Created
March 21, 2015 04:48
-
-
Save chkwon/c66a56977d5f5684b7fb to your computer and use it in GitHub Desktop.
Simple Gurobi Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP, Gurobi | |
m = Model(solver=GurobiSolver()) | |
@defVar(m, x <= 5) | |
@defVar(m, y >= 45) | |
@setObjective(m, Min, x + y) | |
@addConstraint(m, 50x + 24y <= 2400) | |
@addConstraint(m, 30x + 33y <= 2100) | |
status = solve(m) | |
println("Optimal objective: ", getObjectiveValue(m)) | |
println("x = ", getValue(x), " y = ", getValue(y)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment