Issues with defined and inline variable

  • 4 January 2024
  • 2 replies
  • 33 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

Userlevel 5
Badge +7

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.

Userlevel 5
Badge +4

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).

Reply


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

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