- Main Page
- Namespaces
- Classes
- Files
- Directories

- Search for |

- File List
- File Members

# Clp_C_Interface.h

Go to the documentation of this file.

    00001 /* $Id: Clp_C_Interface.h 1665 2011-01-04 17:55:54Z lou $ */
    00002 /*
    00003   Copyright (C) 2002, 2003 International Business Machines Corporation
    00004   and others.  All Rights Reserved.
    00005
    00006   This code is licensed under the terms of the Eclipse Public License (EPL).
    00007 */
    00008 #ifndef ClpSimplexC_H
    00009 #define ClpSimplexC_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 Clp_Simplex * COINLINKAGE Clp_newModel(void);
    00036      COINLIBAPI void COINLINKAGE Clp_deleteModel(Clp_Simplex * model);
    00054      COINLIBAPI void COINLINKAGE Clp_loadProblem (Clp_Simplex * model,  const int numcols, const int numrows,
    00055                const CoinBigIndex * start, const int* index,
    00056                const double* value,
    00057                const double* collb, const double* colub,
    00058                const double* obj,
    00059                const double* rowlb, const double* rowub);
    00060
    00061      /* read quadratic part of the objective (the matrix part) */
    00062      COINLIBAPI void COINLINKAGE
    00063      Clp_loadQuadraticObjective(Clp_Simplex * model,
    00064                                 const int numberColumns,
    00065                                 const CoinBigIndex * start,
    00066                                 const int * column,
    00067                                 const double * element);
    00069      COINLIBAPI int COINLINKAGE Clp_readMps(Clp_Simplex * model, const char *filename,
    00070                                             int keepNames,
    00071                                             int ignoreErrors);
    00073      COINLIBAPI void COINLINKAGE Clp_copyInIntegerInformation(Clp_Simplex * model, const char * information);
    00075      COINLIBAPI void COINLINKAGE Clp_deleteIntegerInformation(Clp_Simplex * model);
    00077      COINLIBAPI void COINLINKAGE Clp_resize (Clp_Simplex * model, int newNumberRows, int newNumberColumns);
    00079      COINLIBAPI void COINLINKAGE Clp_deleteRows(Clp_Simplex * model, int number, const int * which);
    00081      COINLIBAPI void COINLINKAGE Clp_addRows(Clp_Simplex * model, int number, const double * rowLower,
    00082                                              const double * rowUpper,
    00083                                              const int * rowStarts, const int * columns,
    00084                                              const double * elements);
    00085
    00087      COINLIBAPI void COINLINKAGE Clp_deleteColumns(Clp_Simplex * model, int number, const int * which);
    00089      COINLIBAPI void COINLINKAGE Clp_addColumns(Clp_Simplex * model, int number, const double * columnLower,
    00090                const double * columnUpper,
    00091                const double * objective,
    00092                const int * columnStarts, const int * rows,
    00093                const double * elements);
    00095      COINLIBAPI void COINLINKAGE Clp_chgRowLower(Clp_Simplex * model, const double * rowLower);
    00097      COINLIBAPI void COINLINKAGE Clp_chgRowUpper(Clp_Simplex * model, const double * rowUpper);
    00099      COINLIBAPI void COINLINKAGE Clp_chgColumnLower(Clp_Simplex * model, const double * columnLower);
    00101      COINLIBAPI void COINLINKAGE Clp_chgColumnUpper(Clp_Simplex * model, const double * columnUpper);
    00103      COINLIBAPI void COINLINKAGE Clp_chgObjCoefficients(Clp_Simplex * model, const double * objIn);
    00105      COINLIBAPI void COINLINKAGE Clp_dropNames(Clp_Simplex * model);
    00107      COINLIBAPI void COINLINKAGE Clp_copyNames(Clp_Simplex * model, const char * const * rowNames,
    00108                const char * const * columnNames);
    00109
    00114      COINLIBAPI int COINLINKAGE Clp_numberRows(Clp_Simplex * model);
    00116      COINLIBAPI int COINLINKAGE Clp_numberColumns(Clp_Simplex * model);
    00118      COINLIBAPI double COINLINKAGE Clp_primalTolerance(Clp_Simplex * model);
    00119      COINLIBAPI void COINLINKAGE Clp_setPrimalTolerance(Clp_Simplex * model,  double value) ;
    00121      COINLIBAPI double COINLINKAGE Clp_dualTolerance(Clp_Simplex * model);
    00122      COINLIBAPI void COINLINKAGE Clp_setDualTolerance(Clp_Simplex * model,  double value) ;
    00124      COINLIBAPI double COINLINKAGE Clp_dualObjectiveLimit(Clp_Simplex * model);
    00125      COINLIBAPI void COINLINKAGE Clp_setDualObjectiveLimit(Clp_Simplex * model, double value);
    00127      COINLIBAPI double COINLINKAGE Clp_objectiveOffset(Clp_Simplex * model);
    00128      COINLIBAPI void COINLINKAGE Clp_setObjectiveOffset(Clp_Simplex * model, double value);
    00130      COINLIBAPI void COINLINKAGE Clp_problemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00131      /* Sets problem name.  Must have \0 at end.  */
    00132      COINLIBAPI int COINLINKAGE
    00133      Clp_setProblemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00135      COINLIBAPI int COINLINKAGE Clp_numberIterations(Clp_Simplex * model);
    00136      COINLIBAPI void COINLINKAGE Clp_setNumberIterations(Clp_Simplex * model, int numberIterations);
    00138      COINLIBAPI int maximumIterations(Clp_Simplex * model);
    00139      COINLIBAPI void COINLINKAGE Clp_setMaximumIterations(Clp_Simplex * model, int value);
    00141      COINLIBAPI double COINLINKAGE Clp_maximumSeconds(Clp_Simplex * model);
    00142      COINLIBAPI void COINLINKAGE Clp_setMaximumSeconds(Clp_Simplex * model, double value);
    00144      COINLIBAPI int COINLINKAGE Clp_hitMaximumIterations(Clp_Simplex * model);
    00152      COINLIBAPI int COINLINKAGE Clp_status(Clp_Simplex * model);
    00154      COINLIBAPI void COINLINKAGE Clp_setProblemStatus(Clp_Simplex * model, int problemStatus);
    00162      COINLIBAPI int COINLINKAGE Clp_secondaryStatus(Clp_Simplex * model);
    00163      COINLIBAPI void COINLINKAGE Clp_setSecondaryStatus(Clp_Simplex * model, int status);
    00165      COINLIBAPI double COINLINKAGE Clp_optimizationDirection(Clp_Simplex * model);
    00166      COINLIBAPI void COINLINKAGE Clp_setOptimizationDirection(Clp_Simplex * model, double value);
    00168      COINLIBAPI double * COINLINKAGE Clp_primalRowSolution(Clp_Simplex * model);
    00170      COINLIBAPI double * COINLINKAGE Clp_primalColumnSolution(Clp_Simplex * model);
    00172      COINLIBAPI double * COINLINKAGE Clp_dualRowSolution(Clp_Simplex * model);
    00174      COINLIBAPI double * COINLINKAGE Clp_dualColumnSolution(Clp_Simplex * model);
    00176      COINLIBAPI double* COINLINKAGE Clp_rowLower(Clp_Simplex * model);
    00178      COINLIBAPI double* COINLINKAGE Clp_rowUpper(Clp_Simplex * model);
    00180      COINLIBAPI double * COINLINKAGE Clp_objective(Clp_Simplex * model);
    00182      COINLIBAPI double * COINLINKAGE Clp_columnLower(Clp_Simplex * model);
    00184      COINLIBAPI double * COINLINKAGE Clp_columnUpper(Clp_Simplex * model);
    00186      COINLIBAPI int COINLINKAGE Clp_getNumElements(Clp_Simplex * model);
    00187      /* Column starts in matrix */
    00188      COINLIBAPI const CoinBigIndex * COINLINKAGE Clp_getVectorStarts(Clp_Simplex * model);
    00189      /* Row indices in matrix */
    00190      COINLIBAPI const int * COINLINKAGE Clp_getIndices(Clp_Simplex * model);
    00191      /* Column vector lengths in matrix */
    00192      COINLIBAPI const int * COINLINKAGE Clp_getVectorLengths(Clp_Simplex * model);
    00193      /* Element values in matrix */
    00194      COINLIBAPI const double * COINLINKAGE Clp_getElements(Clp_Simplex * model);
    00196      COINLIBAPI double COINLINKAGE Clp_objectiveValue(Clp_Simplex * model);
    00198      COINLIBAPI char * COINLINKAGE Clp_integerInformation(Clp_Simplex * model);
    00201      COINLIBAPI double * COINLINKAGE Clp_infeasibilityRay(Clp_Simplex * model);
    00202      COINLIBAPI double * COINLINKAGE Clp_unboundedRay(Clp_Simplex * model);
    00204      COINLIBAPI int COINLINKAGE Clp_statusExists(Clp_Simplex * model);
    00206      COINLIBAPI unsigned char *  COINLINKAGE Clp_statusArray(Clp_Simplex * model);
    00208      COINLIBAPI void COINLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
    00209      /* status values are as in ClpSimplex.hpp i.e. 0 - free, 1 basic, 2 at upper,
    00210         3 at lower, 4 superbasic, (5 fixed) */
    00211      /* Get variable basis info */
    00212      COINLIBAPI int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model, int sequence);
    00213      /* Get row basis info */
    00214      COINLIBAPI int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model, int sequence);
    00215      /* Set variable basis info (and value if at bound) */
    00216      COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
    00217                int sequence, int value);
    00218      /* Set row basis info (and value if at bound) */
    00219      COINLIBAPI void COINLINKAGE Clp_setRowStatus(Clp_Simplex * model,
    00220                int sequence, int value);
    00221
    00223      COINLIBAPI void COINLINKAGE Clp_setUserPointer (Clp_Simplex * model, void * pointer);
    00224      COINLIBAPI void * COINLINKAGE Clp_getUserPointer (Clp_Simplex * model);
    00230      COINLIBAPI void COINLINKAGE Clp_registerCallBack(Clp_Simplex * model,
    00231                clp_callback userCallBack);
    00233      COINLIBAPI void COINLINKAGE Clp_clearCallBack(Clp_Simplex * model);
    00242      COINLIBAPI void COINLINKAGE Clp_setLogLevel(Clp_Simplex * model, int value);
    00243      COINLIBAPI int COINLINKAGE Clp_logLevel(Clp_Simplex * model);
    00245      COINLIBAPI int COINLINKAGE Clp_lengthNames(Clp_Simplex * model);
    00247      COINLIBAPI void COINLINKAGE Clp_rowName(Clp_Simplex * model, int iRow, char * name);
    00249      COINLIBAPI void COINLINKAGE Clp_columnName(Clp_Simplex * model, int iColumn, char * name);
    00250
    00259      COINLIBAPI int COINLINKAGE Clp_initialSolve(Clp_Simplex * model);
    00261      COINLIBAPI int COINLINKAGE Clp_initialDualSolve(Clp_Simplex * model);
    00263      COINLIBAPI int COINLINKAGE Clp_initialPrimalSolve(Clp_Simplex * model);
    00265      COINLIBAPI int COINLINKAGE Clp_initialBarrierSolve(Clp_Simplex * model);
    00267      COINLIBAPI int COINLINKAGE Clp_initialBarrierNoCrossSolve(Clp_Simplex * model);
    00269      COINLIBAPI int COINLINKAGE Clp_dual(Clp_Simplex * model, int ifValuesPass);
    00271      COINLIBAPI int COINLINKAGE Clp_primal(Clp_Simplex * model, int ifValuesPass);
    00272 #ifndef SLIM_CLP
    00273
    00274      COINLIBAPI void COINLINKAGE Clp_idiot(Clp_Simplex * model, int tryhard);
    00275 #endif
    00276
    00277      COINLIBAPI void COINLINKAGE Clp_scaling(Clp_Simplex * model, int mode);
    00279      COINLIBAPI int COINLINKAGE Clp_scalingFlag(Clp_Simplex * model);
    00294      COINLIBAPI int COINLINKAGE Clp_crash(Clp_Simplex * model, double gap, int pivot);
    00301      COINLIBAPI int COINLINKAGE Clp_primalFeasible(Clp_Simplex * model);
    00303      COINLIBAPI int COINLINKAGE Clp_dualFeasible(Clp_Simplex * model);
    00305      COINLIBAPI double COINLINKAGE Clp_dualBound(Clp_Simplex * model);
    00306      COINLIBAPI void COINLINKAGE Clp_setDualBound(Clp_Simplex * model, double value);
    00308      COINLIBAPI double COINLINKAGE Clp_infeasibilityCost(Clp_Simplex * model);
    00309      COINLIBAPI void COINLINKAGE Clp_setInfeasibilityCost(Clp_Simplex * model, double value);
    00318      COINLIBAPI int COINLINKAGE Clp_perturbation(Clp_Simplex * model);
    00319      COINLIBAPI void COINLINKAGE Clp_setPerturbation(Clp_Simplex * model, int value);
    00321      COINLIBAPI int COINLINKAGE Clp_algorithm(Clp_Simplex * model);
    00323      COINLIBAPI void COINLINKAGE Clp_setAlgorithm(Clp_Simplex * model, int value);
    00325      COINLIBAPI double COINLINKAGE Clp_sumDualInfeasibilities(Clp_Simplex * model);
    00327      COINLIBAPI int COINLINKAGE Clp_numberDualInfeasibilities(Clp_Simplex * model);
    00329      COINLIBAPI double COINLINKAGE Clp_sumPrimalInfeasibilities(Clp_Simplex * model);
    00331      COINLIBAPI int COINLINKAGE Clp_numberPrimalInfeasibilities(Clp_Simplex * model);
    00338      COINLIBAPI int COINLINKAGE Clp_saveModel(Clp_Simplex * model, const char * fileName);
    00341      COINLIBAPI int COINLINKAGE Clp_restoreModel(Clp_Simplex * model, const char * fileName);
    00342
    00345      COINLIBAPI void COINLINKAGE Clp_checkSolution(Clp_Simplex * model);
    00348      /******************** End of most useful part **************/
    00352      COINLIBAPI int COINLINKAGE Clp_getNumRows(Clp_Simplex * model);
    00354      COINLIBAPI int COINLINKAGE Clp_getNumCols(Clp_Simplex * model);
    00356      COINLIBAPI int COINLINKAGE Clp_getIterationCount(Clp_Simplex * model);
    00358      COINLIBAPI int COINLINKAGE Clp_isAbandoned(Clp_Simplex * model);
    00360      COINLIBAPI int COINLINKAGE Clp_isProvenOptimal(Clp_Simplex * model);
    00362      COINLIBAPI int COINLINKAGE Clp_isProvenPrimalInfeasible(Clp_Simplex * model);
    00364      COINLIBAPI int COINLINKAGE Clp_isProvenDualInfeasible(Clp_Simplex * model);
    00366      COINLIBAPI int COINLINKAGE Clp_isPrimalObjectiveLimitReached(Clp_Simplex * model) ;
    00368      COINLIBAPI int COINLINKAGE Clp_isDualObjectiveLimitReached(Clp_Simplex * model) ;
    00370      COINLIBAPI int COINLINKAGE Clp_isIterationLimitReached(Clp_Simplex * model);
    00372      COINLIBAPI double COINLINKAGE Clp_getObjSense(Clp_Simplex * model);
    00374      COINLIBAPI void COINLINKAGE Clp_setObjSense(Clp_Simplex * model, double objsen);
    00376      COINLIBAPI const double * COINLINKAGE Clp_getRowActivity(Clp_Simplex * model);
    00378      COINLIBAPI const double * COINLINKAGE Clp_getColSolution(Clp_Simplex * model);
    00379      COINLIBAPI void COINLINKAGE Clp_setColSolution(Clp_Simplex * model, const double * input);
    00381      COINLIBAPI const double * COINLINKAGE Clp_getRowPrice(Clp_Simplex * model);
    00383      COINLIBAPI const double * COINLINKAGE Clp_getReducedCost(Clp_Simplex * model);
    00385      COINLIBAPI const double* COINLINKAGE Clp_getRowLower(Clp_Simplex * model);
    00387      COINLIBAPI const double* COINLINKAGE Clp_getRowUpper(Clp_Simplex * model);
    00389      COINLIBAPI const double * COINLINKAGE Clp_getObjCoefficients(Clp_Simplex * model);
    00391      COINLIBAPI const double * COINLINKAGE Clp_getColLower(Clp_Simplex * model);
    00393      COINLIBAPI const double * COINLINKAGE Clp_getColUpper(Clp_Simplex * model);
    00395      COINLIBAPI double COINLINKAGE Clp_getObjValue(Clp_Simplex * model);
    00397      COINLIBAPI void COINLINKAGE Clp_printModel(Clp_Simplex * model, const char * prefix);
    00398      /* Small element value - elements less than this set to zero,
    00399         default is 1.0e-20 */
    00400      COINLIBAPI double COINLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
    00401      COINLIBAPI void COINLINKAGE Clp_setSmallElementValue(Clp_Simplex * model, double value);
    00403 #ifdef __cplusplus
    00404 }
    00405 #endif
    00406 #endif