Ignore:
Timestamp:
Aug 9, 2003 5:09:12 AM (18 years ago)
Author:
forrest
Message:

For Yiming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pre/Test/unitTest.cpp

    r186 r192  
    518518    CoinMpsIO m;
    519519    std::string fn = mpsDir+"exmip1";
     520    fn = "Test/subGams4";
    520521    m.readMps(fn.c_str(),"mps");
    521     ClpSimplex solution;
    522     solution.loadProblem(*m.getMatrixByCol(),m.getColLower(),m.getColUpper(),
     522    ClpSimplex model;
     523    model.loadProblem(*m.getMatrixByCol(),m.getColLower(),m.getColUpper(),
    523524                         m.getObjCoefficients(),
    524525                         m.getRowLower(),m.getRowUpper());
    525526    // Message handler
    526     MyMessageHandler messageHandler(&solution);
     527    MyMessageHandler messageHandler(&model);
    527528    std::cout<<"Testing derived message handler"<<std::endl;
    528     solution.passInMessageHandler(&messageHandler);
    529     solution.primal();
     529    model.passInMessageHandler(&messageHandler);
     530    model.messagesPointer()->setDetailMessage(1,102);
     531    model.setFactorizationFrequency(10);
     532    model.primal();
    530533
    531534    // Write saved solutions
    532     int nc = solution.getNumCols();
     535    int nc = model.getNumCols();
    533536    int s;
    534537    std::deque<StdVectorDouble> fep = messageHandler.getFeasibleExtremePoints();
     
    541544      }
    542545    }
    543     // solve again without scaling
     546    // Solve again without scaling
     547    // and maximize then minimize
    544548    messageHandler.clearFeasibleExtremePoints();
    545     solution.scaling(0);
    546     solution.allSlackBasis();
    547     solution.primal();
     549    model.scaling(0);
     550    model.setOptimizationDirection(-1);
     551    model.primal();
     552    model.setOptimizationDirection(1);
     553    model.primal();
    548554    fep = messageHandler.getFeasibleExtremePoints();
    549555    numSavedSolutions = fep.size();
Note: See TracChangeset for help on using the changeset viewer.