CoinOptServices.jl
CoinOptServices.jl copied to clipboard
broken when switching from quadratic to linear objective
The following test causes all sorts of mayhem after the fix in https://github.com/JuliaOpt/JuMP.jl/pull/898
using JuMP,CoinOptServices
m = Model(solver=OsilBonminSolver())
@variable(m,x >=0)
@variable(m,y >=0)
@constraint(m, x + 2*y <= 4)
@constraint(m, 2*x + y <= 4)
@objective(m,Min, x^2) # Quadratic objective function
solve(m)
@show getobjectivevalue(m)
@objective(m,Max, 3*x + 4*y) # Change to linear objective function
solve(m)
@show getobjectivevalue(m)
What kind of "mayhem" exactly?
getobjectivevalue(m) = 3.0489213312228895e-9
<?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="error">
</generalStatus>
<message>syntax error, unexpected ENDOFELEMENT, expecting GREATERTHAN</message>
</general>
</osrl>
WARNING: /home/mlubin/.julia/v0.5/CoinOptServices/.osil/results.osrl is empty
WARNING: Not solved to optimality, status: Error
getobjectivevalue(m) = 3.0489213312228895e-9
This seems like a related issue:
using JuMP, CoinOptServices
m = Model(solver=OsilBonminSolver())
@variable(m, 0 <= v <= 2)
@variable(m, 1 <= x <= 5)
@constraint(m, v >= 0.0 * x^2 + x)
@objective(m, Min, v)
status = solve(m)
println("Objective value: ", getobjectivevalue(m))
gives
<?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="error">
</generalStatus>
<message>syntax error, unexpected ENDOFELEMENT, expecting GREATERTHAN</message>
</general>
</osrl>
WARNING: /home/mlubin/.julia/v0.5/CoinOptServices/.osil/results.osrl is empty
WARNING: Not solved to optimality, status: Error
Objective value: NaN
What does the osil file look like?
I don't have any need for this to work, but I'll be disabling CoinOptServices in the default JuMP tests until it passes.
Is there a way of doing that while still allowing them to run if included here?
I don't have this package installed locally at the moment. Can you gist the problemantic .osil/problem.osil files?
Ref https://github.com/JuliaOpt/JuMP.jl/issues/901 for running JuMP's tests for this solver only