Tech Blog

Tips and Tricks for AIMMS Users

Lazy Outer Approximation

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:

  • A cleaner and easier implementation; using less “tricks”.
  • It can also be used for problems with general integer variables.
  • It can be used by CPLEX and Gurobi.
  • Improved performance.
  • Continue reading »

    This entry was posted in Advanced, CPLEX, GMP, GUROBI, Technical on by .

    Modeling variables with limited number of possible values

    Modeling discrete values

    Modeling discrete values

    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:
    x \in \{1.5 , 2.5, 3.5\}.

    Continue reading »

    This entry was posted in Beginner on by .

    Change default solver used for each type of mathematical program

    AIMMS Solver Configuration

    AIMMS Solver Configuration

    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.

    Continue reading »

    This entry was posted in Beginner on by .

    Converting string to number

    Converting string representation of number to numerical value

    Converting string representation of number to numerical value


    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.

    Continue reading »

    This entry was posted in Beginner on by .

    Get platform/architecture information in AIMMS

    Get information about platform/architecture

    Get information about platform/architecture


    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.

    Continue reading »

    This entry was posted in Advanced on by .

    Using different stop criteria when solving math program

    Stop criteria for math programs

    Stop criteria for math programs


    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.

    Continue reading »

    This entry was posted in Beginner on by .

    Get name of (current) case

    Get name of a case

    Get name of a case

    In AIMMS you have the option to store the data for all or some identifiers in so-called AIMMS cases. Within the AIMMS language there is support for saving and loading cases.

    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.

    Continue reading »

    This entry was posted in Beginner on by .

    Setting up Startup items for your AIMMS project

    Setting startup items in AIMMS project

    Setting startup items in AIMMS project. (Credit: flickr/dierken)

    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.

    Continue reading »

    This entry was posted in Beginner on by .

    Making your project start in end-user mode

    Authorized modelers only...

    Authorized modelers only...

    When you are finished with making your project and you want to deploy it to end-users, you typically don’t want your end-users to make modifications to the underlying model, but only use the model the way you intended them to use it via the GUI you created.

    Continue reading »

    This entry was posted in Beginner on by .

    Determine number of available processors in AIMMS

    Number of cores in computer

    Number of cores in computer

    There are situations where you would like to know the number of CPU cores you have available in your computer.

    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.

    Continue reading »

    This entry was posted in Advanced on by .
  • Customer Reviews

    Read more AIMMS reviews
  • Review AIMMS on G2 Crowd
  • Recent Posts

  • Categories