Commit a5260c2f authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

JobShop examples updated to follow new notation

parent 9f334383
......@@ -18,8 +18,16 @@ E=ExitJobShop('E','Exit')
G.ObjList=[M1,M2,M3,Q1,Q2,Q3,E] #add all the objects in G.ObjList so that they can be easier accessed later
#define the route of the Job 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"],}]
#define the Jobs
J=Job('J1','Job1',route=[['Q1',0],['M1',1],['Q3',0],['M3',3],['Q2',0],['M2',2],['E',0]])
J=Job('J1','Job1',route=J1Route)
G.EntityList=[J] #a list to hold all the jobs
initialize() #initialize the simulation (SimPy method)
......
......@@ -20,8 +20,16 @@ E=ExitJobShop('E','Exit')
G.ObjList=[M1,M2,M3,Q1,Q2,Q3,E] #add all the objects in G.ObjList so that they can be easier accessed later
#define the route of the Job 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"],}]
#define the Jobs
J=Job('J1','Job1',route=[['Q1',0],['M1',1],['Q3',0],['M3',3],['Q2',0],['M2',2],['E',0]])
J=Job('J1','Job1',route=J1Route)
G.EntityList=[J] #a list to hold all the jobs
initialize() #initialize the simulation (SimPy method)
......
......@@ -25,10 +25,31 @@ 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"]},
{"stationIdsList": ["M2"],"processingTime":{"distributionType": "Fixed","mean": "4"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "6"}},
{"stationIdsList": ["E"],}]
J3Route=[{"stationIdsList": ["Q1"]},
{"stationIdsList": ["M1"],"processingTime":{"distributionType": "Fixed","mean": "10"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "3"}},
{"stationIdsList": ["E"],}]
#define the Jobs
J1=Job('J1','Job1',[['Q1',0],['M1',1],['Q3',0],['M3',3],['Q2',0],['M2',2],['E',0]], priority=1, dueDate=100)
J2=Job('J2','Job2',[['Q1',0],['M1',2],['Q2',0],['M2',4],['Q3',0],['M3',6],['E',0]], priority=1, dueDate=90)
J3=Job('J3','Job3',[['Q1',0],['M1',10],['Q3',0],['M3',3],['E',0]], priority=0, dueDate=110)
J1=Job('J1','Job1',route=J1Route, priority=1, dueDate=100)
J2=Job('J2','Job2',route=J2Route, priority=1, dueDate=90)
J3=Job('J3','Job3',route=J3Route, priority=0, dueDate=110)
G.JobList=[J1,J2,J3] #a list to hold all the jobs
G.maxSimTime=1440.0 #set G.maxSimTime 1440.0 minutes (1 day)
......
......@@ -25,10 +25,31 @@ 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"]},
{"stationIdsList": ["M2"],"processingTime":{"distributionType": "Fixed","mean": "4"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "6"}},
{"stationIdsList": ["E"],}]
J3Route=[{"stationIdsList": ["Q1"]},
{"stationIdsList": ["M1"],"processingTime":{"distributionType": "Fixed","mean": "10"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "3"}},
{"stationIdsList": ["E"],}]
#define the Jobs
J1=Job('J1','Job1',[['Q1',0],['M1',1],['Q3',0],['M3',3],['Q2',0],['M2',2],['E',0]], priority=1, dueDate=100)
J2=Job('J2','Job2',[['Q1',0],['M1',2],['Q2',0],['M2',4],['Q3',0],['M3',6],['E',0]], priority=1, dueDate=90)
J3=Job('J3','Job3',[['Q1',0],['M1',10],['Q3',0],['M3',3],['E',0]], priority=0, dueDate=110)
J1=Job('J1','Job1',route=J1Route, priority=1, dueDate=100)
J2=Job('J2','Job2',route=J2Route, priority=1, dueDate=90)
J3=Job('J3','Job3',route=J3Route, priority=0, dueDate=110)
G.JobList=[J1,J2,J3] #a list to hold all the jobs
G.maxSimTime=1440.0 #set G.maxSimTime 1440.0 minutes (1 day)
......
......@@ -25,10 +25,31 @@ 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"]},
{"stationIdsList": ["M2"],"processingTime":{"distributionType": "Fixed","mean": "4"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "6"}},
{"stationIdsList": ["E"],}]
J3Route=[{"stationIdsList": ["Q1"]},
{"stationIdsList": ["M1"],"processingTime":{"distributionType": "Fixed","mean": "10"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "3"}},
{"stationIdsList": ["E"],}]
#define the Jobs
J1=Job('J1','Job1',[['Q1',0],['M1',1],['Q3',0],['M3',3],['Q2',0],['M2',2],['E',0]], priority=1, dueDate=100)
J2=Job('J2','Job2',[['Q1',0],['M1',2],['Q2',0],['M2',4],['Q3',0],['M3',6],['E',0]], priority=1, dueDate=90)
J3=Job('J3','Job3',[['Q1',0],['M1',10],['Q3',0],['M3',3],['E',0]], priority=0, dueDate=110)
J1=Job('J1','Job1',route=J1Route, priority=1, dueDate=100)
J2=Job('J2','Job2',route=J2Route, priority=1, dueDate=90)
J3=Job('J3','Job3',route=J3Route, priority=0, dueDate=110)
G.JobList=[J1,J2,J3] #a list to hold all the jobs
G.maxSimTime=1440.0 #set G.maxSimTime 1440.0 minutes (1 day)
......
......@@ -7,7 +7,7 @@ from simulation.Globals import G
import simulation.Globals as Globals
#define the objects of the model
Q1=QueueJobShop('Q1','Queue1', capacity=infinity, schedulingRule="RPC")
Q1=QueueJobShop('Q1','Queue1', capacity=infinity, schedulingRule="LPT")
Q2=QueueJobShop('Q2','Queue2', capacity=infinity)
Q3=QueueJobShop('Q3','Queue3', capacity=infinity)
M1=MachineJobShop('M1','Machine1')
......@@ -25,10 +25,31 @@ 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"]},
{"stationIdsList": ["M2"],"processingTime":{"distributionType": "Fixed","mean": "4"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "6"}},
{"stationIdsList": ["E"],}]
J3Route=[{"stationIdsList": ["Q1"]},
{"stationIdsList": ["M1"],"processingTime":{"distributionType": "Fixed","mean": "10"}},
{"stationIdsList": ["Q3"]},
{"stationIdsList": ["M3"],"processingTime":{"distributionType": "Fixed","mean": "3"}},
{"stationIdsList": ["E"],}]
#define the Jobs
J1=Job('J1','Job1',[['Q1',0],['M1',1],['Q3',0],['M3',3],['Q2',0],['M2',2],['E',0]], priority=1, dueDate=100)
J2=Job('J2','Job2',[['Q1',0],['M1',2],['Q2',0],['M2',4],['Q3',0],['M3',6],['E',0]], priority=1, dueDate=90)
J3=Job('J3','Job3',[['Q1',0],['M1',10],['Q3',0],['M3',3],['E',0]], priority=0, dueDate=110)
J1=Job('J1','Job1',route=J1Route, priority=1, dueDate=100)
J2=Job('J2','Job2',route=J2Route, priority=1, dueDate=90)
J3=Job('J3','Job3',route=J3Route, priority=0, dueDate=110)
G.JobList=[J1,J2,J3] #a list to hold all the jobs
G.maxSimTime=1440.0 #set G.maxSimTime 1440.0 minutes (1 day)
......
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