sampo.pipeline#

Submodules#

Overview#

Classes#

InputPipeline

Base class to build different pipeline, that help to use the framework

DefaultInputPipeline

Default pipeline, that help to use the framework

PipelineType

Generic enumeration.

SchedulingPipeline

-

Classes#

class sampo.pipeline.InputPipeline#

Bases: abc.ABC

Base class to build different pipeline, that help to use the framework

abstract wg(wg: sampo.schemas.graph.WorkGraph | pandas.DataFrame | str, full_connection: bool = False, change_base_on_history: bool = False) InputPipeline#
abstract contractors(contractors: list[sampo.schemas.contractor.Contractor] | pandas.DataFrame | str) InputPipeline#
abstract name_mapper(name_mapper: sampo.utilities.task_name.NameMapper) InputPipeline#
abstract history(history: pandas.DataFrame | str) InputPipeline#
abstract landscape(landscape_config: sampo.schemas.landscape.LandscapeConfiguration) InputPipeline#
abstract spec(spec: sampo.schemas.schedule_spec.ScheduleSpec) InputPipeline#
abstract time_shift(time: sampo.schemas.time.Time) InputPipeline#
abstract lag_optimize(lag_optimize: sampo.pipeline.lag_optimization.LagOptimizationStrategy) InputPipeline#

Mandatory argument. Shows should graph be lag-optimized or not. If not defined, pipeline should search the best variant of this argument in result.

Parameters:

lag_optimize

Returns:

the pipeline object

abstract work_estimator(work_estimator: sampo.schemas.time_estimator.WorkTimeEstimator) InputPipeline#
abstract node_order(node_order: list[sampo.schemas.graph.GraphNode]) InputPipeline#
abstract optimize_local(optimizer: sampo.scheduler.utils.local_optimization.OrderLocalOptimizer, area: range) InputPipeline#
abstract schedule(scheduler: sampo.scheduler.base.Scheduler) SchedulePipeline#
class sampo.pipeline.DefaultInputPipeline#

Bases: sampo.pipeline.base.InputPipeline

Default pipeline, that help to use the framework

wg(wg: sampo.schemas.graph.WorkGraph | pandas.DataFrame | str, is_wg_has_full_info_about_connections: bool = False, change_base_on_history: bool = False) sampo.pipeline.base.InputPipeline#

Mandatory argument.

Parameters:
  • change_base_on_history – whether it is necessary to change project information based on connection history data

  • is_wg_has_full_info_about_connections – does the project information contain full details of the works

  • wg – the WorkGraph object for scheduling task

Returns:

the pipeline object

contractors(contractors: list[sampo.schemas.contractor.Contractor] | pandas.DataFrame | str) sampo.pipeline.base.InputPipeline#

Mandatory argument.

Parameters:

contractors – the contractors list for scheduling task

Returns:

the pipeline object

landscape(landscape_config: sampo.schemas.landscape.LandscapeConfiguration) sampo.pipeline.base.InputPipeline#

Set landscape configuration

Parameters:

landscape_config

Returns:

name_mapper(name_mapper: sampo.utilities.task_name.NameMapper) sampo.pipeline.base.InputPipeline#

Set works’ name mapper :param name_mapper: :return:

history(history: pandas.DataFrame | str) sampo.pipeline.base.InputPipeline#

Set historical data. Mandatory method, if work graph hasn’t info about links :param history: :return:

spec(spec: sampo.schemas.schedule_spec.ScheduleSpec) sampo.pipeline.base.InputPipeline#

Set specification of schedule

Parameters:

spec

Returns:

time_shift(time: sampo.schemas.time.Time) sampo.pipeline.base.InputPipeline#

If the schedule should start at a certain time

Parameters:

time

Returns:

lag_optimize(lag_optimize: sampo.pipeline.lag_optimization.LagOptimizationStrategy) sampo.pipeline.base.InputPipeline#

Mandatory argument. Shows should graph be lag-optimized or not. If not defined, pipeline should search the best variant of this argument in result.

Parameters:

lag_optimize

Returns:

the pipeline object

work_estimator(work_estimator: sampo.schemas.time_estimator.WorkTimeEstimator) sampo.pipeline.base.InputPipeline#
node_order(node_order: list[sampo.schemas.graph.GraphNode]) sampo.pipeline.base.InputPipeline#
optimize_local(optimizer: sampo.scheduler.utils.local_optimization.OrderLocalOptimizer, area: range) sampo.pipeline.base.InputPipeline#
schedule(scheduler: sampo.scheduler.base.Scheduler) sampo.pipeline.base.SchedulePipeline#
static _check_is_contractors_can_perform_work_graph(contractors: list[sampo.schemas.contractor.Contractor], wg: sampo.schemas.graph.WorkGraph) bool#
class sampo.pipeline.PipelineType#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

DEFAULT = 0#
class sampo.pipeline.SchedulingPipeline#
static create(pipeline_type: PipelineType = PipelineType.DEFAULT) base.InputPipeline#