Changeset 2458


Ignore:
Timestamp:
Dec 30, 2018 1:55:01 PM (7 weeks ago)
Author:
unxusr
Message:

get reduced cost in C api and more doxygen doc

Location:
trunk/Cbc/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/Cbc_C_Interface.cpp

    r2456 r2458  
    798798}
    799799
     800COINLIBAPI const double * COINLINKAGE
     801Cbc_getReducedCost(Cbc_Model * model)
     802{
     803    if ( Cbc_getNumIntegers(model)==0 || model->relax_==1 )
     804        return (model->solver_->getReducedCost());
     805
     806    return model->model_->getReducedCost();
     807}
     808
     809
     810COINLIBAPI const double * COINLINKAGE
     811Cbc_getColSolution(Cbc_Model * model)
     812{
     813    if ( Cbc_getNumIntegers(model)==0 || model->relax_==1 )
     814        return (model->solver_->getColSolution());
     815
     816    return model->model_->getColSolution();
     817}
     818
    800819
    801820CbcGetProperty(int, isContinuousUnbounded)
     
    816835
    817836CbcGetProperty(const double*, getRowActivity)
    818 CbcGetProperty(const double*, getColSolution)
    819837
    820838CbcGetProperty(const double*, getRowLower)
  • trunk/Cbc/src/Cbc_C_Interface.h

    r2457 r2458  
    563563    /*@{*/
    564564
     565    /** @brief Best feasible solution vector
     566     *
     567     * @param model problem object
     568     * @return vector with best solution found
     569     **/
     570    COINLIBAPI const double * COINLINKAGE
     571    Cbc_getColSolution(Cbc_Model * model)
     572    ;
     573   
     574    /** @brief Queries vector of reduced costs
     575     *
     576     * @param model problem object
     577     * @return reduced cost vector
     578     **/
     579    COINLIBAPI const double * COINLINKAGE
     580    Cbc_getReducedCost(Cbc_Model * model)
     581    ;
     582
    565583    /** Sum of primal infeasibilities */
    566584    COINLIBAPI double COINLINKAGE
    567585    Cbc_sumPrimalInfeasibilities(Cbc_Model * model)
    568586    ;
     587
    569588    /** Number of primal infeasibilities */
    570589    COINLIBAPI int COINLINKAGE
     
    627646    COINLIBAPI const double * COINLINKAGE
    628647    Cbc_getRowActivity(Cbc_Model * model)
    629     ;
    630     /** Best feasible solution vector */
    631     COINLIBAPI const double * COINLINKAGE
    632     Cbc_getColSolution(Cbc_Model * model)
    633648    ;
    634649    /** Objective value of best feasible solution */
Note: See TracChangeset for help on using the changeset viewer.