I am working on a multi-objective problem using lexicographic ordering. I want to set a different time limit and a different MIP GAP for each level, that is, a vector of time limits and a vector of MIP GAPs of size equal to the number of targets. I also want to control working memory and node storage.
Problem: I can't find the way to specify these parameters to make them all work together. If I specify the vector of time limits and MIP GAPs, the solver ignores the workingmem parameter.
I tried:
model = Model(name='Model_name')
model.parameters.parallel = -1 # oportunistic
model.parameters.workmem = 10000 # 10 GB
model.parameters.mip.strategy.file = 3 # Save nodes on disk and compressed
model.set_multi_objective('max',objectives, priorities=[3,2,1], names=objective_names)
paramsets = model.build_multiobj_paramsets(timelimits=[time1, time2, time3], mipgaps=[gap1, gap2, gap3])
solution = model.solve(url=None, key=None, log_output=True, clean_before_solve=True, parameter_sets=paramsets)
when I run the model the workmem limit is not respected and memory usage increases until it runs out of memory. I also get the following message:
warning: inconsistent parallel mode settings ignored, using opportunistic.
I also tried:
model = Model(name='Model_name')
model.parameters.parallel = -1 # oportunistic
model.parameters.workmem = 10000 # 10 GB
model.parameters.mip.strategy.file = 3 # Save nodes on disk and compressed
model.maximize_static_lex(objectives, objnames=objective_names)
solution = model.solve(url=None, key=None, log_output=True, clean_before_solve=True)
With this last try, the workmem limit and node file storage works fine, but I can’t introduce a different time limits and different gaps for each lexicographic level. My question: Is there a way to control the workmem parameter (globally) and at the same time specify different time limits and mip gaps for each lexicographic level?
In the solve you can use time limits as parameters:
in the example https://github.com/AlexFleischerParis/zoodocplex/blob/master/zoomultiobjective.py