A somewhat hidden functionality in AIMMS is the implementation of the Quesada and Grossmann algorithm for solving convex Mixed Integer Nonlinear Programming (MINLP) problems. For AIMMS 3.13 the implementation of this algorithm will use the lazy constraint callback function that was introduced in CPLEX 12.3 and Gurobi 5.0, and has several advantages over the old implementation:
I have seen a question appear a couple of times on the AIMMS Google group, though every time explained in different words. I have also seen a similar kind of question a number of times as a support question to our support department. Although always formulated a bit different, the bottom line of the question always boils down to the following:
How to model a variable that can only take a couple of values, for example:
Depending on which solvers are allowed by your AIMMS license, you might have multiple solvers capable of solving a given type of mathematical program (e.g. an LP problem). In this case, you can instruct AIMMS in a variety of ways which solver should be used to solve a problem of a specific type.
There are various situations where you will have a number that is stored in a string parameter or an element in AIMMS. Although this string looks like the number, you can’t directly use the numerical value it represents. You will need the val intrinsic function of AIMMS to convert the string representation of the number to a numerical value again.
In certain cases, as an AIMMS developer it is very useful to know details about the AIMMS version that is currently used for your project like:
- Is the project running under Linux or under Windows?
- Is the project running in 64 bit AIMMS or in 32 bit AIMMS?
- Is the project running in ASCII AIMMS or in Unicode AIMMS?
These details are especially useful if you are using external procedures in your project because you can’t use a 32 bit compiled DLL when running a 64 bit version of AIMMS.
When you solve a Mathematical Program in AIMMS, the default behavior is that AIMMS will let the solver solve the problem to (local) optimality. However, there could also be MIP problems for which you are not interested in the proven optimum, but you are already satisfied if the solution is within 10% of the optimum.
Another possibility is that you want to allow the solver to only run for a limited time and just want to obtain the solution the solver found till then.
All of these functions work with an element parameter in the predefined set AllCases, which is a subset of the set Integers. Quite often, I have seen the question whether it is possible to actually get the name of either the current case or more general, any case denoted by an element in the predefined set AllCases. In this post I will show how you can use the case related AIMMS functions to achieve this.
When you are creating an application in AIMMS that is to be used by other persons, you typically want to ensure that after they start the project, the right startup page is automatically opened, maybe some data is initialized with saved values, and some initialization procedures are run.
For example in the project that I worked out in the earlier blog post Solve problems in parallel with asynchronous solver sessions, I showed how you can start up multiple asynchronous solver sessions in AIMMS to solve multiple different problems simultaneously (if your license allowed for this).
In such cases, you typically do not want to have more simultaneous sessions running than the number of cores present in your computer. The operating system (windows or linux) provides information that allows you to find the number of cores.
Another example is that you could use this information to limit the number of parallel threads of solvers like CPLEX and GUROBI to some value that depends on the actual number of cores that is available.