Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using JuMP, GLPK
- m = Model(GLPK.Optimizer)
- @variable(m, 0 <= x <=2)
- @variable(m, 0 <= y <= 30)
- @objective(m, Max, 5x + 3y)
- @constraint(m, 1x + 5y <= 3.0)
- JuMP.optimize!(m)
- println("Objectivevalue:", JuMP.objective_value(m))
- println("x = ", JuMP.value(x))
- println("y = ", JuMP.value(y))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement