Solved

Report Duplicate Columns to User

  • 7 December 2023
  • 3 replies
  • 33 views

Userlevel 1
Badge +3

Hi all,

We have a relatively simple math program with the potential for duplicate columns. However, knowledge of which variables are duplicates is actually beneficial to the user.

While I could go through and examine my parameters/constraints to manually search these, a much faster (computationally speaking) option would just be to have CPLEX report them out to the user, as I wouldn’t need to iterate through lots of parameters. Is there a way I can easily take these warnings from CPLEX and give them to the user? Any help would be appreciated here. 

Thank you in advance!

icon

Best answer by gdiepen 8 December 2023, 08:51

View original

3 replies

Userlevel 5
Badge +7

The warnings you see about duplicate columns do not come from the solver, but they are coming from AIMMS itself.

 

One way you can deal with this is catching the warnings within a block that has an onerror err do  part.

You can then parse the warnings that AIMMS is giving and return them to your user.

You can find more information about this on https://how-to.aimms.com/Articles/191/191-handle-errors-and-warnings.html

Also, I saw that AIMMS recently released an elearning about error handling:https://aimms.getlearnworlds.com/course/error-handling

The one thing I am not sure about is whether you will get to see ALL warnings (in the warnings window you typically will see something like showing only X number of errors, rest is discarded).

 

Another way that might work (not 100% sure about how this would work though, but I think it should be possible) is to use the Generated Math Programming (GMP) functions in AIMMS to check the coefficients of the generated math program.

I think the first option might be the easiest though.

Userlevel 1
Badge +3

Ah ok, I have used this before for other purposes, but I was indeed hoping there was an easier way. I may try the GMP approach; unfortunately we would like to see all duplicate columns. One more thing I may check: if there is a way to change the limit of reporting to some very high value.

Userlevel 1
Badge +3

I did indeed find that you can find more than 3 duplicate rows/columns via the setting in Project Options:

 

 

Reply


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

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