jump-dev / AmplNLWriter.jl

A Julia interface to AMPL-enabled solvers
http://ampl.com/products/solvers/all-solvers-for-ampl/
MIT License
67 stars 18 forks source link

Error when setValue is given #55

Closed jac0320 closed 6 years ago

jac0320 commented 7 years ago

When using JuMP(0.15.0) & AmplNLWriter(0.3.0), error happens when setValue() is utilized with solver Bonmin (with intention of warm starting the value, not sure if Bonmin is supported, but there shouldn't be any error given the code fits different solvers). I attached the solving log below the error log.

Thanks!

ERROR: LoadError: SystemError: opening file /Users/sitew/.julia/v0.5/AmplNLWriter/.solverdata/tmpZNwvZa.sol: No such file or directory
 in #systemerror#51 at ./error.jl:34 [inlined]
 in systemerror(::String, ::Bool) at ./error.jl:34
 in open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./iostream.jl:89
 in open(::String, ::String) at ./iostream.jl:101
 in read_sol(::AmplNLWriter.AmplNLMathProgModel) at /Users/sitew/.julia/v0.5/AmplNLWriter/src/AmplNLWriter.jl:596
 in read_results(::AmplNLWriter.AmplNLMathProgModel) at /Users/sitew/.julia/v0.5/AmplNLWriter/src/AmplNLWriter.jl:532
 in optimize!(::AmplNLWriter.AmplNLMathProgModel) at /Users/sitew/.julia/v0.5/AmplNLWriter/src/AmplNLWriter.jl:387
 in optimize!(::AmplNLWriter.AmplNLNonlinearModel) at /Users/sitew/.julia/v0.5/AmplNLWriter/src/AmplNLWriter.jl:722
 in #solvenlp#150(::Bool, ::Function, ::JuMP.Model, ::JuMP.ProblemTraits) at /Users/sitew/.julia/v0.5/JuMP/src/nlp.jl:1208
 in (::JuMP.#kw##solvenlp)(::Array{Any,1}, ::JuMP.#solvenlp, ::JuMP.Model, ::JuMP.ProblemTraits) at ./<missing>:0
 in #solve#97(::Bool, ::Bool, ::Bool, ::Array{Any,1}, ::Function, ::JuMP.Model) at /Users/sitew/.julia/v0.5/JuMP/src/solvers.jl:139
 in solve(::JuMP.Model) at /Users/sitew/.julia/v0.5/JuMP/src/solvers.jl:117
 in reoptimize_ub(::Array{JuMP.Variable,1}, ::Array{Array{Float64,1},1}, ::Array{Array{Float64,1},1}, ::Array{Any,1}, ::Array{Float64,1}, ::Float64) at /Users/sitew/Dropbox/SourceCodes/DTMC_suite_R/ubworker.jl:45
 in dynamicmccormick(::Int64, ::Int64, ::Int64, ::Int64, ::Int64) at /Users/sitew/Dropbox/SourceCodes/DTMC_suite_R/dynamicmcormick.jl:251
 in DTMC_simulation(::Int64) at /Users/sitew/Dropbox/SourceCodes/DTMC_suite_R/DTMC_simulation.jl:137
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
 in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/sitew/Dropbox/SourceCodes/DTMC_suite_R/DTMC_simulation.jl, in expression starting on line 226
Bonmin 1.8.4 using Cbc 2.9.7 and Ipopt 3.12.4
bonmin: bonmin.fp_log_level=1
bonmin.num_resolve_at_root=10
bonmin.num_resolve_at_infeasibles=100
bonmin.oa_log_level=1
bonmin.nlp_log_level=1
bonmin.bb_log_level=1
bonmin.milp_log_level=1
bonmin.milp_solver=Cplex
bonmin.algorithm=B-OA

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT -48.835201       86 0.681959     build initial OA
NLP0014I *           1         OPT -48.835201       63 0.455417         resolve cost
NLP0014I             2         OPT -48.835201       44 0.258605         resolve cost
NLP0014I *           3         OPT -48.835201      259 1.607007         resolve cost
NLP0014I             4         OPT -48.835201       95 0.566131         resolve cost
NLP0014I             5         OPT -48.835201       78 0.485658         resolve cost
NLP0014I             6         OPT -48.835201      184 1.322304         resolve cost
NLP0014I             7         OPT -48.835201       47 0.277185         resolve cost
NLP0014I             8         OPT -48.835201       45 0.287969         resolve cost
NLP0014I             9         OPT -48.835201       51 0.319179         resolve cost
NLP0014I *          10         OPT -48.835201      128 0.770185         resolve cost
NLP3017W OA on non-convex constraint is very experimental.
OCbc0031I 18 added rows had average density of 77.166667
OCbc0013I At root node, 18 cuts changed objective from -48.314801 to -47.788586 in 40 passes
OCbc0014I Cut generator 0 (Probing) - 68 row cuts average 2.0 elements, 1 column cuts (1 active)  in 0.045 seconds - new frequency is -100
OCbc0014I Cut generator 1 (Gomory) - 424 row cuts average 150.9 elements, 0 column cuts (0 active)  in 0.028 seconds - new frequency is -100
OCbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.045 seconds - new frequency is -100
OCbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.001 seconds - new frequency is -100
OCbc0014I Cut generator 4 (FlowCover) - 2 row cuts average 7.0 elements, 0 column cuts (0 active)  in 0.035 seconds - new frequency is -100
OCbc0014I Cut generator 5 (MixedIntegerRounding2) - 72 row cuts average 11.9 elements, 0 column cuts (0 active)  in 0.021 seconds - new frequency is -100
OCbc0010I After 0 nodes, 1 on tree, 1e+50 best solution, best possible -47.788586 (0.44 seconds)
OCbc0012I Integer solution of -44.841665 found by rounding after 1883 iterations and 20 nodes (0.62 seconds)
OCbc0004I Integer solution of -44.888401 found after 1898 iterations and 23 nodes (0.63 seconds)
OCbc0012I Integer solution of -45.045873 found by rounding after 2334 iterations and 47 nodes (0.77 seconds)
OCbc0012I Integer solution of -45.163126 found by rounding after 2379 iterations and 52 nodes (0.78 seconds)
OCbc0012I Integer solution of -45.631461 found by rounding after 2539 iterations and 63 nodes (0.85 seconds)
OCbc0012I Integer solution of -45.704891 found by rounding after 2632 iterations and 73 nodes (0.90 seconds)
OCbc0012I Integer solution of -45.811665 found by rounding after 7401 iterations and 341 nodes (1.64 seconds)
OCbc0004I Integer solution of -45.858401 found after 7469 iterations and 346 nodes (1.65 seconds)
OCbc0010I After 1000 nodes, 16 on tree, -45.858401 best solution, best possible -47.788586 (3.76 seconds)
OCbc0010I After 2000 nodes, 7 on tree, -45.858401 best solution, best possible -47.782111 (7.26 seconds)
OCbc0012I Integer solution of -46.125879 found by rounding after 37736 iterations and 2045 nodes (7.43 seconds)
OCbc0012I Integer solution of -46.285879 found by rounding after 39177 iterations and 2109 nodes (7.64 seconds)
OCbc0012I Integer solution of -46.393241 found by rounding after 40800 iterations and 2170 nodes (7.85 seconds)
OCbc0004I Integer solution of -46.492433 found after 40819 iterations and 2172 nodes (7.86 seconds)
OCbc0012I Integer solution of -46.62449 found by rounding after 41344 iterations and 2204 nodes (7.97 seconds)
OCbc0012I Integer solution of -46.958306 found by rounding after 41414 iterations and 2210 nodes (7.99 seconds)
OCbc0004I Integer solution of -46.96903 found after 41927 iterations and 2232 nodes (8.04 seconds)
OCbc0001I Search completed - best objective -46.96902997737194, took 43100 iterations and 2274 nodes (8.19 seconds)
OCbc0032I Strong branching done 12084 times (125210 iterations), fathomed 115 nodes and fixed 115 variables
OCbc0035I Maximum depth 21, 1650 variables fixed on reduced cost
NLP0014I            12      INFEAS 0.049980845       74 0.369824     OA decomposition
OCbc0031I 17 added rows had average density of 7.4117647
OCbc0013I At root node, 17 cuts changed objective from -48.290147 to -48.039859 in 13 passes
OCbc0014I Cut generator 0 (Probing) - 28 row cuts average 2.0 elements, 1 column cuts (1 active)  in 0.017 seconds - new frequency is -100
OCbc0014I Cut generator 1 (Gomory) - 6 row cuts average 24.7 elements, 0 column cuts (0 active)  in 0.007 seconds - new frequency is -100
OCbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.030 seconds - new frequency is -100
OCbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.001 seconds - new frequency is -100
OCbc0014I Cut generator 4 (FlowCover) - 1 row cuts average 12.0 elements, 0 column cuts (0 active)  in 0.011 seconds - new frequency is -100
OCbc0014I Cut generator 5 (MixedIntegerRounding2) - 18 row cuts average 11.9 elements, 0 column cuts (0 active)  in 0.011 seconds - new frequency is -100
OCbc0010I After 0 nodes, 1 on tree, 1e+50 best solution, best possible -48.039859 (0.14 seconds)
OCbc0012I Integer solution of -44.897039 found by rounding after 506 iterations and 19 nodes (0.31 seconds)
OCbc0012I Integer solution of -45.612438 found by rounding after 1419 iterations and 64 nodes (0.49 seconds)
OCbc0001I Search completed - best objective -45.61243822610445, took 15047 iterations and 498 nodes (2.72 seconds)
OCbc0032I Strong branching done 2682 times (54682 iterations), fathomed 20 nodes and fixed 21 variables
OCbc0035I Maximum depth 17, 489 variables fixed on reduced cost
NLP0014I            13      INFEAS 0.033333315       90 0.634502     OA decomposition
OCbc0031I 11 added rows had average density of 5.8181818
OCbc0013I At root node, 11 cuts changed objective from -48.100568 to -47.722262 in 5 passes
OCbc0014I Cut generator 0 (Probing) - 8 row cuts average 2.0 elements, 1 column cuts (1 active)  in 0.008 seconds - new frequency is -100
OCbc0014I Cut generator 1 (Gomory) - 3 row cuts average 18.7 elements, 0 column cuts (0 active)  in 0.003 seconds - new frequency is -100
OCbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.014 seconds - new frequency is -100
OCbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is -100
OCbc0014I Cut generator 4 (FlowCover) - 1 row cuts average 10.0 elements, 0 column cuts (0 active)  in 0.005 seconds - new frequency is -100
OCbc0014I Cut generator 5 (MixedIntegerRounding2) - 7 row cuts average 9.0 elements, 0 column cuts (0 active)  in 0.004 seconds - new frequency is -100
OCbc0010I After 0 nodes, 1 on tree, 1e+50 best solution, best possible -47.722262 (0.08 seconds)
OCbc0012I Integer solution of -33.961504 found by rounding after 23395 iterations and 156 nodes (4.23 seconds)
OCbc0004I Integer solution of -34.526247 found after 23403 iterations and 157 nodes (4.24 seconds)
OCbc0012I Integer solution of -34.556601 found by rounding after 23907 iterations and 179 nodes (4.38 seconds)
OCbc0012I Integer solution of -34.706601 found by rounding after 23948 iterations and 182 nodes (4.40 seconds)
OCbc0012I Integer solution of -35.0166 found by rounding after 24052 iterations and 187 nodes (4.43 seconds)
OCbc0012I Integer solution of -35.0966 found by rounding after 24190 iterations and 194 nodes (4.47 seconds)
OCbc0004I Integer solution of -35.133175 found after 24331 iterations and 202 nodes (4.52 seconds)
OCbc0004I Integer solution of -35.443174 found after 24378 iterations and 204 nodes (4.55 seconds)

odow: edited formatting

odow commented 6 years ago

It looks like the solver didn't produce a .sol file. Is this still an issue?

odow commented 6 years ago

Closing as this now has a better error message