In [4]:
using JuMP
m = Model()
@variables m begin
r>=0
g>=0
end
@constraints m begin
r + g <= 8
r >= 1
g >= 1
r <= 5
g <= 6
end
@objective(m, Max, 3r+2g)
solve(m)
println(getobjectivevalue(m))
writeLP(m, "costs.lp")
Changing Kernel to Execute Shell Command
In [1]:
!less "costs.lp"
In [3]:
!glpsol --cpxlp costs.lp --ranges costs.sen
In [4]:
!less "costs.sen"
In [ ]:
Pkg.add("Plots")
In [2]:
%%julia
println("Hello from Julia!\n")
[1:10]
In [ ]: