Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

broken when switching from quadratic to linear objective #26

Open
mlubin opened this issue Nov 23, 2016 · 7 comments
Open

broken when switching from quadratic to linear objective #26

mlubin opened this issue Nov 23, 2016 · 7 comments

Comments

@mlubin
Copy link
Member

mlubin commented Nov 23, 2016

The following test causes all sorts of mayhem after the fix in jump-dev/JuMP.jl#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)
@tkelman
Copy link
Contributor

tkelman commented Nov 23, 2016

What kind of "mayhem" exactly?

@mlubin
Copy link
Member Author

mlubin commented Nov 23, 2016

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

@mlubin
Copy link
Member Author

mlubin commented Nov 23, 2016

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

@tkelman
Copy link
Contributor

tkelman commented Nov 25, 2016

What does the osil file look like?

@mlubin
Copy link
Member Author

mlubin commented Nov 26, 2016

I don't have any need for this to work, but I'll be disabling CoinOptServices in the default JuMP tests until it passes.

@tkelman
Copy link
Contributor

tkelman commented Nov 26, 2016

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?

@mlubin
Copy link
Member Author

mlubin commented Apr 1, 2017

Ref jump-dev/JuMP.jl#901 for running JuMP's tests for this solver only

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants