How to create a library of functions and procedures
Creating libraries to share/reuse functionality in multiple projects is a powerful feature of AIMMS. In this article, we present some best practices and tips to create such libraries of functions and procedures.
The following are discussed in detail:
Library organization - interfacing with a library is eased by a proper organization into sections.
Functions - functions are popular because they can be used in expressions.
Procedures - procedures are popular because they can assign new data to global identifiers.
I have tried to create an example for one of my problems here but I get the following error :
I am trying to create a library called optim 1 to run my problem. When I tried to create the procedure in the Public folder which would be used to map the main model arguments to first the local arguments in the library and then run the procedure in the private folder, I get the above mentioned error. It seems the error is connected to an index. Attaching screenshots below on the same. I tried to create seperate indices for the procedure in private section (t2) and public section (t1) but t1 seems to be the problem. Any help would be appreciated.