You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote the following script in Julia because I want to test the piecewise-linear function for different solvers. Solvers GLPK, Gurobi and HiGHS are working. However, when I try to add EAGO and CPLEX I keep getting errors...
import Pkg
Pkg.add("JuMP")
ENV["CPLEX_STUDIO_BINARIES"] = raw"C:\Program Files\IBM\ILOG\CPLEX_Enterprise_Server1210\CPLEX_Studio\cplex\bin\x64_win64"
Pkg.add("CPLEX")
Pkg.build("CPLEX")
using JuMP, CPLEX, PiecewiseLinearOpt
m = Model(CplexSolver())
f(x) = x^2
@variable(m, -2 <= x <= 2)
d = [-2, -1, 0, 1, 2]
fd = f.(d)
z = piecewiselinear(m, x, d, fd)
@objective(m, Min, z)
optimize!(m)
solution = (value(x), value(f(x)))
print(solution)
In the GitHub for EAGO someone gave me the following answer:
Ah, this is because of PiecewiseLinearOpt. Adding that package will downgrade JuMP and EAGO to versions that were designed in earlier versions of Julia and likely will not work in Julia v1.10.
(eago2) pkg> st
Status `/private/tmp/eago2/Project.toml`
[a076750e] CPLEX v1.0.3
⌅ [4076af6c] JuMP v0.23.2
[0f51c51e] PiecewiseLinearOpt v0.4.1
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`
I wrote the following script in Julia because I want to test the piecewise-linear function for different solvers. Solvers GLPK, Gurobi and HiGHS are working. However, when I try to add EAGO and CPLEX I keep getting errors...
The error that is shown is the following:
In the GitHub for EAGO someone gave me the following answer:
Ah, this is because of PiecewiseLinearOpt. Adding that package will downgrade JuMP and EAGO to versions that were designed in earlier versions of Julia and likely will not work in Julia v1.10.
If you need to use PiecewiseLinearOpt with a more recent version of JuMP, you should post an issue here: https://github.com/jump-dev/PiecewiseLinearOpt.jl/issues.
Can you help me to do this?
Kind regards,
Kiki
The text was updated successfully, but these errors were encountered: