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

changes in demand planning

parent f1b8b2bd
......@@ -151,8 +151,20 @@ def AllocationRoutine_Final(initialWeek, itemList, itemType, ant):
if itemType == 'order':
if chosenMA == None:
G.OrderResults.append((item['orderID'], item['sp'], item['MAlist'], item['Week'], item['Qty'], item['priority'], chosenMA, oMAlist2, 'NaN', 'NaN', 'None'))
mList = ''
for i in range(len(oMAlist2)):
if i>0:
mList += ', '
mList += oMAlist2[i]
G.OrderResultsShort.append((item['orderID'], mList))
else:
G.OrderResults.append((item['orderID'], item['sp'], item['MAlist'], item['Week'], item['Qty'], item['priority'], chosenMA, oMAlist2, Results[chosenMA]['lateness'], Results[chosenMA]['earliness'], Results[chosenMA]['Allocation']))
mList = ''
for i in range(len(oMAlist2)):
if i>0:
mList += ', '
mList += oMAlist2[i]
G.OrderResultsShort.append((item['orderID'], mList))
if itemType == 'forecast':
if chosenMA == None:
......
......@@ -81,6 +81,8 @@ class G:
reportResults = tablib.Databook()
OrderResults = tablib.Dataset(title='OrderSummary')
OrderResults.headers = ('OrderID', 'SP_NUMBER', 'MA_LIST', 'REQUEST_DATE', 'ORDERQTY', 'PRIORITY', 'CHOSEN_MA','ORDERED_MA_LIST', 'LATENESS', 'EARLINESS', 'ALLOCATION')
OrderResultsShort = tablib.Dataset(title='OrderResultsForDM')
OrderResultsShort.headers = ('OrderID', 'MA_LIST')
forecastResults = tablib.Dataset(title='ForecastSummary')
forecastResults.headers = ('PPOS', 'SP_NUMBER', 'MA_LIST', 'REQUEST_DATE', 'ORDERQTY', 'PRIORITY', 'CHOSEN_MA', 'LATENESS', 'EARLINESS', 'ALLOCATION')
globalMAAllocation = {}
......@@ -151,6 +153,8 @@ def initialiseVar():
G.reportResults = tablib.Databook()
G.OrderResults = tablib.Dataset(title='OrderSummary')
G.OrderResults.headers = ('OrderID', 'SP_NUMBER', 'MA_LIST', 'REQUEST_DATE', 'ORDERQTY', 'PRIORITY', 'CHOSEN_MA','ORDERED_MA_LIST', 'LATENESS', 'EARLINESS', 'ALLOCATION')
G.OrderResultsShort = tablib.Dataset(title='OrderResultsForDM')
G.OrderResultsShort.headers = ('OrderID', 'MA_LIST')
G.forecastResults = tablib.Dataset(title='ForecastSummary')
G.forecastResults.headers = ('PPOS', 'SP_NUMBER', 'MA_LIST', 'REQUEST_DATE', 'ORDERQTY', 'PRIORITY', 'CHOSEN_MA', 'LATENESS', 'EARLINESS', 'ALLOCATION')
G.CapacityResults = None
......
......@@ -60,6 +60,7 @@ def outputResults():
G.reportResults.add_sheet(resultsOverview)
G.reportResults.add_sheet(G.OrderResults)
G.reportResults.add_sheet(G.OrderResultsShort)
G.reportResults.add_sheet(G.forecastResults)
# report capacity results
......
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