sampo.schemas.time_estimator#
Overview#
Generic enumeration. |
|
Implementation of time estimator of work with a given set of resources. |
|
Implementation of time estimator of work with a given set of resources. |
|
- |
Classes#
- class sampo.schemas.time_estimator.WorkEstimationMode#
Bases:
enum.EnumGeneric enumeration.
Derive from this class to define new enumerations.
- Pessimistic = ()#
- Realistic = (0,)#
- Optimistic = 1#
- class sampo.schemas.time_estimator.WorkTimeEstimator#
Bases:
abc.ABCImplementation of time estimator of work with a given set of resources.
- abstract set_estimation_mode(use_idle: bool = True, mode: WorkEstimationMode = WorkEstimationMode.Realistic)#
- abstract set_productivity_mode(mode: sampo.schemas.resources.WorkerProductivityMode = WorkerProductivityMode.Static)#
- abstract find_work_resources(work_name: str, work_volume: float, resource_name: list[str] = None) dict[str, int]#
- abstract estimate_time(work_unit: sampo.schemas.works.WorkUnit, worker_list: list[sampo.schemas.resources.Worker])#
- class sampo.schemas.time_estimator.DefaultWorkEstimator(rand: random.Random = Random())#
Bases:
WorkTimeEstimatorImplementation of time estimator of work with a given set of resources.
- find_work_resources(work_name: str, work_volume: float, resource_name: list[str] | None = None) dict[str, int]#
- set_estimation_mode(use_idle: bool = True, mode: WorkEstimationMode = WorkEstimationMode.Realistic)#
- set_productivity_mode(mode: sampo.schemas.resources.WorkerProductivityMode = WorkerProductivityMode.Static)#
- estimate_static(work_unit: sampo.schemas.works.WorkUnit, worker_list: list[sampo.schemas.resources.Worker]) sampo.schemas.time.Time#
Calculate summary time of task execution (without stochastic part)
- Parameters:
work_unit –
worker_list –
- Returns:
time of task execution
- estimate_time(work_unit: sampo.schemas.works.WorkUnit, worker_list: list[sampo.schemas.resources.Worker]) sampo.schemas.time.Time#
- static get_productivity_of_worker(worker: sampo.schemas.resources.Worker, rand: random.Random | None = None, max_groups: int = 0, productivity_mode: sampo.schemas.resources.WorkerProductivityMode = WorkerProductivityMode.Static)#
Calculate the productivity of the Worker It has 2 mods: stochastic and non-stochastic, depending on the value of rand
- Parameters:
productivity_mode –
max_groups –
worker – the worker
rand – parameter for stochastic part
- Returns:
productivity of received worker
Functions#
- sampo.schemas.time_estimator.communication_coefficient(groups_count: int, max_groups: int) float#