Commit 004b38b9 authored by Georgios Dagkakis's avatar Georgios Dagkakis

allocation algorithms changed in order to work with the JSON input. Still...

allocation algorithms changed in order to work with the JSON input. Still verification work to be done
parent 300a2574
......@@ -17,7 +17,7 @@ from dream.simulation.Globals import G
class AllocManagement():
def Run(self):
G.CurrentCapacityDict=G.CapacityDict
for kWeek in range(G.planningHorizon):
# activate allocation procedure for future items at target week
procedureFuture = AllocationRoutine(initialWeek=kWeek, itemType=1)
......@@ -26,9 +26,9 @@ class AllocManagement():
# activate allocation procedure for PPOS items at target week
procedurePPOS = AllocationRoutine(initialWeek=G.TargetPPOSweek, itemType=0)
procedurePPOS.Run()
G.reCapacity.append(G.currentCapacity)
k=0
print 'excess future', [i.orderID for i in G.ExcessFutureBuffer[k]], [i.qty for i in G.ExcessFutureBuffer[k]]
This diff is collapsed.
......@@ -2,11 +2,11 @@
Created on 5 Sep 2013
@author: Anna
'''
from dream.simulation.Globals import G
from Allocation import Allocation
from dream.simulation.JobMA import Job
from dream.simulation.JobMA import JobMA
class AllocationRoutine():
def __init__(self, initialWeek, itemType):
......@@ -62,7 +62,7 @@ class AllocationRoutine():
for item in self.internalBuffer:
# if the item presents min qty then create a new item and store it into minBuffer
if item.minQty:
newJob = Job(item.orderID, item.MAid, item.SPid, item.PPOSid, item.minQty, item.minQty, item.originalWeek, item.future)
newJob = JobMA(item.orderID, item.MAid, item.SPid, item.PPOSid, item.minQty, item.minQty, item.originalWeek, item.future)
self.minBuffer.append(newJob)
item.qty = item.qty - item.minQty
item.minQty = 0
......
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