Commit 93b606e8 authored by Georgios Dagkakis's avatar Georgios Dagkakis

port to new version of demand planned

parent 375387dc
......@@ -77,6 +77,9 @@ def AllocManagement_Hybrid2():
if week in G.sortedOrders['order'][priority]:
print 'order week', week
if G.ACO:
if G.ACOdefault:
G.popSize = int(0.75*len(G.sortedOrders['order'][priority][week]) - 0.75*len(G.sortedOrders['order'][priority][week])%2)
G.noGen = 20*G.popSize
ACOresults = Allocation_ACO(week, G.sortedOrders['order'][priority][week],'order',ACOresults)
else:
AllocationRoutine2(week, G.sortedOrders['order'][priority][week],'order')
......@@ -99,6 +102,10 @@ def AllocManagement_Hybrid2():
# if GA is required perform order sequence optimisation combined with internal LP optimisation
if G.GA:
if G.GAdefault:
G.popSizeGA = int(0.75*len(G.sortedOrders['forecast'][priority][week]) - 0.75*len(G.sortedOrders['forecast'][priority][week])%2)
G.noGenGA = 20*G.popSizeGA
GAresults = Allocation_GA(week,itemList,'forecast',GAresults)
# if GA is not require perform allocation with internal LP optimisation
......
......@@ -46,13 +46,14 @@ class G:
Earliness = {}
Lateness = {}
Excess = {}
weightFactor = [10.0,1.0,0,2]
weightFactor = [10.0,1.0,0,2,0.5]
Utilisation={}
# ACO parameters
ACO = 1
noGen = 5
popSize = 10
ACOdefault = 0
# GA parameters
GA = 0 # suggests whether application of GA to forecast diseggragation is required
......@@ -62,6 +63,7 @@ class G:
probMutation = 0.1
elitistSelection = 1
terminationGA = 4
GAdefault = 0
# utilisation calculation
minDeltaUt = 0
......
......@@ -57,6 +57,8 @@ def ImportInput(input, algorithmAttributes):
# ACO parameters
G.ACO = algorithmAttributes.get('ACO',None)
G.popSize=algorithmAttributes.get('ACOpopulationSize',None)
if (not G.popSize) and G.ACO:
G.ACOdefault = 1
G.noGen=algorithmAttributes.get('ACOnumberOfGenerations',None)
# optimisation weights for forecast IP method
......@@ -64,12 +66,13 @@ def ImportInput(input, algorithmAttributes):
G.weightFactor[1] = algorithmAttributes.get('minUtilisation',None)
G.weightFactor[2] = algorithmAttributes.get('minDeltaTargetUtilisation',None)
G.weightFactor[3] = algorithmAttributes.get('minTargetUtilisation',None)
G.weightFactor[4] = algorithmAttributes.get('MAProportionality',None)
# GA parameters
G.GA= algorithmAttributes.get('GA',None)
G.popSizeGA =algorithmAttributes.get('GApopulationSize',None)
if (not G.popSizeGA) and G.GA:
G.GAdefault = 1
G.noGenGA =algorithmAttributes.get('GAnumberOfGenerations',None)
G.probXover =algorithmAttributes.get('XOver',None)
G.probMutation =algorithmAttributes.get('mutationProbability',None)
......
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