Не могли бы вы мне помочь, как я могу сделать модель CPLEX с Gap в Julia v.1.1.1?В предыдущей версии я использовал
Tsp=Model(solver=CplexSolver(CPX_PARAM_EPGAP=0.00009))
, но новая версия выдает ошибку при запуске модели.
Model(with_optimizer(CPLEX.Optimizer),CPX_PARAM_EPGAP=0.00009)
ERROR: MethodError: no method matching Model(; CPX_PARAM_EPGAP=9.0e-5)
Closest candidates are:
Model(; caching_mode, solver) at C:\Users\admin\.juliapro\JuliaPro_v1.1.1.1\packages\JuMP\ibcEh\src\JuMP.jl:190 got unsupported keyword argument "CPX_PARAM_EPGAP"
Model(::Dict{MathOptInterface.VariableIndex,MathOptInterface.ConstraintIndex{MathOptInterface.SingleVariable,MathOptInterface.GreaterThan{Float64}}}, ::Dict{MathOptInterface.VariableIndex,MathOptInterface.ConstraintIndex{MathOptInterface.SingleVariable,MathOptInterface.LessThan{Float64}}}, ::Dict{MathOptInterface.VariableIndex,MathOptInterface.ConstraintIndex{MathOptInterface.SingleVariable,MathOptInterface.EqualTo{Float64}}}, ::Dict{MathOptInterface.VariableIndex,MathOptInterface.ConstraintIndex{MathOptInterface.SingleVariable,MathOptInterface.Integer}}, ::Dict{MathOptInterface.VariableIndex,MathOptInterface.ConstraintIndex{MathOptInterface.SingleVariable,MathOptInterface.ZeroOne}}, ::MathOptInterface.AbstractOptimizer, ::Dict{MathOptInterface.ConstraintIndex,AbstractShape}, ::Set{Any}, ::Any, ::Any, ::Dict{Symbol,Any}, ::Int64, ::Dict{Symbol,Any}) at C:\Users\admin\.juliapro\JuliaPro_v1.1.1.1\packages\JuMP\ibcEh\src\JuMP.jl:146 got unsupported keyword argument "CPX_PARAM_EPGAP"
Model(::OptimizerFactory; bridge_constraints, kwargs...) at C:\Users\admin\.juliapro\JuliaPro_v1.1.1.1\packages\JuMP\ibcEh\src\JuMP.jl:220
...
Stacktrace:
[1] kwerr(::NamedTuple{(:CPX_PARAM_EPGAP,),Tuple{Float64}}, ::Type) at .\error.jl:125
[2] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:CPX_PARAM_EPGAP,),Tuple{Float64}}, ::Type{Model}) at .\none:0
[3] #Model#7(::Bool, ::Base.Iterators.Pairs{Symbol,Float64,Tuple{Symbol},NamedTuple{(:CPX_PARAM_EPGAP,),Tuple{Float64}}}, ::Type, ::OptimizerFactory) at C:\Users\admin\.juliapro\JuliaPro_v1.1.1.1\packages\JuMP\ibcEh\src\JuMP.jl:220
[4] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:CPX_PARAM_EPGAP,),Tuple{Float64}}, ::Type{Model}, ::OptimizerFactory) at .\none:0
, но без пробела она запускалась
Model(with_optimizer(CPLEX.Optimizer))
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: CPLEX
Спасибоочень сильно
делает модель Tsp.
Tsp=Model(with_optimizer(CPLEX.Optimizer,CPX_PARAM_EPGAP=0.00009))
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: CPLEX