Solved

Select newest file, sort parameter

  • 17 June 2019
  • 1 reply
  • 62 views

Userlevel 1
Hi,

I have an integer set, a parameter with filenames, and a parameters with Aimms'standard date/time.
How do I select the newest file, or how to sort a parameter and select the first, or how to select the smallest, largest?

Thanks!
icon

Best answer by mohansx 2 July 2019, 04:47

View original

1 reply

Userlevel 5
Badge +2
@wiet

You can use the argmax and argmin functions to find the index which has the smallest / largest value.

So, Filename(argmax(i, dateparameter)) will give you the newest file / filename corresponding to the index which has the greatest (most recent date) value in the date/time parameter.

Reply


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

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