[SCIP] About program for SOCP with C++

Benjamin Müller benjamin.mueller at zib.de
Fri Jan 29 10:00:57 CET 2016


Dear Shirai,

I guess you forgot to call SCIPcreateProbBasic(...) or for more advanced 
usage SCIPcreateProb(...).

By the way, you should release your constraints before releasing the 
variables. Since you don't use the constraints after solving the problem 
anyway, you can directly call SCIPreleaseCons() after SCIPaddCons().

Maybe you can take a look into circle.c in the callable library example 
of SCIP ([scipdir]/examples/CallableLibrary/src/circle.c). There you see 
how to create and solve a problem containing SOC constraints.


Best regards,

Benny


On 01/29/2016 09:09 AM, Satoshi Shirai wrote:
> Dear all,
>
> I am programming to solve the following problem.
> But my program dumps core before SCIPsolve().
> It does not make sense.
> I use the following functions.
>
> SCIPcreate()
> SCIPincludeDefaultPlugins()
> SCIPsetObjsense()
> SCIPcreateVar()
> SCIPaddVar()
> SCIPcreateConsLinear()
> SCIPaddCoefLinear()
> SCIPaddCons()
> SCIPcreateConsSOC()
> SCIPaddCons()
> SCIPsolve()
> SCIPgetBestSol()
> SCIPprintStatistics()
> SCIPgetSolVar()
> SCIPreleaseVar()
> SCIPreleaseCons()
> SCIPfree()
>
> I have read the documents but I still don't know how to use suitable 
> for the problem.
>
>
> Sincerely,
> Shirai
>
>
> On 2015/12/16 16:40, Satoshi Shirai wrote:
>> Dear,
>>
>> I want to solve SOCP.
>> But I don't understand how to program to solve it with C++.
>>
>> maximize     a^T z
>> subject to    A1 x + A2 z = t
>>         || B x || <= u^T x
>>
>> where
>>
>> a, z \in R^2
>> x, u \in R^9
>> A1 \in R^{6*9}
>> A2 \in R^{6*2}
>> B  \in R^{9*9}
>>
>>
>> I think to use the following function mainly, right?
>> I have read the documents
>> but I still don't know how to use suitable for the problem.
>>
>> SCIPcreateVar()
>> SCIPcreateConsLinear()
>> SCIPcreateConsSOC()
>>
>>
>> Regards,
>> Shirai
>>
>

-- 
______________________________
Benjamin Müller
Zuse Institute Berlin
Takustr. 7, 14195 Berlin
benjamin.mueller at zib.de
+49 30 841 85-195



More information about the Scip mailing list