AMPL problem advisory - about bi-level programming model/multi objective function statement(AMPL问题咨询——关于双层规划模型/多目标函数的语句表述 )

125 views
Skip to first unread message

婷婷

unread,
May 16, 2022, 10:34:47 AM5/16/22
to ampl
I have three questions to ask.
1. Can AMPL directly solve the bi-level optimization model (linear)?
2. I am eager to solve such a bi-level model. For example, I can solve the lower layer model and obtain the solution set of the optimal solution of the lower layer, and then take this solution set as the feasible domain of the upper layer model and optimize the upper layer model.
Does AMPL have a specific command statement that describes the upper and lower layers of the model, and then directly solves the bi-level model?
Specifically, I was looking for statements in AMPL similar to those in gurobi+Python,
MODEL.setObjectiveN(-sum(R.iat[i - 1, j - 1] * y[i, j] for i in I for j in J), priority=1, index=0)
MODEL.setObjectiveN(-sum(X_[i, j] for i in I for j in J), priority=0, index=1)
Among them, Gurobi used the priority keyword to set the priority of the function and completed the description of multi-objective function, which was convenient for the direct solution of multi-objective function.
I wonder if there is a similar statement in AMPL. If there are similar statements, please tell me the expression of such statements.
3. If you have any code for solving bi-level programming or multi-objective function examples, please send it to my e-mail :3314...@qq.com. Thank you very much.

翻译:
我有三个问题需要咨询。 
1.AMPL能不能直接求解双层优化模型(线性的) 呢? 
2.我渴望求解这样的一种双层模型,例如,对下层模型求解,得到下层最优解的解集,然后将此解集作为上层模型的可行域,再进行上层模型的优化。 
请问AMPL有没有特定的命令语句分别来描述上层模型和下层模型,然后直接求解双层模型呢 ? 
详细的说是, 我想在AMPL里面找到和gurobi+Python程序类似的语句 , 
MODEL.setObjectiveN(-sum(R.iat[i - 1, j - 1] * y[i, j] for i in I for j in J), priority=1, index=0) 
MODEL.setObjectiveN(-sum(X_[i, j] for i in I for j in J), priority=0, index=1) 
其中,gurobi利用priority关键词设置了函数的优先级,完成了多目标函数的描述,便于多目标函数直接求解。 
我非常想知道AMPL里面有没有这样类似的语句呢? 如果有类似的语句,请您告诉我这种语句的表达式。 
3.如果有求解双层规划或者多目标函数例子的代码,请您发到我的邮箱3314...@qq.com,非常感谢。 

AMPL Google Group

unread,
May 17, 2022, 11:43:15 AM5/17/22
to AMPL Modeling Language
AMPL does not have any features for specifically describing bi-level optimization problems. Also there are not any bi-level programming solvers that have been connected to AMPL, and we do not have any bi-level optimization codes to distribute. Thus, in AMPL, you would have to explicitly define and solve the upper-level model and the lower-level model, and you would have to write an AMPL script that specifies how information from the solution to one model should be passed to the other model.

AMPL has a specific feature for describing two separate models and switching between them. There's an introduction to this feature -- with a detailed example -- in section 14.4 Alternating between models of the AMPL book; then it is explained in more detail in section 14.5 Named problems.

AMPL also supports Gurobi's priority settings for multi-objective optimization. In the situation you describe, you could use two AMPL statements to define two different objective functions; for example, they might have the form

minimize Upper: . . . ;
minimize Lower: . . . ;

where . . . is replaced by the appropriate objective function expressions. After these objectives are read by AMPL, you could use commands like the following to set their priorities:

suffix objpriority IN;
let Upper.objpriority := 1;
let Lower.objpriority := 0;

Finally, to turn on the multi-objective optimization feature, you would specify (before the first "solve"),

option gurobi_options 'multiobj=1';

(or, if you are already defining a gurobi_options string, you would add multiobj=1 to it). For a complete description of this feature, see the following reply that was previously posted in this forum:

https://groups.google.com/d/msg/ampl/cDKRsJFHJcQ/AhZsBmnqDQAJ

This Gurobi feature is often useful, but it is not the same as bi-level optimization.


--
Robert Fourer
am...@googlegroups.com
{#HS:1885904670-110047#}
Reply all
Reply to author
Forward
0 new messages