sampo.schemas.requirements#

Overview#

Classes#

BaseReq

A class summarizing any requirements for the work to be performed related to renewable and non-renewable

WorkerReq

Requirements related to renewable human resources

EquipmentReq

Requirements for renewable non-human resources: equipment, trucks, machines, etc

MaterialReq

Requirements for non-renewable materials: consumables, spare parts, construction materials

ConstructionObjectReq

Requirements for infrastructure and the construction of other facilities: electricity, pipelines, roads, etc

Attributes#

DEFAULT_MAX_COUNT

-

Classes#

class sampo.schemas.requirements.BaseReq#

Bases: sampo.schemas.serializable.AutoJSONSerializable[BaseReq], abc.ABC

A class summarizing any requirements for the work to be performed related to renewable and non-renewable resources, infrastructure requirements, etc.

abstract property name: str#

Returns the name of the claim if it exists, e.g. ‘dig work claim’.

Return name:

the name of req

class sampo.schemas.requirements.WorkerReq#

Bases: BaseReq

Requirements related to renewable human resources

Parameters:
  • kind – type of resource/profession

  • volume – volume of work in time units

  • min_count – minimum number of employees needed to perform the work

  • max_count – maximum allowable number of employees performing the work

  • name – the name of this requirement

kind: str#
volume: sampo.schemas.time.Time#
min_count: int | None = 1#
max_count: int | None#
name: str | None = ''#
scale_all(scalar: float, new_name: str | None = '') WorkerReq#

The function scales the requirement to the size of the work including the total volume and the maximum number of personnel involved.

Parameters:
  • scalar – scalar for multiplication

  • new_name – name for new req

Return new_req:

new object with new volume of the work and extended max_count_commands

scale_volume(scalar: float, new_name: str | None = None) WorkerReq#

The function scales only volume of the work for the requirement.

Parameters:
  • scalar – scalar for multiplication

  • new_name – name for new req

Return new_req:

new object with new volume of the work.

class sampo.schemas.requirements.EquipmentReq#

Bases: BaseReq

Requirements for renewable non-human resources: equipment, trucks, machines, etc

Parameters:
  • kind – type of resource/profession

  • name – the name of this requirement

kind: str#
count: int#
name: str | None#
class sampo.schemas.requirements.MaterialReq#

Bases: BaseReq

Requirements for non-renewable materials: consumables, spare parts, construction materials

Parameters:
  • kind – type of resource/profession

  • name – the name of this requirement

kind: str#
count: int#
name: str | None#
material()#
class sampo.schemas.requirements.ConstructionObjectReq#

Bases: BaseReq

Requirements for infrastructure and the construction of other facilities: electricity, pipelines, roads, etc

Parameters:
  • kind – type of resource/profession

  • name – the name of this requirement

kind: str#
count: int#
name: str | None#

Attributes#

sampo.schemas.requirements.DEFAULT_MAX_COUNT = 100#