1 | /* $Id: Cbc_C_Interface.h 2016 2014-03-10 21:58:20Z 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 | |
---|
14 | /** This is a first "C" interface to Cbc. |
---|
15 | It is mostly similar to the "C" interface to Clp and |
---|
16 | was contributed by Bob Entriken. |
---|
17 | */ |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | /**@name Constructors and destructor |
---|
24 | These do not have an exact analogue in C++. |
---|
25 | The user does not need to know structure of Cbc_Model. |
---|
26 | |
---|
27 | For all functions outside this group there is an exact C++ |
---|
28 | analogue created by taking the first parameter out, removing the Cbc_ |
---|
29 | from name and applying the method to an object of type ClpSimplex. |
---|
30 | */ |
---|
31 | /*@{*/ |
---|
32 | |
---|
33 | /** Version */ |
---|
34 | COINLIBAPI double COINLINKAGE Cbc_getVersion() |
---|
35 | ; |
---|
36 | /** Default Cbc_Model constructor */ |
---|
37 | COINLIBAPI Cbc_Model * COINLINKAGE |
---|
38 | Cbc_newModel() |
---|
39 | ; |
---|
40 | /** Cbc_Model Destructor */ |
---|
41 | COINLIBAPI void COINLINKAGE |
---|
42 | Cbc_deleteModel(Cbc_Model * model) |
---|
43 | ; |
---|
44 | /*@}*/ |
---|
45 | |
---|
46 | /**@name Load model - loads some stuff and initializes others */ |
---|
47 | /*@{*/ |
---|
48 | /* Loads a problem (the constraints on the |
---|
49 | rows are given by lower and upper bounds). If a pointer is NULL then the |
---|
50 | following values are the default: |
---|
51 | <ul> |
---|
52 | <li> <code>colub</code>: all columns have upper bound infinity |
---|
53 | <li> <code>collb</code>: all columns have lower bound 0 |
---|
54 | <li> <code>rowub</code>: all rows have upper bound infinity |
---|
55 | <li> <code>rowlb</code>: all rows have lower bound -infinity |
---|
56 | <li> <code>obj</code>: all variables have 0 objective coefficient |
---|
57 | </ul> |
---|
58 | |
---|
59 | Just like the other loadProblem() method except that the matrix is |
---|
60 | given in a standard column major ordered format (without gaps). |
---|
61 | */ |
---|
62 | COINLIBAPI void COINLINKAGE |
---|
63 | Cbc_loadProblem (Cbc_Model * model, const int numcols, const int numrows, |
---|
64 | const CoinBigIndex * start, const int* index, |
---|
65 | const double* value, |
---|
66 | const double* collb, const double* colub, |
---|
67 | const double* obj, |
---|
68 | const double* rowlb, const double* rowub) |
---|
69 | ; |
---|
70 | /** Read an mps file from the given filename */ |
---|
71 | COINLIBAPI int COINLINKAGE |
---|
72 | Cbc_readMps(Cbc_Model * model, const char *filename) |
---|
73 | ; |
---|
74 | /** Write an mps file from the given filename */ |
---|
75 | COINLIBAPI void COINLINKAGE |
---|
76 | Cbc_writeMps(Cbc_Model * model, const char *filename) |
---|
77 | ; |
---|
78 | /** Integer information */ |
---|
79 | COINLIBAPI char * COINLINKAGE |
---|
80 | Cbc_integerInformation(Cbc_Model * model) |
---|
81 | ; |
---|
82 | /** Copy in integer information */ |
---|
83 | COINLIBAPI void COINLINKAGE |
---|
84 | Cbc_copyInIntegerInformation(Cbc_Model * model, const char * information) |
---|
85 | ; |
---|
86 | /** Drop integer informations */ |
---|
87 | COINLIBAPI void COINLINKAGE |
---|
88 | Cbc_deleteIntegerInformation(Cbc_Model * model) |
---|
89 | ; |
---|
90 | /** Resizes rim part of model */ |
---|
91 | COINLIBAPI void COINLINKAGE |
---|
92 | Cbc_resize (Cbc_Model * model, int newNumberRows, int newNumberColumns) |
---|
93 | ; |
---|
94 | /** Deletes rows */ |
---|
95 | COINLIBAPI void COINLINKAGE |
---|
96 | Cbc_deleteRows(Cbc_Model * model, int number, const int * which) |
---|
97 | ; |
---|
98 | /** Add rows */ |
---|
99 | COINLIBAPI void COINLINKAGE |
---|
100 | Cbc_addRows(Cbc_Model * model, const int number, const double * rowLower, |
---|
101 | const double * rowUpper, |
---|
102 | const int * rowStarts, const int * columns, |
---|
103 | const double * elements) |
---|
104 | ; |
---|
105 | |
---|
106 | /** Deletes columns */ |
---|
107 | COINLIBAPI void COINLINKAGE |
---|
108 | Cbc_deleteColumns(Cbc_Model * model, int number, const int * which) |
---|
109 | ; |
---|
110 | /** Add columns */ |
---|
111 | COINLIBAPI void COINLINKAGE |
---|
112 | Cbc_addColumns(Cbc_Model * model, int number, const double * columnLower, |
---|
113 | const double * columnUpper, |
---|
114 | const double * objective, |
---|
115 | const int * columnStarts, const int * rows, |
---|
116 | const double * elements); |
---|
117 | /** Drops names - makes lengthnames 0 and names empty */ |
---|
118 | COINLIBAPI void COINLINKAGE |
---|
119 | Cbc_dropNames(Cbc_Model * model) |
---|
120 | ; |
---|
121 | /** Copies in names */ |
---|
122 | COINLIBAPI void COINLINKAGE |
---|
123 | Cbc_copyNames(Cbc_Model * model, const char * const * rowNamesIn, |
---|
124 | const char * const * columnNamesIn) |
---|
125 | ; |
---|
126 | |
---|
127 | /*@}*/ |
---|
128 | /**@name gets and sets - you will find some synonyms at the end of this file */ |
---|
129 | /*@{*/ |
---|
130 | /** Number of rows */ |
---|
131 | COINLIBAPI int COINLINKAGE |
---|
132 | Cbc_numberRows(Cbc_Model * model) |
---|
133 | ; |
---|
134 | /** Number of columns */ |
---|
135 | COINLIBAPI int COINLINKAGE |
---|
136 | Cbc_numberColumns(Cbc_Model * model) |
---|
137 | ; |
---|
138 | /** Primal tolerance to use */ |
---|
139 | COINLIBAPI double COINLINKAGE |
---|
140 | Cbc_primalTolerance(Cbc_Model * model) |
---|
141 | ; |
---|
142 | COINLIBAPI void COINLINKAGE |
---|
143 | Cbc_setPrimalTolerance(Cbc_Model * model, double value) |
---|
144 | ; |
---|
145 | /** Dual tolerance to use */ |
---|
146 | COINLIBAPI double COINLINKAGE |
---|
147 | Cbc_dualTolerance(Cbc_Model * model) |
---|
148 | ; |
---|
149 | COINLIBAPI void COINLINKAGE |
---|
150 | Cbc_setDualTolerance(Cbc_Model * model, double value) |
---|
151 | ; |
---|
152 | /* Integer tolerance to use */ |
---|
153 | COINLIBAPI double COINLINKAGE |
---|
154 | Cbc_integerTolerance(Cbc_Model * model) |
---|
155 | ; |
---|
156 | COINLIBAPI void COINLINKAGE |
---|
157 | Cbc_setIntegerTolerance(Cbc_Model * model, double value) |
---|
158 | ; |
---|
159 | /** Dual objective limit */ |
---|
160 | COINLIBAPI double COINLINKAGE |
---|
161 | Cbc_dualObjectiveLimit(Cbc_Model * model) |
---|
162 | ; |
---|
163 | COINLIBAPI void COINLINKAGE |
---|
164 | Cbc_setDualObjectiveLimit(Cbc_Model * model, double value) |
---|
165 | ; |
---|
166 | /** Objective offset */ |
---|
167 | COINLIBAPI double COINLINKAGE |
---|
168 | Cbc_objectiveOffset(Cbc_Model * model) |
---|
169 | ; |
---|
170 | COINLIBAPI void COINLINKAGE |
---|
171 | Cbc_setObjectiveOffset(Cbc_Model * model, double value) |
---|
172 | ; |
---|
173 | /** Fills in array with problem name */ |
---|
174 | COINLIBAPI void COINLINKAGE |
---|
175 | Cbc_problemName(Cbc_Model * model, int maxNumberCharacters, char * array) |
---|
176 | ; |
---|
177 | /** Sets problem name. |
---|
178 | |
---|
179 | \p array must be a null-terminated string. |
---|
180 | */ |
---|
181 | COINLIBAPI int COINLINKAGE |
---|
182 | Cbc_setProblemName(Cbc_Model * model, int maxNumberCharacters, char * array) |
---|
183 | ; |
---|
184 | /** Number of iterations */ |
---|
185 | COINLIBAPI int COINLINKAGE |
---|
186 | Cbc_numberIterations(Cbc_Model * model) |
---|
187 | ; |
---|
188 | COINLIBAPI void COINLINKAGE |
---|
189 | Cbc_setNumberIterations(Cbc_Model * model, int numberIterations) |
---|
190 | ; |
---|
191 | /** Maximum number of iterations */ |
---|
192 | COINLIBAPI int COINLINKAGE |
---|
193 | Cbc_maximumIterations(Cbc_Model * model) |
---|
194 | ; |
---|
195 | COINLIBAPI void COINLINKAGE |
---|
196 | Cbc_setMaximumIterations(Cbc_Model * model, int value) |
---|
197 | ; |
---|
198 | /** Maximum number of nodes */ |
---|
199 | COINLIBAPI int COINLINKAGE |
---|
200 | Cbc_maxNumNode(Cbc_Model * model) |
---|
201 | ; |
---|
202 | COINLIBAPI void COINLINKAGE |
---|
203 | Cbc_setMaxNumNode(Cbc_Model * model, int value) |
---|
204 | ; |
---|
205 | /* Maximum number of solutions */ |
---|
206 | COINLIBAPI int COINLINKAGE |
---|
207 | Cbc_maxNumSol(Cbc_Model * model) |
---|
208 | ; |
---|
209 | COINLIBAPI void COINLINKAGE |
---|
210 | Cbc_setMaxNumSol(Cbc_Model * model, int value) |
---|
211 | ; |
---|
212 | /** Maximum time in seconds (from when set called) */ |
---|
213 | COINLIBAPI double COINLINKAGE |
---|
214 | Cbc_maximumSeconds(Cbc_Model * model) |
---|
215 | ; |
---|
216 | COINLIBAPI void COINLINKAGE |
---|
217 | Cbc_setMaximumSeconds(Cbc_Model * model, double value) |
---|
218 | ; |
---|
219 | /** Returns true if hit maximum iterations (or time) */ |
---|
220 | COINLIBAPI int COINLINKAGE |
---|
221 | Cbc_hitMaximumIterations(Cbc_Model * model) |
---|
222 | ; |
---|
223 | /** Status of problem: |
---|
224 | 0 - optimal |
---|
225 | 1 - primal infeasible |
---|
226 | 2 - dual infeasible |
---|
227 | 3 - stopped on iterations etc |
---|
228 | 4 - stopped due to errors |
---|
229 | */ |
---|
230 | COINLIBAPI int COINLINKAGE |
---|
231 | Cbc_status(Cbc_Model * model) |
---|
232 | ; |
---|
233 | /** Set problem status */ |
---|
234 | COINLIBAPI void COINLINKAGE |
---|
235 | Cbc_setProblemStatus(Cbc_Model * model, int problemStatus) |
---|
236 | ; |
---|
237 | /** Secondary status of problem - may get extended |
---|
238 | 0 - none |
---|
239 | 1 - primal infeasible because dual limit reached |
---|
240 | 2 - scaled problem optimal - unscaled has primal infeasibilities |
---|
241 | 3 - scaled problem optimal - unscaled has dual infeasibilities |
---|
242 | 4 - scaled problem optimal - unscaled has both dual and primal infeasibilities |
---|
243 | */ |
---|
244 | COINLIBAPI int COINLINKAGE |
---|
245 | Cbc_secondaryStatus(Cbc_Model * model) |
---|
246 | ; |
---|
247 | COINLIBAPI void COINLINKAGE |
---|
248 | Cbc_setSecondaryStatus(Cbc_Model * model, int status) |
---|
249 | ; |
---|
250 | /** Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore */ |
---|
251 | COINLIBAPI double COINLINKAGE |
---|
252 | Cbc_optimizationDirection(Cbc_Model * model) |
---|
253 | ; |
---|
254 | COINLIBAPI void COINLINKAGE |
---|
255 | Cbc_setOptimizationDirection(Cbc_Model * model, double value) |
---|
256 | ; |
---|
257 | /** Primal row solution */ |
---|
258 | COINLIBAPI double * COINLINKAGE |
---|
259 | Cbc_primalRowSolution(Cbc_Model * model) |
---|
260 | ; |
---|
261 | /** Primal column solution */ |
---|
262 | COINLIBAPI double * COINLINKAGE |
---|
263 | Cbc_primalColumnSolution(Cbc_Model * model) |
---|
264 | ; |
---|
265 | /** Dual row solution */ |
---|
266 | COINLIBAPI double * COINLINKAGE |
---|
267 | Cbc_dualRowSolution(Cbc_Model * model) |
---|
268 | ; |
---|
269 | /** Reduced costs */ |
---|
270 | COINLIBAPI double * COINLINKAGE |
---|
271 | Cbc_dualColumnSolution(Cbc_Model * model) |
---|
272 | ; |
---|
273 | /** Row lower */ |
---|
274 | COINLIBAPI double* COINLINKAGE |
---|
275 | Cbc_rowLower(Cbc_Model * model) |
---|
276 | ; |
---|
277 | /** Row upper */ |
---|
278 | COINLIBAPI double* COINLINKAGE |
---|
279 | Cbc_rowUpper(Cbc_Model * model) |
---|
280 | ; |
---|
281 | /** Objective */ |
---|
282 | COINLIBAPI double * COINLINKAGE |
---|
283 | Cbc_objective(Cbc_Model * model) |
---|
284 | ; |
---|
285 | /** Column Lower */ |
---|
286 | COINLIBAPI double * COINLINKAGE |
---|
287 | Cbc_columnLower(Cbc_Model * model) |
---|
288 | ; |
---|
289 | /** Column Upper */ |
---|
290 | COINLIBAPI double * COINLINKAGE |
---|
291 | Cbc_columnUpper(Cbc_Model * model) |
---|
292 | ; |
---|
293 | /** Number of elements in matrix */ |
---|
294 | COINLIBAPI int COINLINKAGE |
---|
295 | Cbc_getNumElements(Cbc_Model * model) |
---|
296 | ; |
---|
297 | /** Column starts in matrix */ |
---|
298 | COINLIBAPI const CoinBigIndex * COINLINKAGE |
---|
299 | Cbc_getVectorStarts(Cbc_Model * model) |
---|
300 | ; |
---|
301 | /** Row indices in matrix */ |
---|
302 | COINLIBAPI const int * COINLINKAGE |
---|
303 | Cbc_getIndices(Cbc_Model * model) |
---|
304 | ; |
---|
305 | /** Column vector lengths in matrix */ |
---|
306 | COINLIBAPI const int * COINLINKAGE |
---|
307 | Cbc_getVectorLengths(Cbc_Model * model) |
---|
308 | ; |
---|
309 | /** Element values in matrix */ |
---|
310 | COINLIBAPI const double * COINLINKAGE |
---|
311 | Cbc_getElements(Cbc_Model * model) |
---|
312 | ; |
---|
313 | /** Objective value */ |
---|
314 | COINLIBAPI double COINLINKAGE |
---|
315 | Cbc_objectiveValue(Cbc_Model * model) |
---|
316 | ; |
---|
317 | /** Infeasibility/unbounded ray (NULL returned if none/wrong) |
---|
318 | Up to user to use delete [] on these arrays. */ |
---|
319 | COINLIBAPI double * COINLINKAGE |
---|
320 | Cbc_infeasibilityRay(Cbc_Model * model) |
---|
321 | ; |
---|
322 | COINLIBAPI double * COINLINKAGE |
---|
323 | Cbc_unboundedRay(Cbc_Model * model) |
---|
324 | ; |
---|
325 | /** See if status array exists (partly for OsiClp) */ |
---|
326 | COINLIBAPI int COINLINKAGE |
---|
327 | Cbc_statusExists(Cbc_Model * model) |
---|
328 | ; |
---|
329 | /** Return address of status array (char[numberRows+numberColumns]) */ |
---|
330 | COINLIBAPI void COINLINKAGE |
---|
331 | Cbc_getBasisStatus(Cbc_Model * model, int * cstat, int * rstat) |
---|
332 | ; |
---|
333 | /** Copy in status vector */ |
---|
334 | COINLIBAPI void COINLINKAGE |
---|
335 | Cbc_setBasisStatus(Cbc_Model * model, int * cstat, int * rstat) |
---|
336 | ; |
---|
337 | |
---|
338 | /** User pointer for whatever reason */ |
---|
339 | COINLIBAPI void COINLINKAGE |
---|
340 | Cbc_setUserPointer (Cbc_Model * model, void * pointer) |
---|
341 | ; |
---|
342 | COINLIBAPI void * COINLINKAGE |
---|
343 | Cbc_getUserPointer (Cbc_Model * model) |
---|
344 | ; |
---|
345 | /*@}*/ |
---|
346 | /**@name Message handling. Call backs are handled by ONE function */ |
---|
347 | /*@{*/ |
---|
348 | /** Pass in Callback function. |
---|
349 | Message numbers up to 1000000 are Clp, Coin ones have 1000000 added */ |
---|
350 | COINLIBAPI void COINLINKAGE |
---|
351 | Cbc_registerCallBack(Cbc_Model * model, |
---|
352 | cbc_callback userCallBack) |
---|
353 | ; |
---|
354 | /** Unset Callback function */ |
---|
355 | COINLIBAPI void COINLINKAGE |
---|
356 | Cbc_clearCallBack(Cbc_Model * model) |
---|
357 | ; |
---|
358 | /** Amount of print out: |
---|
359 | 0 - none |
---|
360 | 1 - just final |
---|
361 | 2 - just factorizations |
---|
362 | 3 - as 2 plus a bit more |
---|
363 | 4 - verbose |
---|
364 | above that 8,16,32 etc just for selective debug |
---|
365 | */ |
---|
366 | COINLIBAPI void COINLINKAGE |
---|
367 | Cbc_setLogLevel(Cbc_Model * model, int value) |
---|
368 | ; |
---|
369 | COINLIBAPI int COINLINKAGE |
---|
370 | Cbc_logLevel(Cbc_Model * model) |
---|
371 | ; |
---|
372 | /** length of names (0 means no names0 */ |
---|
373 | COINLIBAPI int COINLINKAGE |
---|
374 | Cbc_lengthNames(Cbc_Model * model) |
---|
375 | ; |
---|
376 | /** Fill in array (at least lengthNames+1 long) with a row name */ |
---|
377 | COINLIBAPI void COINLINKAGE |
---|
378 | Cbc_rowName(Cbc_Model * model, int iRow, char * name) |
---|
379 | ; |
---|
380 | /** Fill in array (at least lengthNames+1 long) with a column name */ |
---|
381 | COINLIBAPI void COINLINKAGE |
---|
382 | Cbc_columnName(Cbc_Model * model, int iColumn, char * name) |
---|
383 | ; |
---|
384 | |
---|
385 | /*@}*/ |
---|
386 | |
---|
387 | |
---|
388 | /**@name Functions most useful to user */ |
---|
389 | /*@{*/ |
---|
390 | /** General solve algorithm which can do presolve. |
---|
391 | See ClpSolve.hpp for options |
---|
392 | */ |
---|
393 | COINLIBAPI int COINLINKAGE |
---|
394 | Cbc_initialSolve(Cbc_Model * model) |
---|
395 | ; |
---|
396 | /* General solve algorithm which can do presolve. |
---|
397 | See CbcModel.hpp for options |
---|
398 | */ |
---|
399 | COINLIBAPI int COINLINKAGE |
---|
400 | Cbc_branchAndBound(Cbc_Model * model) |
---|
401 | ; |
---|
402 | /* Solve using CbcMain1. This is the recommended default solve function. |
---|
403 | */ |
---|
404 | COINLIBAPI int COINLINKAGE |
---|
405 | Cbc_solve(Cbc_Model * model) |
---|
406 | ; |
---|
407 | /** Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later) */ |
---|
408 | COINLIBAPI void COINLINKAGE |
---|
409 | Cbc_scaling(Cbc_Model * model, int mode) |
---|
410 | ; |
---|
411 | /** Gets scalingFlag */ |
---|
412 | COINLIBAPI int COINLINKAGE |
---|
413 | Cbc_scalingFlag(Cbc_Model * model) |
---|
414 | ; |
---|
415 | /** Crash - at present just aimed at dual, returns |
---|
416 | -2 if dual preferred and crash basis created |
---|
417 | -1 if dual preferred and all slack basis preferred |
---|
418 | 0 if basis going in was not all slack |
---|
419 | 1 if primal preferred and all slack basis preferred |
---|
420 | 2 if primal preferred and crash basis created. |
---|
421 | |
---|
422 | if gap between bounds <="gap" variables can be flipped |
---|
423 | |
---|
424 | If "pivot" is |
---|
425 | 0 No pivoting (so will just be choice of algorithm) |
---|
426 | 1 Simple pivoting e.g. gub |
---|
427 | 2 Mini iterations |
---|
428 | */ |
---|
429 | COINLIBAPI int COINLINKAGE |
---|
430 | Cbc_crash(Cbc_Model * model, double gap, int pivot) |
---|
431 | ; |
---|
432 | /*@}*/ |
---|
433 | |
---|
434 | |
---|
435 | /**@name most useful gets and sets */ |
---|
436 | /*@{*/ |
---|
437 | /** If problem is primal feasible */ |
---|
438 | COINLIBAPI int COINLINKAGE |
---|
439 | Cbc_primalFeasible(Cbc_Model * model) |
---|
440 | ; |
---|
441 | /** If problem is dual feasible */ |
---|
442 | COINLIBAPI int COINLINKAGE |
---|
443 | Cbc_dualFeasible(Cbc_Model * model) |
---|
444 | ; |
---|
445 | /** Dual bound */ |
---|
446 | COINLIBAPI double COINLINKAGE |
---|
447 | Cbc_dualBound(Cbc_Model * model) |
---|
448 | ; |
---|
449 | COINLIBAPI void COINLINKAGE |
---|
450 | Cbc_setDualBound(Cbc_Model * model, double value) |
---|
451 | ; |
---|
452 | /** Infeasibility cost */ |
---|
453 | COINLIBAPI double COINLINKAGE |
---|
454 | Cbc_infeasibilityCost(Cbc_Model * model) |
---|
455 | ; |
---|
456 | COINLIBAPI void COINLINKAGE |
---|
457 | Cbc_setInfeasibilityCost(Cbc_Model * model, double value) |
---|
458 | ; |
---|
459 | /** Perturbation: |
---|
460 | 50 - switch on perturbation |
---|
461 | 100 - auto perturb if takes too long (1.0e-6 largest nonzero) |
---|
462 | 101 - we are perturbed |
---|
463 | 102 - don't try perturbing again |
---|
464 | default is 100 |
---|
465 | others are for playing |
---|
466 | */ |
---|
467 | COINLIBAPI int COINLINKAGE |
---|
468 | Cbc_perturbation(Cbc_Model * model) |
---|
469 | ; |
---|
470 | COINLIBAPI void COINLINKAGE |
---|
471 | Cbc_setPerturbation(Cbc_Model * model, int value) |
---|
472 | ; |
---|
473 | /** Current (or last) algorithm */ |
---|
474 | COINLIBAPI int COINLINKAGE |
---|
475 | Cbc_algorithm(Cbc_Model * model) |
---|
476 | ; |
---|
477 | /** Set algorithm */ |
---|
478 | COINLIBAPI void COINLINKAGE |
---|
479 | Cbc_setAlgorithm(Cbc_Model * model, int value) |
---|
480 | ; |
---|
481 | /** Sum of dual infeasibilities */ |
---|
482 | COINLIBAPI double COINLINKAGE |
---|
483 | Cbc_sumDualInfeasibilities(Cbc_Model * model) |
---|
484 | ; |
---|
485 | /** Number of dual infeasibilities */ |
---|
486 | COINLIBAPI int COINLINKAGE |
---|
487 | Cbc_numberDualInfeasibilities(Cbc_Model * model) |
---|
488 | ; |
---|
489 | /** Sum of primal infeasibilities */ |
---|
490 | COINLIBAPI double COINLINKAGE |
---|
491 | Cbc_sumPrimalInfeasibilities(Cbc_Model * model) |
---|
492 | ; |
---|
493 | /** Number of primal infeasibilities */ |
---|
494 | COINLIBAPI int COINLINKAGE |
---|
495 | Cbc_numberPrimalInfeasibilities(Cbc_Model * model) |
---|
496 | ; |
---|
497 | /** Save model to file, returns 0 if success. This is designed for |
---|
498 | use outside algorithms so does not save iterating arrays etc. |
---|
499 | It does not save any messaging information. |
---|
500 | Does not save scaling values. |
---|
501 | It does not know about all types of virtual functions. |
---|
502 | */ |
---|
503 | COINLIBAPI int COINLINKAGE |
---|
504 | Cbc_saveModel(Cbc_Model * model, const char * fileName) |
---|
505 | ; |
---|
506 | /** Restore model from file, returns 0 if success, |
---|
507 | deletes current model */ |
---|
508 | COINLIBAPI int COINLINKAGE |
---|
509 | Cbc_restoreModel(Cbc_Model * model, const char * fileName) |
---|
510 | ; |
---|
511 | |
---|
512 | /** Just check solution (for external use) - sets sum of |
---|
513 | infeasibilities etc */ |
---|
514 | COINLIBAPI void COINLINKAGE |
---|
515 | Cbc_checkSolution(Cbc_Model * model) |
---|
516 | ; |
---|
517 | /*@}*/ |
---|
518 | |
---|
519 | /******************** End of most useful part **************/ |
---|
520 | /**@name gets and sets - some synonyms */ |
---|
521 | /*@{*/ |
---|
522 | /** Number of rows */ |
---|
523 | COINLIBAPI int COINLINKAGE |
---|
524 | Cbc_getNumRows(Cbc_Model * model) |
---|
525 | ; |
---|
526 | /** Number of columns */ |
---|
527 | COINLIBAPI int COINLINKAGE |
---|
528 | Cbc_getNumCols(Cbc_Model * model) |
---|
529 | ; |
---|
530 | /** Number of iterations */ |
---|
531 | COINLIBAPI int COINLINKAGE |
---|
532 | Cbc_getIterationCount(Cbc_Model * model) |
---|
533 | ; |
---|
534 | /** Are there a numerical difficulties? */ |
---|
535 | COINLIBAPI int COINLINKAGE |
---|
536 | Cbc_isAbandoned(Cbc_Model * model) |
---|
537 | ; |
---|
538 | /** Is optimality proven? */ |
---|
539 | COINLIBAPI int COINLINKAGE |
---|
540 | Cbc_isProvenOptimal(Cbc_Model * model) |
---|
541 | ; |
---|
542 | /** Is primal infeasiblity proven? */ |
---|
543 | COINLIBAPI int COINLINKAGE |
---|
544 | Cbc_isProvenPrimalInfeasible(Cbc_Model * model) |
---|
545 | ; |
---|
546 | /** Is dual infeasiblity proven? */ |
---|
547 | COINLIBAPI int COINLINKAGE |
---|
548 | Cbc_isProvenDualInfeasible(Cbc_Model * model) |
---|
549 | ; |
---|
550 | /** Is the given primal objective limit reached? */ |
---|
551 | COINLIBAPI int COINLINKAGE |
---|
552 | Cbc_isPrimalObjectiveLimitReached(Cbc_Model * model) |
---|
553 | ; |
---|
554 | /** Is the given dual objective limit reached? */ |
---|
555 | COINLIBAPI int COINLINKAGE |
---|
556 | Cbc_isDualObjectiveLimitReached(Cbc_Model * model) |
---|
557 | ; |
---|
558 | /** Iteration limit reached? */ |
---|
559 | COINLIBAPI int COINLINKAGE |
---|
560 | Cbc_isIterationLimitReached(Cbc_Model * model) |
---|
561 | ; |
---|
562 | /** Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore */ |
---|
563 | COINLIBAPI double COINLINKAGE |
---|
564 | Cbc_getObjSense(Cbc_Model * model) |
---|
565 | ; |
---|
566 | /** Primal row solution */ |
---|
567 | COINLIBAPI const double * COINLINKAGE |
---|
568 | Cbc_getRowActivity(Cbc_Model * model) |
---|
569 | ; |
---|
570 | /** Primal column solution */ |
---|
571 | COINLIBAPI const double * COINLINKAGE |
---|
572 | Cbc_getColSolution(Cbc_Model * model) |
---|
573 | ; |
---|
574 | COINLIBAPI void COINLINKAGE |
---|
575 | Cbc_setColSolution(Cbc_Model * model, const double * input) |
---|
576 | ; |
---|
577 | /** Dual row solution */ |
---|
578 | COINLIBAPI const double * COINLINKAGE |
---|
579 | Cbc_getRowPrice(Cbc_Model * model) |
---|
580 | ; |
---|
581 | /** Reduced costs */ |
---|
582 | COINLIBAPI const double * COINLINKAGE |
---|
583 | Cbc_getReducedCost(Cbc_Model * model) |
---|
584 | ; |
---|
585 | /** Row lower */ |
---|
586 | COINLIBAPI const double* COINLINKAGE |
---|
587 | Cbc_getRowLower(Cbc_Model * model) |
---|
588 | ; |
---|
589 | /** Row upper */ |
---|
590 | COINLIBAPI const double* COINLINKAGE |
---|
591 | Cbc_getRowUpper(Cbc_Model * model) |
---|
592 | ; |
---|
593 | /** Objective */ |
---|
594 | COINLIBAPI const double * COINLINKAGE |
---|
595 | Cbc_getObjCoefficients(Cbc_Model * model) |
---|
596 | ; |
---|
597 | /** Column Lower */ |
---|
598 | COINLIBAPI const double * COINLINKAGE |
---|
599 | Cbc_getColLower(Cbc_Model * model) |
---|
600 | ; |
---|
601 | /** Column Upper */ |
---|
602 | COINLIBAPI const double * COINLINKAGE |
---|
603 | Cbc_getColUpper(Cbc_Model * model) |
---|
604 | ; |
---|
605 | /** Objective value */ |
---|
606 | COINLIBAPI double COINLINKAGE |
---|
607 | Cbc_getObjValue(Cbc_Model * model) |
---|
608 | ; |
---|
609 | /** Print the model */ |
---|
610 | COINLIBAPI void COINLINKAGE |
---|
611 | Cbc_printModel(Cbc_Model * model, const char * argPrefix) |
---|
612 | ; |
---|
613 | /** Determine whether the variable at location i is integer restricted */ |
---|
614 | COINLIBAPI int COINLINKAGE |
---|
615 | Cbc_isInteger(Cbc_Model * model, int i) |
---|
616 | ; |
---|
617 | /** Return CPU time */ |
---|
618 | COINLIBAPI double COINLINKAGE |
---|
619 | Cbc_cpuTime(Cbc_Model * model) |
---|
620 | ; |
---|
621 | /** Number of nodes explored in B&B tree */ |
---|
622 | COINLIBAPI int COINLINKAGE |
---|
623 | Cbc_getNodeCount(Cbc_Model * model) |
---|
624 | ; |
---|
625 | /** Return a copy of this model */ |
---|
626 | COINLIBAPI Cbc_Model * COINLINKAGE |
---|
627 | Cbc_clone(Cbc_Model * model) |
---|
628 | ; |
---|
629 | /** Set this the variable to be continuous */ |
---|
630 | COINLIBAPI Cbc_Model * COINLINKAGE |
---|
631 | Cbc_setContinuous(Cbc_Model * model, int iColumn) |
---|
632 | ; |
---|
633 | /** Add SOS constraints to the model using dense matrix */ |
---|
634 | COINLIBAPI void COINLINKAGE |
---|
635 | Cbc_addSOS_Dense(Cbc_Model * model, int numObjects, const int * len, |
---|
636 | const int * const * which, const double * weights, const int type) |
---|
637 | ; |
---|
638 | /** Add SOS constraints to the model using row-order matrix */ |
---|
639 | COINLIBAPI void COINLINKAGE |
---|
640 | Cbc_addSOS_Sparse(Cbc_Model * model, const int * rowStarts, |
---|
641 | const int * rowIndices, const double * weights, const int type) |
---|
642 | ; |
---|
643 | /** Delete all object information */ |
---|
644 | COINLIBAPI void COINLINKAGE |
---|
645 | Cbc_deleteObjects(Cbc_Model * model) |
---|
646 | ; |
---|
647 | /** Print the solution */ |
---|
648 | COINLIBAPI void COINLINKAGE |
---|
649 | Cbc_printSolution(Cbc_Model * model) |
---|
650 | ; |
---|
651 | /** Dual initial solve */ |
---|
652 | COINLIBAPI int COINLINKAGE |
---|
653 | Cbc_initialDualSolve(Cbc_Model * model) |
---|
654 | ; |
---|
655 | /** Primal initial solve */ |
---|
656 | COINLIBAPI int COINLINKAGE |
---|
657 | Cbc_initialPrimalSolve(Cbc_Model * model) |
---|
658 | ; |
---|
659 | /** Dual algorithm - see ClpSimplexDual.hpp for method */ |
---|
660 | COINLIBAPI int COINLINKAGE |
---|
661 | Cbc_dual(Cbc_Model * model, int ifValuesPass) |
---|
662 | ; |
---|
663 | /** Primal algorithm - see ClpSimplexPrimal.hpp for method */ |
---|
664 | COINLIBAPI int COINLINKAGE |
---|
665 | Cbc_primal(Cbc_Model * model, int ifValuesPass) |
---|
666 | ; |
---|
667 | /*@}*/ |
---|
668 | #ifdef __cplusplus |
---|
669 | } |
---|
670 | #endif |
---|
671 | #endif |
---|