Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save a solution even if infeasible #9

Merged
merged 2 commits into from
Mar 24, 2017
Merged

Conversation

chriscoey
Copy link
Contributor

to avoid an UndefRefError I'm getting in Pajarito tests

  Got an exception of type UndefRefError outside of a @test
  UndefRefError: access to undefined reference
   in getsolution(::ConicNonlinearBridge.NonlinearToConicBridge) at /home/chriscoey/.julia/v0.5/ConicNonlinearBridge/src/nonlinear_to_conic.jl:254
   in solve_cbf(::String, ::String, ::Pajarito.PajaritoSolver, ::Bool) at /home/chriscoey/.julia/v0.5/Pajarito/test/conictest.jl:49

to avoid an UndefRefError I'm getting in Pajarito tests
@mlubin
Copy link
Owner

mlubin commented Mar 24, 2017

Meh, the proper fix is JuliaOpt/MathProgBase.jl#156, but until then I'll merge this if it doesn't break anything. The main issue is that we don't currently have a way to query a model and ask if a solution is available.

@chriscoey
Copy link
Contributor Author

sure but other solvers don't usually give you an UndefRefError when you ask for a solution

@mlubin
Copy link
Owner

mlubin commented Mar 24, 2017

Pretty sure cplex will throw an error, for example, if it doesn't have a solution to give you.

@@ -255,7 +250,4 @@ MathProgBase.getsolution(m::NonlinearToConicBridge) = m.solution[1:size(m.A_ini,
MathProgBase.getsolvetime(m::NonlinearToConicBridge) = MathProgBase.getsolvetime(m.nlp_model)

MathProgBase.numvar(m::NonlinearToConicBridge) = m.numVar
function MathProgBase.numconstr(m::NonlinearToConicBridge)
# is numconstr well defined for conic models?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to remove this comment? It's there for a reason

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I thought it was well enough defined because there is a way to query number of constraints in conic models

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the way?

@mlubin mlubin merged commit d3cd357 into mlubin:master Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants