from lot_sizing_hm import * if __name__ == "__main__": import sys args = sys.argv if len(args) != 4: print "usage:", args[0], "seed instance-number tmlim(s)" sys.exit(-1) seed = int(args[1]) num = int(args[2]) tmlim = float(args[3]) print seed, num, tmlim random.seed(seed) import fridata data = fridata.inst[num] prob = LotSizing("fri-jt.mod", data) print "relax_and_fix_one_prod SOLUTION:" prob.relax_and_fix_one_prod() x,y,z = prob.getsol() prob.printsol() print clock() print "\n\n\n\n\ntabu search + reconstruct_one_prod:" sol,zsol = tabusearch(prob, y, z, z, tmlim) print "final solution:", sol print "final objective:", zsol sys.exit(0)