sampo.scheduler.genetic.converter#
Overview#
|
Receive a result of scheduling algorithm and transform it to chromosome |
|
Build schedule from received chromosome |
- |
Functions#
- sampo.scheduler.genetic.converter.convert_schedule_to_chromosome(wg: sampo.schemas.graph.WorkGraph, work_id2index: dict[str, int], worker_name2index: dict[str, int], contractor2index: dict[str, int], contractor_borders: numpy.ndarray, schedule: sampo.schemas.schedule.Schedule, spec: sampo.schemas.schedule_spec.ScheduleSpec, order: list[sampo.schemas.graph.GraphNode] | None = None) ChromosomeType#
Receive a result of scheduling algorithm and transform it to chromosome
- Parameters:
wg –
work_id2index –
worker_name2index –
contractor2index –
contractor_borders –
schedule –
spec –
order – if passed, specify the node order that should appear in the chromosome
- Returns:
- sampo.scheduler.genetic.converter.convert_chromosome_to_schedule(chromosome: ChromosomeType, worker_pool: sampo.schemas.contractor.WorkerContractorPool, index2node: dict[int, sampo.schemas.graph.GraphNode], index2contractor: dict[int, sampo.schemas.contractor.Contractor], worker_pool_indices: dict[int, dict[int, sampo.schemas.resources.Worker]], worker_name2index: dict[str, int], contractor2index: dict[str, int], landscape: sampo.schemas.landscape.LandscapeConfiguration = LandscapeConfiguration(), timeline: sampo.scheduler.timeline.base.Timeline | None = None, assigned_parent_time: sampo.schemas.time.Time = Time(0), work_estimator: sampo.schemas.time_estimator.WorkTimeEstimator = DefaultWorkEstimator()) tuple[dict[sampo.schemas.graph.GraphNode, sampo.schemas.schedule.ScheduledWork], sampo.schemas.time.Time, sampo.scheduler.timeline.base.Timeline, list[sampo.schemas.graph.GraphNode]]#
Build schedule from received chromosome It can be used in visualization of final solving of genetic algorithm
Attributes#
- sampo.scheduler.genetic.converter.ChromosomeType#