Skip to main content

Issues with defined and inline variable

  • January 4, 2024
  • 2 replies
  • 40 views

Good afternoon!

I’m having an issue concerning the use of inline and defined Variables.

In order to simplify the code, I’m used to implement expressions in my models using inline variables (Variable > Property > Inline). Currently, I’m in a situation where my model turns out to be “Infeasible or Unbounded” when I try to solve it with an inline Variable, but when I remove the “Inline” property and convert the same Variable in a _defined one, the model is solved with no problems.

 

What could be happening? If a model is feasible when I’m using a defined variable, when I change it to an Inline variable shouldn’t it be feasible as well?

 

Thank you!

2 replies

gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 155 replies
  • January 5, 2024

Not really sure what is going on. Do you have an explicit subset of AllVariables and AllConstraints for your mathematical program identifier?

 

Alternatively, you could try to generate a .lp file for both situations and see where the main differences are in the model that is sent to the solver.


Marcel Hunting
AIMMSian
Forum|alt.badge.img+4
  • AIMMSian
  • 258 replies
  • January 5, 2024

Hi @msantana95. Is your model linear or nonlinear?

Please note that if you declare a variable as inline then the variable range will be ignored, that is, the variable will be treated as a free variable. So, if you declare a variable as nonnegative and change it to inline then it becomes a free variable (but in that case AIMMS will also generate a warning). This could make the model unbounded (but not infeasible).



Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator