May 2018
Beginner to intermediate
364 pages
7h 43m
English
The next example is from the web page https://jump.readthedocs.io/en/release-0.2/jump.html. The code is given here:
using JuMP
using ECOS
m= Model(solver =ECOSSolver())
@variable(m, 0 <= x <= 2 )
@variable(m, 0 <= y <= 30 )
@setObjective(m, Max, 5x + 3*y )
@addConstraint(m, 1x + 5y <= 3.0 )
print(m)
status = solve(m)
println("Objective value: ", getObjectiveValue(m))
println("x = ", getValue(x))
println("y = ", getValue(y))
First, the objective function is shown here:

The output is given in the following screenshot:
For the code of m=Model(solver=ECOSSolver()) in the preceding program, the solver contained in the package ...
Read now
Unlock full access