from lot_sizing_hm import * class LSLib(LotSizing): def __init__(self, data): self.data = data lpx.__init__(self, data.ModelFile, data.DataFile) if __name__ == "__main__": import sys args = sys.argv ### args = ["", "1", "tr24_30", "120"] if len(args) != 4: print "usage:", args[0], "seed instance-number tmlim(s)" sys.exit(-1) seed = int(args[1]) name = args[2] tmlim = float(args[3]) print seed, name, tmlim random.seed(seed) import lotsizelib_data insttst = 'data = lotsizelib_data.%s' % name print 'data:', insttst exec(insttst) prob = LSLib(data) print 'created problem', prob print "relax_and_fix_one_prod SOLUTION:" prob.relax_and_fix_one_prod() x,y,z = prob.getsol() ### prob.printstat() prob.printsol() print clock()