Commit 40fb02fc authored by Georgios Dagkakis's avatar Georgios Dagkakis

track how much time PuLP requires

parent 5fa377f1
...@@ -124,6 +124,7 @@ class G: ...@@ -124,6 +124,7 @@ class G:
pendingEntities=[] pendingEntities=[]
env=simpy.Environment() env=simpy.Environment()
totalPulpTime=0 # temporary to track how much time PuLP needs to run
# ======================================================================= # =======================================================================
# method to move entities exceeding a certain safety stock # method to move entities exceeding a certain safety stock
......
...@@ -11,6 +11,10 @@ def opAss_LP(machineList, PBlist, PBskills, previousAssignment={}, weightFactors ...@@ -11,6 +11,10 @@ def opAss_LP(machineList, PBlist, PBskills, previousAssignment={}, weightFactors
import copy import copy
import glob import glob
import os import os
import time
from Globals import G
startPulp=time.time()
machines = machineList.keys() machines = machineList.keys()
sumWIP = float(sum([machineList[mach]['WIP'] for mach in machines ])) sumWIP = float(sum([machineList[mach]['WIP'] for mach in machines ]))
...@@ -185,7 +189,8 @@ def opAss_LP(machineList, PBlist, PBskills, previousAssignment={}, weightFactors ...@@ -185,7 +189,8 @@ def opAss_LP(machineList, PBlist, PBskills, previousAssignment={}, weightFactors
files = glob.glob('*.lp') files = glob.glob('*.lp')
for f in files: for f in files:
os.remove(f) os.remove(f)
G.totalPulpTime+=time.time()-startPulp
return PBallocation return PBallocation
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