Beispiel #1
0
from dream.simulation.imports import MachineJobShop, QueueJobShop, ExitJobShop,  Job
from dream.simulation.Globals import runSimulation

#define the objects of the model
Q1=QueueJobShop('Q1','Queue1', capacity=float("inf"), schedulingRule="RPC")
Q2=QueueJobShop('Q2','Queue2', capacity=float("inf"))
Q3=QueueJobShop('Q3','Queue3', capacity=float("inf"))
M1=MachineJobShop('M1','Machine1')
M2=MachineJobShop('M2','Machine2')
M3=MachineJobShop('M3','Machine3')
E=ExitJobShop('E','Exit')  

#define predecessors and successors for the objects    
Q1.defineRouting(successorList=[M1])
Q2.defineRouting(successorList=[M2])
Q3.defineRouting(successorList=[M3])
M1.defineRouting(predecessorList=[Q1])
M2.defineRouting(predecessorList=[Q2])
M3.defineRouting(predecessorList=[Q3])

#define the routes of the Jobs in the system
J1Route=[{"stationIdsList": ["Q1"]},
         {"stationIdsList": ["M1"],"processingTime":{"distributionType": "Fixed","mean": "1"}},
         {"stationIdsList": ["Q3"]},
         {"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "3"}},
         {"stationIdsList": ["Q2"]},
         {"stationIdsList": ["M2"],"processingTime":{"distributionType": "Fixed","mean": "2"}},
         {"stationIdsList": ["E"],}]
J2Route=[{"stationIdsList": ["Q1"]},
         {"stationIdsList": ["M1"],"processingTime":{"distributionType": "Fixed","mean": "2"}},
         {"stationIdsList": ["Q2"]},
Beispiel #2
0
from dream.simulation.imports import MachineJobShop, QueueJobShop, ExitJobShop, Job, ExcelHandler
from dream.simulation.Globals import runSimulation

#define the objects of the model
Q1=QueueJobShop('Q1','Queue1', capacity=float("inf"))
Q2=QueueJobShop('Q2','Queue2', capacity=float("inf"))
Q3=QueueJobShop('Q3','Queue3', capacity=float("inf"))
M1=MachineJobShop('M1','Machine1')
M2=MachineJobShop('M2','Machine2')
M3=MachineJobShop('M3','Machine3')
E=ExitJobShop('E','Exit')  

#define the route of the Job in the system
route=[{"stationIdsList": ["Q1"]},
         {"stationIdsList": ["M1"],"processingTime":{'Fixed':{'mean':1}}},
         {"stationIdsList": ["Q3"]},
         {"stationIdsList": ["M3"],"processingTime":{'Fixed':{'mean':3}}},
         {"stationIdsList": ["Q2"]},
         {"stationIdsList": ["M2"],"processingTime":{'Fixed':{'mean':2}}},
         {"stationIdsList": ["E"],}]
#define the Jobs
J=Job('J1','Job1',route=route)
   
def main():
    # add all the objects in a list
    objectList=[M1,M2,M3,Q1,Q2,Q3,E,J]  
    # set the length of the experiment  
    maxSimTime=float('inf')
    # call the runSimulation giving the objects and the length of the experiment
    runSimulation(objectList, maxSimTime, trace='Yes')
      
Beispiel #3
0
from dream.simulation.Globals import runSimulation
from dream.simulation.imports import MachineJobShop, QueueJobShop, ExitJobShop, Job

# define the objects of the model
Q1 = QueueJobShop('Q1',
                  'Queue1',
                  capacity=float("inf"),
                  schedulingRule="MC-Priority-EDD")
Q2 = QueueJobShop('Q2', 'Queue2', capacity=float("inf"))
Q3 = QueueJobShop('Q3', 'Queue3', capacity=float("inf"))
M1 = MachineJobShop('M1', 'Machine1')
M2 = MachineJobShop('M2', 'Machine2')
M3 = MachineJobShop('M3', 'Machine3')
E = ExitJobShop('E', 'Exit')

# define predecessors and successors for the objects
Q1.defineRouting(successorList=[M1])
Q2.defineRouting(successorList=[M2])
Q3.defineRouting(successorList=[M3])
M1.defineRouting(predecessorList=[Q1])
M2.defineRouting(predecessorList=[Q2])
M3.defineRouting(predecessorList=[Q3])

# define the routes of the Jobs in the system
J1Route = [{
    "stationIdsList": ["Q1"]
}, {
    "stationIdsList": ["M1"],
    "processingTime": {
        'Fixed': {
            'mean': 1