sampo.generator.environment.contractor_by_wg#
Overview#
Generic enumeration. |
|
Sets the function by which the number for the function of searching for a contractor by the graph of works |
|
Creates a pool of contractor resources based on job requirements, selecting the maximum specified parameter |
Classes#
Functions#
- sampo.generator.environment.contractor_by_wg._value_by_req(method: ContractorGenerationMethod, req: sampo.schemas.requirements.WorkerReq) int#
Sets the function by which the number for the function of searching for a contractor by the graph of works is determined by the given parameter
- Parameters:
method – type the specified parameter: min ~ min_count, max ~ max_count, avg ~ (min_count + max_count) / 2
req – the Worker Req
- Returns:
- sampo.generator.environment.contractor_by_wg.get_contractor_by_wg(wg: sampo.schemas.graph.WorkGraph, scaler: float | None = 1, method: ContractorGenerationMethod = ContractorGenerationMethod.AVG) sampo.schemas.contractor.Contractor#
Creates a pool of contractor resources based on job requirements, selecting the maximum specified parameter
- Parameters:
wg – The graph of works for which it is necessary to find a set of resources
scaler – Multiplier for the number of resources in the contractor
method – type the specified parameter: min ~ min_count, max ~ max_count, avg ~ (min_count + max_count) / 2
- Returns:
Contractor capable of completing the work schedule