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

- File List
- File Members

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

Go to the documentation of this file.

    00001 /* Copyright (C) 2002, 2003 International Business Machines
    00002    Corporation and others.  All Rights Reserved.*/
    00003 #ifndef ClpSimplexC_H
    00004 #define ClpSimplexC_H
    00005
    00006 /* include all defines and ugly stuff */
    00007 #include "Coin_C_defines.h"
    00008
    00014 #ifdef __cplusplus
    00015 extern "C"{
    00016 #endif
    00017
    00027
    00029   COINLIBAPI Clp_Simplex * COINLINKAGE Clp_newModel(void);
    00031   COINLIBAPI void COINLINKAGE Clp_deleteModel(Clp_Simplex * model);
    00049   COINLIBAPI void COINLINKAGE Clp_loadProblem (Clp_Simplex * model,  const int numcols, const int numrows,
    00050                       const CoinBigIndex * start, const int* index,
    00051                       const double* value,
    00052                       const double* collb, const double* colub,
    00053                       const double* obj,
    00054                       const double* rowlb, const double* rowub);
    00055
    00056 /* read quadratic part of the objective (the matrix part) */
    00057 COINLIBAPI void COINLINKAGE
    00058 Clp_loadQuadraticObjective(Clp_Simplex * model,
    00059                            const int numberColumns,
    00060                            const CoinBigIndex * start,
    00061                            const int * column,
    00062                            const double * element);
    00064   COINLIBAPI int COINLINKAGE Clp_readMps(Clp_Simplex * model,const char *filename,
    00065               int keepNames,
    00066               int ignoreErrors);
    00068   COINLIBAPI void COINLINKAGE Clp_copyInIntegerInformation(Clp_Simplex * model,const char * information);
    00070   COINLIBAPI void COINLINKAGE Clp_deleteIntegerInformation(Clp_Simplex * model);
    00072   COINLIBAPI void COINLINKAGE Clp_resize (Clp_Simplex * model, int newNumberRows, int newNumberColumns);
    00074   COINLIBAPI void COINLINKAGE Clp_deleteRows(Clp_Simplex * model, int number, const int * which);
    00076   COINLIBAPI void COINLINKAGE Clp_addRows(Clp_Simplex * model, int number, const double * rowLower,
    00077                const double * rowUpper,
    00078                const int * rowStarts, const int * columns,
    00079                const double * elements);
    00080
    00082   COINLIBAPI void COINLINKAGE Clp_deleteColumns(Clp_Simplex * model, int number, const int * which);
    00084   COINLIBAPI void COINLINKAGE Clp_addColumns(Clp_Simplex * model, int number, const double * columnLower,
    00085                   const double * columnUpper,
    00086                   const double * objective,
    00087                   const int * columnStarts, const int * rows,
    00088                   const double * elements);
    00090   COINLIBAPI void COINLINKAGE Clp_chgRowLower(Clp_Simplex * model, const double * rowLower);
    00092   COINLIBAPI void COINLINKAGE Clp_chgRowUpper(Clp_Simplex * model, const double * rowUpper);
    00094   COINLIBAPI void COINLINKAGE Clp_chgColumnLower(Clp_Simplex * model, const double * columnLower);
    00096   COINLIBAPI void COINLINKAGE Clp_chgColumnUpper(Clp_Simplex * model, const double * columnUpper);
    00098   COINLIBAPI void COINLINKAGE Clp_chgObjCoefficients(Clp_Simplex * model, const double * objIn);
    00100   COINLIBAPI void COINLINKAGE Clp_dropNames(Clp_Simplex * model);
    00102   COINLIBAPI void COINLINKAGE Clp_copyNames(Clp_Simplex * model, const char * const * rowNames,
    00103                  const char * const * columnNames);
    00104
    00109   COINLIBAPI int COINLINKAGE Clp_numberRows(Clp_Simplex * model);
    00111   COINLIBAPI int COINLINKAGE Clp_numberColumns(Clp_Simplex * model);
    00113   COINLIBAPI double COINLINKAGE Clp_primalTolerance(Clp_Simplex * model);
    00114   COINLIBAPI void COINLINKAGE Clp_setPrimalTolerance(Clp_Simplex * model,  double value) ;
    00116   COINLIBAPI double COINLINKAGE Clp_dualTolerance(Clp_Simplex * model);
    00117   COINLIBAPI void COINLINKAGE Clp_setDualTolerance(Clp_Simplex * model,  double value) ;
    00119   COINLIBAPI double COINLINKAGE Clp_dualObjectiveLimit(Clp_Simplex * model);
    00120   COINLIBAPI void COINLINKAGE Clp_setDualObjectiveLimit(Clp_Simplex * model, double value);
    00122   COINLIBAPI double COINLINKAGE Clp_objectiveOffset(Clp_Simplex * model);
    00123   COINLIBAPI void COINLINKAGE Clp_setObjectiveOffset(Clp_Simplex * model, double value);
    00125   COINLIBAPI void COINLINKAGE Clp_problemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00126   /* Sets problem name.  Must have \0 at end.  */
    00127   COINLIBAPI int COINLINKAGE
    00128     Clp_setProblemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00130   COINLIBAPI int COINLINKAGE Clp_numberIterations(Clp_Simplex * model);
    00131   COINLIBAPI void COINLINKAGE Clp_setNumberIterations(Clp_Simplex * model, int numberIterations);
    00133   COINLIBAPI int maximumIterations(Clp_Simplex * model);
    00134   COINLIBAPI void COINLINKAGE Clp_setMaximumIterations(Clp_Simplex * model, int value);
    00136   COINLIBAPI double COINLINKAGE Clp_maximumSeconds(Clp_Simplex * model);
    00137   COINLIBAPI void COINLINKAGE Clp_setMaximumSeconds(Clp_Simplex * model, double value);
    00139   COINLIBAPI int COINLINKAGE Clp_hitMaximumIterations(Clp_Simplex * model);
    00147   COINLIBAPI int COINLINKAGE Clp_status(Clp_Simplex * model);
    00149   COINLIBAPI void COINLINKAGE Clp_setProblemStatus(Clp_Simplex * model, int problemStatus);
    00157   COINLIBAPI int COINLINKAGE Clp_secondaryStatus(Clp_Simplex * model);
    00158   COINLIBAPI void COINLINKAGE Clp_setSecondaryStatus(Clp_Simplex * model, int status);
    00160   COINLIBAPI double COINLINKAGE Clp_optimizationDirection(Clp_Simplex * model);
    00161   COINLIBAPI void COINLINKAGE Clp_setOptimizationDirection(Clp_Simplex * model, double value);
    00163   COINLIBAPI double * COINLINKAGE Clp_primalRowSolution(Clp_Simplex * model);
    00165   COINLIBAPI double * COINLINKAGE Clp_primalColumnSolution(Clp_Simplex * model);
    00167   COINLIBAPI double * COINLINKAGE Clp_dualRowSolution(Clp_Simplex * model);
    00169   COINLIBAPI double * COINLINKAGE Clp_dualColumnSolution(Clp_Simplex * model);
    00171   COINLIBAPI double* COINLINKAGE Clp_rowLower(Clp_Simplex * model);
    00173   COINLIBAPI double* COINLINKAGE Clp_rowUpper(Clp_Simplex * model);
    00175   COINLIBAPI double * COINLINKAGE Clp_objective(Clp_Simplex * model);
    00177   COINLIBAPI double * COINLINKAGE Clp_columnLower(Clp_Simplex * model);
    00179   COINLIBAPI double * COINLINKAGE Clp_columnUpper(Clp_Simplex * model);
    00181   COINLIBAPI int COINLINKAGE Clp_getNumElements(Clp_Simplex * model);
    00182   /* Column starts in matrix */
    00183   COINLIBAPI const CoinBigIndex * COINLINKAGE Clp_getVectorStarts(Clp_Simplex * model);
    00184   /* Row indices in matrix */
    00185   COINLIBAPI const int * COINLINKAGE Clp_getIndices(Clp_Simplex * model);
    00186   /* Column vector lengths in matrix */
    00187   COINLIBAPI const int * COINLINKAGE Clp_getVectorLengths(Clp_Simplex * model);
    00188   /* Element values in matrix */
    00189   COINLIBAPI const double * COINLINKAGE Clp_getElements(Clp_Simplex * model);
    00191   COINLIBAPI double COINLINKAGE Clp_objectiveValue(Clp_Simplex * model);
    00193   COINLIBAPI char * COINLINKAGE Clp_integerInformation(Clp_Simplex * model);
    00196   COINLIBAPI double * COINLINKAGE Clp_infeasibilityRay(Clp_Simplex * model);
    00197   COINLIBAPI double * COINLINKAGE Clp_unboundedRay(Clp_Simplex * model);
    00199   COINLIBAPI int COINLINKAGE Clp_statusExists(Clp_Simplex * model);
    00201   COINLIBAPI unsigned char *  COINLINKAGE Clp_statusArray(Clp_Simplex * model);
    00203   COINLIBAPI void COINLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
    00204   /* status values are as in ClpSimplex.hpp i.e. 0 - free, 1 basic, 2 at upper,
    00205      3 at lower, 4 superbasic, (5 fixed) */
    00206   /* Get variable basis info */
    00207   COINLIBAPI int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model,int sequence);
    00208   /* Get row basis info */
    00209   COINLIBAPI int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model,int sequence);
    00210   /* Set variable basis info (and value if at bound) */
    00211   COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
    00212                                                   int sequence, int value);
    00213   /* Set row basis info (and value if at bound) */
    00214   COINLIBAPI void COINLINKAGE Clp_setRowStatus(Clp_Simplex * model,
    00215                                                int sequence, int value);
    00216
    00218   COINLIBAPI void COINLINKAGE Clp_setUserPointer (Clp_Simplex * model, void * pointer);
    00219   COINLIBAPI void * COINLINKAGE Clp_getUserPointer (Clp_Simplex * model);
    00225   COINLIBAPI void COINLINKAGE Clp_registerCallBack(Clp_Simplex * model,
    00226                                                    clp_callback userCallBack);
    00228   COINLIBAPI void COINLINKAGE Clp_clearCallBack(Clp_Simplex * model);
    00237   COINLIBAPI void COINLINKAGE Clp_setLogLevel(Clp_Simplex * model, int value);
    00238   COINLIBAPI int COINLINKAGE Clp_logLevel(Clp_Simplex * model);
    00240   COINLIBAPI int COINLINKAGE Clp_lengthNames(Clp_Simplex * model);
    00242   COINLIBAPI void COINLINKAGE Clp_rowName(Clp_Simplex * model, int iRow, char * name);
    00244   COINLIBAPI void COINLINKAGE Clp_columnName(Clp_Simplex * model, int iColumn, char * name);
    00245
    00254   COINLIBAPI int COINLINKAGE Clp_initialSolve(Clp_Simplex * model);
    00256   COINLIBAPI int COINLINKAGE Clp_initialDualSolve(Clp_Simplex * model);
    00258   COINLIBAPI int COINLINKAGE Clp_initialPrimalSolve(Clp_Simplex * model);
    00260   COINLIBAPI int COINLINKAGE Clp_initialBarrierSolve(Clp_Simplex * model);
    00262   COINLIBAPI int COINLINKAGE Clp_initialBarrierNoCrossSolve(Clp_Simplex * model);
    00264   COINLIBAPI int COINLINKAGE Clp_dual(Clp_Simplex * model, int ifValuesPass);
    00266   COINLIBAPI int COINLINKAGE Clp_primal(Clp_Simplex * model, int ifValuesPass);
    00268   COINLIBAPI void COINLINKAGE Clp_scaling(Clp_Simplex * model, int mode);
    00270   COINLIBAPI int COINLINKAGE Clp_scalingFlag(Clp_Simplex * model);
    00285   COINLIBAPI int COINLINKAGE Clp_crash(Clp_Simplex * model, double gap,int pivot);
    00292   COINLIBAPI int COINLINKAGE Clp_primalFeasible(Clp_Simplex * model);
    00294   COINLIBAPI int COINLINKAGE Clp_dualFeasible(Clp_Simplex * model);
    00296   COINLIBAPI double COINLINKAGE Clp_dualBound(Clp_Simplex * model);
    00297   COINLIBAPI void COINLINKAGE Clp_setDualBound(Clp_Simplex * model, double value);
    00299   COINLIBAPI double COINLINKAGE Clp_infeasibilityCost(Clp_Simplex * model);
    00300   COINLIBAPI void COINLINKAGE Clp_setInfeasibilityCost(Clp_Simplex * model, double value);
    00309   COINLIBAPI int COINLINKAGE Clp_perturbation(Clp_Simplex * model);
    00310   COINLIBAPI void COINLINKAGE Clp_setPerturbation(Clp_Simplex * model, int value);
    00312   COINLIBAPI int COINLINKAGE Clp_algorithm(Clp_Simplex * model);
    00314   COINLIBAPI void COINLINKAGE Clp_setAlgorithm(Clp_Simplex * model, int value);
    00316   COINLIBAPI double COINLINKAGE Clp_sumDualInfeasibilities(Clp_Simplex * model);
    00318   COINLIBAPI int COINLINKAGE Clp_numberDualInfeasibilities(Clp_Simplex * model);
    00320   COINLIBAPI double COINLINKAGE Clp_sumPrimalInfeasibilities(Clp_Simplex * model);
    00322   COINLIBAPI int COINLINKAGE Clp_numberPrimalInfeasibilities(Clp_Simplex * model);
    00329   COINLIBAPI int COINLINKAGE Clp_saveModel(Clp_Simplex * model, const char * fileName);
    00332   COINLIBAPI int COINLINKAGE Clp_restoreModel(Clp_Simplex * model, const char * fileName);
    00333
    00336   COINLIBAPI void COINLINKAGE Clp_checkSolution(Clp_Simplex * model);
    00339   /******************** End of most useful part **************/
    00343   COINLIBAPI int COINLINKAGE Clp_getNumRows(Clp_Simplex * model);
    00345   COINLIBAPI int COINLINKAGE Clp_getNumCols(Clp_Simplex * model);
    00347   COINLIBAPI int COINLINKAGE Clp_getIterationCount(Clp_Simplex * model);
    00349   COINLIBAPI int COINLINKAGE Clp_isAbandoned(Clp_Simplex * model);
    00351   COINLIBAPI int COINLINKAGE Clp_isProvenOptimal(Clp_Simplex * model);
    00353   COINLIBAPI int COINLINKAGE Clp_isProvenPrimalInfeasible(Clp_Simplex * model);
    00355   COINLIBAPI int COINLINKAGE Clp_isProvenDualInfeasible(Clp_Simplex * model);
    00357   COINLIBAPI int COINLINKAGE Clp_isPrimalObjectiveLimitReached(Clp_Simplex * model) ;
    00359   COINLIBAPI int COINLINKAGE Clp_isDualObjectiveLimitReached(Clp_Simplex * model) ;
    00361   COINLIBAPI int COINLINKAGE Clp_isIterationLimitReached(Clp_Simplex * model);
    00363   COINLIBAPI double COINLINKAGE Clp_getObjSense(Clp_Simplex * model);
    00365   COINLIBAPI const double * COINLINKAGE Clp_getRowActivity(Clp_Simplex * model);
    00367   COINLIBAPI const double * COINLINKAGE Clp_getColSolution(Clp_Simplex * model);
    00368   COINLIBAPI void COINLINKAGE Clp_setColSolution(Clp_Simplex * model, const double * input);
    00370   COINLIBAPI const double * COINLINKAGE Clp_getRowPrice(Clp_Simplex * model);
    00372   COINLIBAPI const double * COINLINKAGE Clp_getReducedCost(Clp_Simplex * model);
    00374   COINLIBAPI const double* COINLINKAGE Clp_getRowLower(Clp_Simplex * model);
    00376   COINLIBAPI const double* COINLINKAGE Clp_getRowUpper(Clp_Simplex * model);
    00378   COINLIBAPI const double * COINLINKAGE Clp_getObjCoefficients(Clp_Simplex * model);
    00380   COINLIBAPI const double * COINLINKAGE Clp_getColLower(Clp_Simplex * model);
    00382   COINLIBAPI const double * COINLINKAGE Clp_getColUpper(Clp_Simplex * model);
    00384   COINLIBAPI double COINLINKAGE Clp_getObjValue(Clp_Simplex * model);
    00386   COINLIBAPI void COINLINKAGE Clp_printModel(Clp_Simplex * model, const char * prefix);
    00387   /* Small element value - elements less than this set to zero,
    00388      default is 1.0e-20 */
    00389   COINLIBAPI double COINLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
    00390   COINLIBAPI void COINLINKAGE Clp_setSmallElementValue(Clp_Simplex * model,double value);
    00392 #ifdef __cplusplus
    00393           }
    00394 #endif
    00395 #endif