How to write a Function

  • 6 January 2021
  • 2 replies

  • AIMMS Implementation Partner
  • 9 replies

I want to write a function in AIMMS which should return a value or an element of Set X(say).

The function is say F(a,b,x) where in Ain B, and in X. The function F should return an element(or value) x1 from set X if x1 is in X otherwise returns no value.

for Example, say F(a,b,x) = x - 10 and = {x | 0<= x <= 100}

F(a,b,20) should return 10  and F(a,b,8) returns no value or a default value which AIMMS will not consider when using this functions return value in a constraint.


Best answer by Gertjan 7 January 2021, 17:04

View original


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

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