91mUndefVarError: ClpSolver not defined

jump
optimization

#1

Hi, I am written a small code to elaborate the error which I am facing:

using JuMP
using Cbc
m = Model(solver = ClpSolver())
@variable(m, 0 <= x <= 2 )
@variable(m, 0 <= y <= 30 )
@objective(m, Max, 5x + 3y )
@constraint(m, 1x + 5y <= 3.0 )
print(m)
status = solve(m)

I remember that I have ran this code perfectly fine a week back, but suddenly, I am facing the following error:

LoadError: e[91mUndefVarError: ClpSolver not definede[39m

while loading C:\Users\rajatsanyal\Desktop\JULIA Coding\Practice\test_code2.jl, in expression starting on line 3

include_string(::String, ::String) at loading.jl:522

include_string(::Module, ::String, ::String) at Compat.jl:84

(::Atom.##112#116{String,String})() at eval.jl:109

withpath(::Atom.##112#116{String,String}, ::String) at utils.jl:30

withpath(::Function, ::String) at eval.jl:38

hideprompt(::Atom.##111#115{String,String}) at repl.jl:67

macro expansion at eval.jl:106 [inlined]

(::Atom.##110#114{Dict{String,Any}})() at task.jl:80

Any idea how to resolve the issue. Thanks for your help in advance.


#2

using Clp?


#3

Thanks. Sorry, it was a naive mistake. :expressionless:


#4

Hi. In the main code, I am getting the following error message:

LoadError: e[91mReadOnlyMemoryError()e[39m

while loading C:\Users\rajatsanyal\Desktop\JULIA Coding\Coplanning.jl, in expression starting on line 411

optimize!(::Cbc.CbcMathProgSolverInterface.CbcMathProgModel) at CbcSolverInterface.jl:152

Any suggestion why am I getting a ROM error message?


#5

Hey. Please read PSA: make it easier to help you, especially the points regarding a minimal working example and version numbers.