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

- File List
- File Members

# /home/coin/SVN-release/Alps-1.2.1/Clp/src/Clp_C_Interface.h

Go to the documentation of this file.

    00001 /* $Id: Clp_C_Interface.h 1525 2010-02-26 17:27:59Z mjs $ */
    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);
    00268 #ifndef SLIM_CLP
    00269
    00270      COINLIBAPI void COINLINKAGE Clp_idiot(Clp_Simplex * model, int tryhard);
    00271 #endif
    00272
    00273      COINLIBAPI void COINLINKAGE Clp_scaling(Clp_Simplex * model, int mode);
    00275      COINLIBAPI int COINLINKAGE Clp_scalingFlag(Clp_Simplex * model);
    00290      COINLIBAPI int COINLINKAGE Clp_crash(Clp_Simplex * model, double gap, int pivot);
    00297      COINLIBAPI int COINLINKAGE Clp_primalFeasible(Clp_Simplex * model);
    00299      COINLIBAPI int COINLINKAGE Clp_dualFeasible(Clp_Simplex * model);
    00301      COINLIBAPI double COINLINKAGE Clp_dualBound(Clp_Simplex * model);
    00302      COINLIBAPI void COINLINKAGE Clp_setDualBound(Clp_Simplex * model, double value);
    00304      COINLIBAPI double COINLINKAGE Clp_infeasibilityCost(Clp_Simplex * model);
    00305      COINLIBAPI void COINLINKAGE Clp_setInfeasibilityCost(Clp_Simplex * model, double value);
    00314      COINLIBAPI int COINLINKAGE Clp_perturbation(Clp_Simplex * model);
    00315      COINLIBAPI void COINLINKAGE Clp_setPerturbation(Clp_Simplex * model, int value);
    00317      COINLIBAPI int COINLINKAGE Clp_algorithm(Clp_Simplex * model);
    00319      COINLIBAPI void COINLINKAGE Clp_setAlgorithm(Clp_Simplex * model, int value);
    00321      COINLIBAPI double COINLINKAGE Clp_sumDualInfeasibilities(Clp_Simplex * model);
    00323      COINLIBAPI int COINLINKAGE Clp_numberDualInfeasibilities(Clp_Simplex * model);
    00325      COINLIBAPI double COINLINKAGE Clp_sumPrimalInfeasibilities(Clp_Simplex * model);
    00327      COINLIBAPI int COINLINKAGE Clp_numberPrimalInfeasibilities(Clp_Simplex * model);
    00334      COINLIBAPI int COINLINKAGE Clp_saveModel(Clp_Simplex * model, const char * fileName);
    00337      COINLIBAPI int COINLINKAGE Clp_restoreModel(Clp_Simplex * model, const char * fileName);
    00338
    00341      COINLIBAPI void COINLINKAGE Clp_checkSolution(Clp_Simplex * model);
    00344      /******************** End of most useful part **************/
    00348      COINLIBAPI int COINLINKAGE Clp_getNumRows(Clp_Simplex * model);
    00350      COINLIBAPI int COINLINKAGE Clp_getNumCols(Clp_Simplex * model);
    00352      COINLIBAPI int COINLINKAGE Clp_getIterationCount(Clp_Simplex * model);
    00354      COINLIBAPI int COINLINKAGE Clp_isAbandoned(Clp_Simplex * model);
    00356      COINLIBAPI int COINLINKAGE Clp_isProvenOptimal(Clp_Simplex * model);
    00358      COINLIBAPI int COINLINKAGE Clp_isProvenPrimalInfeasible(Clp_Simplex * model);
    00360      COINLIBAPI int COINLINKAGE Clp_isProvenDualInfeasible(Clp_Simplex * model);
    00362      COINLIBAPI int COINLINKAGE Clp_isPrimalObjectiveLimitReached(Clp_Simplex * model) ;
    00364      COINLIBAPI int COINLINKAGE Clp_isDualObjectiveLimitReached(Clp_Simplex * model) ;
    00366      COINLIBAPI int COINLINKAGE Clp_isIterationLimitReached(Clp_Simplex * model);
    00368      COINLIBAPI double COINLINKAGE Clp_getObjSense(Clp_Simplex * model);
    00370      COINLIBAPI void COINLINKAGE Clp_setObjSense(Clp_Simplex * model, double objsen);
    00372      COINLIBAPI const double * COINLINKAGE Clp_getRowActivity(Clp_Simplex * model);
    00374      COINLIBAPI const double * COINLINKAGE Clp_getColSolution(Clp_Simplex * model);
    00375      COINLIBAPI void COINLINKAGE Clp_setColSolution(Clp_Simplex * model, const double * input);
    00377      COINLIBAPI const double * COINLINKAGE Clp_getRowPrice(Clp_Simplex * model);
    00379      COINLIBAPI const double * COINLINKAGE Clp_getReducedCost(Clp_Simplex * model);
    00381      COINLIBAPI const double* COINLINKAGE Clp_getRowLower(Clp_Simplex * model);
    00383      COINLIBAPI const double* COINLINKAGE Clp_getRowUpper(Clp_Simplex * model);
    00385      COINLIBAPI const double * COINLINKAGE Clp_getObjCoefficients(Clp_Simplex * model);
    00387      COINLIBAPI const double * COINLINKAGE Clp_getColLower(Clp_Simplex * model);
    00389      COINLIBAPI const double * COINLINKAGE Clp_getColUpper(Clp_Simplex * model);
    00391      COINLIBAPI double COINLINKAGE Clp_getObjValue(Clp_Simplex * model);
    00393      COINLIBAPI void COINLINKAGE Clp_printModel(Clp_Simplex * model, const char * prefix);
    00394      /* Small element value - elements less than this set to zero,
    00395         default is 1.0e-20 */
    00396      COINLIBAPI double COINLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
    00397      COINLIBAPI void COINLINKAGE Clp_setSmallElementValue(Clp_Simplex * model, double value);
    00399 #ifdef __cplusplus
    00400 }
    00401 #endif
    00402 #endif