Obsidian | Level 7

## Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

Hi :

I have two questions :

1.  Frequently one needs a term as   j * T[j] :  that's no problem if  j is numeric. However if you have { j in ARCS}  and your  ARCS  are  <NY,SF>  or the like you would need something as the  order function in  GAMS  ord(j) :  What is the equivalent in Optmodel ? Add :  When I write  { j in ARCS}  essentially I leave it to SAS to determine the order in which the arcs are processed: how can I recover that order ?

2.  People have to use what they find at their places. So it can occur that one has to translate a model formulation from  GAMS  to  SAS (Optmodel)  ore vice versa. Are you aware of any compilation of a kind of correspondence table between the two systems ?

3.  What is the state of the affairs with a  MINLP solver for Optmodel ??  GAMS  can  access one.

SAS  BLACKBOX -  and  LSO - solvers both say they would perform with  around  100  variables.

Frequently you find yourself with around   600  which can technically go to  ~ 2000  variables  ......

I understand that  Q3  needs time for answering.  Q1  and  Q2  should go more easily.

Kind regards,  ODENWALD .

1 ACCEPTED SOLUTION

Accepted Solutions
SAS Super FREQ

## Re: Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

1. Here's a simple example that creates an ord array to access the set members by position:

``````proc optmodel;
set S = /A B C/;
str ord {1..card(S)};
num count init 0;
for {i in S} do;
count = count + 1;
ord[count] = i;
end;
print ord;
print ord[2];
quit;``````

2. I'm not aware of any such table.

3. We do have long-term plans to provide a generic MINLP solver.  For now, Blackbox is the best choice.  Coming soon, OPTMODEL will provide automated linearization for several common use cases.  Stay tuned!

6 REPLIES 6
SAS Super FREQ

## Re: Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

1. Here's a simple example that creates an ord array to access the set members by position:

``````proc optmodel;
set S = /A B C/;
str ord {1..card(S)};
num count init 0;
for {i in S} do;
count = count + 1;
ord[count] = i;
end;
print ord;
print ord[2];
quit;``````

2. I'm not aware of any such table.

3. We do have long-term plans to provide a generic MINLP solver.  For now, Blackbox is the best choice.  Coming soon, OPTMODEL will provide automated linearization for several common use cases.  Stay tuned!

SAS Super FREQ

## Re: Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

The linearization feature I mentioned is now available.  The idea is that you use the nonlinear expressions directly and then call:

``solve linearize;``

For several common linearizable use cases, OPTMODEL introduces the new variables and constraints for you under the hood.

Obsidian | Level 7

## Re: Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

Rob :  Thanks for the info.

Is it in  (SAS 9.4, Rev. 940_20w39) or in a more recent one

which is not yet listed ?

Odenwald

SAS Super FREQ

## Re: Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

It is in SAS Optimization in SAS Viya 2020.1.1.

Obsidian | Level 7

## Re: Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

When will it show up in  SAS/OR ?

Odenwald

SAS Super FREQ

## Re: Proc OPTMODEL : Order of a set | GAMS <--> Optmodel comparison sheet | MINLP solver

That is yet to be determined.

Discussion stats
• 6 replies
• 664 views
• 1 like
• 2 in conversation