Commit a57ddd23 authored by Georgios Dagkakis's avatar Georgios Dagkakis

change in DemandPlanning so that it uses the same globals as the other scripts

parent 14a4753f
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
''' '''
Created on 17 Apr 2014 Created on 17 Apr 2014
@author: George @author: Anna, George
''' '''
''' '''
test script to convert the static excels to JSON. It does not communicate with GUI yet test script to convert the static excels to JSON. It does not communicate with GUI yet
...@@ -28,50 +28,44 @@ test script to convert the static excels to JSON. It does not communicate with G ...@@ -28,50 +28,44 @@ test script to convert the static excels to JSON. It does not communicate with G
import xlwt import xlwt
import xlrd import xlrd
import json import json
from dream.simulation. Globals import G
''' def createGlobals():
Created on 5 Sep 2013 G.TargetPPOS = 0
G.TargetPPOSqty = 0
@author: Anna G.TargetPPOSweek = 0
''' G.ReplicationNo = 0
G.replication = 0
class G: G.PPOSlist = {}
TargetPPOS = 0 G.Capacity = []
TargetPPOSqty = 0 G.route = {}
TargetPPOSweek = 0 G.maxEarliness = 0 # max number of weeks for earliness
ReplicationNo = 0 G.maxLateness = 0 # max number of weeks for lateness
replication = 0 G.planningHorizon =0 # for future demand purposes
PPOSlist = {} G.demandFile = None
Capacity = [] G.currentCapacity = None
route = {} G.reCapacity = []
maxEarliness = 0 # max number of weeks for earliness G.PPOSprofile = [] # initial disaggregation for PPOS
maxLateness = 0 # max number of weeks for lateness G.FutureProfile = [] # initial disaggregation for future demand
planningHorizon =0 # for future demand purposes G.AllocationFuture = []
demandFile = None G.FutureLateness = []
currentCapacity = None G.FutureEarliness = []
reCapacity = [] G.AllocationPPOS = []
PPOSprofile = [] # initial disaggregation for PPOS G.PPOSLateness = []
FutureProfile = [] # initial disaggregation for future demand G.PPOSEarliness = []
AllocationFuture = [] G.minPackingSize = 0
FutureLateness = [] G.Buffer = []
FutureEarliness = [] G.ExcessPPOSBuffer = []
AllocationPPOS = [] G.ExcessPPOSminBuffer = []
PPOSLateness = [] G.ExcessFutureBuffer = []
PPOSEarliness = [] G.ExcessFutureMinBuffer = []
minPackingSize = 0 G.DistributionType=None
Buffer = [] G.CapacityDict={}
ExcessPPOSBuffer = [] G.RouteDict={}
ExcessPPOSminBuffer = []
ExcessFutureBuffer = []
ExcessFutureMinBuffer = []
DistributionType=None
CapacityDict={}
RouteDict={}
# filterItem = 0 # filterItem = 0
# filterWeek = 0 # filterWeek = 0
#=================================== #===================================
# import simulation input data # import simulation input data
#=================================== #===================================
...@@ -121,6 +115,8 @@ def readGeneralInput(): ...@@ -121,6 +115,8 @@ def readGeneralInput():
G.RouteDict[id]['route'][sh.cell(2,j+3).value]=routeValues[j] G.RouteDict[id]['route'][sh.cell(2,j+3).value]=routeValues[j]
def main(): def main():
# set up global variables
createGlobals()
# read from inputs spreadsheet # read from inputs spreadsheet
readGeneralInput() readGeneralInput()
# open json file # open json 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