[Scip] SCIP API

Tobias Achterberg achterberg at zib.de
Wed Mar 24 11:45:18 MET 2010


Hi Eugene,

Eugene Zak wrote:
> Do you have a sample how to call SCIP from C++ or C#? Does SCIP has an
> interface with a sparse matrix presented by 3 arrays:
>
> int[] nColStart = new int[nCol + 1];
>
> int[] nRowInd = new int[nNonZeros];
>
> double[] dMatElem = new double[nNonZeros];


Yes, there is a simple example in "scip/examples/Queens" that illustrates how to create, 
populate, and solve a model in SCIP, and how to query the solution afterwards.

No, there is no direct way to pass in sparse matrices in column or row format to SCIP. As 
SCIP is not matrix based but constraint based, this would not be natural. You need to 
create and add each constraint individually.

Note also that in SCIP the constraints and variables are not referenced by indices but by 
pointers to the correspondings structs.


Tobias


More information about the Scip mailing list