How to read a QCVRP instance file: First line: N depot Second line: K Q Third line: 2N entries containing the demands and costs for single-customer routes. To read them we do: for(i = 0; i < N; ++ i) in >> d[i] >> c[0][i]; Following lines: Quadratic costs. To read them we proceed as follows: for(i = 0; i < N; ++ i) for(j = 0; j < N; ++ j) for(k = i + 1; k < N; ++ k) if(i != j && j != k && j != depot) in >> c[i][j][k]; ----------------------------------------------- Legend: N : Total number of nodes (number of customers + 1) depot : Index of the depot node (normally 0). K : Number of vehicles Q : Vehicle capacity d[i] : Demand of node i c[0][i] : Cost of single customer route 0-i-0. c[i][j][k] : Cost of q-edge ({i,k}, j).