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

- File List
- File Members

# /home/coin/svn-release/Alps-1.4.8/Clp/src/Clp_C_Interface.h

Go to the documentation of this file.

    00001 /* $Id: Clp_C_Interface.h 1902 2013-01-03 17:07:26Z stefan $ */
    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
    00014 #if defined (CLP_EXTERN_C)
    00015 typedef struct {
    00016   ClpSolve options;
    00017 } Clp_Solve;
    00018 #else
    00019 typedef void Clp_Solve;
    00020 #endif
    00021
    00027 #ifdef __cplusplus
    00028 extern "C" {
    00029 #endif
    00030
    00044
    00046      COINLIBAPI Clp_Simplex * COINLINKAGE Clp_newModel(void);
    00048      COINLIBAPI void COINLINKAGE Clp_deleteModel(Clp_Simplex * model);
    00050      COINLIBAPI Clp_Solve * COINLINKAGE ClpSolve_new();
    00052      COINLIBAPI void COINLINKAGE ClpSolve_delete(Clp_Solve * solve);
    00070      COINLIBAPI void COINLINKAGE Clp_loadProblem (Clp_Simplex * model,  const int numcols, const int numrows,
    00071                const CoinBigIndex * start, const int* index,
    00072                const double* value,
    00073                const double* collb, const double* colub,
    00074                const double* obj,
    00075                const double* rowlb, const double* rowub);
    00076
    00077      /* read quadratic part of the objective (the matrix part) */
    00078      COINLIBAPI void COINLINKAGE
    00079      Clp_loadQuadraticObjective(Clp_Simplex * model,
    00080                                 const int numberColumns,
    00081                                 const CoinBigIndex * start,
    00082                                 const int * column,
    00083                                 const double * element);
    00085      COINLIBAPI int COINLINKAGE Clp_readMps(Clp_Simplex * model, const char *filename,
    00086                                             int keepNames,
    00087                                             int ignoreErrors);
    00089      COINLIBAPI void COINLINKAGE Clp_copyInIntegerInformation(Clp_Simplex * model, const char * information);
    00091      COINLIBAPI void COINLINKAGE Clp_deleteIntegerInformation(Clp_Simplex * model);
    00093      COINLIBAPI void COINLINKAGE Clp_resize (Clp_Simplex * model, int newNumberRows, int newNumberColumns);
    00095      COINLIBAPI void COINLINKAGE Clp_deleteRows(Clp_Simplex * model, int number, const int * which);
    00097      COINLIBAPI void COINLINKAGE Clp_addRows(Clp_Simplex * model, int number, const double * rowLower,
    00098                                              const double * rowUpper,
    00099                                              const int * rowStarts, const int * columns,
    00100                                              const double * elements);
    00101
    00103      COINLIBAPI void COINLINKAGE Clp_deleteColumns(Clp_Simplex * model, int number, const int * which);
    00105      COINLIBAPI void COINLINKAGE Clp_addColumns(Clp_Simplex * model, int number, const double * columnLower,
    00106                const double * columnUpper,
    00107                const double * objective,
    00108                const int * columnStarts, const int * rows,
    00109                const double * elements);
    00111      COINLIBAPI void COINLINKAGE Clp_chgRowLower(Clp_Simplex * model, const double * rowLower);
    00113      COINLIBAPI void COINLINKAGE Clp_chgRowUpper(Clp_Simplex * model, const double * rowUpper);
    00115      COINLIBAPI void COINLINKAGE Clp_chgColumnLower(Clp_Simplex * model, const double * columnLower);
    00117      COINLIBAPI void COINLINKAGE Clp_chgColumnUpper(Clp_Simplex * model, const double * columnUpper);
    00119      COINLIBAPI void COINLINKAGE Clp_chgObjCoefficients(Clp_Simplex * model, const double * objIn);
    00121      COINLIBAPI void COINLINKAGE Clp_dropNames(Clp_Simplex * model);
    00123      COINLIBAPI void COINLINKAGE Clp_copyNames(Clp_Simplex * model, const char * const * rowNames,
    00124                const char * const * columnNames);
    00125
    00130      COINLIBAPI int COINLINKAGE Clp_numberRows(Clp_Simplex * model);
    00132      COINLIBAPI int COINLINKAGE Clp_numberColumns(Clp_Simplex * model);
    00134      COINLIBAPI double COINLINKAGE Clp_primalTolerance(Clp_Simplex * model);
    00135      COINLIBAPI void COINLINKAGE Clp_setPrimalTolerance(Clp_Simplex * model,  double value) ;
    00137      COINLIBAPI double COINLINKAGE Clp_dualTolerance(Clp_Simplex * model);
    00138      COINLIBAPI void COINLINKAGE Clp_setDualTolerance(Clp_Simplex * model,  double value) ;
    00140      COINLIBAPI double COINLINKAGE Clp_dualObjectiveLimit(Clp_Simplex * model);
    00141      COINLIBAPI void COINLINKAGE Clp_setDualObjectiveLimit(Clp_Simplex * model, double value);
    00143      COINLIBAPI double COINLINKAGE Clp_objectiveOffset(Clp_Simplex * model);
    00144      COINLIBAPI void COINLINKAGE Clp_setObjectiveOffset(Clp_Simplex * model, double value);
    00146      COINLIBAPI void COINLINKAGE Clp_problemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00147      /* Sets problem name.  Must have \0 at end.  */
    00148      COINLIBAPI int COINLINKAGE
    00149      Clp_setProblemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00151      COINLIBAPI int COINLINKAGE Clp_numberIterations(Clp_Simplex * model);
    00152      COINLIBAPI void COINLINKAGE Clp_setNumberIterations(Clp_Simplex * model, int numberIterations);
    00154      COINLIBAPI int maximumIterations(Clp_Simplex * model);
    00155      COINLIBAPI void COINLINKAGE Clp_setMaximumIterations(Clp_Simplex * model, int value);
    00157      COINLIBAPI double COINLINKAGE Clp_maximumSeconds(Clp_Simplex * model);
    00158      COINLIBAPI void COINLINKAGE Clp_setMaximumSeconds(Clp_Simplex * model, double value);
    00160      COINLIBAPI int COINLINKAGE Clp_hitMaximumIterations(Clp_Simplex * model);
    00168      COINLIBAPI int COINLINKAGE Clp_status(Clp_Simplex * model);
    00170      COINLIBAPI void COINLINKAGE Clp_setProblemStatus(Clp_Simplex * model, int problemStatus);
    00178      COINLIBAPI int COINLINKAGE Clp_secondaryStatus(Clp_Simplex * model);
    00179      COINLIBAPI void COINLINKAGE Clp_setSecondaryStatus(Clp_Simplex * model, int status);
    00181      COINLIBAPI double COINLINKAGE Clp_optimizationDirection(Clp_Simplex * model);
    00182      COINLIBAPI void COINLINKAGE Clp_setOptimizationDirection(Clp_Simplex * model, double value);
    00184      COINLIBAPI double * COINLINKAGE Clp_primalRowSolution(Clp_Simplex * model);
    00186      COINLIBAPI double * COINLINKAGE Clp_primalColumnSolution(Clp_Simplex * model);
    00188      COINLIBAPI double * COINLINKAGE Clp_dualRowSolution(Clp_Simplex * model);
    00190      COINLIBAPI double * COINLINKAGE Clp_dualColumnSolution(Clp_Simplex * model);
    00192      COINLIBAPI double* COINLINKAGE Clp_rowLower(Clp_Simplex * model);
    00194      COINLIBAPI double* COINLINKAGE Clp_rowUpper(Clp_Simplex * model);
    00196      COINLIBAPI double * COINLINKAGE Clp_objective(Clp_Simplex * model);
    00198      COINLIBAPI double * COINLINKAGE Clp_columnLower(Clp_Simplex * model);
    00200      COINLIBAPI double * COINLINKAGE Clp_columnUpper(Clp_Simplex * model);
    00202      COINLIBAPI int COINLINKAGE Clp_getNumElements(Clp_Simplex * model);
    00203      /* Column starts in matrix */
    00204      COINLIBAPI const CoinBigIndex * COINLINKAGE Clp_getVectorStarts(Clp_Simplex * model);
    00205      /* Row indices in matrix */
    00206      COINLIBAPI const int * COINLINKAGE Clp_getIndices(Clp_Simplex * model);
    00207      /* Column vector lengths in matrix */
    00208      COINLIBAPI const int * COINLINKAGE Clp_getVectorLengths(Clp_Simplex * model);
    00209      /* Element values in matrix */
    00210      COINLIBAPI const double * COINLINKAGE Clp_getElements(Clp_Simplex * model);
    00212      COINLIBAPI double COINLINKAGE Clp_objectiveValue(Clp_Simplex * model);
    00214      COINLIBAPI char * COINLINKAGE Clp_integerInformation(Clp_Simplex * model);
    00217      COINLIBAPI double * COINLINKAGE Clp_infeasibilityRay(Clp_Simplex * model);
    00218      COINLIBAPI double * COINLINKAGE Clp_unboundedRay(Clp_Simplex * model);
    00220      COINLIBAPI int COINLINKAGE Clp_statusExists(Clp_Simplex * model);
    00222      COINLIBAPI unsigned char *  COINLINKAGE Clp_statusArray(Clp_Simplex * model);
    00224      COINLIBAPI void COINLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
    00225      /* status values are as in ClpSimplex.hpp i.e. 0 - free, 1 basic, 2 at upper,
    00226         3 at lower, 4 superbasic, (5 fixed) */
    00227      /* Get variable basis info */
    00228      COINLIBAPI int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model, int sequence);
    00229      /* Get row basis info */
    00230      COINLIBAPI int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model, int sequence);
    00231      /* Set variable basis info (and value if at bound) */
    00232      COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
    00233                int sequence, int value);
    00234      /* Set row basis info (and value if at bound) */
    00235      COINLIBAPI void COINLINKAGE Clp_setRowStatus(Clp_Simplex * model,
    00236                int sequence, int value);
    00237
    00239      COINLIBAPI void COINLINKAGE Clp_setUserPointer (Clp_Simplex * model, void * pointer);
    00240      COINLIBAPI void * COINLINKAGE Clp_getUserPointer (Clp_Simplex * model);
    00246      COINLIBAPI void COINLINKAGE Clp_registerCallBack(Clp_Simplex * model,
    00247                clp_callback userCallBack);
    00249      COINLIBAPI void COINLINKAGE Clp_clearCallBack(Clp_Simplex * model);
    00258      COINLIBAPI void COINLINKAGE Clp_setLogLevel(Clp_Simplex * model, int value);
    00259      COINLIBAPI int COINLINKAGE Clp_logLevel(Clp_Simplex * model);
    00261      COINLIBAPI int COINLINKAGE Clp_lengthNames(Clp_Simplex * model);
    00263      COINLIBAPI void COINLINKAGE Clp_rowName(Clp_Simplex * model, int iRow, char * name);
    00265      COINLIBAPI void COINLINKAGE Clp_columnName(Clp_Simplex * model, int iColumn, char * name);
    00266
    00275      COINLIBAPI int COINLINKAGE Clp_initialSolve(Clp_Simplex * model);
    00277      COINLIBAPI int COINLINKAGE Clp_initialSolveWithOptions(Clp_Simplex * model, Clp_Solve *);
    00279      COINLIBAPI int COINLINKAGE Clp_initialDualSolve(Clp_Simplex * model);
    00281      COINLIBAPI int COINLINKAGE Clp_initialPrimalSolve(Clp_Simplex * model);
    00283      COINLIBAPI int COINLINKAGE Clp_initialBarrierSolve(Clp_Simplex * model);
    00285      COINLIBAPI int COINLINKAGE Clp_initialBarrierNoCrossSolve(Clp_Simplex * model);
    00287      COINLIBAPI int COINLINKAGE Clp_dual(Clp_Simplex * model, int ifValuesPass);
    00289      COINLIBAPI int COINLINKAGE Clp_primal(Clp_Simplex * model, int ifValuesPass);
    00290 #ifndef SLIM_CLP
    00291
    00292      COINLIBAPI void COINLINKAGE Clp_idiot(Clp_Simplex * model, int tryhard);
    00293 #endif
    00294
    00295      COINLIBAPI void COINLINKAGE Clp_scaling(Clp_Simplex * model, int mode);
    00297      COINLIBAPI int COINLINKAGE Clp_scalingFlag(Clp_Simplex * model);
    00312      COINLIBAPI int COINLINKAGE Clp_crash(Clp_Simplex * model, double gap, int pivot);
    00319      COINLIBAPI int COINLINKAGE Clp_primalFeasible(Clp_Simplex * model);
    00321      COINLIBAPI int COINLINKAGE Clp_dualFeasible(Clp_Simplex * model);
    00323      COINLIBAPI double COINLINKAGE Clp_dualBound(Clp_Simplex * model);
    00324      COINLIBAPI void COINLINKAGE Clp_setDualBound(Clp_Simplex * model, double value);
    00326      COINLIBAPI double COINLINKAGE Clp_infeasibilityCost(Clp_Simplex * model);
    00327      COINLIBAPI void COINLINKAGE Clp_setInfeasibilityCost(Clp_Simplex * model, double value);
    00336      COINLIBAPI int COINLINKAGE Clp_perturbation(Clp_Simplex * model);
    00337      COINLIBAPI void COINLINKAGE Clp_setPerturbation(Clp_Simplex * model, int value);
    00339      COINLIBAPI int COINLINKAGE Clp_algorithm(Clp_Simplex * model);
    00341      COINLIBAPI void COINLINKAGE Clp_setAlgorithm(Clp_Simplex * model, int value);
    00343      COINLIBAPI double COINLINKAGE Clp_sumDualInfeasibilities(Clp_Simplex * model);
    00345      COINLIBAPI int COINLINKAGE Clp_numberDualInfeasibilities(Clp_Simplex * model);
    00347      COINLIBAPI double COINLINKAGE Clp_sumPrimalInfeasibilities(Clp_Simplex * model);
    00349      COINLIBAPI int COINLINKAGE Clp_numberPrimalInfeasibilities(Clp_Simplex * model);
    00356      COINLIBAPI int COINLINKAGE Clp_saveModel(Clp_Simplex * model, const char * fileName);
    00359      COINLIBAPI int COINLINKAGE Clp_restoreModel(Clp_Simplex * model, const char * fileName);
    00360
    00363      COINLIBAPI void COINLINKAGE Clp_checkSolution(Clp_Simplex * model);
    00366      /******************** End of most useful part **************/
    00370      COINLIBAPI int COINLINKAGE Clp_getNumRows(Clp_Simplex * model);
    00372      COINLIBAPI int COINLINKAGE Clp_getNumCols(Clp_Simplex * model);
    00374      COINLIBAPI int COINLINKAGE Clp_getIterationCount(Clp_Simplex * model);
    00376      COINLIBAPI int COINLINKAGE Clp_isAbandoned(Clp_Simplex * model);
    00378      COINLIBAPI int COINLINKAGE Clp_isProvenOptimal(Clp_Simplex * model);
    00380      COINLIBAPI int COINLINKAGE Clp_isProvenPrimalInfeasible(Clp_Simplex * model);
    00382      COINLIBAPI int COINLINKAGE Clp_isProvenDualInfeasible(Clp_Simplex * model);
    00384      COINLIBAPI int COINLINKAGE Clp_isPrimalObjectiveLimitReached(Clp_Simplex * model) ;
    00386      COINLIBAPI int COINLINKAGE Clp_isDualObjectiveLimitReached(Clp_Simplex * model) ;
    00388      COINLIBAPI int COINLINKAGE Clp_isIterationLimitReached(Clp_Simplex * model);
    00390      COINLIBAPI double COINLINKAGE Clp_getObjSense(Clp_Simplex * model);
    00392      COINLIBAPI void COINLINKAGE Clp_setObjSense(Clp_Simplex * model, double objsen);
    00394      COINLIBAPI const double * COINLINKAGE Clp_getRowActivity(Clp_Simplex * model);
    00396      COINLIBAPI const double * COINLINKAGE Clp_getColSolution(Clp_Simplex * model);
    00397      COINLIBAPI void COINLINKAGE Clp_setColSolution(Clp_Simplex * model, const double * input);
    00399      COINLIBAPI const double * COINLINKAGE Clp_getRowPrice(Clp_Simplex * model);
    00401      COINLIBAPI const double * COINLINKAGE Clp_getReducedCost(Clp_Simplex * model);
    00403      COINLIBAPI const double* COINLINKAGE Clp_getRowLower(Clp_Simplex * model);
    00405      COINLIBAPI const double* COINLINKAGE Clp_getRowUpper(Clp_Simplex * model);
    00407      COINLIBAPI const double * COINLINKAGE Clp_getObjCoefficients(Clp_Simplex * model);
    00409      COINLIBAPI const double * COINLINKAGE Clp_getColLower(Clp_Simplex * model);
    00411      COINLIBAPI const double * COINLINKAGE Clp_getColUpper(Clp_Simplex * model);
    00413      COINLIBAPI double COINLINKAGE Clp_getObjValue(Clp_Simplex * model);
    00415      COINLIBAPI void COINLINKAGE Clp_printModel(Clp_Simplex * model, const char * prefix);
    00416      /* Small element value - elements less than this set to zero,
    00417         default is 1.0e-20 */
    00418      COINLIBAPI double COINLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
    00419      COINLIBAPI void COINLINKAGE Clp_setSmallElementValue(Clp_Simplex * model, double value);
    00426      COINLIBAPI void COINLINKAGE ClpSolve_setSpecialOption(Clp_Solve *, int which, int value, int extraInfo);
    00427      COINLIBAPI int COINLINKAGE ClpSolve_getSpecialOption(Clp_Solve *, int which);
    00428
    00438      COINLIBAPI void COINLINKAGE ClpSolve_setSolveType(Clp_Solve *, int method, int extraInfo);
    00439      COINLIBAPI int COINLINKAGE ClpSolve_getSolveType(Clp_Solve *);
    00440
    00447      COINLIBAPI void COINLINKAGE ClpSolve_setPresolveType(Clp_Solve *, int amount, int extraInfo);
    00448      COINLIBAPI int COINLINKAGE ClpSolve_getPresolveType(Clp_Solve *);
    00449
    00450      COINLIBAPI int COINLINKAGE ClpSolve_getPresolvePasses(Clp_Solve *);
    00451      COINLIBAPI int COINLINKAGE ClpSolve_getExtraInfo(Clp_Solve *, int which);
    00452      COINLIBAPI void COINLINKAGE ClpSolve_setInfeasibleReturn(Clp_Solve *, int trueFalse);
    00453      COINLIBAPI int COINLINKAGE ClpSolve_infeasibleReturn(Clp_Solve *);
    00454
    00455      COINLIBAPI int COINLINKAGE ClpSolve_doDual(Clp_Solve *);
    00456      COINLIBAPI void COINLINKAGE ClpSolve_setDoDual(Clp_Solve *, int doDual);
    00457
    00458      COINLIBAPI int COINLINKAGE ClpSolve_doSingleton(Clp_Solve *);
    00459      COINLIBAPI void COINLINKAGE ClpSolve_setDoSingleton(Clp_Solve *, int doSingleton);
    00460
    00461      COINLIBAPI int COINLINKAGE ClpSolve_doDoubleton(Clp_Solve *);
    00462      COINLIBAPI void COINLINKAGE ClpSolve_setDoDoubleton(Clp_Solve *, int doDoubleton);
    00463
    00464      COINLIBAPI int COINLINKAGE ClpSolve_doTripleton(Clp_Solve *);
    00465      COINLIBAPI void COINLINKAGE ClpSolve_setDoTripleton(Clp_Solve *, int doTripleton);
    00466
    00467      COINLIBAPI int COINLINKAGE ClpSolve_doTighten(Clp_Solve *);
    00468      COINLIBAPI void COINLINKAGE ClpSolve_setDoTighten(Clp_Solve *, int doTighten);
    00469
    00470      COINLIBAPI int COINLINKAGE ClpSolve_doForcing(Clp_Solve *);
    00471      COINLIBAPI void COINLINKAGE ClpSolve_setDoForcing(Clp_Solve *, int doForcing);
    00472
    00473      COINLIBAPI int COINLINKAGE ClpSolve_doImpliedFree(Clp_Solve *);
    00474      COINLIBAPI void COINLINKAGE ClpSolve_setDoImpliedFree(Clp_Solve *, int doImpliedFree);
    00475
    00476      COINLIBAPI int COINLINKAGE ClpSolve_doDupcol(Clp_Solve *);
    00477      COINLIBAPI void COINLINKAGE ClpSolve_setDoDupcol(Clp_Solve *, int doDupcol);
    00478
    00479      COINLIBAPI int COINLINKAGE ClpSolve_doDuprow(Clp_Solve *);
    00480      COINLIBAPI void COINLINKAGE ClpSolve_setDoDuprow(Clp_Solve *, int doDuprow);
    00481
    00482      COINLIBAPI int COINLINKAGE ClpSolve_doSingletonColumn(Clp_Solve *);
    00483      COINLIBAPI void COINLINKAGE ClpSolve_setDoSingletonColumn(Clp_Solve *, int doSingleton);
    00484
    00485      COINLIBAPI int COINLINKAGE ClpSolve_presolveActions(Clp_Solve *);
    00486      COINLIBAPI void COINLINKAGE ClpSolve_setPresolveActions(Clp_Solve *, int action);
    00487
    00488      COINLIBAPI int COINLINKAGE ClpSolve_substitution(Clp_Solve *);
    00489      COINLIBAPI void COINLINKAGE ClpSolve_setSubstitution(Clp_Solve *, int value);
    00490
    00492 #ifdef __cplusplus
    00493 }
    00494 #endif
    00495 #endif