Commit 4239ba05 authored by Jérome Perrin's avatar Jérome Perrin

CapacityStationController: use same keys than job shop for output schedule

parent b9843a8d
......@@ -74,8 +74,8 @@ class CapacityStationController(EventGenerator):
project=entity.capacityProject
# output the finish time of the project. This will updated every time, so in the end it should be correct
for entry in project.projectSchedule:
if entry['station']==station.id:
entry['finish']=self.env.now
if entry['stationId']==station.id:
entry['exitTime']=self.env.now
# lock the exit again
exit.isLocked=True
......@@ -124,7 +124,10 @@ class CapacityStationController(EventGenerator):
'allocation':entity.requiredCapacity})
capacityAllocated+=entity.requiredCapacity
if self.checkIfProjectJustStartsInStation(project, station):
project.projectSchedule.append({"station": station.id,"start": self.env.now})
project.projectSchedule.append({
"stationId": station.id,
"entranceTime": self.env.now})
# lock the station
station.isLocked=True
# calculate the utilization
......@@ -250,7 +253,7 @@ class CapacityStationController(EventGenerator):
# checks if a project is just starting in station
def checkIfProjectJustStartsInStation(self, project, station):
for entry in project.projectSchedule:
if entry['station']==station.id:
if entry['stationId']==station.id:
return False
return True
\ No newline at end of file
......@@ -9,15 +9,6 @@
"_class": "Dream.CapacityStationBuffer",
"id": "CB2"
},
{
"_class": "Dream.Exit",
"id": "CE1",
"results": {
"lifespan": 1.5,
"takt_time": 0.5,
"throughput": 4
}
},
{
"_class": "Dream.Exit",
"id": "CE2",
......@@ -135,14 +126,14 @@
"results": {
"schedule": [
{
"finish": 2.0,
"start": 0.0,
"station": "CS1"
"entranceTime": 0.0,
"exitTime": 2.0,
"stationId": "CS1"
},
{
"finish": 3.0,
"start": 1.0,
"station": "CS2"
"entranceTime": 1.0,
"exitTime": 3.0,
"stationId": "CS2"
}
]
}
......@@ -153,14 +144,14 @@
"results": {
"schedule": [
{
"finish": 2.0,
"start": 0.0,
"station": "CS1"
"entranceTime": 0.0,
"exitTime": 2.0,
"stationId": "CS1"
},
{
"finish": 3.0,
"start": 1.0,
"station": "CS2"
"entranceTime": 1.0,
"exitTime": 3.0,
"stationId": "CS2"
}
]
}
......
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