Originally posted by: SystemAdmin
[biaggi said:]
Hi,
I'm testing a program with Cplex 9.1.
My program (implemented in Java) manages an object IloCplex. I try to solve my model and then, modify the cost function (only the cost function !) and re-optimize and so on.
I'm wondering which kind of informations Cplex automatically stores in memory (basis, priorities...) after the method solve() is asked.
Indeed, I observe that if I export one of my models (for a given cost function and exactly the same parameters) and then try to solve it, Cplex does not act the same way. For example, in the overall process and for a given iteration, outputs indicate :
Iteration log . . .
Iteration: 1 Scaled infeas = 0.431148
Iteration: 3 Objective = 1359.777465
whereas if I export this particular model (with a MPS format) and optimize, I get :
Iteration log . . .
Iteration: 1 Scaled infeas = 9.522288
Iteration: 5 Objective = 1468.371528
I would like to know how to "clear" my model, ie, how to make Cplex begins from nothing because it seems to be (for my problem) more efficient.
Does anyone has an idea ? Thanks.
Modif :
To ensure myself I'n not stupid, I've just tried to stop the process after a given iteration and exports the model, then I set my model to null, instantiates it again and imports the latter model. The results confirm my observations, outputs are different. It does hence proves that when the method solve() is invoked, informations are stored in memory, but which ones and how to clear them (without creating a new file for each model...) ?
Modif 2 :
I've found what I was looking for (or I think I did...). In fact, to do what I want, I have to manage parameters IloCplex::AdvInd and IloCplex::CraInd carefully. The first one is an indicator that gives advanced starting information when optimization is initiated and the second one determines how CPLEX orders variables relative to the objective function when selecting an initial basis.
I hope this would be helful for someone else...
#CPLEXOptimizers#DecisionOptimization