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

- File List
- File Members

# /home/coin/svn-release/Blis-0.94.1/Clp/src/Clp_C_Interface.h

Go to the documentation of this file.

    00001 /* $Id: Clp_C_Interface.h 2019 2014-01-31 05:18:01Z 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
    00040      COINLIBAPI const char* COINLINKAGE Clp_Version(void);
    00042      COINLIBAPI int COINLINKAGE Clp_VersionMajor(void);
    00044      COINLIBAPI int COINLINKAGE Clp_VersionMinor(void);
    00046      COINLIBAPI int COINLINKAGE Clp_VersionRelease(void);
    00062
    00064      COINLIBAPI Clp_Simplex * COINLINKAGE Clp_newModel(void);
    00066      COINLIBAPI void COINLINKAGE Clp_deleteModel(Clp_Simplex * model);
    00068      COINLIBAPI Clp_Solve * COINLINKAGE ClpSolve_new();
    00070      COINLIBAPI void COINLINKAGE ClpSolve_delete(Clp_Solve * solve);
    00088      COINLIBAPI void COINLINKAGE Clp_loadProblem (Clp_Simplex * model,  const int numcols, const int numrows,
    00089                const CoinBigIndex * start, const int* index,
    00090                const double* value,
    00091                const double* collb, const double* colub,
    00092                const double* obj,
    00093                const double* rowlb, const double* rowub);
    00094
    00095      /* read quadratic part of the objective (the matrix part) */
    00096      COINLIBAPI void COINLINKAGE
    00097      Clp_loadQuadraticObjective(Clp_Simplex * model,
    00098                                 const int numberColumns,
    00099                                 const CoinBigIndex * start,
    00100                                 const int * column,
    00101                                 const double * element);
    00103      COINLIBAPI int COINLINKAGE Clp_readMps(Clp_Simplex * model, const char *filename,
    00104                                             int keepNames,
    00105                                             int ignoreErrors);
    00107      COINLIBAPI void COINLINKAGE Clp_copyInIntegerInformation(Clp_Simplex * model, const char * information);
    00109      COINLIBAPI void COINLINKAGE Clp_deleteIntegerInformation(Clp_Simplex * model);
    00111      COINLIBAPI void COINLINKAGE Clp_resize (Clp_Simplex * model, int newNumberRows, int newNumberColumns);
    00113      COINLIBAPI void COINLINKAGE Clp_deleteRows(Clp_Simplex * model, int number, const int * which);
    00115      COINLIBAPI void COINLINKAGE Clp_addRows(Clp_Simplex * model, int number, const double * rowLower,
    00116                                              const double * rowUpper,
    00117                                              const int * rowStarts, const int * columns,
    00118                                              const double * elements);
    00119
    00121      COINLIBAPI void COINLINKAGE Clp_deleteColumns(Clp_Simplex * model, int number, const int * which);
    00123      COINLIBAPI void COINLINKAGE Clp_addColumns(Clp_Simplex * model, int number, const double * columnLower,
    00124                const double * columnUpper,
    00125                const double * objective,
    00126                const int * columnStarts, const int * rows,
    00127                const double * elements);
    00129      COINLIBAPI void COINLINKAGE Clp_chgRowLower(Clp_Simplex * model, const double * rowLower);
    00131      COINLIBAPI void COINLINKAGE Clp_chgRowUpper(Clp_Simplex * model, const double * rowUpper);
    00133      COINLIBAPI void COINLINKAGE Clp_chgColumnLower(Clp_Simplex * model, const double * columnLower);
    00135      COINLIBAPI void COINLINKAGE Clp_chgColumnUpper(Clp_Simplex * model, const double * columnUpper);
    00137      COINLIBAPI void COINLINKAGE Clp_chgObjCoefficients(Clp_Simplex * model, const double * objIn);
    00139      COINLIBAPI void COINLINKAGE Clp_dropNames(Clp_Simplex * model);
    00141      COINLIBAPI void COINLINKAGE Clp_copyNames(Clp_Simplex * model, const char * const * rowNames,
    00142                const char * const * columnNames);
    00143
    00148      COINLIBAPI int COINLINKAGE Clp_numberRows(Clp_Simplex * model);
    00150      COINLIBAPI int COINLINKAGE Clp_numberColumns(Clp_Simplex * model);
    00152      COINLIBAPI double COINLINKAGE Clp_primalTolerance(Clp_Simplex * model);
    00153      COINLIBAPI void COINLINKAGE Clp_setPrimalTolerance(Clp_Simplex * model,  double value) ;
    00155      COINLIBAPI double COINLINKAGE Clp_dualTolerance(Clp_Simplex * model);
    00156      COINLIBAPI void COINLINKAGE Clp_setDualTolerance(Clp_Simplex * model,  double value) ;
    00158      COINLIBAPI double COINLINKAGE Clp_dualObjectiveLimit(Clp_Simplex * model);
    00159      COINLIBAPI void COINLINKAGE Clp_setDualObjectiveLimit(Clp_Simplex * model, double value);
    00161      COINLIBAPI double COINLINKAGE Clp_objectiveOffset(Clp_Simplex * model);
    00162      COINLIBAPI void COINLINKAGE Clp_setObjectiveOffset(Clp_Simplex * model, double value);
    00164      COINLIBAPI void COINLINKAGE Clp_problemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00165      /* Sets problem name.  Must have \0 at end.  */
    00166      COINLIBAPI int COINLINKAGE
    00167      Clp_setProblemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
    00169      COINLIBAPI int COINLINKAGE Clp_numberIterations(Clp_Simplex * model);
    00170      COINLIBAPI void COINLINKAGE Clp_setNumberIterations(Clp_Simplex * model, int numberIterations);
    00172      COINLIBAPI int maximumIterations(Clp_Simplex * model);
    00173      COINLIBAPI void COINLINKAGE Clp_setMaximumIterations(Clp_Simplex * model, int value);
    00175      COINLIBAPI double COINLINKAGE Clp_maximumSeconds(Clp_Simplex * model);
    00176      COINLIBAPI void COINLINKAGE Clp_setMaximumSeconds(Clp_Simplex * model, double value);
    00178      COINLIBAPI int COINLINKAGE Clp_hitMaximumIterations(Clp_Simplex * model);
    00186      COINLIBAPI int COINLINKAGE Clp_status(Clp_Simplex * model);
    00188      COINLIBAPI void COINLINKAGE Clp_setProblemStatus(Clp_Simplex * model, int problemStatus);
    00196      COINLIBAPI int COINLINKAGE Clp_secondaryStatus(Clp_Simplex * model);
    00197      COINLIBAPI void COINLINKAGE Clp_setSecondaryStatus(Clp_Simplex * model, int status);
    00199      COINLIBAPI double COINLINKAGE Clp_optimizationDirection(Clp_Simplex * model);
    00200      COINLIBAPI void COINLINKAGE Clp_setOptimizationDirection(Clp_Simplex * model, double value);
    00202      COINLIBAPI double * COINLINKAGE Clp_primalRowSolution(Clp_Simplex * model);
    00204      COINLIBAPI double * COINLINKAGE Clp_primalColumnSolution(Clp_Simplex * model);
    00206      COINLIBAPI double * COINLINKAGE Clp_dualRowSolution(Clp_Simplex * model);
    00208      COINLIBAPI double * COINLINKAGE Clp_dualColumnSolution(Clp_Simplex * model);
    00210      COINLIBAPI double* COINLINKAGE Clp_rowLower(Clp_Simplex * model);
    00212      COINLIBAPI double* COINLINKAGE Clp_rowUpper(Clp_Simplex * model);
    00214      COINLIBAPI double * COINLINKAGE Clp_objective(Clp_Simplex * model);
    00216      COINLIBAPI double * COINLINKAGE Clp_columnLower(Clp_Simplex * model);
    00218      COINLIBAPI double * COINLINKAGE Clp_columnUpper(Clp_Simplex * model);
    00220      COINLIBAPI int COINLINKAGE Clp_getNumElements(Clp_Simplex * model);
    00221      /* Column starts in matrix */
    00222      COINLIBAPI const CoinBigIndex * COINLINKAGE Clp_getVectorStarts(Clp_Simplex * model);
    00223      /* Row indices in matrix */
    00224      COINLIBAPI const int * COINLINKAGE Clp_getIndices(Clp_Simplex * model);
    00225      /* Column vector lengths in matrix */
    00226      COINLIBAPI const int * COINLINKAGE Clp_getVectorLengths(Clp_Simplex * model);
    00227      /* Element values in matrix */
    00228      COINLIBAPI const double * COINLINKAGE Clp_getElements(Clp_Simplex * model);
    00230      COINLIBAPI double COINLINKAGE Clp_objectiveValue(Clp_Simplex * model);
    00232      COINLIBAPI char * COINLINKAGE Clp_integerInformation(Clp_Simplex * model);
    00239      COINLIBAPI double * COINLINKAGE Clp_infeasibilityRay(Clp_Simplex * model);
    00246      COINLIBAPI double * COINLINKAGE Clp_unboundedRay(Clp_Simplex * model);
    00248      COINLIBAPI void COINLINKAGE Clp_freeRay(Clp_Simplex * model, double * ray);
    00250      COINLIBAPI int COINLINKAGE Clp_statusExists(Clp_Simplex * model);
    00252      COINLIBAPI unsigned char *  COINLINKAGE Clp_statusArray(Clp_Simplex * model);
    00254      COINLIBAPI void COINLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
    00255      /* status values are as in ClpSimplex.hpp i.e. 0 - free, 1 basic, 2 at upper,
    00256         3 at lower, 4 superbasic, (5 fixed) */
    00257      /* Get variable basis info */
    00258      COINLIBAPI int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model, int sequence);
    00259      /* Get row basis info */
    00260      COINLIBAPI int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model, int sequence);
    00261      /* Set variable basis info (and value if at bound) */
    00262      COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
    00263                int sequence, int value);
    00264      /* Set row basis info (and value if at bound) */
    00265      COINLIBAPI void COINLINKAGE Clp_setRowStatus(Clp_Simplex * model,
    00266                int sequence, int value);
    00267
    00269      COINLIBAPI void COINLINKAGE Clp_setUserPointer (Clp_Simplex * model, void * pointer);
    00270      COINLIBAPI void * COINLINKAGE Clp_getUserPointer (Clp_Simplex * model);
    00276      COINLIBAPI void COINLINKAGE Clp_registerCallBack(Clp_Simplex * model,
    00277                clp_callback userCallBack);
    00279      COINLIBAPI void COINLINKAGE Clp_clearCallBack(Clp_Simplex * model);
    00288      COINLIBAPI void COINLINKAGE Clp_setLogLevel(Clp_Simplex * model, int value);
    00289      COINLIBAPI int COINLINKAGE Clp_logLevel(Clp_Simplex * model);
    00291      COINLIBAPI int COINLINKAGE Clp_lengthNames(Clp_Simplex * model);
    00293      COINLIBAPI void COINLINKAGE Clp_rowName(Clp_Simplex * model, int iRow, char * name);
    00295      COINLIBAPI void COINLINKAGE Clp_columnName(Clp_Simplex * model, int iColumn, char * name);
    00296
    00305      COINLIBAPI int COINLINKAGE Clp_initialSolve(Clp_Simplex * model);
    00307      COINLIBAPI int COINLINKAGE Clp_initialSolveWithOptions(Clp_Simplex * model, Clp_Solve *);
    00309      COINLIBAPI int COINLINKAGE Clp_initialDualSolve(Clp_Simplex * model);
    00311      COINLIBAPI int COINLINKAGE Clp_initialPrimalSolve(Clp_Simplex * model);
    00313      COINLIBAPI int COINLINKAGE Clp_initialBarrierSolve(Clp_Simplex * model);
    00315      COINLIBAPI int COINLINKAGE Clp_initialBarrierNoCrossSolve(Clp_Simplex * model);
    00317      COINLIBAPI int COINLINKAGE Clp_dual(Clp_Simplex * model, int ifValuesPass);
    00319      COINLIBAPI int COINLINKAGE Clp_primal(Clp_Simplex * model, int ifValuesPass);
    00320 #ifndef SLIM_CLP
    00321
    00322      COINLIBAPI void COINLINKAGE Clp_idiot(Clp_Simplex * model, int tryhard);
    00323 #endif
    00324
    00325      COINLIBAPI void COINLINKAGE Clp_scaling(Clp_Simplex * model, int mode);
    00327      COINLIBAPI int COINLINKAGE Clp_scalingFlag(Clp_Simplex * model);
    00342      COINLIBAPI int COINLINKAGE Clp_crash(Clp_Simplex * model, double gap, int pivot);
    00349      COINLIBAPI int COINLINKAGE Clp_primalFeasible(Clp_Simplex * model);
    00351      COINLIBAPI int COINLINKAGE Clp_dualFeasible(Clp_Simplex * model);
    00353      COINLIBAPI double COINLINKAGE Clp_dualBound(Clp_Simplex * model);
    00354      COINLIBAPI void COINLINKAGE Clp_setDualBound(Clp_Simplex * model, double value);
    00356      COINLIBAPI double COINLINKAGE Clp_infeasibilityCost(Clp_Simplex * model);
    00357      COINLIBAPI void COINLINKAGE Clp_setInfeasibilityCost(Clp_Simplex * model, double value);
    00366      COINLIBAPI int COINLINKAGE Clp_perturbation(Clp_Simplex * model);
    00367      COINLIBAPI void COINLINKAGE Clp_setPerturbation(Clp_Simplex * model, int value);
    00369      COINLIBAPI int COINLINKAGE Clp_algorithm(Clp_Simplex * model);
    00371      COINLIBAPI void COINLINKAGE Clp_setAlgorithm(Clp_Simplex * model, int value);
    00373      COINLIBAPI double COINLINKAGE Clp_sumDualInfeasibilities(Clp_Simplex * model);
    00375      COINLIBAPI int COINLINKAGE Clp_numberDualInfeasibilities(Clp_Simplex * model);
    00377      COINLIBAPI double COINLINKAGE Clp_sumPrimalInfeasibilities(Clp_Simplex * model);
    00379      COINLIBAPI int COINLINKAGE Clp_numberPrimalInfeasibilities(Clp_Simplex * model);
    00386      COINLIBAPI int COINLINKAGE Clp_saveModel(Clp_Simplex * model, const char * fileName);
    00389      COINLIBAPI int COINLINKAGE Clp_restoreModel(Clp_Simplex * model, const char * fileName);
    00390
    00393      COINLIBAPI void COINLINKAGE Clp_checkSolution(Clp_Simplex * model);
    00396      /******************** End of most useful part **************/
    00400      COINLIBAPI int COINLINKAGE Clp_getNumRows(Clp_Simplex * model);
    00402      COINLIBAPI int COINLINKAGE Clp_getNumCols(Clp_Simplex * model);
    00404      COINLIBAPI int COINLINKAGE Clp_getIterationCount(Clp_Simplex * model);
    00406      COINLIBAPI int COINLINKAGE Clp_isAbandoned(Clp_Simplex * model);
    00408      COINLIBAPI int COINLINKAGE Clp_isProvenOptimal(Clp_Simplex * model);
    00410      COINLIBAPI int COINLINKAGE Clp_isProvenPrimalInfeasible(Clp_Simplex * model);
    00412      COINLIBAPI int COINLINKAGE Clp_isProvenDualInfeasible(Clp_Simplex * model);
    00414      COINLIBAPI int COINLINKAGE Clp_isPrimalObjectiveLimitReached(Clp_Simplex * model) ;
    00416      COINLIBAPI int COINLINKAGE Clp_isDualObjectiveLimitReached(Clp_Simplex * model) ;
    00418      COINLIBAPI int COINLINKAGE Clp_isIterationLimitReached(Clp_Simplex * model);
    00420      COINLIBAPI double COINLINKAGE Clp_getObjSense(Clp_Simplex * model);
    00422      COINLIBAPI void COINLINKAGE Clp_setObjSense(Clp_Simplex * model, double objsen);
    00424      COINLIBAPI const double * COINLINKAGE Clp_getRowActivity(Clp_Simplex * model);
    00426      COINLIBAPI const double * COINLINKAGE Clp_getColSolution(Clp_Simplex * model);
    00427      COINLIBAPI void COINLINKAGE Clp_setColSolution(Clp_Simplex * model, const double * input);
    00429      COINLIBAPI const double * COINLINKAGE Clp_getRowPrice(Clp_Simplex * model);
    00431      COINLIBAPI const double * COINLINKAGE Clp_getReducedCost(Clp_Simplex * model);
    00433      COINLIBAPI const double* COINLINKAGE Clp_getRowLower(Clp_Simplex * model);
    00435      COINLIBAPI const double* COINLINKAGE Clp_getRowUpper(Clp_Simplex * model);
    00437      COINLIBAPI const double * COINLINKAGE Clp_getObjCoefficients(Clp_Simplex * model);
    00439      COINLIBAPI const double * COINLINKAGE Clp_getColLower(Clp_Simplex * model);
    00441      COINLIBAPI const double * COINLINKAGE Clp_getColUpper(Clp_Simplex * model);
    00443      COINLIBAPI double COINLINKAGE Clp_getObjValue(Clp_Simplex * model);
    00445      COINLIBAPI void COINLINKAGE Clp_printModel(Clp_Simplex * model, const char * prefix);
    00446      /* Small element value - elements less than this set to zero,
    00447         default is 1.0e-20 */
    00448      COINLIBAPI double COINLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
    00449      COINLIBAPI void COINLINKAGE Clp_setSmallElementValue(Clp_Simplex * model, double value);
    00456      COINLIBAPI void COINLINKAGE ClpSolve_setSpecialOption(Clp_Solve *, int which, int value, int extraInfo);
    00457      COINLIBAPI int COINLINKAGE ClpSolve_getSpecialOption(Clp_Solve *, int which);
    00458
    00468      COINLIBAPI void COINLINKAGE ClpSolve_setSolveType(Clp_Solve *, int method, int extraInfo);
    00469      COINLIBAPI int COINLINKAGE ClpSolve_getSolveType(Clp_Solve *);
    00470
    00477      COINLIBAPI void COINLINKAGE ClpSolve_setPresolveType(Clp_Solve *, int amount, int extraInfo);
    00478      COINLIBAPI int COINLINKAGE ClpSolve_getPresolveType(Clp_Solve *);
    00479
    00480      COINLIBAPI int COINLINKAGE ClpSolve_getPresolvePasses(Clp_Solve *);
    00481      COINLIBAPI int COINLINKAGE ClpSolve_getExtraInfo(Clp_Solve *, int which);
    00482      COINLIBAPI void COINLINKAGE ClpSolve_setInfeasibleReturn(Clp_Solve *, int trueFalse);
    00483      COINLIBAPI int COINLINKAGE ClpSolve_infeasibleReturn(Clp_Solve *);
    00484
    00485      COINLIBAPI int COINLINKAGE ClpSolve_doDual(Clp_Solve *);
    00486      COINLIBAPI void COINLINKAGE ClpSolve_setDoDual(Clp_Solve *, int doDual);
    00487
    00488      COINLIBAPI int COINLINKAGE ClpSolve_doSingleton(Clp_Solve *);
    00489      COINLIBAPI void COINLINKAGE ClpSolve_setDoSingleton(Clp_Solve *, int doSingleton);
    00490
    00491      COINLIBAPI int COINLINKAGE ClpSolve_doDoubleton(Clp_Solve *);
    00492      COINLIBAPI void COINLINKAGE ClpSolve_setDoDoubleton(Clp_Solve *, int doDoubleton);
    00493
    00494      COINLIBAPI int COINLINKAGE ClpSolve_doTripleton(Clp_Solve *);
    00495      COINLIBAPI void COINLINKAGE ClpSolve_setDoTripleton(Clp_Solve *, int doTripleton);
    00496
    00497      COINLIBAPI int COINLINKAGE ClpSolve_doTighten(Clp_Solve *);
    00498      COINLIBAPI void COINLINKAGE ClpSolve_setDoTighten(Clp_Solve *, int doTighten);
    00499
    00500      COINLIBAPI int COINLINKAGE ClpSolve_doForcing(Clp_Solve *);
    00501      COINLIBAPI void COINLINKAGE ClpSolve_setDoForcing(Clp_Solve *, int doForcing);
    00502
    00503      COINLIBAPI int COINLINKAGE ClpSolve_doImpliedFree(Clp_Solve *);
    00504      COINLIBAPI void COINLINKAGE ClpSolve_setDoImpliedFree(Clp_Solve *, int doImpliedFree);
    00505
    00506      COINLIBAPI int COINLINKAGE ClpSolve_doDupcol(Clp_Solve *);
    00507      COINLIBAPI void COINLINKAGE ClpSolve_setDoDupcol(Clp_Solve *, int doDupcol);
    00508
    00509      COINLIBAPI int COINLINKAGE ClpSolve_doDuprow(Clp_Solve *);
    00510      COINLIBAPI void COINLINKAGE ClpSolve_setDoDuprow(Clp_Solve *, int doDuprow);
    00511
    00512      COINLIBAPI int COINLINKAGE ClpSolve_doSingletonColumn(Clp_Solve *);
    00513      COINLIBAPI void COINLINKAGE ClpSolve_setDoSingletonColumn(Clp_Solve *, int doSingleton);
    00514
    00515      COINLIBAPI int COINLINKAGE ClpSolve_presolveActions(Clp_Solve *);
    00516      COINLIBAPI void COINLINKAGE ClpSolve_setPresolveActions(Clp_Solve *, int action);
    00517
    00518      COINLIBAPI int COINLINKAGE ClpSolve_substitution(Clp_Solve *);
    00519      COINLIBAPI void COINLINKAGE ClpSolve_setSubstitution(Clp_Solve *, int value);
    00520
    00522 #ifdef __cplusplus
    00523 }
    00524 #endif
    00525 #endif