Commit 42b601cb authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Sebastien Robin

main script updated in order to read Job data and create the job. Also...

main script updated in order to read Job data and create the job. Also Jobshop1 topology modified to match new JSON format
parent 5b3282e1
{
"_class": "Dream.Simulation",
"edges": {
"0": [
"M1",
"Q1",
{}
],
"1": [
"M2",
"Q2",
{}
],
"2": [
"M3",
"Q3",
{}
]
},
"general": {
"_class": "Dream.Configuration",
"numberOfReplications": "1",
......@@ -7,10 +24,9 @@
"trace": "Yes",
"confidenceLevel": "0.95"
},
"elementList": [
{
"nodes": {
"M1": {
"_class": "Dream.Machine",
"id": "M1",
"name": "Machine1",
"processingTime": {
"distributionType": "Fixed",
......@@ -20,12 +36,10 @@
"failureDistribution": "No",
"MTTF": "60",
"MTTR": "5"
},
"successorList": []
}
},
{
"M2": {
"_class": "Dream.Machine",
"id": "M2",
"name": "Machine2",
"processingTime": {
"distributionType": "Fixed",
......@@ -35,12 +49,10 @@
"failureDistribution": "No",
"MTTF": "40",
"MTTR": "10"
},
"successorList": []
}
},
{
"M3": {
"_class": "Dream.Machine",
"id": "M3",
"name": "Machine3",
"processingTime": {
"distributionType": "Fixed",
......@@ -50,47 +62,33 @@
"failureDistribution": "No",
"MTTF": "40",
"MTTR": "10"
},
"successorList": []
}
},
{
"Q1": {
"_class": "Dream.Queue",
"id": "Q1",
"name": "Queue1",
"isDummy": "0",
"capacity": "1000",
"successorList": [
"M1"
]
"capacity": "1000"
},
{
"Q2": {
"_class": "Dream.Queue",
"id": "Q2",
"name": "Queue2",
"isDummy": "0",
"capacity": "1000",
"successorList": [
"M2"
]
"capacity": "1000"
},
{
"Q3": {
"_class": "Dream.Queue",
"id": "Q3",
"name": "Queue3",
"isDummy": "0",
"capacity": "1000",
"successorList": [
"M3"
]
"capacity": "1000"
},
{
"E1": {
"_class": "Dream.Exit",
"id": "E1",
"name": "Exit"
},
{
"J1": {
"_class": "Dream.Job",
"id": "J1",
"name": "Job1",
"route": [
{
......@@ -123,5 +121,5 @@
}
]
}
]
}
}
\ No newline at end of file
......@@ -41,8 +41,8 @@
"_class": "Dream.Configuration",
"confidenceLevel": "0.95",
"maxSimTime": "1440",
"numberOfReplications": "2",
"trace": "No"
"numberOfReplications": "1",
"trace": "Yes"
},
"nodes": {
"DummyQ": {
......
......@@ -39,6 +39,7 @@ class Job(Entity):
self.fullRoute=route #the route that the job follows, also contains the processing times in each station
self.remainingRoute=route #the remaining route. in the beginning this should be the same as the full route
self.currentStop=route[0][0] #the starting stop should be the first in the route
......
......@@ -63,6 +63,7 @@ from Frame import Frame
from Assembly import Assembly
from Dismantle import Dismantle
from Conveyer import Conveyer
from Job import Job
import xlwt
import xlrd
import time
......@@ -108,6 +109,9 @@ def createObjects():
G.AssemblyList=[]
G.DismantleList=[]
G.ConveyerList=[]
G.JobList=[]
G.WipList=[]
G.EntityList=[]
#loop through all the model resources
......@@ -243,16 +247,15 @@ def createObjects():
JSONRoute=element.get('route', [])
route=[]
for routeElement in JSONRoute:
print routeElement
nextId=routeElement.get('stationId', 'not found')
processingTime=routeElement.get('processingTime', 'not found')
distributionType=processingTime.get('distributionType', 'not found')
mean=int(processingTime.get('mean', 'not found'))
print nextId, distributionType, mean
route.append([nextId, mean])
print route[0][0]
J=Job(id, name, route)
G.JobList.append(J)
G.WipList.append(J)
G.EntityList.append(J)
#loop through all the core objects
#to read predecessors
......
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