sampo.scheduler.utils.multi_contractor#
Overview#
|
Define for each job each type of workers the min and max possible number of workers. |
|
Performs the best contractor search. |
Functions#
- sampo.scheduler.utils.multi_contractor.get_worker_borders(agents: sampo.schemas.contractor.WorkerContractorPool, contractor: sampo.schemas.contractor.Contractor, work_reqs: list[sampo.schemas.requirements.WorkerReq])#
Define for each job each type of workers the min and max possible number of workers. For max number of workers, max is defined as a minimum from max possible numbers at all and max possible for a current job.
- Parameters:
agents – from all projects
contractor –
work_reqs –
- Returns:
- sampo.scheduler.utils.multi_contractor.run_contractor_search(contractors: list[sampo.schemas.contractor.Contractor], runner: Callable[[sampo.schemas.contractor.Contractor], tuple[sampo.schemas.time.Time, sampo.schemas.time.Time, list[sampo.schemas.resources.Worker]]]) tuple[sampo.schemas.time.Time, sampo.schemas.time.Time, sampo.schemas.contractor.Contractor, list[sampo.schemas.resources.Worker]]#
Performs the best contractor search.
- Parameters:
contractors – contractors’ list
runner – a runner function, should be inner of the calling code. Calculates Tuple[start time, finish time, worker team] from given contractor object.
- Returns:
start time, finish time, the best contractor, worker team with the best contractor