[SCIP] error in Julia interface
Yankai Cao
yankai.cao at gmail.com
Wed Apr 12 16:44:22 CEST 2017
Hi, Ambros,
Here is the test code of Julia:
using JuMP, SCIP
m=Model()
@variable(m, -10<= x <=10, start=1)
@variable(m, -100<= y <=100, start=1)
@NLconstraint(m, x^2 + y^2 == 10)
@NLobjective(m, Min, x*y)
m.solver = SCIPSolver()
status = solve(m)
I installed scipoptsuite-4.0.0 first and then install Julia interface with Pkg.add(“SCIP”).
The error happened because in /JuMP/src/nlp.jl:1259
if applicable(MathProgBase.getconstrduals, m.internalModel) && applicable(MathProgBase.getreducedcosts, m.internalModel)
nlduals = MathProgBase.getconstrduals(m.internalModel)
and in .julia/v0.4/SCIP/src/mpb_interface.jl:209
getconstrduals(m::SCIPMathProgModel) = error("Not implemented for SCIP.jl")
The error disappear when I comment out line 209 of mob_interface.jl or replace
@NLconstraint(m, x^2 + y^2 == 10)
@NLobjective(m, Min, x*y)
to
@constraint(m, x^2 + y^2 == 10)
@objective(m, Min, x*y)
Regards,
Yankai
> On Apr 12, 2017, at 2:05 AM, Ambros Gleixner <gleixner at zib.de> wrote:
>
> Hi Yankai,
>
> We will need some more information from your side to help. Can you send your Julia code and describe in more detail your setup?
>
> Best,
> Ambros
>
>
> On 10.04.2017 22:36, Yankai Cao wrote:
>> HI, I am using SCIP 4.0 with Julia. SCIP can solve my problem to global
>> optimality. But I got the following error. Is there anyway to remove this?
>>
>>
>> Regards,
>> Yankai
>> SCIP Status : problem is solved [optimal solution found]
>> Solving Time (sec) : 0.07
>> Solving Nodes : 98
>> Primal Bound : +7.94432584076847e-01 (5 solutions)
>> Dual Bound : +7.94432584076847e-01
>> Gap : 0.00 %
>> ERROR: LoadError: Not implemented for SCIP.jl
>> in getconstrduals at /home/cao27/.julia/v0.4/SCIP/src/mpb_interface.jl:209
>> in solvenlp at /home/cao27/.julia/v0.4/JuMP/src/nlp.jl:1259
>> in solve at /home/cao27/.julia/v0.4/JuMP/src/solvers.jl:138
>> in include at ./boot.jl:261
>> in include_from_node1 at ./loading.jl:320
>> in process_options at ./client.jl:280
>> in _start at ./client.jl:378
>>
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> https://listserv.zib.de/mailman/listinfo/scip
>>
>
> --
> Ambros Gleixner, Zuse Institute Berlin, http://www.zib.de/gleixner
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20170412/70676d35/attachment.html>
More information about the Scip
mailing list