引言

1 规划求解工具的安装
Excel软件安装时并不会自动安装规划求解工具,因此在使用规划求解工具前必须手工实现其安装。安装的步骤非常简单,下面以Office官网上给出的步骤,结合截图给出操作步骤:(1)打开Excel软件,在软件的左上角找到“文件”菜单




2 规划求解工具基本介绍
Excel软件的规划求解工具操作比较简单,窗口上内容主要可以分为三部分:
3 深入了解规划求解工具
规划求解工具由Frontline公司提供(https://solver.com),在公司的网站中,对三个求解算法进行了说明(网站原文节选如下):The Microsoft Office Excel Solver tool uses several algorithms to find optimal solutions.
非线性GRG:
The GRG Nonlinear Solving Method for nonlinear optimization uses the Generalized Reduced Gradient (GRG2) code, which was developed by Leon Lasdon, University of Texas at Austin, and Alan Waren, Cleveland State University, and enhanced by Frontline Systems, Inc.
【翻译】此方法采用Generalized Reduced Gradient (GRG2)代码。开发者是...
单纯线性规划:
The Simplex LP Solving Method for linear programming uses the Simplex and dual Simplex method with bounds on the variables, and problems with integer constraints use the branch and bound method, as implemented by John Watson and Daniel Fylstra, Frontline Systems, Inc.
【翻译】线性规划问题采用单纯形法(Simplex)和对偶单纯形法(dual Simplex),对于整数约束的线性规划问题采用分支定界方法(branch and bound)。开发者是...
演化:
The Evolutionary Solving Method for non-smooth optimization uses a variety of genetic algorithm and local search methods, implemented by several individuals at Frontline Systems, Inc.
【翻译】演化算法采用了遗传算法(genetic algorithm)和局部搜索方法(local search)。开发者是...
【注】规划求解工具的英文原名是Solver。计算结果情况呢?(网站原文节选如下)With the Simplex LP Solving method, you can find a globally optimal solution given enough time – but you may have to settle for a solution that’s “close to optimal” found in a more reasonable amount of time. With the GRG Nonlinear and Evolutionary Solving methods, you should expect a “good,” but not provably optimal solution.
【翻译】如果是单纯线性规划算法求解,你一定能够找出全局最优解(globally optimal solution),但是你需要设置算法精度(close to optimal)。但是,非线性GRG和演化算法,你可能只能找到一个还不错(good)的解,但不一定是全局最优解。
这里所说的"设置"是指在“规划求解参数”窗口中,通过点击“选项”按钮,得到“选项”对话框。在这里,可以通过精确度设置来保证问题求解的“质量”。
*If your objective and constraints are linear functions of the decision variables, you can be confident of finding a globally optimal solution reasonably quickly, given the size of your model. This is a linear programming problem; it is also a convex optimization problem (since all linear functions are convex). The Simplex LP Solving method is designed for these problems.
【翻译】如果问题是线性规划问题,那么单纯形法最能够快速找到一个全局最优解,而求解速度取决于模型大小。
*If your objective and constraints are smooth nonlinear functions of the decision variables, solution times will be longer. If the problem is convex, you can be confident of finding a globally optimal solution, but if it is non-convex, you can only expect a locally optimal solution – and even this may be hard to find. The GRG Nonlinear Solving method is designed for these problems.
【翻译】如果问题是一个平滑的非线性问题,最好使用“非线性GRG”方法,计算时间会长一点。如果问题是一个凸函数(convex),还是能够求出全局最优解;但是如果问题不是一个凸函数,那么这个问题求解非常困难。
*If your objective and constraints are non-smooth and non-convex functions of the decision variables (for example if you use IF, CHOOSE and LOOKUP functions whose arguments depend on decision variables), the best you can hope for is a “good” solution (better than the initial values of the variables), not a locally or globally optimal solution. The Evolutionary Solving method is designed for these problems.
【翻译】如果问题不是一个平滑和凸函数,例如,你在模型中用了类似Excel函数IF等,那么问题求解比较困难。此时,你需要使用“演化”方法。
*You can use integer, binary, and alldifferent constraints on variables with all three Solving methods. However, these constraints make the problem non-convex and much harder to solve.
【翻译】如果问题中增加了整数、0-1变量或者alldifferent约束形式,这个问题就变成了非凸函数,求解起来也非常困难。
4 总结
对于一般问题,采用规划求解工具进行求解,不会有太大问题。但是,如果问题中出现了非线性、整数约束等,最好还是选用更加高级的商业工具,如matlab, ampl, cplex, ...。
|编辑:胡锦亚
