Ignore:
Timestamp:
Jan 18, 2007 2:37:10 PM (13 years ago)
Author:
forrest
Message:

fix bug in ampl interface and try slp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CoinSolve.cpp

    r505 r520  
    15881588                solveOptions.setSpecialOption(4,barrierOptions);
    15891589              }
    1590               model2->initialSolve(solveOptions);
     1590              OsiSolverInterface * coinSolver = model.solver();
     1591              OsiSolverLink * linkSolver = dynamic_cast< OsiSolverLink*> (coinSolver);
     1592              if (!linkSolver) {
     1593                model2->initialSolve(solveOptions);
     1594              } else {
     1595                // special solver
     1596                double * solution = linkSolver->nonlinearSLP(slpValue,1.0e-5);
     1597                if (solution) {
     1598                  memcpy(model2->primalColumnSolution(),solution,
     1599                         CoinMin(model2->numberColumns(),linkSolver->coinModel()->numberColumns())*sizeof(double));
     1600                  delete [] solution;
     1601                } else {
     1602                  printf("No nonlinear solution\n");
     1603                }
     1604              }
    15911605              basisHasValues=1;
    15921606              if (dualize) {
Note: See TracChangeset for help on using the changeset viewer.