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

Topology76 added as a first test. Not working yet

parent 93f92611
......@@ -57,11 +57,10 @@ class CapacityStationController(EventGenerator):
print 1
# unlock all the capacity station exits
for exit in G.CapacityStationExitList:
exit.isLocked==False
exit.isLocked=False
# Send canDispose to all the Stations
print 2
for station in G.CapacityStationList:
print station.id
station.canDispose.succeed()
# give control until all the Stations become empty
print 3
......@@ -70,7 +69,7 @@ class CapacityStationController(EventGenerator):
print 4
# Lock all StationExits canAccept
for exit in G.CapacityStationExitList:
exit.isLocked==True
exit.isLocked=True
# Calculate from the last moves in Station->StationExits
# what should be created in StationBuffers and create it
print 5
......@@ -91,6 +90,10 @@ class CapacityStationController(EventGenerator):
print 9
while not self.checkIfBuffersFinished():
yield self.env.timeout(0)
print 10
# for every station update the remaining interval capacity so that it is ready for next loop
for station in G.CapacityStationList:
station.remainingIntervalCapacity.pop(0)
self.stepsAreComplete.succeed()
def checkIfStationsEmpty(self):
......@@ -103,7 +106,17 @@ class CapacityStationController(EventGenerator):
pass
def calculateWhatIsToBeProcessed(self):
pass
# loop through the capacity station buffers
for buffer in G.CapacityStationBufferList:
totalRequestedCapacity=0
print buffer.next
totalAvailableCapacity=buffer.next[0].remainingIntervalCapacity[0]
for entity in buffer.getActiveObjectQueue():
totalRequestedCapacity+=entity.requiredCapacity
if totalRequestedCapacity<=totalAvailableCapacity:
for entity in buffer.getActiveObjectQueue():
pass
#entity.shouldMove=True
def checkIfBuffersFinished(self):
for buffer in G.CapacityStationBufferList:
......
{
"_class": "Dream.Simulation",
"edges": {
"0": [
"CB1",
"CS1",
{}
],
"1": [
"CS1",
"CE1",
{}
],
"2": [
"CB2",
"CS2",
{}
],
"3": [
"CS2",
"CE2",
{}
]
},
"general": {
"_class": "Dream.Configuration",
"confidenceLevel": "0.95",
"maxSimTime": "2.1",
"numberOfReplications": "1",
"trace": "Yes"
},
"nodes": {
"CB1": {
"_class": "Dream.CapacityStationBuffer",
"name": "SMFBuffer",
"wip": [
{
"_class": "Dream.CapacityEntity",
"capacityProjectId": "P1",
"name": "P1_SMF_100",
"requiredCapacity": 100
},
{
"_class": "Dream.CapacityEntity",
"capacityProjectId": "P2",
"name": "P2_SMF_50",
"requiredCapacity": 50
}
]
},
"CS1": {
"_class": "Dream.CapacityStation",
"name": "SMF",
"intervalCapacity": [
100,
200,
300
]
},
"CE1": {
"_class": "Dream.CapacityStationExit",
"nextCapacityStationBufferId": "CB2",
"name": "SMFExit"
},
"CB2": {
"_class": "Dream.CapacityStationBuffer",
"name": "WELDBuffer"
},
"CS2": {
"_class": "Dream.CapacityStation",
"name": "WELD",
"intervalCapacity": [
150,
60,
350
]
},
"CE2": {
"_class": "Dream.CapacityStationExit",
"nextCapacityStationBufferId": "CB2",
"name": "WELDExit"
},
"QD": {
"_class": "Dream.Queue",
"capacity": "-1",
"id": "QD",
"name": "DUMMY",
"wip": [
{
"_class": "Dream.CapacityProject",
"id": "P1",
"name": "P1",
"capacityRequirementDict": {
"CS1": 100,
"CS2": 50
}
},
{
"_class": "Dream.CapacityProject",
"id": "P2",
"name": "P2",
"capacityRequirementDict": {
"CS1": 50,
"CS2": 100
}
}
]
},
"CSC": {
"_class": "Dream.CapacityStationController",
"name": "CSC",
"start": "0",
"interval": "1",
"method": "Dream.None"
}
}
}
\ No newline at end of file
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