simpype.pipeline

SimPype’s pipeline.

class simpype.pipeline.Pipeline(sim, id)

The pipeline connecting the various Resource instances.

Parameters:
  • sim (Simulation) – The SimPype simulation object.
  • id (str) – The pipeline id.
sim

The SimPype simulation object.

Type:Simulation
env

The SimPy environment object.

Type:simpy.Environment
id

The pipeline id.

Type:str
resource

The dictionary storing the connected resources in the form of adjency list.

Type:dict
first

The first resource of the pipeline.

Type:Resource
last

The last resource of the pipeline.

Type:Resource
add_pipe(src, dst)

Add a pipe to the pipeline.

Connect resource src to resource dst.

Parameters:
  • src (Resource) – The source resource of the pipe.
  • dst (Resource) – The destination resource of the pipe.
merge_pipe(pipeline)

Merge pipeline with this pipeline.

Parameters:pipeline (Pipeline) – The pipeline to be merged with this pipeline.