I'm solving the VRP problem using a cutting plane algorithm and I've implemented that on Java using the CPLEX Concert Technology. The main problem occures when I add some cuts to the problem, the result obtained consider the a subset of nodes that was prohibited by the cut restriction.
When I solve the exported model with the problem mentioned using the CPLEX command line tool, the solution isn't the same provided by the Java Concert library.
Some days ago I found a problem with a numerical truncation and I configure the IloCplex object whit this line:
cplex.setParam(IloCplex.BooleanParam.NumericalEmphasis, true);
but now the problem persists.
What can I do to solve this problem?? please help me.....
Topic

Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100921T19:09:01ZThis is the accepted answer. This is the accepted answer.Are you exporting the model in .sav format? Other formats (such as .lp format) will truncate floating point data, which can result in changes to the set of solutions to a model.
Philip Starhill
CPLEX Research Engineer 
Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100921T19:17:34ZThis is the accepted answer. This is the accepted answer.> jpolako wrote:
> I'm solving the VRP problem using a cutting plane algorithm and I've implemented that on Java using the CPLEX Concert Technology. The main problem occures when I add some cuts to the problem, the result obtained consider the a subset of nodes that was prohibited by the cut restriction.
Are these cuts of the form f(x) >= 1, where x contains binary variables (only) and f is linear with coefficients +/ 1 (and 0)? Are you adding the cuts as global cuts? (Local cuts would not apply outside the subtree where they were added.)
/Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe) 
Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100921T23:17:53ZThis is the accepted answer. This is the accepted answer.I'm saving the models in a lp format because is a integer problem (all the parameter are integer values) and the cuts are added as global cuts, I suppose so. In order to add a new cut I use the method addCut of the IloCplex object.
http://yalma.fime.uanl.mx/cplex11manual/refjavacplex/html/ilog/cplex/IloCplex.html#addCut%28ilog.concert.IloConstraint%29 
Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100922T18:47:18ZThis is the accepted answer. This is the accepted answer. jpolako
 20100921T23:17:53Z
I'm saving the models in a lp format because is a integer problem (all the parameter are integer values) and the cuts are added as global cuts, I suppose so. In order to add a new cut I use the method addCut of the IloCplex object.
http://yalma.fime.uanl.mx/cplex11manual/refjavacplex/html/ilog/cplex/IloCplex.html#addCut%28ilog.concert.IloConstraint%29
> I'm saving the models in a lp format because is a integer problem (all the parameter are integer values) and the cuts are added as global cuts, I suppose so. In order to add a new cut I use the method addCut of the IloCplex object.
Am I correct in interpreting this to mean that you are not adding the cuts in a callback? In otherwords, you are using a sequence like the following:
{code}
IloCplex cplex;
// ...
cplex.solve();
cplex.addCut(...);
cplex.solve();
cplex.addCut(...);
// ...
Using addCut this way does not add the cuts to the model; so if you export the model, I believe the .lp file will not contain the cuts.
/Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe) 
Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100922T20:58:56ZThis is the accepted answer. This is the accepted answer.Paul, you are right, I'm don't adding the cuts using callbacks because I'm solving VRP with intervalar uncertainty in travel costs using the minmax regret criterion.
The exported the model in a .lp format contains all the cuts added, as a Lazy Constraints.
When I solve the model using the command line interface the solution obtained isn't equals to the solution obtained with the Java Concert plugin.
I think, maybe, the set of parameters used in the cplex command line interface is different to the set of parameter used in the Java Concert plugin.
But I don know what is the problem. I've configured the cplex object with
cplex.setParam(IloCplex.BooleanParam.NumericalEmphasis, true);
but in some cases works.... 
Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100922T22:45:33ZThis is the accepted answer. This is the accepted answer. jpolako
 20100922T20:58:56Z
Paul, you are right, I'm don't adding the cuts using callbacks because I'm solving VRP with intervalar uncertainty in travel costs using the minmax regret criterion.
The exported the model in a .lp format contains all the cuts added, as a Lazy Constraints.
When I solve the model using the command line interface the solution obtained isn't equals to the solution obtained with the Java Concert plugin.
I think, maybe, the set of parameters used in the cplex command line interface is different to the set of parameter used in the Java Concert plugin.
But I don know what is the problem. I've configured the cplex object with
cplex.setParam(IloCplex.BooleanParam.NumericalEmphasis, true);
but in some cases works....
The second point, which Philip Starhill was driving at, is that using the LP file format raises the likelihood that the interactive optimizer will behave differently from your code. This gets discussed repeatedly in this forum, but I have not kept links to the discussions, so I decided to make a blog entry that I can point to in the future (and save myself some typing).
Now, if I understand where we're at here, you have cuts you add between calls to solve, and the solution your code generates sometimes violates one or more of those cuts; but if you write the file out (LP format) and solve it interactively, the solution does not violate any cuts. Did I summarize that correctly? If so, the most likely culprit would be numerical instability, even if you have numerical emphasis on. What do you get for basis kappa values? (The other explanation would be that the cuts are not being applied correctly, but if they show up in the LP file, that seems less likely.)
/Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe) 
Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100923T15:11:31ZThis is the accepted answer. This is the accepted answer.Thanks for your help Paul, I'm a Masters Student, working in Metaheuristic to solve the Robust Vehicle Routing Problem with Interval Data using MinMax Regret Criteria.
This kind of Robust problems using the minmax regret criteria are a NPHard problem, due to the nature of the criteria. In order to solve the Robust problem you must solve many of classical problem, in this case many of VRP. Once you have solved a classical problem, you must add a new cut to the Robust model (acording to the Benders Decomposition applying to this case).
There are no literature for this problem, for that reason I'm solving this problems, only to use this results to compare it with the results obtained with Simulated Annealing and other Metaheuristics.
I think that is a numerical problem, I will configure the kappa basis parameter (when I will first understand the meaning of that) and then I will tell you about the solution.
Again thank you Paul for your help... 
Re: Differents solutions between Java Concert Thechnology  CPLEX command line
20100923T21:32:27ZThis is the accepted answer. This is the accepted answer. jpolako
 20100923T18:05:59Z
There are no parameters to configure the basis kappa values in CPLEX 12.1...
What other parameter can I configure to fix this problem?
> There are no parameters to configure the basis kappa values in CPLEX 12.1...
>
> What other parameter can I configure to fix this problem?
I saw that you posted a comment on my blog and answered there. Just to complete the thread here, MIPKappa was new in CPLEX 12.2. In 12.1, I would either relax the problem to an LP, solve it and check the basis kappa value, or solve the MIP, fix the integer variables, solve the fixed problem as a MIP and check the final basis kapp there. (Actually, I'd probably do both.)
/Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)