- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Cgl-0.55.0/Clp/src/Clp_C_Interface.h

Go to the documentation of this file.

    00001 /* $Id: Clp_C_Interface.h 1458 2009-11-05 12:34:07Z forrest $ */
    00002 /* Copyright (C) 2002, 2003 International Business Machines
    00003    Corporation and others.  All Rights Reserved.*/
    00004 #ifndef ClpSimplexC_H
    00005 #define ClpSimplexC_H
    00006
    00007 /* include all defines and ugly stuff */
    00008 #include "Coin_C_defines.h"
    00009
    00015 #ifdef __cplusplus
    00016 extern "C"{
    00017 #endif
    00018
    00028
    00030   COINLIBAPI Clp_Simplex * COINLINKAGE Clp_newModel(void);
    00032   COINLIBAPI void COINLINKAGE Clp_deleteModel(Clp_Simplex * model);
    00050   COINLIBAPI void COINLINKAGE Clp_loadProblem (Clp_Simplex * model,  const int numcols, const int numrows,
    00051                       const CoinBigIndex * start, const int* index,
    00052                       const double* value,
    00053                       const double* collb, const double* colub,
    00054                       const double* obj,
    00055                       const double* rowlb, const double* rowub);
    00056
    00057 /* read quadratic part of the objective (the matrix part) */
    00058 COINLIBAPI void COINLINKAGE
    00059 Clp_loadQuadraticObjective(Clp_Simplex * model,
    00060                            const int numberColumns,
    00061                            const CoinBigIndex * start,
    00062                            const int * column,
    00063                            const double * element);
    00065   COINLIBAPI int COINLINKAGE Clp_readMps(Clp_Simplex * model,const char *filename,
    00066               int keepNames,
    00067               int ignoreErrors);
    00069   COINLIBAPI void COINLINKAGE Clp_copyInIntegerInformation(Clp_Simplex * model,const char * information);
    00071   COINLIBAPI void COINLINKAGE Clp_deleteIntegerInformation(Clp_Simplex * model);
    00073   COINLIBAPI void COINLINKAGE Clp_resize (Clp_Simplex * model, int newNumberRows, int newNumberColumns);
    00075   COINLIBAPI void COINLINKAGE Clp_deleteRows(Clp_Simplex * model, int number, const int * which);
    00077   COINLIBAPI void COINLINKAGE Clp_addRows(Clp_Simplex * model, int number, const double * rowLower,
    00078                const double * rowUpper,
    00079                const int * rowStarts, const int * columns,
    00080                const double * elements);
    00081
    00083   COINLIBAPI void COINLINKAGE Clp_deleteColumns(Clp_Simplex * model, int number, const int * which);
    00085   COINLIBAPI void COINLINKAGE Clp_addColumns(Clp_Simplex * model, int number, const double * columnLower,
    00086                   const double * columnUpper,
    00087                   const double * objective,
    00088                   const int * columnStarts, const int * rows,
    00089                   const double * elements);
    00091   COINLIBAPI void COINLINKAGE Clp_chgRowLower(Clp_Simplex * model, const double * rowLower);
    00093   COINLIBAPI void COINLINKAGE Clp_chgRowUpper(Clp_Simplex * model, const double * rowUpper);
    00095   COINLIBAPI void COINLINKAGE Clp_chgColumnLower(Clp_Simplex * model, const double * columnLower);
    00097   COINLIBAPI void COINLINKAGE Clp_chgColumnUpper(Clp_Simplex * model, const double * columnUpper);
    00099   COINLIBAPI void COINLINKAGE Clp_chgObjCoefficients(Clp_Simplex * model, const double * objIn);
    00101   COINLIBAPI void COINLINKAGE Clp_dropNames(Clp_Simplex * model);
    00103   COINLIBAPI void COINLINKAGE Clp_copyNames(Clp_Simplex * model, const char * const * rowNames,
    00104                  const char * const * columnNames);
    00105
    00110   COINLIBAPI int COINLINKAGE Clp_numberRows(Clp_Simplex * model);
    00112   COINLIBAPI int COINLINKAGE Clp_numberColumns(Clp_Simplex * model);
    00114   COINLIBAPI double COINLINKAGE Clp_primalTolerance(Clp_Simplex * model);
    00115   COINLIBAPI void COINLINKAGE Clp_setPrimalTolerance(Clp_Simplex * model,  double value) ;
    00117   COINLIBAPI double COINLINKAGE Clp_dualTolerance(Clp_Simplex * model);
    00118   COINLIBAPI void COINLINKAGE Clp_setDualTolerance(Clp_Simplex * model,  double value) ;
    00120   COINLIBAPI double COINLINKAGE Clp_dualObjectiveLimit(Clp_Simplex * model);
    00121   COINLIBAPI void COINLINKAGE Clp_setDualObjectiveLimit(Clp_Simplex * model, double value);
    00123   COINLIBAPI double COINLINKAGE Clp_objectiveOffset(Clp_Simplex * model);
    00124   COINLIBAPI void COINLINKAGE Clp_setObjectiveOffset(Clp_Simplex * model, double value);
    00126   COINLIBAPI void COINLINKAGE Clp_problemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00127   /* Sets problem name.  Must have \0 at end.  */
    00128   COINLIBAPI int COINLINKAGE
    00129     Clp_setProblemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00131   COINLIBAPI int COINLINKAGE Clp_numberIterations(Clp_Simplex * model);
    00132   COINLIBAPI void COINLINKAGE Clp_setNumberIterations(Clp_Simplex * model, int numberIterations);
    00134   COINLIBAPI int maximumIterations(Clp_Simplex * model);
    00135   COINLIBAPI void COINLINKAGE Clp_setMaximumIterations(Clp_Simplex * model, int value);
    00137   COINLIBAPI double COINLINKAGE Clp_maximumSeconds(Clp_Simplex * model);
    00138   COINLIBAPI void COINLINKAGE Clp_setMaximumSeconds(Clp_Simplex * model, double value);
    00140   COINLIBAPI int COINLINKAGE Clp_hitMaximumIterations(Clp_Simplex * model);
    00148   COINLIBAPI int COINLINKAGE Clp_status(Clp_Simplex * model);
    00150   COINLIBAPI void COINLINKAGE Clp_setProblemStatus(Clp_Simplex * model, int problemStatus);
    00158   COINLIBAPI int COINLINKAGE Clp_secondaryStatus(Clp_Simplex * model);
    00159   COINLIBAPI void COINLINKAGE Clp_setSecondaryStatus(Clp_Simplex * model, int status);
    00161   COINLIBAPI double COINLINKAGE Clp_optimizationDirection(Clp_Simplex * model);
    00162   COINLIBAPI void COINLINKAGE Clp_setOptimizationDirection(Clp_Simplex * model, double value);
    00164   COINLIBAPI double * COINLINKAGE Clp_primalRowSolution(Clp_Simplex * model);
    00166   COINLIBAPI double * COINLINKAGE Clp_primalColumnSolution(Clp_Simplex * model);
    00168   COINLIBAPI double * COINLINKAGE Clp_dualRowSolution(Clp_Simplex * model);
    00170   COINLIBAPI double * COINLINKAGE Clp_dualColumnSolution(Clp_Simplex * model);
    00172   COINLIBAPI double* COINLINKAGE Clp_rowLower(Clp_Simplex * model);
    00174   COINLIBAPI double* COINLINKAGE Clp_rowUpper(Clp_Simplex * model);
    00176   COINLIBAPI double * COINLINKAGE Clp_objective(Clp_Simplex * model);
    00178   COINLIBAPI double * COINLINKAGE Clp_columnLower(Clp_Simplex * model);
    00180   COINLIBAPI double * COINLINKAGE Clp_columnUpper(Clp_Simplex * model);
    00182   COINLIBAPI int COINLINKAGE Clp_getNumElements(Clp_Simplex * model);
    00183   /* Column starts in matrix */
    00184   COINLIBAPI const CoinBigIndex * COINLINKAGE Clp_getVectorStarts(Clp_Simplex * model);
    00185   /* Row indices in matrix */
    00186   COINLIBAPI const int * COINLINKAGE Clp_getIndices(Clp_Simplex * model);
    00187   /* Column vector lengths in matrix */
    00188   COINLIBAPI const int * COINLINKAGE Clp_getVectorLengths(Clp_Simplex * model);
    00189   /* Element values in matrix */
    00190   COINLIBAPI const double * COINLINKAGE Clp_getElements(Clp_Simplex * model);
    00192   COINLIBAPI double COINLINKAGE Clp_objectiveValue(Clp_Simplex * model);
    00194   COINLIBAPI char * COINLINKAGE Clp_integerInformation(Clp_Simplex * model);
    00197   COINLIBAPI double * COINLINKAGE Clp_infeasibilityRay(Clp_Simplex * model);
    00198   COINLIBAPI double * COINLINKAGE Clp_unboundedRay(Clp_Simplex * model);
    00200   COINLIBAPI int COINLINKAGE Clp_statusExists(Clp_Simplex * model);
    00202   COINLIBAPI unsigned char *  COINLINKAGE Clp_statusArray(Clp_Simplex * model);
    00204   COINLIBAPI void COINLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
    00205   /* status values are as in ClpSimplex.hpp i.e. 0 - free, 1 basic, 2 at upper,
    00206      3 at lower, 4 superbasic, (5 fixed) */
    00207   /* Get variable basis info */
    00208   COINLIBAPI int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model,int sequence);
    00209   /* Get row basis info */
    00210   COINLIBAPI int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model,int sequence);
    00211   /* Set variable basis info (and value if at bound) */
    00212   COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
    00213                                                   int sequence, int value);
    00214   /* Set row basis info (and value if at bound) */
    00215   COINLIBAPI void COINLINKAGE Clp_setRowStatus(Clp_Simplex * model,
    00216                                                int sequence, int value);
    00217
    00219   COINLIBAPI void COINLINKAGE Clp_setUserPointer (Clp_Simplex * model, void * pointer);
    00220   COINLIBAPI void * COINLINKAGE Clp_getUserPointer (Clp_Simplex * model);
    00226   COINLIBAPI void COINLINKAGE Clp_registerCallBack(Clp_Simplex * model,
    00227                                                    clp_callback userCallBack);
    00229   COINLIBAPI void COINLINKAGE Clp_clearCallBack(Clp_Simplex * model);
    00238   COINLIBAPI void COINLINKAGE Clp_setLogLevel(Clp_Simplex * model, int value);
    00239   COINLIBAPI int COINLINKAGE Clp_logLevel(Clp_Simplex * model);
    00241   COINLIBAPI int COINLINKAGE Clp_lengthNames(Clp_Simplex * model);
    00243   COINLIBAPI void COINLINKAGE Clp_rowName(Clp_Simplex * model, int iRow, char * name);
    00245   COINLIBAPI void COINLINKAGE Clp_columnName(Clp_Simplex * model, int iColumn, char * name);
    00246
    00255   COINLIBAPI int COINLINKAGE Clp_initialSolve(Clp_Simplex * model);
    00257   COINLIBAPI int COINLINKAGE Clp_initialDualSolve(Clp_Simplex * model);
    00259   COINLIBAPI int COINLINKAGE Clp_initialPrimalSolve(Clp_Simplex * model);
    00261   COINLIBAPI int COINLINKAGE Clp_initialBarrierSolve(Clp_Simplex * model);
    00263   COINLIBAPI int COINLINKAGE Clp_initialBarrierNoCrossSolve(Clp_Simplex * model);
    00265   COINLIBAPI int COINLINKAGE Clp_dual(Clp_Simplex * model, int ifValuesPass);
    00267   COINLIBAPI int COINLINKAGE Clp_primal(Clp_Simplex * model, int ifValuesPass);
    00269   COINLIBAPI void COINLINKAGE Clp_scaling(Clp_Simplex * model, int mode);
    00271   COINLIBAPI int COINLINKAGE Clp_scalingFlag(Clp_Simplex * model);
    00286   COINLIBAPI int COINLINKAGE Clp_crash(Clp_Simplex * model, double gap,int pivot);
    00293   COINLIBAPI int COINLINKAGE Clp_primalFeasible(Clp_Simplex * model);
    00295   COINLIBAPI int COINLINKAGE Clp_dualFeasible(Clp_Simplex * model);
    00297   COINLIBAPI double COINLINKAGE Clp_dualBound(Clp_Simplex * model);
    00298   COINLIBAPI void COINLINKAGE Clp_setDualBound(Clp_Simplex * model, double value);
    00300   COINLIBAPI double COINLINKAGE Clp_infeasibilityCost(Clp_Simplex * model);
    00301   COINLIBAPI void COINLINKAGE Clp_setInfeasibilityCost(Clp_Simplex * model, double value);
    00310   COINLIBAPI int COINLINKAGE Clp_perturbation(Clp_Simplex * model);
    00311   COINLIBAPI void COINLINKAGE Clp_setPerturbation(Clp_Simplex * model, int value);
    00313   COINLIBAPI int COINLINKAGE Clp_algorithm(Clp_Simplex * model);
    00315   COINLIBAPI void COINLINKAGE Clp_setAlgorithm(Clp_Simplex * model, int value);
    00317   COINLIBAPI double COINLINKAGE Clp_sumDualInfeasibilities(Clp_Simplex * model);
    00319   COINLIBAPI int COINLINKAGE Clp_numberDualInfeasibilities(Clp_Simplex * model);
    00321   COINLIBAPI double COINLINKAGE Clp_sumPrimalInfeasibilities(Clp_Simplex * model);
    00323   COINLIBAPI int COINLINKAGE Clp_numberPrimalInfeasibilities(Clp_Simplex * model);
    00330   COINLIBAPI int COINLINKAGE Clp_saveModel(Clp_Simplex * model, const char * fileName);
    00333   COINLIBAPI int COINLINKAGE Clp_restoreModel(Clp_Simplex * model, const char * fileName);
    00334
    00337   COINLIBAPI void COINLINKAGE Clp_checkSolution(Clp_Simplex * model);
    00340   /******************** End of most useful part **************/
    00344   COINLIBAPI int COINLINKAGE Clp_getNumRows(Clp_Simplex * model);
    00346   COINLIBAPI int COINLINKAGE Clp_getNumCols(Clp_Simplex * model);
    00348   COINLIBAPI int COINLINKAGE Clp_getIterationCount(Clp_Simplex * model);
    00350   COINLIBAPI int COINLINKAGE Clp_isAbandoned(Clp_Simplex * model);
    00352   COINLIBAPI int COINLINKAGE Clp_isProvenOptimal(Clp_Simplex * model);
    00354   COINLIBAPI int COINLINKAGE Clp_isProvenPrimalInfeasible(Clp_Simplex * model);
    00356   COINLIBAPI int COINLINKAGE Clp_isProvenDualInfeasible(Clp_Simplex * model);
    00358   COINLIBAPI int COINLINKAGE Clp_isPrimalObjectiveLimitReached(Clp_Simplex * model) ;
    00360   COINLIBAPI int COINLINKAGE Clp_isDualObjectiveLimitReached(Clp_Simplex * model) ;
    00362   COINLIBAPI int COINLINKAGE Clp_isIterationLimitReached(Clp_Simplex * model);
    00364   COINLIBAPI double COINLINKAGE Clp_getObjSense(Clp_Simplex * model);
    00366   COINLIBAPI const double * COINLINKAGE Clp_getRowActivity(Clp_Simplex * model);
    00368   COINLIBAPI const double * COINLINKAGE Clp_getColSolution(Clp_Simplex * model);
    00369   COINLIBAPI void COINLINKAGE Clp_setColSolution(Clp_Simplex * model, const double * input);
    00371   COINLIBAPI const double * COINLINKAGE Clp_getRowPrice(Clp_Simplex * model);
    00373   COINLIBAPI const double * COINLINKAGE Clp_getReducedCost(Clp_Simplex * model);
    00375   COINLIBAPI const double* COINLINKAGE Clp_getRowLower(Clp_Simplex * model);
    00377   COINLIBAPI const double* COINLINKAGE Clp_getRowUpper(Clp_Simplex * model);
    00379   COINLIBAPI const double * COINLINKAGE Clp_getObjCoefficients(Clp_Simplex * model);
    00381   COINLIBAPI const double * COINLINKAGE Clp_getColLower(Clp_Simplex * model);
    00383   COINLIBAPI const double * COINLINKAGE Clp_getColUpper(Clp_Simplex * model);
    00385   COINLIBAPI double COINLINKAGE Clp_getObjValue(Clp_Simplex * model);
    00387   COINLIBAPI void COINLINKAGE Clp_printModel(Clp_Simplex * model, const char * prefix);
    00388   /* Small element value - elements less than this set to zero,
    00389      default is 1.0e-20 */
    00390   COINLIBAPI double COINLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
    00391   COINLIBAPI void COINLINKAGE Clp_setSmallElementValue(Clp_Simplex * model,double value);
    00393 #ifdef __cplusplus
    00394           }
    00395 #endif
    00396 #endif