Convert a GAMS Model to an AIMMS Model

You can convert GAMS files using an older version of AIMMS.

To convert a GAMS model to an AIMMS model, follow this procedure:

You can follow this procedure to convert a GAMS file to an AIMMS project: 1. Download AIMMS 3.14 and convert the .gms file to a .aim file. 2. Download current AIMMS version and convert the old AIMMS project to a modern one using .ams file. 3. Open the newly converted project in current version of AIMMS.

These steps are discussed in further detail below.

This article uses an example GAMS model.

Converting GMS to AIM file

  1. Download and install AIMMS 3.14 <https://download.aimms.com/aimms/download/data/3.14/5.53/Aimms-3.14.5.53-x86.exe> (if you don’t already have it).

    After creating and restarting your project with AIMMS 3.14, it should look like:

    ../../_images/NewAIMMS313Project.png
  2. Copy the GAMS model file next to the .amb file created by AIMMS 3.14.

    We assume here that the GAMS model file has extension .gms, for instance trnsport.gms.

  3. Close AIMMS. Open AIMMS 3.14 again on the existing project.

  4. Go to File > Open Model File and switch the file type to .aim. Now you can open the GAMS model.

    ../../_images/NewModelAIMTypeFiles.png

    Accept a new model.

    ../../_images/OkTheAreYouSureNewModel.png

    Confirm that the model is converted.

    ../../_images/NotificationModelIsConverted.png

    Enter a name and save it as an AIMMS 3 .aim file.

    ../../_images/SaveAs30AimFile.png

Converting AIM to AMB file

  1. Open the project again using AIMMS 3.14.

    ../../_images/ConvertedModelTree.png

    (Double-click with the Ctrl key pressed on the box before the main model named “aimms 2 upgrade”, and again to fully expand the model tree.)

    AIMMS 3.14 will automatically convert the AIMMS 3 model from .aim to AIMMS 3 .amb format , after you make a model change.

  2. Add the procedure MainTermination with the contents:

    return 1;
    
  3. Save and close the project. Confirm the following dialog:

    ../../_images/convertModelFromAim3ToAmb.png
  4. Open this project again using AIMMS 3.14 and it should look something like the following:

    ../../_images/Convert314AimTo314Amb.png

Converting AIMMS 3 to current AIMMS version

  1. Install the current version of AIMMS (or the AIMMS 4 version you prefer to use).

  2. Open the project with the new version of AIMMS.

    ../../_images/OpenProjectUsing4-9.png

    Acknowledge the warning.

    ../../_images/OkWarningConversion.png
  3. Now you can switch the .dat files (used with AIMMS 3.14) to the .data files offered with newer versions of AIMMS:

    ../../_images/settingOptionsDataManagerStyle.png

    For more information about why to do this, read Convert Files from DAT to DATA.

AIMMS Support

If you need further help, contact AIMMS Support at support@aimms.com.

Last Updated: October, 2019