Forum Discussion
FICO
2 years agoCommunity Manager
How to make a variable be of "continuous type" but only allow (positive) integer values as its solution
Hi, I'm a student and currently stuck on a difficult problem. I've tried for many hours to solve this seemingly simple problem and can't find a solution. It would be cool if you could help without lo...
FICO
2 years agoCommunity Manager
Hi Paul,
integer variables cannot have a reduced cost, by their nature. In a way the reduced cost measures the change of objective per unit change of the variable, in other words a derivative. That you cannot have for a discrete variable.
The simplest case is when your problem is guaranteed to have integer optimal solutions (TU matrix). In that case you can just drop the integrality and obtain the reduced costs. In general, you can always try to drop the integrality and hope the solutions turn out to be integer. If so, your problem is solved.
Another thing that people commonly do is to solve the integer problem to optimality, then fix the integer variables to their optimal values and then resolve the problem. This way you can at least get reduced costs for the other variables, but still not for the integer ones.
If you want to get a measure similar to a reduced cost for an integer variable you need to perform sensitivity analysis: change the variable by one in each direction and observe how the optimal objective value is changing.
Without knowing your problem my assumption is that your task involves some sensitivity analysis, for which you learned to use the reduced cost in the continuous case, but your problem is integer. In this case you'll have to do the sensitivity analysis manually.
In summary, try to focus on why you think you need the reduced costs and what other ways are there to get the same information without reduced costs.
I hope this helps,
Imre Polik
FICO
Related Content
Related Content
How to resolve traceback: "xpress.InterfaceError: Incorrect control name; check name and license type"?
We are trying to access xpress in Python via Pyomo. We have no issues installing xpress and solving a simple model with the xpress interface. However, when we attempt to access xpress via pyomo we re...2 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread1View0likes1CommentCan't find the reason for "E-113: Wrong type for conversion" error
Hi all, Im new to Mosel so this may be an easy one. See example Mosel model below and find associated data file attached. When I run the code it seems Mosel is trying to convert one of the data type...6 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread0Views0likes2Commentscom.blazesoft.engines.rules.NdCompilerException: The type for the initial value is invalid. Expected 'array_of_ElementParent' but got a 'array_of_"ElementChild".
Hi everyone, I'm trying to generate an ADB of a strategy, but i'm having the issue above, Does anyone experience something similar? I have an elementA that is parent of elementB, generally I work de...