Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Cbc_C_Interface.h
Go to the documentation of this file.
1 /* $Id: Cbc_C_Interface.h 2091 2014-10-03 00:46:49Z mlubin $ */
2 /*
3  Copyright (C) 2004 International Business Machines Corporation and others.
4  All Rights Reserved.
5 
6  This code is licensed under the terms of the Eclipse Public License (EPL).
7 */
8 #ifndef CbcModelC_H
9 #define CbcModelC_H
10 
11 /* include all defines and ugly stuff */
12 #include "Coin_C_defines.h"
13 #include <stddef.h>
14 
15 /*
16  * Original verison contributed by Bob Entriken,
17  * significantly updated by Miles Lubin.
18 */
19 
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
30 
33  Cbc_newModel(void)
34  ;
37  Cbc_deleteModel(Cbc_Model * model)
38  ;
40  COINLIBAPI const char* COINLINKAGE Cbc_getVersion(void)
41  ;
73  Cbc_loadProblem (Cbc_Model * model, const int numcols, const int numrows,
74  const CoinBigIndex * start, const int* index,
75  const double* value,
76  const double* collb, const double* colub,
77  const double* obj,
78  const double* rowlb, const double* rowub)
79  ;
82  Cbc_readMps(Cbc_Model * model, const char *filename)
83  ;
86  Cbc_writeMps(Cbc_Model * model, const char *filename)
87  ;
92  Cbc_setInitialSolution(Cbc_Model *model, const double * sol)
93  ;
96  Cbc_problemName(Cbc_Model * model, int maxNumberCharacters, char * array)
97  ;
103  Cbc_setProblemName(Cbc_Model * model, const char * array)
104  ;
105 
108  Cbc_getNumElements(Cbc_Model * model)
109  ;
112  Cbc_getVectorStarts(Cbc_Model * model)
113  ;
115  COINLIBAPI const int * COINLINKAGE
116  Cbc_getIndices(Cbc_Model * model)
117  ;
119  COINLIBAPI const double * COINLINKAGE
120  Cbc_getElements(Cbc_Model * model)
121  ;
122 
124  COINLIBAPI size_t COINLINKAGE
125  Cbc_maxNameLength(Cbc_Model * model)
126  ;
129  Cbc_getRowName(Cbc_Model * model, int iRow, char * name, size_t maxLength)
130  ;
133  Cbc_getColName(Cbc_Model * model, int iColumn, char * name, size_t maxLength)
134  ;
137  Cbc_setColName(Cbc_Model * model, int iColumn, const char * name)
138  ;
141  Cbc_setRowName(Cbc_Model * model, int iRow, const char * name)
142  ;
145  Cbc_getNumRows(Cbc_Model * model)
146  ;
149  Cbc_getNumCols(Cbc_Model * model)
150  ;
153  Cbc_setObjSense(Cbc_Model * model, double sense)
154  ;
156  COINLIBAPI double COINLINKAGE
157  Cbc_getObjSense(Cbc_Model * model)
158  ;
160  COINLIBAPI const double* COINLINKAGE
161  Cbc_getRowLower(Cbc_Model * model)
162  ;
165  Cbc_setRowLower(Cbc_Model * model, int index, double value)
166  ;
168  COINLIBAPI const double* COINLINKAGE
169  Cbc_getRowUpper(Cbc_Model * model)
170  ;
173  Cbc_setRowUpper(Cbc_Model * model, int index, double value)
174  ;
176  COINLIBAPI const double * COINLINKAGE
177  Cbc_getObjCoefficients(Cbc_Model * model)
178  ;
181  Cbc_setObjCoeff(Cbc_Model * model, int index, double value)
182  ;
184  COINLIBAPI const double * COINLINKAGE
185  Cbc_getColLower(Cbc_Model * model)
186  ;
189  Cbc_setColLower(Cbc_Model * model, int index, double value)
190  ;
192  COINLIBAPI const double * COINLINKAGE
193  Cbc_getColUpper(Cbc_Model * model)
194  ;
197  Cbc_setColUpper(Cbc_Model * model, int index, double value)
198  ;
201  Cbc_isInteger(Cbc_Model * model, int i)
202  ;
205  Cbc_setContinuous(Cbc_Model * model, int iColumn)
206  ;
209  Cbc_setInteger(Cbc_Model * model, int iColumn)
210  ;
213  Cbc_addSOS(Cbc_Model * model, int numRows, const int * rowStarts,
214  const int * colIndices, const double * weights, const int type)
215  ;
218  Cbc_printModel(Cbc_Model * model, const char * argPrefix)
219  ;
222  Cbc_clone(Cbc_Model * model)
223  ;
231  Cbc_setParameter(Cbc_Model * model, const char * name, const char * value)
232  ;
233 
234 
242  cbc_callback userCallBack)
243  ;
246  Cbc_clearCallBack(Cbc_Model * model)
247  ;
248 
254  /* Solve the model with Cbc (using CbcMain1).
255  */
257  Cbc_solve(Cbc_Model * model)
258  ;
264 
266  COINLIBAPI double COINLINKAGE
267  Cbc_sumPrimalInfeasibilities(Cbc_Model * model)
268  ;
271  Cbc_numberPrimalInfeasibilities(Cbc_Model * model)
272  ;
273 
277  Cbc_checkSolution(Cbc_Model * model)
278  ;
279 
282  Cbc_getIterationCount(Cbc_Model * model)
283  ;
286  Cbc_isAbandoned(Cbc_Model * model)
287  ;
290  Cbc_isProvenOptimal(Cbc_Model * model)
291  ;
294  Cbc_isProvenInfeasible(Cbc_Model * model)
295  ;
298  Cbc_isContinuousUnbounded(Cbc_Model * model)
299  ;
302  Cbc_isNodeLimitReached(Cbc_Model * model)
303  ;
306  Cbc_isSecondsLimitReached(Cbc_Model * model)
307  ;
310  Cbc_isSolutionLimitReached(Cbc_Model * model)
311  ;
314  Cbc_isInitialSolveAbandoned(Cbc_Model * model)
315  ;
318  Cbc_isInitialSolveProvenOptimal(Cbc_Model * model)
319  ;
322  Cbc_isInitialSolveProvenPrimalInfeasible(Cbc_Model * model)
323  ;
327  COINLIBAPI const double * COINLINKAGE
328  Cbc_getRowActivity(Cbc_Model * model)
329  ;
331  COINLIBAPI const double * COINLINKAGE
332  Cbc_getColSolution(Cbc_Model * model)
333  ;
335  COINLIBAPI double COINLINKAGE
336  Cbc_getObjValue(Cbc_Model * model)
337  ;
339  COINLIBAPI double COINLINKAGE
340  Cbc_getBestPossibleObjValue(Cbc_Model * model)
341  ;
344  Cbc_getNodeCount(Cbc_Model * model)
345  ;
348  Cbc_printSolution(Cbc_Model * model)
349  ;
360  Cbc_status(Cbc_Model * model)
361  ;
375  Cbc_secondaryStatus(Cbc_Model * model)
376  ;
378 #ifdef __cplusplus
379 }
380 #endif
381 #endif
COINLIBAPI const char *COINLINKAGE Cbc_getVersion(void)
Current version of Cbc.
COINLIBAPI void COINLINKAGE Cbc_addSOS(Cbc_Model *model, int numRows, const int *rowStarts, const int *colIndices, const double *weights, const int type)
Add SOS constraints to the model using row-order matrix.
COINLIBAPI void COINLINKAGE Cbc_loadProblem(Cbc_Model *model, const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
Loads a problem (the constraints on the rows are given by lower and upper bounds).
#define COINLIBAPI
This has #defines etc for the &quot;C&quot; interface to Coin.
COINLIBAPI Cbc_Model * COINLINKAGE
Default Cbc_Model constructor.
COINLIBAPI void COINLINKAGE Cbc_registerCallBack(Cbc_Model *model, cbc_callback userCallBack)
Pass in Callback function.
int CoinBigIndex
void Cbc_Model