conversion_of_confidential_models_for_submission_to_gams_support

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||

conversion_of_confidential_models_for_submission_to_gams_support [2008/02/22 13:43] Franz Nelissen |
conversion_of_confidential_models_for_submission_to_gams_support [2015/09/18 15:45] Jarungjit Parnjai [Customized Scalar Model Output] |
||
---|---|---|---|

Line 2: | Line 2: | ||

===== Background ===== | ===== 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 [[http://support.gams-software.com/doku.php?id=conversion_of_confidential_models_for_submission_to_gams_support#unifying_data_from_external_sources_into_a_single_model|unify data form different models into a single model]]. | + | 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. There may be an issue with **confidentiality**. A model may contain: |

- | | + | |

- | Another issue is **confidentiality**. A model may contain: | + | |

* confidential data | * confidential data | ||

* confidential data structures (equation, parameter, variable names) | * confidential data structures (equation, parameter, variable names) | ||

* confidential comments | * confidential comments | ||

- | which the developer may wish to hide. GAMS has several utilities, which aid in [[conversion_of_confidential_models_for_submission_to_gams_support#converting_a_single_model_instance_to_scalar_format|conversion into scalar format and the removal of confidential information]]. In particular, [[http://www.gams.com/solvers/solvers.htm#CONVERT|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: | + | which the developer may wish to hide. |

+ | | ||

+ | GAMS has several utilities, which aid in [[conversion_of_confidential_models_for_submission_to_gams_support#converting_a_single_model_instance_to_scalar_format|conversion into scalar format and the removal of confidential information]]. In particular, [[http://www.gams.com/help/topic/gams.doc/solvers/convert/index.html|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. | * 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. | * 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. | GAMS/CONVERT comes free of charge with any licensed GAMS system. | ||

- | | + | ===== Simple Conversion ===== |

- | ===== 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: | + | |

- | - 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=11''. 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. | + | |

- | - 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 to Scalar Format ===== | + | |

- | ==== Simple Conversion ==== | + | |

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: | 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 | 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 [[http://www.gams.com/modlib/modlib.htm|GAMS model library]] using the default settings: | + | where [modeltype] is the model type used (LP, NLP, MIP, etc.). If you have hard coded the solver inside your GAMS model via an option statement like ''option LP=bdmlp;'' or need to solve other models before the model instance you want to convert you should not set the ''[modeltype]=convert'' command line option, but add the run time option ''option [modeltype]=convert;'' in front of the solve statement of the model instance you want to convert. 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 [[http://www.gams.com/modlib/modlib.htm|GAMS model library]] using the default settings: |

<code> | <code> | ||

* LP written by GAMS Convert at 02/08/08 11:45:21 | * LP written by GAMS Convert at 02/08/08 11:45:21 | ||

Line 85: | Line 77: | ||

- | ==== Customized Scalar Model Output ==== | + | ===== Customized Scalar Model Output ===== |

- | CONVERT allows customized scalar model output by making use of options. Please consult the CONVERT options in the [[http://www.gams.com/solvers/solvers.htm#CONVERT|CONVERT user guide]] for details. | + | CONVERT allows customized scalar model output by making use of options. Please consult the CONVERT options in the [[http://www.gams.com/help/topic/gams.doc/solvers/convert/index.html|CONVERT user guide]] for details. |

To do so, the user must make a solver option file called convert.opt (or similarly using the GAMS option file naming conventions). As usual, the user must tell GAMS to use this option file, either by specifying | To do so, the user must make a solver option file called convert.opt (or similarly using the GAMS option file naming conventions). As usual, the user must tell GAMS to use this option file, either by specifying | ||

gams mymodel.gms [modeltype]=convert optfile=1 | gams mymodel.gms [modeltype]=convert optfile=1 | ||

from the command line, or | from the command line, or | ||

- | mymodel.optfile = 1; | + | mymodel.optfile = 1; option [modeltype]=convert; |

before the solve statement in the model. | before the solve statement in the model. | ||

- | === Custom scalar model name === | + | ===== Custom scalar model name ===== |

The default scalar model created is called ''gams.gms''. In order to generate a scalar model with a different name, specify''gams mymodel.gms'' | The default scalar model created is called ''gams.gms''. In order to generate a scalar model with a different name, specify''gams mymodel.gms'' | ||

in the ''convert.opt'' option file. The resulting output file will be called ''mymodel.gms''. | in the ''convert.opt'' option file. The resulting output file will be called ''mymodel.gms''. | ||

- | === Terminate GAMS after solve === | + | ===== Terminate GAMS after solve ===== |

Models may consist of several solves, whereas the user may wish to obtain the scalar model only from a single particular solve. The CONVERT option ''terminate'' causes GAMS to abort once the solve is complete. To do so, specify ''terminate'' in the ''convert.opt'' option file. GAMS will then terminate after the solve (and resulting scalar model conversion) is completed. Note that it may be necessary to specify different solvers before previous solves and then specify CONVERT as the solver only for the particular solve for which one wishes to obtain a scalar model. | Models may consist of several solves, whereas the user may wish to obtain the scalar model only from a single particular solve. The CONVERT option ''terminate'' causes GAMS to abort once the solve is complete. To do so, specify ''terminate'' in the ''convert.opt'' option file. GAMS will then terminate after the solve (and resulting scalar model conversion) is completed. Note that it may be necessary to specify different solvers before previous solves and then specify CONVERT as the solver only for the particular solve for which one wishes to obtain a scalar model. | ||

- | === Renaming the objective variable in the scalar model === | + | |

+ | ===== Renaming the objective variable in the scalar model ===== | ||

By default, the scalar variable is called x1, x2, x3, or similar. If the user wishes to rename the objective variable to something more identifiable, the user can do so by specifying ''ObjVar myobj'' in the ''convert.opt'' option file. The resulting objective variable will then be called ''myobj''. If the user only specifies ''ObjVa''r, the default is ''objvar''. | By default, the scalar variable is called x1, x2, x3, or similar. If the user wishes to rename the objective variable to something more identifiable, the user can do so by specifying ''ObjVar myobj'' in the ''convert.opt'' option file. The resulting objective variable will then be called ''myobj''. If the user only specifies ''ObjVa''r, the default is ''objvar''. | ||

- | === Mapping scalar data structure names to original model names === | + | ===== Mapping scalar data structure names to original model names ===== |

- | The scalar model uses data structures called ''x1, x2, x3,...'' for variables and ''eq1, eq2, eq3,...'' for equations. The user may wish to know how scalar data structures are mapped to the original variable and equation names. For example, GAMS support may identify infeasibilities in a particular scalar equation, which the user needs to identify in the original (non-scalar) model. To do so, CONVERT has an option called Dict. Specifying ''Dict mydict.txt'' in the ''convert.opt'' option file will generate a dictionary file called ''mydict.txt'' containing the mapping information. If only ''Dict'' is specified, the default filename is ''dict.txt''. A sample dictionary file, obtained from running CONVERT on the transportation model ([[http://www.gams.com/modlib/libhtml/trnsport.htm|trnsport.gms]]) is given below: | + | The scalar model uses data structures called ''x1, x2, x3,...'' for variables and ''eq1, eq2, eq3,...'' for equations. The user may wish to know how scalar data structures are mapped to the original variable and equation names. For example, GAMS support may identify infeasibilities in a particular scalar equation, which the user needs to identify in the original (non-scalar) model. To do so, CONVERT has an option called Dict. Specifying ''Dict mydict.txt'' in the ''convert.opt'' option file will generate a dictionary file called ''mydict.txt'' containing the mapping information. If only ''Dict'' is specified, the default file name is ''dict.txt''. A sample dictionary file, obtained from running CONVERT on the transportation model ([[http://www.gams.com/modlib/libhtml/trnsport.htm|trnsport.gms]]) is given below: |

<code> | <code> | ||

LP written by GAMS Convert at 02/08/08 11:56:03 | LP written by GAMS Convert at 02/08/08 11:56:03 | ||

Line 137: | Line 130: | ||

x7 z</code> | x7 z</code> | ||

+ | ===== Non-disclosure agreement ===== | ||

+ | We are happy to sign a non-disclosure agreement (NDA), also known as a confidentiality agreement (CA), in case this is required. |

IMPRESSUM / LEGAL NOTICE
PRIVACY POLICY
conversion_of_confidential_models_for_submission_to_gams_support.txt · Last modified: 2017/09/02 19:02 by support