<div>Dear Sir:</div><div>         My name is LiuFeng, I am a student of Computer Science In Ji Lin University of China. I am learning to use CBC Library to solve some MIP problems. I met a problem,but I don&#39;t know how to solve it.</div>
<div>         The problem is as follows.</div><div>          It is an Integer Programming problem.</div><div>          The target function is Min z=x1 + x2 + x3 + x4</div><div>          The Constraints are</div><div>                                             4*x1 + 3*x2  + 2*x3             =2</div>
<div>                                                            x2 +  2*x3 + 5*x4 = 2</div><div>                                             xi &gt;= 0 (i=1,2,3,4) all of them have the constraint of integer.</div><div>          </div>
<div>          The CBC Codes is as follows:</div><div>int _tmain(int argc, _TCHAR* argv[])<br>{</div><div>     OsiClpSolverInterface solver1;<br>     const int numcols = 4;<br>     const int numrows = 2;<br>     int nnz = 6;<br>
    CoinBigIndex *start = new int[numcols+1];<br>    int* index = new int[nnz];<br>    double* value = new double[nnz];<br>    double *collb = new double[numcols];<br>    double *colub = new double[numcols];<br>    double *obj = new double[numcols];<br>
    double *rowlb = new double[numrows];<br>    double *rowub = new double[numrows];<br> //object<br> obj[0] = -1.0; obj[1] = -1.0; obj[2]=-1.0; obj[3]=-1.0;</div><div>  // column bounds<br>    collb[0] = 0;  colub[0] = solver1.getInfinity(); <br>
    collb[1] = 0;  colub[1] = solver1.getInfinity(); <br>    collb[2] = 0;  colub[2] = solver1.getInfinity(); <br>    collb[3] = 0;  colub[3] = solver1.getInfinity(); </div><div> // matrix<br> start[0]=0; index[0] = 0; value[0] = 4.0;<br>
 start[1]=1; index[1] = 0; value[4] = 3.0;<br>    index[2] = 1; value[5] = 1.0;<br> start[2]=3; index[3] = 0; value[6] = 2.0;<br>    index[4] = 1; value[7] = 2.0;<br> start[3]=5; index[5] = 1; value[8] = 5.0;<br> start[4]=6;</div>
<div> // row bounds<br> rowlb[0] = 2.; rowub[0] = 2.;<br>    rowlb[1] = 2.; rowub[1] = 2.;<br> solver1.loadProblem(numcols, numrows, start, index, value, collb, colub, obj, rowlb, rowub);<br> solver1.setInteger(0); // Sets x0 to integer<br>
 solver1.setInteger(1); // Sets x1 to integer<br> solver1.setInteger(2); // Sets x2 to integer<br> solver1.setInteger(3); // Sets x3 to integer<br> solver1.setObjSense(-1000.0); // Maximise</div><div> CbcModel solver(solver1);<br>
 solver.branchAndBound();<br> bool optimal = solver.isProvenOptimal();<br> const double *val = solver.getColSolution();<br> printf(&quot;Solution %g %g %g %g\n&quot;, val[0], val[1], val[2], val[3]);<br> return 0;</div><div>
}</div><div> </div><div>       I can&#39;t get the result. Would you please tell me how to solve them?Thank you very much!<br></div>