Commit 37d4047e authored by Georgios Dagkakis's avatar Georgios Dagkakis

SingleServer Example updated to have a buffer

parent ce794484
No preview for this file type
No preview for this file type
from dream.simulation.imports import Machine, Source, Exit, Part
from dream.simulation.imports import Source, Queue, Machine, Exit
from dream.simulation.Globals import runSimulation
#define the objects of the model
S=Source('S1','Source',interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part')
Q=Queue('Q1','Queue', capacity=1)
M=Machine('M1','Machine', processingTime={'distributionType':'Fixed','mean':0.25})
E=Exit('E1','Exit')
#define predecessors and successors for the objects
S.defineRouting(successorList=[M])
M.defineRouting(predecessorList=[S],successorList=[E])
S.defineRouting(successorList=[Q])
Q.defineRouting(predecessorList=[S],successorList=[M])
M.defineRouting(predecessorList=[Q],successorList=[E])
E.defineRouting(predecessorList=[M])
def main(test=0):
# add all the objects in a list
objectList=[S,M,E]
objectList=[S,Q,M,E]
# set the length of the experiment
maxSimTime=1440.0
# call the runSimulation giving the objects and the length of the experiment
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment