上海卡贝信息技术有限公司


 

 

 

在GAMS中通过GUSS求解器进行DEA建模

数据包络分析(Data Envelopment Analysis,DEA)模型能够在GAMS中使用Gather-Update-Solve-Scatter (GUSS)功能快速求解。这是从GAMS 23.7分发版本开始的默认方法,因此GAMS/DEA求解器已不再可用。

一篇名为 "GUSS: Solving Collections of Data Related Models within GAMS"的论文中包含适合GUSS的2个额外的应用示例,可以从这里下载

GUSS文档可以从这里下载

介绍

The basic (CCR) DEA model is a collection of models indexed by k and defined by


where X,Y are data matrices.

Without using GUSS in GAMS, a model would be defined and solved in a loop over k, requiring the model to be generated multiple times with different instances for each value of k. GUSS is an alternative (and more efficient) way to define the individual programs and pass them to any underlying GAMS solver. In this way, individual programs are not re-generated, but are instead defined as data modifications of each other. This reduces overall model generation time. Further, previous solutions can be used as starting points in later solves to speed up overall processing time.

比较两个公式的一些DEA示例。这些公式的源代码可以从这里下载

DEA示例

Original GAMS formulation (without GUSS): In all these models the model setup and data are given at the top of the file and the code of interest is in the last 10 or so lines. In this setting we loop over the set k and change the data in the objective function and the first constraint of the model explicitly before each solve. We only output a minimal summary of the solution.



The DEA problem formulated using GUSS: In this setting, the solve statement includes an extra keyword scenario that points to a new set called dict. The contents of this set are directives to GUSS that state the scenario index is k, the parameter slice is populated from the parameter data and the values of the variable eff are stored into the parameter eff_k for each scenario solved. More details follow below.


In the GUSS version we indicate the collection of models to be solved using the set dict. The first element of dict determines the set to be used for the scenario (collection) index, in this case k. The second element of dict then details that in each scenario k, the parameter slice is instantiated using a slice of the parameter data. Essentially, this corresponds to the GAMS statement:

slice(j) = data(k,j)

Note the scenario index k must appear as the first index of the parameter data. The third element of dict allows the modeler to collect information from each solve and store it into a GAMS parameter. Essentially, the third element of dict corresponds to the GAMS statement:

eff_k(k) = eff.l

that gets executed immediately after the solve of scenario k.

More complex scenario models can also be formulated using GUSS, including multiple equations being updated. This is shown by the dual of the basic DEA model, given by

The next example compares the two formulations for this model. The actual source code for both of these formulations is available here.

Original GAMS formulation (without GUSS):


Dual (CRS) DEA model formulated using GUSS: The key modeling statements occur in the last 10 lines below.


Extensions of these models to formulations with weighted outputs or variable returns to scale are easy to formulate with the scenario solver within GAMS. This extended model can be downloaded here.

The DEA model in the model library is similar to the extended model, but does not make use of GUSS.

GUSS选项

The execution of GUSS can be parameterized using some options. Options are not passed through a solver option file but via another tuple in the dict set. The keyword in the second position of this tuple is opt . A one dimensional parameter is expected in the first position (or the label '' ). This parameter may contain some of the following labels with values:

OptfileInit : Option file number for the first solve
Optfile : Option file number for subsequent solves
LogOption : Determines amount of log output
0 - Moderate log (default)
1 - Minimal log
2 - Detailed log
SkipBaseCase : Switch for solving the base case ( 0 solves the base case)
UpdateType : Determines amount of log output
0 - Set everything to zero and apply changes (default)
1 - Reestablish base case and apply changes
2 - Build on top of last scenario and apply changes
Restart Type : Determines restart point for the scenarios
0 - Restart from last solution (default)
1 - Restart from solution of base case
2 - Restart from input point

For the DEA model the UpdateType setting would mean:

UpdateType=0: loop(s, A(i,j) = A_s(s,i,j))
UpdateType=1: loop(s, A(i,j) = A_base(i,j); A(i,j) $= A_s(s,i,j))
UpdateType=2: loop(s, A(i,j) $= A_s(s,i,j))

The option SkipBaseCase=1 allows to skip the base case. This means only the scenarios are solved and there is no solution reported back to GAMS in the traditional way. The third position in the opt -tuple can contain a parameter for storing the scenario solution status information, e.g. model and solve status, or needs to have the label '' . The labels to store solution status information must be known to GAMS, so one needs to declare a set with such labels. The following solution status labels can be reported:

domusd iterusd objest nodusd modelstat numnopt

numinfes objval resusd robj solvestat suminfes

The following example shows how to use some of the GUSS options and the use of a parameter to store some solution status information:

 

 

 

 

 

 


 

在线留言

尊敬的客户朋友,如您有任何意见建议,请通过下表反馈给我们,我们会尽快与您联系。

 

 

 

 

联系我们

 

微信公众号

咨询微信

企业店铺

400-621-1085

(节假日期间办公室座机如无人接听,请选择其他联系方式,感谢理解!祝您节日快乐!)

 

联系我们 快速链接 相关产品 上海卡贝信息技术有限公司

©2023  上海卡贝信息技术有限公司

产品中心

下载中心

站点地图

隐私政策

 

销售QQ咨询

产品QQ咨询

淘宝店铺

 

GAMS:概述

最近更新:43.3.0分发

相关文档

下载试用

购买咨询

Berkeley Madonna

iThink

Stella Architect

DecisionTools Suite

NeuralTools

Frontier Analyst

Vensim

RISKOptimizer

PrecisionTree

LINGO

LINDO API

What'sBest!