sampo.schemas.resources#
Overview#
Generic enumeration. |
|
A class summarizing the different resources used in the work: Human resources, equipment, materials, etc. |
|
A class dedicated to human resources |
|
A class summarizing the different resources used in the work: Human resources, equipment, materials, etc. |
|
A class summarizing the different resources used in the work: Human resources, equipment, materials, etc. |
|
A class summarizing the different resources used in the work: Human resources, equipment, materials, etc. |
|
A class summarizing the different resources used in the work: Human resources, equipment, materials, etc. |
Classes#
- class sampo.schemas.resources.WorkerProductivityMode#
Bases:
enum.EnumGeneric enumeration.
Derive from this class to define new enumerations.
- Static = ('static',)#
- Stochastic = 'stochastic'#
- class sampo.schemas.resources.Resource(id: str, name: str, count: int, contractor_id: str | None = '')#
Bases:
sampo.schemas.serializable.AutoJSONSerializable[Equipment],sampo.schemas.identifiable.IdentifiableA class summarizing the different resources used in the work: Human resources, equipment, materials, etc.
- property count#
- id: str#
- name: str#
- count: int#
- contractor_id: str | None = ''#
- get_agent_id() sampo.schemas.types.AgentId#
- class sampo.schemas.resources.Worker(id: str, name: str, count: int, contractor_id: str | None = '', productivity: sampo.schemas.interval.IntervalGaussian | None = IntervalGaussian(1, 0, 1, 1), cost_one_unit: float | None = None)#
Bases:
ResourceA class dedicated to human resources
- Parameters:
count – the number of people in this resource
contractor_id – Contractor id if resources are added directly to the contractor
productivity – interval from Gaussian or Uniform distribution, that contains possible values of
productivity of certain worker
- ignored_fields = ['productivity']#
- copy()#
Return copied current object
- Returns:
object of Worker class
- with_count(count: int) Worker#
Update count field
- Parameters:
count – amount of current type of worker
- Returns:
upgraded current object
- get_cost() float#
Returns cost of this worker entry
- get_agent_id() sampo.schemas.types.AgentId#
Return the agent unique identifier in schedule
- Returns:
contractor’s id and name
- get_productivity(rand: random.Random, productivity_mode: WorkerProductivityMode) float#
Return the productivity of the worker team. It has 2 mods: stochastic and non-stochastic.
- Parameters:
productivity_mode –
rand – parameter for stochastic part
- __repr__()#
Return repr(self).
- __str__()#
Return str(self).
- class sampo.schemas.resources.ConstructionObject(id: str, name: str, count: int, contractor_id: str | None = '')#
Bases:
ResourceA class summarizing the different resources used in the work: Human resources, equipment, materials, etc.
- class sampo.schemas.resources.EmptySpaceConstructionObject(id: str, name: str, count: int, contractor_id: str | None = '')#
Bases:
ConstructionObjectA class summarizing the different resources used in the work: Human resources, equipment, materials, etc.
- id: str = '00000000000000000'#
- name: str = 'empty space construction object'#