我最近在 Julia 中开发了一个 JuMP 程序(文件“main_lac.jl”构建问题,文件“lac.jl”解决它)来建模和解决混合整数非线性规划问题。直到几天前一切正常,我能够使用 CoinOptServices.jl 包提供的 Bonmin 和 Couenne 求解器解决问题。奇怪的是,现在启动程序时出现以下错误。以下是我在 Julia 中得到的信息:
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.11 (2015-07-27 06:18 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-w64-mingw32
julia> include("main_lac.jl")
Optimization Services Solver
Main Authors: Horand Gassmann, Jun Ma, and Kipp Martin
Distributed under the Eclipse Public License
OS Version: 2.9.2
NLP0012I
Num Status Obj It time
Location
NLP0014I 1 OPT -521.00118 24 0.207
Coin0506I Presolve 159 (-8) rows, 77 (-49) columns and 406 (-124) elements
Clp0006I 0 Obj -291.73028 Primal inf 90.459932 (3) Dual inf 61.664329 (12)
Clp0006I 52 Obj -640.0942 Primal inf 1123.145 (25)
Clp0006I 94 Obj -596.07782 Primal inf 0.68700263 (6)
Clp0006I 102 Obj -596.07782
Clp0006I 102 Obj -596.07782 Dual inf 8.9765432e-007 (1)
Clp0006I 105 Obj -596.07782
Clp0000I Optimal - objective value -596.07782
Clp0006I 0 Obj -596.07782 Dual inf 0.00037833533 (8)
Clp0006I 8 Obj -596.07782
Clp0000I Optimal - objective value -596.07782
Clp0032I Optimal objective -596.0778209 - 113 iterations time 0.052, Presolve 0.
01
Clp0000I Optimal - objective value -596.07782
NLP Heuristic: time limit reached.
Clp0000I Optimal - objective value -596.07782
Optimality Based BT: 4 improved bounds
Probing: 4 improved bounds
NLP Heuristic: no solution.
Optimality Based BT: 5 improved bounds
Couenne: new cutoff value -4.9453392465e+002 (1.13 seconds)
Optimality Based BT: 2 improved bounds
Couenne: new cutoff value -5.0829262369e+002 (3.484 seconds)
Couenne: new cutoff value -5.1799449233e+002 (3.491 seconds)
Couenne: new cutoff value -5.1816308421e+002 (3.498 seconds)
Couenne: new cutoff value -5.1925773349e+002 (3.506 seconds)
Couenne: new cutoff value -5.1925907688e+002 (3.512 seconds)
Couenne: new cutoff value -5.1925910990e+002 (3.61 seconds)
Couenne: new cutoff value -5.1925922776e+002 (3.624 seconds)
Couenne: new cutoff value -5.1925931564e+002 (3.64 seconds)
Couenne: new cutoff value -5.1925932779e+002 (3.662 seconds)
Couenne: new cutoff value -5.1925933108e+002 (3.689 seconds)
Couenne: new cutoff value -5.1925933216e+002 (3.7 seconds)
Couenne: new cutoff value -5.1925933231e+002 (3.717 seconds)
Couenne: new cutoff value -5.1925933244e+002 (3.734 seconds)
Couenne: new cutoff value -5.2036795130e+002 (3.832 seconds)
Couenne: new cutoff value -5.2041509722e+002 (3.844 seconds)
Couenne: new cutoff value -5.2042014861e+002 (3.904 seconds)
Couenne: new cutoff value -5.2042329464e+002 (3.931 seconds)
Couenne: new cutoff value -5.2042367221e+002 (3.966 seconds)
Couenne: new cutoff value -5.2042418354e+002 (4.046 seconds)
Couenne: new cutoff value -5.2042418765e+002 (4.059 seconds)
Couenne: new cutoff value -5.2042425222e+002 (4.086 seconds)
Couenne: new cutoff value -5.2042432194e+002 (4.109 seconds)
Couenne: new cutoff value -5.2042435022e+002 (4.14 seconds)
Couenne: new cutoff value -5.2042435814e+002 (4.151 seconds)
Couenne: new cutoff value -5.2042436647e+002 (4.163 seconds)
Couenne: new cutoff value -5.2042438317e+002 (4.173 seconds)
Couenne: new cutoff value -5.2042438916e+002 (4.189 seconds)
Couenne: new cutoff value -5.2042439029e+002 (4.206 seconds)
Couenne: new cutoff value -5.2042439045e+002 (4.229 seconds)
Couenne: new cutoff value -5.2042493291e+002 (4.298 seconds)
Couenne: new cutoff value -5.2042555039e+002 (4.358 seconds)
Couenne: new cutoff value -5.2042586877e+002 (4.411 seconds)
Couenne: new cutoff value -5.2042615119e+002 (4.475 seconds)
Couenne: new cutoff value -5.2042655116e+002 (4.6 seconds)
Couenne: new cutoff value -5.2042659198e+002 (4.677 seconds)
Couenne: new cutoff value -5.2042661361e+002 (4.693 seconds)
Couenne: new cutoff value -5.2042662379e+002 (4.704 seconds)
Couenne: new cutoff value -5.2042662528e+002 (4.736 seconds)
Couenne: new cutoff value -5.2042662605e+002 (4.749 seconds)
Couenne: new cutoff value -5.2042662620e+002 (4.913 seconds)
Couenne: new cutoff value -5.2042672382e+002 (4.923 seconds)
Couenne: new cutoff value -5.2042672857e+002 (4.961 seconds)
Couenne: new cutoff value -5.2042673319e+002 (4.984 seconds)
Couenne: new cutoff value -5.2042673373e+002 (5.002 seconds)
Couenne: new cutoff value -5.2042673707e+002 (5.015 seconds)
Couenne: new cutoff value -5.2042673748e+002 (5.05 seconds)
Couenne: new cutoff value -5.2042698535e+002 (5.33 seconds)
Couenne: new cutoff value -5.2042711667e+002 (5.345 seconds)
Couenne: new cutoff value -5.2042743366e+002 (5.356 seconds)
Couenne: new cutoff value -5.2042748873e+002 (5.37 seconds)
Couenne: new cutoff value -5.2042749136e+002 (5.409 seconds)
Couenne: new cutoff value -5.2042749469e+002 (5.424 seconds)
Couenne: new cutoff value -5.2042749753e+002 (5.437 seconds)
symbol could not be found xmlReadFile (-1): no error
ERROR: error compiling read_osrl_file!: could not load module C:\Users: no error
in optimize! at C:\Users\Francesco\.julia\v0.3\CoinOptServices\src\CoinOptServi
ces.jl:542
in solveMIP at C:\Users\Francesco\.julia\v0.3\JuMP\src\solvers.jl:343
in solve at C:\Users\Francesco\.julia\v0.3\JuMP\src\solvers.jl:8
in lac at C:\Users\Francesco\AppData\Local\Julia-0.3.11\lac.jl:107
in include at boot.jl:245
in include_from_node1 at loading.jl:128
while loading C:\Users\Francesco\AppData\Local\Julia-0.3.11\main_lac.jl, in expr
ession starting on line 56
julia>
我认为问题已解决,因为 results.osrl 文件报告了解决方案:
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="OSrL.xslt"?>
<osrl xmlns="os.optimizationservices.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="os.optimizationservices.org http://www.optimizationservices.org/schemas/2.0/OSrL.xsd" >
<general>
<generalStatus type="normal">
</generalStatus>
<message>Couenne solver finishes to the end.</message>
<serviceName>
Optimization Services Solver
Main Authors: Horand Gassmann, Jun Ma, and Kipp Martin
Distributed under the Eclipse Public License
OS Version: 2.9.2
</serviceName>
<solverInvoked>COIN-OR Couenne</solverInvoked>
</general>
<optimization numberOfSolutions="1" numberOfVariables="61" numberOfConstraints="78" numberOfObjectives="1">
<solution targetObjectiveIdx="-1">
<status type="locallyOptimal" description="SUCCESS[COUENNE]: Algorithm terminated normally at a locally optimal point, satisfying the convergence tolerances.">
</status>
<variables >
<values numberOfVar="61">
<var idx="0">0</var>
<var idx="1">0</var>
<var idx="2">.2</var>
<var idx="3">.3896517195593275</var>
<var idx="4">.45593354296596916</var>
<var idx="5">.5410201796725872</var>
<var idx="6">.45742211779593706</var>
<var idx="7">.5779862200030897</var>
<var idx="8">.3779862200030897</var>
<var idx="9">0</var>
<var idx="10">0</var>
<var idx="11">0</var>
<var idx="12">0</var>
<var idx="13">0</var>
<var idx="14">0</var>
<var idx="15">0</var>
<var idx="16">0</var>
<var idx="17">1</var>
<var idx="18">1</var>
<var idx="19">1</var>
<var idx="20">.4770485937889726</var>
<var idx="21">.4866129031049262</var>
<var idx="22">.5069859009124318</var>
<var idx="23">.3405620045207881</var>
<var idx="24">.20000000000000004</var>
<var idx="25">.20000000000000004</var>
<var idx="26">.2000000000000001</var>
<var idx="27">.38879059767288054</var>
<var idx="28">.20000000000000018</var>
<var idx="29">1.1102230246251565e-16</var>
<var idx="30">0</var>
<var idx="31">0</var>
<var idx="32">1</var>
<var idx="33">1</var>
<var idx="34">1</var>
<var idx="35">1</var>
<var idx="36">1</var>
<var idx="37">1</var>
<var idx="38">1</var>
<var idx="39">1</var>
<var idx="40">1</var>
<var idx="41">1</var>
<var idx="42">1</var>
<var idx="43">1</var>
<var idx="44">1</var>
<var idx="45">1.0000000000000007</var>
<var idx="46">1</var>
<var idx="47">1</var>
<var idx="48">0</var>
<var idx="49">20.081943751558903</var>
<var idx="50">20.464516124197047</var>
<var idx="51">21.279436036497273</var>
<var idx="52">22.622480180831523</var>
<var idx="53">24.586068782373097</var>
<var idx="54">27.237341718638767</var>
<var idx="55">30.64080718690349</var>
<var idx="56">34.8485086187527</var>
<var idx="57">32.11944880012359</var>
<var idx="58">56.11944880012359</var>
<var idx="59">41</var>
<var idx="60">41</var>
</values>
</variables>
<objectives >
<values numberOfObj="1">
<obj idx="-1">-520.4274975330925</obj>
</values>
</objectives>
</solution>
</optimization>
</osrl>
我尝试重新安装 Julia,但没有成功。我在 Windows 8.1 64 位下工作。注意: Pkg.test("Cbc") 在 Julia 中失败并出现同样的错误(编译 read_osrl_file 时出错!...)
任何帮助,将不胜感激。
谢谢,
弗朗切斯科