⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opb.txt

📁 著名的大规模线性规划求解器源码GLPK.C语言版本,可以修剪.内有详细帮助文档.
💻 TXT
字号:
OPB (PSEUDO BOOLEAN) FORMATOscar Gustafsson <oscarg@isy.liu.se>The OPB format is used to represent linear problems with binaryvariables, i.e., integer variables that can take on the values 0 or 1.Furthermore, the coefficients are restricted to be integers.The routines in GLPK provides a normalized version, conformant with thefiles used in the PB evaluations (seehttp://www.cril.univ-artois.fr/PB07/) as well as a straightforwardversion with (slightly) higher human readability. There are severalvariations of the OPB-format. Therefore, it is not expected that thestraightforward output of this routine works with all PB-solvers, whilethe normalized output should work with most.The objective function is always a function to be minimized and isspecified as:min: coefficient1 variable1 coefficient2 variable2 ... ;Constraints are specified as:coefficient1 variable1 coefficient2 variable2 ... op1 bound1;coefficient1 variable1 coefficient2 variable2 ... op2 bound2;For a problem in normalized format the variables are always of the formxNN, where NN is an integer number. For the straightforward version thename provided by GLPK is used. At the end of a normalized file thetranslation between GLPK names and normalized names are provided ascomments.opx is for normalized problems either '>=' or '=', while also '<=' isallowed for the straightforward format.In the straightforward format coefficients and variables are separatedby '*'. If a coefficient is non-zero it is always representedexplicitly, even if it is +1.All lines (except for comments) must end with ';'. A comment line startswith '*'.EXAMPLENormalized:min: 1 x1 -1 x2;1 x1 4 x2 >= 3;1 x2 -1 x3 = 0;* x1 = orange* x2 = apple* x3 = bananaStraightforward:min: 1*orange -1*apple;1*orange 4*apple >= 3;1*apple -1*banana = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -