Commit 7dbbc9bb authored by Georgios Dagkakis's avatar Georgios Dagkakis

if stations share resources there is no need that input defines the interval...

if stations share resources there is no need that input defines the interval capacity in all of them
parent 3e7554c7
......@@ -53,6 +53,16 @@ class CapacityStation(Queue):
def initialize(self):
Queue.initialize(self)
# if the station shares resources and the capacity is not defined in this
# then read it from some other of the sharing stations
if not self.intervalCapacity and self.sharedResources:
for stationId in self.sharedResources.get('stationIds',[]):
import Globals
station=Globals.findObjectById(stationId)
if station.intervalCapacity:
self.intervalCapacity=station.intervalCapacity
break
# initialize variables
self.remainingIntervalCapacity=list(self.intervalCapacity)
self.isLocked=True
self.utilisationDict=[] # a list of dicts for the utilization results
......
......@@ -80,14 +80,6 @@
"CS2": {
"_class": "Dream.CapacityStation",
"name": "ASBTST",
"intervalCapacity": [
80,
50,
300,
100,
200,
300
],
"sharedResources": {
"stationIds": [
"CS1"
......
......@@ -45,14 +45,6 @@
"CS1": {
"_class": "Dream.CapacityStation",
"name": "PPASB",
"intervalCapacity": [
80,
50,
300,
100,
200,
300
],
"sharedResources": {
"stationIds": [
"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