Skip to main content
Solved

How can I disable the constraints in AIMMS?

  • May 20, 2019
  • 1 reply
  • 461 views

Hello

1- I will try different constraints for my model. For example, I want to disable all constraints and show the results.
I tried to created parameters as a below;
parameter: IsDisable , range=integer
Constraint: MyConstraint , index: (i,j) | not IsDisable

But in index section in MyConstraint: " t | t>=2 "
I could not add the " | not IsDisable "

2- Also How can I write the solution to excel?

Could you please help me?

Best Regards.

Best answer by mohansx

Hello @inci ,

You can write the index domain of MyConstraint as below.

code:
t | t>=2 and (not IsDisable)



This constraint will be valid only when IsDisable = 0

This link is a very helpful resource for exchanging data with Excel files.

https://how-to.aimms.com/Articles/85/85-using-axll-library.html

You will be using axll::WriteTable or axll::WriteCompositeTable depending on what format you want your Excel data to be in. Review the article and let us know if you need more specific help

1 reply

mohansx
Forum|alt.badge.img+5
  • Former AIMMSian
  • 223 replies
  • Answer
  • May 20, 2019
Hello @inci ,

You can write the index domain of MyConstraint as below.

code:
t | t>=2 and (not IsDisable)



This constraint will be valid only when IsDisable = 0

This link is a very helpful resource for exchanging data with Excel files.

https://how-to.aimms.com/Articles/85/85-using-axll-library.html

You will be using axll::WriteTable or axll::WriteCompositeTable depending on what format you want your Excel data to be in. Review the article and let us know if you need more specific help


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

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