Skip to main content
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!
@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