User Tools

Site Tools


conversion_of_confidential_models_for_submission_to_gams_support

This is an old revision of the document!


Conversion of (Confidential) Models For Submission to GAMS Support

Background

Many real world applications involve complex models containing multiple data sources (include files or gdx files). In order to reproduce the problem, the GAMS support may need the complete model and thus it is necessary to unify data form different models into a single model.

Another issue is confidentiality. A model may contain:

  • confidential data
  • confidential data structures (equation, parameter, variable names)
  • confidential comments

which the developer may wish to hide. GAMS has several utilities which aid in conversion into scalar format and the removal of confidential information. In particular, GAMS/CONVERT is a utility which transforms a GAMS model instance into formats used by other modeling and solution systems. GAMS/CONVERT is designed to achieve the following goals:

  • Permit users to convert a confidential model into GAMS scalar format so that any identifiable structure is removed. It can then be passed on to others for investigation without confidentiality being lost.
  • A way of sharing GAMS test problems for use with other modeling systems or solvers.

GAMS/CONVERT comes free of charge with any licensed GAMS system.

Unifying data from external sources into a single model

Many applications involve data from various sources which are included or loaded dynamically into the GAMS model. These can be from Excel spreadsheets, text files (via $include statements), etc. To simplify submission of those models to GAMS Support, we offer the dumpopt parameter, which unifies external data sources into the GAMS model. There are two different modes of operation:

  1. Merge all external data (e.g. from include files) into a single model by using the dumpopt=11 option, which removes all comments: gams mymodel.gms dumpopt=1. This will create a model called mymodel.dmp which includes all external data in a single model. It removes the need to submit all include files with the model.
  2. Merge all external data (e.g. from include files) into a single model by using the dumpopt=21 option, which keeps all comments: gams mymodel.gms dumpopt=21''

Converting a Single Model Instance (Solve) to Scalar Format

The GAMS/CONVERT utility can transform a single model instance (from a solve statement) into scalar format. The scalar format removes all confidential information (data and identifiable model data structures). To translate a model into a scalar format removing any identifiable modeling constructs, enter:

  gams mymodel.gms [modeltype]=convert

where [modeltype] is the model type used (LP, NLP, MIP, etc.). This will generate a scalar model called gams.gms which can be submitted to GAMS support or others without divulging any confidential information. Below is an example output generated from the trnsport model of the GAMS model library using the default settings:

*  LP written by GAMS Convert at 02/08/08 11:45:21
*  
*  Equation counts
*      Total        E        G        L        N        X        C
*          6        1        3        2        0        0        0
*  
*  Variable counts
*                   x        b        i      s1s      s2s       sc       si
*      Total     cont   binary  integer     sos1     sos2    scont     sint
*          7        7        0        0        0        0        0        0
*  FX      0        0        0        0        0        0        0        0
*  
*  Nonzero counts
*      Total    const       NL      DLL
*         19       19        0        0
*
*  Solve m using LP minimizing x7;
*

Variables  x1,x2,x3,x4,x5,x6,x7;

Positive Variables  x1,x2,x3,x4,x5,x6;

Equations  e1,e2,e3,e4,e5,e6;


e1..  - 0.225*x1 - 0.153*x2 - 0.162*x3 - 0.225*x4 - 0.162*x5 - 0.126*x6 + x7
      =E= 0;

e2..    x1 + x2 + x3 =L= 350;

e3..    x4 + x5 + x6 =L= 600;

e4..    x1 + x4 =G= 325;

e5..    x2 + x5 =G= 300;

e6..    x3 + x6 =G= 275;

* set non default bounds


* set non default levels


* set non default marginals


Model m / all /;

m.limrow=0; m.limcol=0;

Solve m using LP minimizing x7;

Customized (CONVERT) scalar model output

IMPRESSUM / LEGAL NOTICEPRIVACY POLICY conversion_of_confidential_models_for_submission_to_gams_support.1202467725.txt.gz · Last modified: 2008/02/08 11:48 by Franz Nelissen