Commit 795e0b24 authored by Jérome Perrin's avatar Jérome Perrin

DemandPlanning: port to Simpy3

Conflicts:
	dream/simulation/LineGenerationJSON.py
parent 16248954
......@@ -14,7 +14,6 @@ import xlrd
from AllocationRoutine import AllocationRoutine
from CoreObject import CoreObject
from Globals import G
from SimPy.Simulation import hold
from ObjectInterruption import ObjectInterruption
from FutureDemandCreator import FutureDemandCreator
......@@ -29,7 +28,7 @@ class AllocationManagement(ObjectInterruption):
def run(self):
self.FDC.run()
yield hold,self,0
yield G.env.timeout(0)
for kWeek in range(int(G.maxSimTime)):
# activate allocation procedure for future items at target week
procedureFuture = AllocationRoutine(initialWeek=kWeek, itemType=1)
......
......@@ -382,6 +382,7 @@ def createObjectInterruptions():
G.ObjectInterruptionList.append(SS)
G.ShiftSchedulerList.append(SS)
# ===========================================================================
# creates the entities that are wip
# ===========================================================================
......@@ -541,9 +542,10 @@ def initializeObjects():
# activates all the objects
# ===========================================================================
def activateObjects():
for element in G.ObjList + G.ObjectInterruptionList:
G.env.process(element.run())
# XXX EventGeneratorList
for element in G.ObjList + G.ObjectInterruptionList + G.AllocationManagementList:
G.env.process(element.run())
# ===========================================================================
# the main script that is ran
# ===========================================================================
......
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