Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## question 15
- using Clp
- #M = Model(solver = GLPKSolverMIP())
- M = JuMP.Model(solver = ClpSolver())
- @variable(M, x[1:3] >= 0)
- @objective(M, Min, 14*x[1] + 16*x[2] + 15*x[3])
- @constraint(M, yDC, 2*x[2] + x[3] <= 3)
- @constraint(M, yED, 2*x[1] + x[3] <= 3)
- @constraint(M, y1, x[1] >= 1)
- @constraint(M, y2, x[2] >= 1)
- @constraint(M, y3, x[3] >= 1)
- status = solve(M)
- println("objective = ", getobjectivevalue(M))
- println(getdual(yDC))
- println(getdual(yED))
- println(getdual(y1))
- println(getdual(y2))
- println(getdual(y3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement