Solved

Disable some of Constraints in Model through a user interface

  • 14 August 2019
  • 1 reply
  • 87 views

Hi All,

I want to create a user interface or page where i can control some of the constraints to toggle and run the model.

e.g. Lets say we have 10 set of constraints and I want to run the model with 8 currently while rest 2 I want to disable for the run. This needs to be dynamic

Is there any documentation available for the same or any example.


Regards
Ankit Bhagat
icon

Best answer by mohansx 14 August 2019, 16:03

@AnkitBhagat

You can declare subsets of the predeclared sets AllVariables and AllConstraints and use them in the math program declaration to control which constraints and variables are considered for the math program. See this article.

Note that variables with definitions will be considered as constraints as well.

You can use a binary parameter indexed over AllConstraints (IndexConstraints) and use this parameter to control which constraints are selected for the final math program.

ModelConstraints will now be {IndexConstraints | bpSelectConstraint(IndexConstraints) } and your end users will be able to change the value of bpSelectConstraint(IndexConstraints) from the UI
View original

1 reply

Userlevel 4
@AnkitBhagat

You can declare subsets of the predeclared sets AllVariables and AllConstraints and use them in the math program declaration to control which constraints and variables are considered for the math program. See this article.

Note that variables with definitions will be considered as constraints as well.

You can use a binary parameter indexed over AllConstraints (IndexConstraints) and use this parameter to control which constraints are selected for the final math program.

ModelConstraints will now be {IndexConstraints | bpSelectConstraint(IndexConstraints) } and your end users will be able to change the value of bpSelectConstraint(IndexConstraints) from the UI

Reply


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

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