sampo.scheduler.timeline.material_timeline#

Overview#

Classes#

SupplyTimeline

-

Classes#

class sampo.scheduler.timeline.material_timeline.SupplyTimeline(landscape_config: sampo.schemas.landscape.LandscapeConfiguration)#
property resource_sources#
find_min_material_time(id: str, start_time: sampo.schemas.time.Time, materials: list[sampo.schemas.resources.Material], batch_size: int) sampo.schemas.time.Time#
deliver_materials(id: str, start_time: sampo.schemas.time.Time, finish_time: sampo.schemas.time.Time, materials: list[sampo.schemas.resources.Material], batch_size: int) tuple[list[sampo.schemas.landscape.MaterialDelivery], sampo.schemas.time.Time, sampo.schemas.time.Time]#

Models material delivery.

Delivery performed in batches sized by batch_size.

Returns:

pair of material-driven minimum start and finish times

_find_best_supply(material: str, count: int, deadline: sampo.schemas.time.Time) str#
supply_resources(work_id: str, deadline: sampo.schemas.time.Time, materials: list[sampo.schemas.resources.Material], simulate: bool, min_supply_start_time: sampo.schemas.time.Time = Time(0)) tuple[sampo.schemas.landscape.MaterialDelivery, sampo.schemas.time.Time]#

Finds minimal time that given materials can be supplied, greater than given start time

Parameters:
  • work_id – work id

  • deadline – the time work starts

  • materials – material resources that are required to start

  • simulate – should timeline only find minimum supply time and not change timeline

  • min_supply_start_time

Returns:

material deliveries, the time when resources are ready