Created
April 20, 2018 16:39
-
-
Save jac0320/bf31e0af348c74fd5b12dc882a4311b2 to your computer and use it in GitHub Desktop.
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()) | |
@variable(m, 5 >= x >= 0) | |
@variable(m, 10 >= y >= 0 , Int) | |
@variable(m, z , Bin) | |
@constraint(m, x + y + z <= 10) | |
@constraint(m, x + 2y + z <= 15) | |
@objective(m, Max, x + 3y + 5z) | |
solve(m) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment