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

missing definition #29

Closed
ORESoftware opened this issue Apr 8, 2015 · 4 comments
Closed

missing definition #29

ORESoftware opened this issue Apr 8, 2015 · 4 comments

Comments

@ORESoftware
Copy link

what's up brolini

in your one example

just FYI

MIPSolver will be undefined

I assume the way to solve this is to simply install MIPSolver with Pkg.add

and then declare it with

using MIPSolver

at the top of your .jl file

but since I am new to Julia and CBC, this is all guesswork on my part

thanks

here is the file I am talking about:

image

@ORESoftware
Copy link
Author

Well, I am having trouble finding how to define MIPSolver in the example ; could you please help with this? thanks

@ORESoftware
Copy link
Author

I changed the file to:

using MathProgBase
using JuMP
using Cbc

function knapsack()
f = Float64[3, 1, 2]
A = [7. 3. 1.]
capacity = 10.
solution = mixintprog(-f, A, '<', capacity, 'I', 0, 1, MIPSolver(:Cbc,LogLevel=0))
println("Solution status: ", solution.status)
println("Optimal value: ", solution.objval) # should be -7
print("Solution vector: ")
show(solution.sol)
println()

end

knapsack()

and this seems like it loads the correct dependencies. However, the program is just churning and burning, no output, CPU is HOT. what kind of example optimization problem did you feed us?

@mlubin mlubin closed this as completed in 6cfd13e Apr 8, 2015
@mlubin
Copy link
Member

mlubin commented Apr 8, 2015

Sorry about that, this example suffered from bitrot and wasn't being tested.

@ORESoftware
Copy link
Author

np, saved the next person some time, thanks for fixing

it worked

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

No branches or pull requests

2 participants