[SCIP] About program for SOCP with C++
Benjamin Müller
benjamin.mueller at zib.de
Thu Feb 4 16:15:09 CET 2016
Dear Satoshi,
an easy way to debug your program is to compile SCIP in debug mode (as
you have done it) and run your binary with:
gdb ./bin/test
In gdb you can display all values that you need to consider. It would be
worth to search for some gdb tutorials if you are not familiar with it.
When creating the SOC constraint you need to ensure that the right hand
side is always non-negative. This will be checked with the two
assertions in SCIPcreateConsSOC() which fail in your case.
Best regards,
Benny
On 02/04/2016 03:34 PM, Satoshi Shirai wrote:
> Dear all,
>
> When I run my program with dbg, I got the following error.
> What would be a good way to debug it?
>
> $ ./bin/test
> test: src/scip/cons_soc.c:5117: SCIPcreateConsSOC: Assertion `rhsvar
> == ((void *)0) || rhscoeff <= 0.0 || SCIPisGE(scip, local ?
> SCIPcomputeVarLbLocal(scip, rhsvar) : SCIPcomputeVarLbGlobal(scip,
> rhsvar), -rhsoffset)' failed.
>
>
> Sincerely,
> Satoshi Shirai
>
>
> On 2016/01/29 17:09, 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()
> > SCIPcreateProbBasic()
>> 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