Skip to main content
Solved

Find ArgMax in a 2-dimensional Parameter

  • July 14, 2020
  • 2 replies
  • 292 views

Hi,

so with the ArgMax function I can find the maximum value out of a Parameter of numbers like this:

ArgMax(i, SomeParamter(i))

 

However I would like to find the maximum value in a 2-dimensional Paramter. So ideally I would like to do something like this:

ArgMax((i,j), Some2DimensionalParamter(i,j))

This is not possible though, because apperently only one index is permitted for the iterative operator argmax.

Does anyone have an idea how this could be done?

 

Thank you!

Best answer by mateusarakawa

Hi, @Gergely.

You should use max function instead. 

max((i,j) | Some2DimensionalParamter(i,j), Some2DimensionalParamter(i,j))

ArgMax returns the element (i OR j) that has the maximum value, not the value.

 

2 replies

mateusarakawa
AIMMS Champ
Forum|alt.badge.img+2
  • AIMMS Champ
  • 85 replies
  • Answer
  • July 14, 2020

Hi, @Gergely.

You should use max function instead. 

max((i,j) | Some2DimensionalParamter(i,j), Some2DimensionalParamter(i,j))

ArgMax returns the element (i OR j) that has the maximum value, not the value.

 


  • Author
  • 2 replies
  • July 14, 2020

Awesome, that solved the issue. Thank you very much!



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

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