sampo.scheduler.utils.multi_contractor#

Overview#

Function#

get_worker_borders(agents, contractor, work_reqs)

Define for each job each type of workers the min and max possible number of workers.

run_contractor_search(contractors, runner)

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:

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