Forum Discussion
FICO
6 years agoCommunity Manager
Has anyone seen an issue with binary variables becoming non-binary?
I'm new to the community and fairly new to xpress. I've attached my code for the project (both as text and PDF). Whenever I am running this code, I am getting a solution but my solutions are not binary. I'm hoping someone has seen this issue before and can point me in the right direction.
1 Reply
- FICOCommunity Manager
Your current model formulation results in an infeasibility.
As a general recommendation, I would suggest that you check the problem status before trying to report on a solution. In addition, for debugging purposes it is usually helpful to enable the display of the solver log, e.g., surrounding the call to the solver by the following lines:
setparam("XPRS_verbose",true)
minimize(Cost)
if getprobstat=XPRS_INF then
writeln("Problem is infeasible")
exit(1)
end-if
I think that the infeasibility is related to the constraints for eliminating sub-cycles.
With the following form I obtain a feasible solution:
n(1) = 0
forall(i,j in 2..Orders+1|i<>j) n(i) - n(j) + Orders*x(i,j) <= Orders-1
Related Content
Related Content
Bynary variables giving non-binary solutions...
So I have been working on a model that uses different linear constrains based on which binarie is activated. For my initial problem all the linear constrains are exactly the same one. The problem ...9 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1CommentVariable names in callback (Java API)
I construct a cut in a preintsol callback using variables from the model containing the callback. When constructing the model, I give the variables names (using withName(...)) and store them in a vec...9 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum4 unread comments4 unread1View0likes4Comments