Tech Blog

Tips and Tricks for AIMMS Users

Connect to Access database file via ODBC connection string

Microsoft Access databases

Microsoft Access databases

For a long time, AIMMS already has the possibility to retrieve/store data from/into any ODBC or OLEDB datasource. Originally, you could provide a UDL file (in case of OLEDB) or a System/User/File DSN (in case of ODBC).

In case you deploy a project where the user of the project can actually choose which specific Access database file should be used, you either would have to generate the .dsn files based on this choice, or let the user choose the specific Access database file via the file selection wizards of the ODBC driver.

Since AIMMS 3.11, another possibility was introduced, namely generating the connection string within AIMMS itself. You could then base this connection string on some file that the end-user had selected. One very big advantage of creating such a connection string instead of using DSN files is that you don’t have to include the database password in the plain-text DSN file if your database requires a password: you can keep this password hidden in the code of your project.

These connection strings can be used in the Data Source attributes of all the database related identifiers AIMMS (e.g. tables, database procedures).

Continue reading »

This entry was posted in Advanced on by .

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:
    $latex x \in \{1.5 , 2.5, 3.5\}&s=1$.

    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 .
  • Customer Reviews

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

  • Categories

  • Google Analytics