# Cbc_C_Interface.h

Go to the documentation of this file.

    00001 /* $Id: Cbc_C_Interface.h 1675 2011-06-19 17:23:14Z stefan $ */
    00002 /*
    00003   Copyright (C) 2004 International Business Machines Corporation and others.
    00004   All Rights Reserved.
    00005
    00006   This code is licensed under the terms of the Eclipse Public License (EPL).
    00007 */
    00008 #ifndef CbcModelC_H
    00009 #define CbcModelC_H
    00010
    00011 /* include all defines and ugly stuff */
    00012 #include "Coin_C_defines.h"
    00013
    00019 #ifdef __cplusplus
    00020 extern "C" {
    00021 #endif
    00022
    00032
    00034     COINLIBAPI double COINLINKAGE Cbc_getVersion()
    00035     ;
    00037     COINLIBAPI Cbc_Model * COINLINKAGE
    00038     Cbc_newModel()
    00039     ;
    00041     COINLIBAPI void COINLINKAGE
    00042     Cbc_deleteModel(Cbc_Model * model)
    00043     ;
    00048     /* Loads a problem (the constraints on the
    00049         rows are given by lower and upper bounds). If a pointer is NULL then the
    00050         following values are the default:
    00051         <ul>
    00052         <li> <code>colub</code>: all columns have upper bound infinity
    00053         <li> <code>collb</code>: all columns have lower bound 0
    00054         <li> <code>rowub</code>: all rows have upper bound infinity
    00055         <li> <code>rowlb</code>: all rows have lower bound -infinity
    00056         <li> <code>obj</code>: all variables have 0 objective coefficient
    00057         </ul>
    00058
    00059      Just like the other loadProblem() method except that the matrix is
    00060      given in a standard column major ordered format (without gaps).
    00061     */
    00062     COINLIBAPI void COINLINKAGE
    00063     Cbc_loadProblem (Cbc_Model * model,  const int numcols, const int numrows,
    00064                      const CoinBigIndex * start, const int* index,
    00065                      const double* value,
    00066                      const double* collb, const double* colub,
    00067                      const double* obj,
    00068                      const double* rowlb, const double* rowub)
    00069     ;
    00071     COINLIBAPI int COINLINKAGE
    00072     Cbc_readMps(Cbc_Model * model, const char *filename)
    00073     ;
    00075     COINLIBAPI void COINLINKAGE
    00076     Cbc_writeMps(Cbc_Model * model, const char *filename)
    00077     ;
    00079     COINLIBAPI char * COINLINKAGE
    00080     Cbc_integerInformation(Cbc_Model * model)
    00081     ;
    00083     COINLIBAPI void COINLINKAGE
    00084     Cbc_copyInIntegerInformation(Cbc_Model * model, const char * information)
    00085     ;
    00087     COINLIBAPI void COINLINKAGE
    00088     Cbc_deleteIntegerInformation(Cbc_Model * model)
    00089     ;
    00091     COINLIBAPI void COINLINKAGE
    00092     Cbc_resize (Cbc_Model * model, int newNumberRows, int newNumberColumns)
    00093     ;
    00095     COINLIBAPI void COINLINKAGE
    00096     Cbc_deleteRows(Cbc_Model * model, int number, const int * which)
    00097     ;
    00099     COINLIBAPI void COINLINKAGE
    00100     Cbc_addRows(Cbc_Model * model, const int number, const double * rowLower,
    00101                 const double * rowUpper,
    00102                 const int * rowStarts, const int * columns,
    00103                 const double * elements)
    00104     ;
    00105
    00107     COINLIBAPI void COINLINKAGE
    00108     Cbc_deleteColumns(Cbc_Model * model, int number, const int * which)
    00109     ;
    00111     COINLIBAPI void COINLINKAGE
    00112     Cbc_addColumns(Cbc_Model * model, int number, const double * columnLower,
    00113                    const double * columnUpper,
    00114                    const double * objective,
    00115                    const int * columnStarts, const int * rows,
    00116                    const double * elements);
    00118     COINLIBAPI void COINLINKAGE
    00119     Cbc_dropNames(Cbc_Model * model)
    00120     ;
    00122     COINLIBAPI void COINLINKAGE
    00123     Cbc_copyNames(Cbc_Model * model, const char * const * rowNamesIn,
    00124                   const char * const * columnNamesIn)
    00125     ;
    00126
    00131     COINLIBAPI int COINLINKAGE
    00132     Cbc_numberRows(Cbc_Model * model)
    00133     ;
    00135     COINLIBAPI int COINLINKAGE
    00136     Cbc_numberColumns(Cbc_Model * model)
    00137     ;
    00139     COINLIBAPI double COINLINKAGE
    00140     Cbc_primalTolerance(Cbc_Model * model)
    00141     ;
    00142     COINLIBAPI void COINLINKAGE
    00143     Cbc_setPrimalTolerance(Cbc_Model * model,  double value)
    00144     ;
    00146     COINLIBAPI double COINLINKAGE
    00147     Cbc_dualTolerance(Cbc_Model * model)
    00148     ;
    00149     COINLIBAPI void COINLINKAGE
    00150     Cbc_setDualTolerance(Cbc_Model * model,  double value)
    00151     ;
    00152     /* Integer tolerance to use */
    00153     COINLIBAPI double COINLINKAGE
    00154     Cbc_integerTolerance(Cbc_Model * model)
    00155     ;
    00156     COINLIBAPI void COINLINKAGE
    00157     Cbc_setIntegerTolerance(Cbc_Model * model,  double value)
    00158     ;
    00160     COINLIBAPI double COINLINKAGE
    00161     Cbc_dualObjectiveLimit(Cbc_Model * model)
    00162     ;
    00163     COINLIBAPI void COINLINKAGE
    00164     Cbc_setDualObjectiveLimit(Cbc_Model * model, double value)
    00165     ;
    00167     COINLIBAPI double COINLINKAGE
    00168     Cbc_objectiveOffset(Cbc_Model * model)
    00169     ;
    00170     COINLIBAPI void COINLINKAGE
    00171     Cbc_setObjectiveOffset(Cbc_Model * model, double value)
    00172     ;
    00174     COINLIBAPI void COINLINKAGE
    00175     Cbc_problemName(Cbc_Model * model, int maxNumberCharacters, char * array)
    00176     ;
    00181     COINLIBAPI int COINLINKAGE
    00182     Cbc_setProblemName(Cbc_Model * model, int maxNumberCharacters, char * array)
    00183     ;
    00185     COINLIBAPI int COINLINKAGE
    00186     Cbc_numberIterations(Cbc_Model * model)
    00187     ;
    00188     COINLIBAPI void COINLINKAGE
    00189     Cbc_setNumberIterations(Cbc_Model * model, int numberIterations)
    00190     ;
    00192     COINLIBAPI int COINLINKAGE
    00193     Cbc_maximumIterations(Cbc_Model * model)
    00194     ;
    00195     COINLIBAPI void COINLINKAGE
    00196     Cbc_setMaximumIterations(Cbc_Model * model, int value)
    00197     ;
    00199     COINLIBAPI int COINLINKAGE
    00200     Cbc_maxNumNode(Cbc_Model * model)
    00201     ;
    00202     COINLIBAPI void COINLINKAGE
    00203     Cbc_setMaxNumNode(Cbc_Model * model, int value)
    00204     ;
    00205     /* Maximum number of solutions */
    00206     COINLIBAPI int COINLINKAGE
    00207     Cbc_maxNumSol(Cbc_Model * model)
    00208     ;
    00209     COINLIBAPI void COINLINKAGE
    00210     Cbc_setMaxNumSol(Cbc_Model * model, int value)
    00211     ;
    00213     COINLIBAPI double COINLINKAGE
    00214     Cbc_maximumSeconds(Cbc_Model * model)
    00215     ;
    00216     COINLIBAPI void COINLINKAGE
    00217     Cbc_setMaximumSeconds(Cbc_Model * model, double value)
    00218     ;
    00220     COINLIBAPI int COINLINKAGE
    00221     Cbc_hitMaximumIterations(Cbc_Model * model)
    00222     ;
    00230     COINLIBAPI int COINLINKAGE
    00231     Cbc_status(Cbc_Model * model)
    00232     ;
    00234     COINLIBAPI void COINLINKAGE
    00235     Cbc_setProblemStatus(Cbc_Model * model, int problemStatus)
    00236     ;
    00244     COINLIBAPI int COINLINKAGE
    00245     Cbc_secondaryStatus(Cbc_Model * model)
    00246     ;
    00247     COINLIBAPI void COINLINKAGE
    00248     Cbc_setSecondaryStatus(Cbc_Model * model, int status)
    00249     ;
    00251     COINLIBAPI double COINLINKAGE
    00252     Cbc_optimizationDirection(Cbc_Model * model)
    00253     ;
    00254     COINLIBAPI void COINLINKAGE
    00255     Cbc_setOptimizationDirection(Cbc_Model * model, double value)
    00256     ;
    00258     COINLIBAPI double * COINLINKAGE
    00259     Cbc_primalRowSolution(Cbc_Model * model)
    00260     ;
    00262     COINLIBAPI double * COINLINKAGE
    00263     Cbc_primalColumnSolution(Cbc_Model * model)
    00264     ;
    00266     COINLIBAPI double * COINLINKAGE
    00267     Cbc_dualRowSolution(Cbc_Model * model)
    00268     ;
    00270     COINLIBAPI double * COINLINKAGE
    00271     Cbc_dualColumnSolution(Cbc_Model * model)
    00272     ;
    00274     COINLIBAPI double* COINLINKAGE
    00275     Cbc_rowLower(Cbc_Model * model)
    00276     ;
    00278     COINLIBAPI double* COINLINKAGE
    00279     Cbc_rowUpper(Cbc_Model * model)
    00280     ;
    00282     COINLIBAPI double * COINLINKAGE
    00283     Cbc_objective(Cbc_Model * model)
    00284     ;
    00286     COINLIBAPI double * COINLINKAGE
    00287     Cbc_columnLower(Cbc_Model * model)
    00288     ;
    00290     COINLIBAPI double * COINLINKAGE
    00291     Cbc_columnUpper(Cbc_Model * model)
    00292     ;
    00294     COINLIBAPI int COINLINKAGE
    00295     Cbc_getNumElements(Cbc_Model * model)
    00296     ;
    00298     COINLIBAPI const CoinBigIndex * COINLINKAGE
    00299     Cbc_getVectorStarts(Cbc_Model * model)
    00300     ;
    00302     COINLIBAPI const int * COINLINKAGE
    00303     Cbc_getIndices(Cbc_Model * model)
    00304     ;
    00306     COINLIBAPI const int * COINLINKAGE
    00307     Cbc_getVectorLengths(Cbc_Model * model)
    00308     ;
    00310     COINLIBAPI const double * COINLINKAGE
    00311     Cbc_getElements(Cbc_Model * model)
    00312     ;
    00314     COINLIBAPI double COINLINKAGE
    00315     Cbc_objectiveValue(Cbc_Model * model)
    00316     ;
    00319     COINLIBAPI double * COINLINKAGE
    00320     Cbc_infeasibilityRay(Cbc_Model * model)
    00321     ;
    00322     COINLIBAPI double * COINLINKAGE
    00323     Cbc_unboundedRay(Cbc_Model * model)
    00324     ;
    00326     COINLIBAPI int COINLINKAGE
    00327     Cbc_statusExists(Cbc_Model * model)
    00328     ;
    00330     COINLIBAPI void  COINLINKAGE
    00331     Cbc_getBasisStatus(Cbc_Model * model, int * cstat, int * rstat)
    00332     ;
    00334     COINLIBAPI void COINLINKAGE
    00335     Cbc_setBasisStatus(Cbc_Model * model, int * cstat, int * rstat)
    00336     ;
    00337
    00339     COINLIBAPI void COINLINKAGE
    00340     Cbc_setUserPointer (Cbc_Model * model, void * pointer)
    00341     ;
    00342     COINLIBAPI void * COINLINKAGE
    00343     Cbc_getUserPointer (Cbc_Model * model)
    00344     ;
    00350     COINLIBAPI void COINLINKAGE
    00351     Cbc_registerCallBack(Cbc_Model * model,
    00352                          cbc_callback userCallBack)
    00353     ;
    00355     COINLIBAPI void COINLINKAGE
    00356     Cbc_clearCallBack(Cbc_Model * model)
    00357     ;
    00366     COINLIBAPI void COINLINKAGE
    00367     Cbc_setLogLevel(Cbc_Model * model, int value)
    00368     ;
    00369     COINLIBAPI int COINLINKAGE
    00370     Cbc_logLevel(Cbc_Model * model)
    00371     ;
    00373     COINLIBAPI int COINLINKAGE
    00374     Cbc_lengthNames(Cbc_Model * model)
    00375     ;
    00377     COINLIBAPI void COINLINKAGE
    00378     Cbc_rowName(Cbc_Model * model, int iRow, char * name)
    00379     ;
    00381     COINLIBAPI void COINLINKAGE
    00382     Cbc_columnName(Cbc_Model * model, int iColumn, char * name)
    00383     ;
    00384
    00393     COINLIBAPI int COINLINKAGE
    00394     Cbc_initialSolve(Cbc_Model * model)
    00395     ;
    00396     /* General solve algorithm which can do presolve.
    00397        See  CbcModel.hpp for options
    00398     */
    00399     COINLIBAPI int COINLINKAGE
    00400     Cbc_branchAndBound(Cbc_Model * model)
    00401     ;
    00403     COINLIBAPI void COINLINKAGE
    00404     Cbc_scaling(Cbc_Model * model, int mode)
    00405     ;
    00407     COINLIBAPI int COINLINKAGE
    00408     Cbc_scalingFlag(Cbc_Model * model)
    00409     ;
    00424     COINLIBAPI int COINLINKAGE
    00425     Cbc_crash(Cbc_Model * model, double gap, int pivot)
    00426     ;
    00433     COINLIBAPI int COINLINKAGE
    00434     Cbc_primalFeasible(Cbc_Model * model)
    00435     ;
    00437     COINLIBAPI int COINLINKAGE
    00438     Cbc_dualFeasible(Cbc_Model * model)
    00439     ;
    00441     COINLIBAPI double COINLINKAGE
    00442     Cbc_dualBound(Cbc_Model * model)
    00443     ;
    00444     COINLIBAPI void COINLINKAGE
    00445     Cbc_setDualBound(Cbc_Model * model, double value)
    00446     ;
    00448     COINLIBAPI double COINLINKAGE
    00449     Cbc_infeasibilityCost(Cbc_Model * model)
    00450     ;
    00451     COINLIBAPI void COINLINKAGE
    00452     Cbc_setInfeasibilityCost(Cbc_Model * model, double value)
    00453     ;
    00462     COINLIBAPI int COINLINKAGE
    00463     Cbc_perturbation(Cbc_Model * model)
    00464     ;
    00465     COINLIBAPI void COINLINKAGE
    00466     Cbc_setPerturbation(Cbc_Model * model, int value)
    00467     ;
    00469     COINLIBAPI int COINLINKAGE
    00470     Cbc_algorithm(Cbc_Model * model)
    00471     ;
    00473     COINLIBAPI void COINLINKAGE
    00474     Cbc_setAlgorithm(Cbc_Model * model, int value)
    00475     ;
    00477     COINLIBAPI double COINLINKAGE
    00478     Cbc_sumDualInfeasibilities(Cbc_Model * model)
    00479     ;
    00481     COINLIBAPI int COINLINKAGE
    00482     Cbc_numberDualInfeasibilities(Cbc_Model * model)
    00483     ;
    00485     COINLIBAPI double COINLINKAGE
    00486     Cbc_sumPrimalInfeasibilities(Cbc_Model * model)
    00487     ;
    00489     COINLIBAPI int COINLINKAGE
    00490     Cbc_numberPrimalInfeasibilities(Cbc_Model * model)
    00491     ;
    00498     COINLIBAPI int COINLINKAGE
    00499     Cbc_saveModel(Cbc_Model * model, const char * fileName)
    00500     ;
    00503     COINLIBAPI int COINLINKAGE
    00504     Cbc_restoreModel(Cbc_Model * model, const char * fileName)
    00505     ;
    00506
    00509     COINLIBAPI void COINLINKAGE
    00510     Cbc_checkSolution(Cbc_Model * model)
    00511     ;
    00514     /******************** End of most useful part **************/
    00518     COINLIBAPI int COINLINKAGE
    00519     Cbc_getNumRows(Cbc_Model * model)
    00520     ;
    00522     COINLIBAPI int COINLINKAGE
    00523     Cbc_getNumCols(Cbc_Model * model)
    00524     ;
    00526     COINLIBAPI int COINLINKAGE
    00527     Cbc_getIterationCount(Cbc_Model * model)
    00528     ;
    00530     COINLIBAPI int COINLINKAGE
    00531     Cbc_isAbandoned(Cbc_Model * model)
    00532     ;
    00534     COINLIBAPI int COINLINKAGE
    00535     Cbc_isProvenOptimal(Cbc_Model * model)
    00536     ;
    00538     COINLIBAPI int COINLINKAGE
    00539     Cbc_isProvenPrimalInfeasible(Cbc_Model * model)
    00540     ;
    00542     COINLIBAPI int COINLINKAGE
    00543     Cbc_isProvenDualInfeasible(Cbc_Model * model)
    00544     ;
    00546     COINLIBAPI int COINLINKAGE
    00547     Cbc_isPrimalObjectiveLimitReached(Cbc_Model * model)
    00548     ;
    00550     COINLIBAPI int COINLINKAGE
    00551     Cbc_isDualObjectiveLimitReached(Cbc_Model * model)
    00552     ;
    00554     COINLIBAPI int COINLINKAGE
    00555     Cbc_isIterationLimitReached(Cbc_Model * model)
    00556     ;
    00558     COINLIBAPI double COINLINKAGE
    00559     Cbc_getObjSense(Cbc_Model * model)
    00560     ;
    00562     COINLIBAPI const double * COINLINKAGE
    00563     Cbc_getRowActivity(Cbc_Model * model)
    00564     ;
    00566     COINLIBAPI const double * COINLINKAGE
    00567     Cbc_getColSolution(Cbc_Model * model)
    00568     ;
    00569     COINLIBAPI void COINLINKAGE
    00570     Cbc_setColSolution(Cbc_Model * model, const double * input)
    00571     ;
    00573     COINLIBAPI const double * COINLINKAGE
    00574     Cbc_getRowPrice(Cbc_Model * model)
    00575     ;
    00577     COINLIBAPI const double * COINLINKAGE
    00578     Cbc_getReducedCost(Cbc_Model * model)
    00579     ;
    00581     COINLIBAPI const double* COINLINKAGE
    00582     Cbc_getRowLower(Cbc_Model * model)
    00583     ;
    00585     COINLIBAPI const double* COINLINKAGE
    00586     Cbc_getRowUpper(Cbc_Model * model)
    00587     ;
    00589     COINLIBAPI const double * COINLINKAGE
    00590     Cbc_getObjCoefficients(Cbc_Model * model)
    00591     ;
    00593     COINLIBAPI const double * COINLINKAGE
    00594     Cbc_getColLower(Cbc_Model * model)
    00595     ;
    00597     COINLIBAPI const double * COINLINKAGE
    00598     Cbc_getColUpper(Cbc_Model * model)
    00599     ;
    00601     COINLIBAPI double COINLINKAGE
    00602     Cbc_getObjValue(Cbc_Model * model)
    00603     ;
    00605     COINLIBAPI void COINLINKAGE
    00606     Cbc_printModel(Cbc_Model * model, const char * argPrefix)
    00607     ;
    00609     COINLIBAPI int COINLINKAGE
    00610     Cbc_isInteger(Cbc_Model * model, int i)
    00611     ;
    00613     COINLIBAPI double COINLINKAGE
    00614     Cbc_cpuTime(Cbc_Model * model)
    00615     ;
    00617     COINLIBAPI int COINLINKAGE
    00618     Cbc_getNodeCount(Cbc_Model * model)
    00619     ;
    00621     COINLIBAPI Cbc_Model * COINLINKAGE
    00622     Cbc_clone(Cbc_Model * model)
    00623     ;
    00625     COINLIBAPI Cbc_Model * COINLINKAGE
    00626     Cbc_setContinuous(Cbc_Model * model, int iColumn)
    00627     ;
    00629     COINLIBAPI void  COINLINKAGE
    00630     Cbc_addSOS_Dense(Cbc_Model * model, int numObjects, const int * len,
    00631                      const int ** which, const double * weights, const int type)
    00632     ;
    00634     COINLIBAPI void  COINLINKAGE
    00635     Cbc_addSOS_Sparse(Cbc_Model * model, const int * rowStarts,
    00636                       const int * rowIndices, const double * weights, const int type)
    00637     ;
    00639     COINLIBAPI void  COINLINKAGE
    00640     Cbc_deleteObjects(Cbc_Model * model)
    00641     ;
    00643     COINLIBAPI void  COINLINKAGE
    00644     Cbc_printSolution(Cbc_Model * model)
    00645     ;
    00647     COINLIBAPI int COINLINKAGE
    00648     Cbc_initialDualSolve(Cbc_Model * model)
    00649     ;
    00651     COINLIBAPI int COINLINKAGE
    00652     Cbc_initialPrimalSolve(Cbc_Model * model)
    00653     ;
    00655     COINLIBAPI int COINLINKAGE
    00656     Cbc_dual(Cbc_Model * model, int ifValuesPass)
    00657     ;
    00659     COINLIBAPI int COINLINKAGE
    00660     Cbc_primal(Cbc_Model * model, int ifValuesPass)
    00661     ;
    00663 #ifdef __cplusplus
    00664 }
    00665 #endif
    00666 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines