[SCIP] Get coefficients values and right hand side

Stefan Vigerske stefan at math.hu-berlin.de
Wed May 1 05:17:45 CEST 2019


Hi,

what matrix and right-hand-side? This isn't defined for CIPs.

You could iterate through the constraint handlers in SCIP, if it is one 
that you know handles some from of linear constraint (cons_linear, 
cons_knapsack, cons_varbound, etc), then the constraint handler can give 
you its constraints. Further, for each constraint handler, there exist 
methods to access the constraint data, e.g., coefficients or left- and 
right-hand-sides, if applicable.

But as you are not the first one who wants only the MIP part of the CIP, 
the functions in pub_misc_linear.h might be helpful, too:
https://scip.zib.de/doc-6.0.1/html/pub__misc__linear_8h.php
The confusingly named SCIPgetConsVals() gives the coefficients. It seems 
that you have to guess the correct number of coefficients or hope that 
it coincides with SCIPgetConsNVars(). It's probably safter to use 
SCIPconsGetRow() and then query the row.

Stefan

On 4/30/19 2:36 PM, Mohamed Mustapha Kabbaj wrote:
> Hello everyone,
> 
> I would like to get values of matrix coefficients and right hand side. I
> found some callable functions :
> SCIPgetConss
> SCIPgetConsRhs
> SCIPConsGetVals
> 
> Are these values  convenient and does it exist a simple tip to get that
> values.
> 
> Thank you in advance
> 
> Kabbaj
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 



More information about the Scip mailing list