2.2 Instance syntax

A BC instance begins with some optional lines of comments, which are strings preceded by a semicolon or by a asterisk:

  <COMMENT> ::= ; <STRING> | * <STRING>

The first line gives the problem type : -1 for minimization, 1 for maximization. This can be followed by other characters ignored by BiqCrunch.

  <#MIN/MAX> ::=  <-1> | <1> <STRING>

The next line defines the number of constraints, which is a positive integer such that <INT>= mI + mE.

  <#CONSTRAINTS> ::= <INT> | <INT> <STRING>

Similar to the SDPA format, we define the number of blocks of the matrices of the input file. As seen before, this line also admits characters after the definition.

  <#BLOCKS> ::= <INT> | <INT> <STRING>

In the BC format an instance can have 1 or 2 blocks depending on the model: if the model contains no inequality constraints, <INT> must be equal to 1; if the model has inequality constraints <INT> must be equal to 2.

The third entry of the instance describes the size of the blocks of the matrices.

<SIZE> ::= <INT_1>           | {<INT_1>}           |  
           <INT_1>, -<INT_2> | {<INT_1>, -<INT_2>}

If the problem has no inequalities, then the size of the first block of the matrices (equal to n + 1) is provided (<INT_1>). If the problem contains inequalities then the size of the second block must also be given (<INT_2>). It always starts with a minus before <INT_2> to indicate that the values of the blocks are only on the diagonal of the matrix, and it is equal to mI. In the next line, the right-hand side values of the constraints are given as a sequence of values.

<RIGHT-HAND_SIDE> ::= <REAL_k> | <REAL_k> <RIGHT-HAND_SIDE>

The number of values must be equal to mI + mE and <REAL_k> must be the right-hand side value of constraint k.

Finally, all the matrices that describe the objective function and the left-hand side of the constraints must be provided. The first matrix corresponds to S0, the objective function. Each line represents to a non-zero element of the matrix.

<OBJ_MATRIX_EL> ::= 0 1 <INT_1> <INT_2> <REAL>

where the first (0) and second number (1) respectively mean that this line concerns the objective function matrix and the first block. <INT_1> and <INT_2> are the row and the column of the non-zero element of the matrix and <REAL> is its value. <INT_1> and <INT_2> must be greater than 0 and less or equal to n + 1. Similarly, for each constraint k the non-zero coefficients of the matrix Sk is given in sparse format:

<CONS_MATRIX_EL> ::= <INDEX_k> 1 <INT_1> <INT_2> <REAL>

where <INDEX_k> must be equal to k.

In the case constraint j is an inequality, one has to provide the value of the second block of the matrix:

<INEQ_MATRIX_EL> ::= <INDEX_j> 2 <INT> <INT> <REAL>

where <INDEX_j> must be equal to j, <INT> ∈ {1,,mI} is the counter for the inequality, and <REAL> is either 1.0 for a inequality or -1.0 for a inequality.