[SCIP] error in Julia interface

Ambros Gleixner gleixner at zib.de
Thu Apr 13 16:04:57 CEST 2017


Hi Yankai,

In general, SCIP does not return duals since it supports the more
general class of constraint integer programs, for which there is no
simple definition of duality.  It can do so for LPs and MIPs when
presolving is turned off, but this is a bit special so it is currently
not supported through the Julia interface.

Your solution of using "@constraint" and "@objective" intuitively looks
OK, but I am not an expert here.  Our dev with more Julia knowledge is
currently away from keyboard, but might be able to provide more next month.

Best regards,
Ambros


Am 12.04.2017 um 16:44 schrieb Yankai Cao:
> 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
>> <mailto: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 <mailto: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 <mailto:Scip at zib.de>
>> https://listserv.zib.de/mailman/listinfo/scip
> 

-- 
Ambros Gleixner, Zuse Institute Berlin, http://www.zib.de/gleixner


More information about the Scip mailing list