source: stable/1.15/Clp/src/Clp_C_Interface.h @ 2017

Last change on this file since 2017 was 2017, checked in by stefan, 6 years ago

add method Clp_freeRay to C interface to free a ray given by Clp_infeasibility/unboundedRay

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 25.0 KB
Line 
1/* $Id: Clp_C_Interface.h 2017 2014-01-31 05:06:42Z stefan $ */
2/*
3  Copyright (C) 2002, 2003 International Business Machines Corporation
4  and others.  All Rights Reserved.
5
6  This code is licensed under the terms of the Eclipse Public License (EPL).
7*/
8#ifndef ClpSimplexC_H
9#define ClpSimplexC_H
10
11/* include all defines and ugly stuff */
12#include "Coin_C_defines.h"
13
14#if defined (CLP_EXTERN_C)
15typedef struct {
16  ClpSolve options;
17} Clp_Solve;
18#else
19typedef void Clp_Solve;
20#endif
21
22/** This is a first "C" interface to Clp.
23    It has similarities to the OSL V3 interface
24    and only has most common functions
25*/
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31     /**@name Constructors and destructor
32        These do not have an exact analogue in C++.
33        The user does not need to know structure of Clp_Simplex or Clp_Solve.
34
35        For (almost) all Clp_* functions outside this group there is an exact C++
36        analogue created by taking the first parameter out, removing the Clp_
37        from name and applying the method to an object of type ClpSimplex.
38       
39        Similarly, for all ClpSolve_* functions there is an exact C++
40        analogue created by taking the first parameter out, removing the ClpSolve_
41        from name and applying the method to an object of type ClpSolve.
42     */
43     /*@{*/
44
45     /** Default constructor */
46     COINLIBAPI Clp_Simplex * COINLINKAGE Clp_newModel(void);
47     /** Destructor */
48     COINLIBAPI void COINLINKAGE Clp_deleteModel(Clp_Simplex * model);
49     /** Default constructor */
50     COINLIBAPI Clp_Solve * COINLINKAGE ClpSolve_new();
51     /** Destructor */ 
52     COINLIBAPI void COINLINKAGE ClpSolve_delete(Clp_Solve * solve);
53     /*@}*/
54
55     /**@name Load model - loads some stuff and initializes others */
56     /*@{*/
57     /** Loads a problem (the constraints on the
58         rows are given by lower and upper bounds). If a pointer is NULL then the
59         following values are the default:
60         <ul>
61         <li> <code>colub</code>: all columns have upper bound infinity
62         <li> <code>collb</code>: all columns have lower bound 0
63         <li> <code>rowub</code>: all rows have upper bound infinity
64         <li> <code>rowlb</code>: all rows have lower bound -infinity
65         <li> <code>obj</code>: all variables have 0 objective coefficient
66         </ul>
67     */
68     /** Just like the other loadProblem() method except that the matrix is
69     given in a standard column major ordered format (without gaps). */
70     COINLIBAPI void COINLINKAGE Clp_loadProblem (Clp_Simplex * model,  const int numcols, const int numrows,
71               const CoinBigIndex * start, const int* index,
72               const double* value,
73               const double* collb, const double* colub,
74               const double* obj,
75               const double* rowlb, const double* rowub);
76
77     /* read quadratic part of the objective (the matrix part) */
78     COINLIBAPI void COINLINKAGE
79     Clp_loadQuadraticObjective(Clp_Simplex * model,
80                                const int numberColumns,
81                                const CoinBigIndex * start,
82                                const int * column,
83                                const double * element);
84     /** Read an mps file from the given filename */
85     COINLIBAPI int COINLINKAGE Clp_readMps(Clp_Simplex * model, const char *filename,
86                                            int keepNames,
87                                            int ignoreErrors);
88     /** Copy in integer informations */
89     COINLIBAPI void COINLINKAGE Clp_copyInIntegerInformation(Clp_Simplex * model, const char * information);
90     /** Drop integer informations */
91     COINLIBAPI void COINLINKAGE Clp_deleteIntegerInformation(Clp_Simplex * model);
92     /** Resizes rim part of model  */
93     COINLIBAPI void COINLINKAGE Clp_resize (Clp_Simplex * model, int newNumberRows, int newNumberColumns);
94     /** Deletes rows */
95     COINLIBAPI void COINLINKAGE Clp_deleteRows(Clp_Simplex * model, int number, const int * which);
96     /** Add rows */
97     COINLIBAPI void COINLINKAGE Clp_addRows(Clp_Simplex * model, int number, const double * rowLower,
98                                             const double * rowUpper,
99                                             const int * rowStarts, const int * columns,
100                                             const double * elements);
101
102     /** Deletes columns */
103     COINLIBAPI void COINLINKAGE Clp_deleteColumns(Clp_Simplex * model, int number, const int * which);
104     /** Add columns */
105     COINLIBAPI void COINLINKAGE Clp_addColumns(Clp_Simplex * model, int number, const double * columnLower,
106               const double * columnUpper,
107               const double * objective,
108               const int * columnStarts, const int * rows,
109               const double * elements);
110     /** Change row lower bounds */
111     COINLIBAPI void COINLINKAGE Clp_chgRowLower(Clp_Simplex * model, const double * rowLower);
112     /** Change row upper bounds */
113     COINLIBAPI void COINLINKAGE Clp_chgRowUpper(Clp_Simplex * model, const double * rowUpper);
114     /** Change column lower bounds */
115     COINLIBAPI void COINLINKAGE Clp_chgColumnLower(Clp_Simplex * model, const double * columnLower);
116     /** Change column upper bounds */
117     COINLIBAPI void COINLINKAGE Clp_chgColumnUpper(Clp_Simplex * model, const double * columnUpper);
118     /** Change objective coefficients */
119     COINLIBAPI void COINLINKAGE Clp_chgObjCoefficients(Clp_Simplex * model, const double * objIn);
120     /** Drops names - makes lengthnames 0 and names empty */
121     COINLIBAPI void COINLINKAGE Clp_dropNames(Clp_Simplex * model);
122     /** Copies in names */
123     COINLIBAPI void COINLINKAGE Clp_copyNames(Clp_Simplex * model, const char * const * rowNames,
124               const char * const * columnNames);
125
126     /*@}*/
127     /**@name gets and sets - you will find some synonyms at the end of this file */
128     /*@{*/
129     /** Number of rows */
130     COINLIBAPI int COINLINKAGE Clp_numberRows(Clp_Simplex * model);
131     /** Number of columns */
132     COINLIBAPI int COINLINKAGE Clp_numberColumns(Clp_Simplex * model);
133     /** Primal tolerance to use */
134     COINLIBAPI double COINLINKAGE Clp_primalTolerance(Clp_Simplex * model);
135     COINLIBAPI void COINLINKAGE Clp_setPrimalTolerance(Clp_Simplex * model,  double value) ;
136     /** Dual tolerance to use */
137     COINLIBAPI double COINLINKAGE Clp_dualTolerance(Clp_Simplex * model);
138     COINLIBAPI void COINLINKAGE Clp_setDualTolerance(Clp_Simplex * model,  double value) ;
139     /** Dual objective limit */
140     COINLIBAPI double COINLINKAGE Clp_dualObjectiveLimit(Clp_Simplex * model);
141     COINLIBAPI void COINLINKAGE Clp_setDualObjectiveLimit(Clp_Simplex * model, double value);
142     /** Objective offset */
143     COINLIBAPI double COINLINKAGE Clp_objectiveOffset(Clp_Simplex * model);
144     COINLIBAPI void COINLINKAGE Clp_setObjectiveOffset(Clp_Simplex * model, double value);
145     /** Fills in array with problem name  */
146     COINLIBAPI void COINLINKAGE Clp_problemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
147     /* Sets problem name.  Must have \0 at end.  */
148     COINLIBAPI int COINLINKAGE
149     Clp_setProblemName(Clp_Simplex * model, int maxNumberCharacters, char * array);
150     /** Number of iterations */
151     COINLIBAPI int COINLINKAGE Clp_numberIterations(Clp_Simplex * model);
152     COINLIBAPI void COINLINKAGE Clp_setNumberIterations(Clp_Simplex * model, int numberIterations);
153     /** Maximum number of iterations */
154     COINLIBAPI int maximumIterations(Clp_Simplex * model);
155     COINLIBAPI void COINLINKAGE Clp_setMaximumIterations(Clp_Simplex * model, int value);
156     /** Maximum time in seconds (from when set called) */
157     COINLIBAPI double COINLINKAGE Clp_maximumSeconds(Clp_Simplex * model);
158     COINLIBAPI void COINLINKAGE Clp_setMaximumSeconds(Clp_Simplex * model, double value);
159     /** Returns true if hit maximum iterations (or time) */
160     COINLIBAPI int COINLINKAGE Clp_hitMaximumIterations(Clp_Simplex * model);
161     /** Status of problem:
162         0 - optimal
163         1 - primal infeasible
164         2 - dual infeasible
165         3 - stopped on iterations etc
166         4 - stopped due to errors
167     */
168     COINLIBAPI int COINLINKAGE Clp_status(Clp_Simplex * model);
169     /** Set problem status */
170     COINLIBAPI void COINLINKAGE Clp_setProblemStatus(Clp_Simplex * model, int problemStatus);
171     /** Secondary status of problem - may get extended
172         0 - none
173         1 - primal infeasible because dual limit reached
174         2 - scaled problem optimal - unscaled has primal infeasibilities
175         3 - scaled problem optimal - unscaled has dual infeasibilities
176         4 - scaled problem optimal - unscaled has both dual and primal infeasibilities
177     */
178     COINLIBAPI int COINLINKAGE Clp_secondaryStatus(Clp_Simplex * model);
179     COINLIBAPI void COINLINKAGE Clp_setSecondaryStatus(Clp_Simplex * model, int status);
180     /** Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore */
181     COINLIBAPI double COINLINKAGE Clp_optimizationDirection(Clp_Simplex * model);
182     COINLIBAPI void COINLINKAGE Clp_setOptimizationDirection(Clp_Simplex * model, double value);
183     /** Primal row solution */
184     COINLIBAPI double * COINLINKAGE Clp_primalRowSolution(Clp_Simplex * model);
185     /** Primal column solution */
186     COINLIBAPI double * COINLINKAGE Clp_primalColumnSolution(Clp_Simplex * model);
187     /** Dual row solution */
188     COINLIBAPI double * COINLINKAGE Clp_dualRowSolution(Clp_Simplex * model);
189     /** Reduced costs */
190     COINLIBAPI double * COINLINKAGE Clp_dualColumnSolution(Clp_Simplex * model);
191     /** Row lower */
192     COINLIBAPI double* COINLINKAGE Clp_rowLower(Clp_Simplex * model);
193     /** Row upper  */
194     COINLIBAPI double* COINLINKAGE Clp_rowUpper(Clp_Simplex * model);
195     /** Objective */
196     COINLIBAPI double * COINLINKAGE Clp_objective(Clp_Simplex * model);
197     /** Column Lower */
198     COINLIBAPI double * COINLINKAGE Clp_columnLower(Clp_Simplex * model);
199     /** Column Upper */
200     COINLIBAPI double * COINLINKAGE Clp_columnUpper(Clp_Simplex * model);
201     /** Number of elements in matrix */
202     COINLIBAPI int COINLINKAGE Clp_getNumElements(Clp_Simplex * model);
203     /* Column starts in matrix */
204     COINLIBAPI const CoinBigIndex * COINLINKAGE Clp_getVectorStarts(Clp_Simplex * model);
205     /* Row indices in matrix */
206     COINLIBAPI const int * COINLINKAGE Clp_getIndices(Clp_Simplex * model);
207     /* Column vector lengths in matrix */
208     COINLIBAPI const int * COINLINKAGE Clp_getVectorLengths(Clp_Simplex * model);
209     /* Element values in matrix */
210     COINLIBAPI const double * COINLINKAGE Clp_getElements(Clp_Simplex * model);
211     /** Objective value */
212     COINLIBAPI double COINLINKAGE Clp_objectiveValue(Clp_Simplex * model);
213     /** Integer information */
214     COINLIBAPI char * COINLINKAGE Clp_integerInformation(Clp_Simplex * model);
215     /** Gives Infeasibility ray.
216      *
217      * Use Clp_freeRay to free the returned array.
218      *
219      * @return infeasibility ray, or NULL returned if none/wrong.
220      */
221     COINLIBAPI double * COINLINKAGE Clp_infeasibilityRay(Clp_Simplex * model);
222     /** Gives ray in which the problem is unbounded.
223      *
224      * Use Clp_freeRay to free the returned array.
225      *
226      * @return unbounded ray, or NULL returned if none/wrong.
227      */
228     COINLIBAPI double * COINLINKAGE Clp_unboundedRay(Clp_Simplex * model);
229     /** Frees a infeasibility or unbounded ray. */
230     COINLIBAPI void COINLINKAGE Clp_freeRay(Clp_Simplex * model, double * ray);
231     /** See if status array exists (partly for OsiClp) */
232     COINLIBAPI int COINLINKAGE Clp_statusExists(Clp_Simplex * model);
233     /** Return address of status array (char[numberRows+numberColumns]) */
234     COINLIBAPI unsigned char *  COINLINKAGE Clp_statusArray(Clp_Simplex * model);
235     /** Copy in status vector */
236     COINLIBAPI void COINLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
237     /* status values are as in ClpSimplex.hpp i.e. 0 - free, 1 basic, 2 at upper,
238        3 at lower, 4 superbasic, (5 fixed) */
239     /* Get variable basis info */
240     COINLIBAPI int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model, int sequence);
241     /* Get row basis info */
242     COINLIBAPI int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model, int sequence);
243     /* Set variable basis info (and value if at bound) */
244     COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
245               int sequence, int value);
246     /* Set row basis info (and value if at bound) */
247     COINLIBAPI void COINLINKAGE Clp_setRowStatus(Clp_Simplex * model,
248               int sequence, int value);
249
250     /** User pointer for whatever reason */
251     COINLIBAPI void COINLINKAGE Clp_setUserPointer (Clp_Simplex * model, void * pointer);
252     COINLIBAPI void * COINLINKAGE Clp_getUserPointer (Clp_Simplex * model);
253     /*@}*/
254     /**@name Message handling.  Call backs are handled by ONE function */
255     /*@{*/
256     /** Pass in Callback function.
257      Message numbers up to 1000000 are Clp, Coin ones have 1000000 added */
258     COINLIBAPI void COINLINKAGE Clp_registerCallBack(Clp_Simplex * model,
259               clp_callback userCallBack);
260     /** Unset Callback function */
261     COINLIBAPI void COINLINKAGE Clp_clearCallBack(Clp_Simplex * model);
262     /** Amount of print out:
263         0 - none
264         1 - just final
265         2 - just factorizations
266         3 - as 2 plus a bit more
267         4 - verbose
268         above that 8,16,32 etc just for selective debug
269     */
270     COINLIBAPI void COINLINKAGE Clp_setLogLevel(Clp_Simplex * model, int value);
271     COINLIBAPI int COINLINKAGE Clp_logLevel(Clp_Simplex * model);
272     /** length of names (0 means no names0 */
273     COINLIBAPI int COINLINKAGE Clp_lengthNames(Clp_Simplex * model);
274     /** Fill in array (at least lengthNames+1 long) with a row name */
275     COINLIBAPI void COINLINKAGE Clp_rowName(Clp_Simplex * model, int iRow, char * name);
276     /** Fill in array (at least lengthNames+1 long) with a column name */
277     COINLIBAPI void COINLINKAGE Clp_columnName(Clp_Simplex * model, int iColumn, char * name);
278
279     /*@}*/
280
281
282     /**@name Functions most useful to user */
283     /*@{*/
284     /** General solve algorithm which can do presolve.
285         See  ClpSolve.hpp for options
286      */
287     COINLIBAPI int COINLINKAGE Clp_initialSolve(Clp_Simplex * model);
288     /** Pass solve options. (Exception to direct analogue rule) */ 
289     COINLIBAPI int COINLINKAGE Clp_initialSolveWithOptions(Clp_Simplex * model, Clp_Solve *);
290     /** Dual initial solve */
291     COINLIBAPI int COINLINKAGE Clp_initialDualSolve(Clp_Simplex * model);
292     /** Primal initial solve */
293     COINLIBAPI int COINLINKAGE Clp_initialPrimalSolve(Clp_Simplex * model);
294     /** Barrier initial solve */
295     COINLIBAPI int COINLINKAGE Clp_initialBarrierSolve(Clp_Simplex * model);
296     /** Barrier initial solve, no crossover */
297     COINLIBAPI int COINLINKAGE Clp_initialBarrierNoCrossSolve(Clp_Simplex * model);
298     /** Dual algorithm - see ClpSimplexDual.hpp for method */
299     COINLIBAPI int COINLINKAGE Clp_dual(Clp_Simplex * model, int ifValuesPass);
300     /** Primal algorithm - see ClpSimplexPrimal.hpp for method */
301     COINLIBAPI int COINLINKAGE Clp_primal(Clp_Simplex * model, int ifValuesPass);
302#ifndef SLIM_CLP
303     /** Solve the problem with the idiot code */
304     COINLIBAPI void COINLINKAGE Clp_idiot(Clp_Simplex * model, int tryhard);
305#endif
306     /** Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later) */
307     COINLIBAPI void COINLINKAGE Clp_scaling(Clp_Simplex * model, int mode);
308     /** Gets scalingFlag */
309     COINLIBAPI int COINLINKAGE Clp_scalingFlag(Clp_Simplex * model);
310     /** Crash - at present just aimed at dual, returns
311         -2 if dual preferred and crash basis created
312         -1 if dual preferred and all slack basis preferred
313          0 if basis going in was not all slack
314          1 if primal preferred and all slack basis preferred
315          2 if primal preferred and crash basis created.
316
317          if gap between bounds <="gap" variables can be flipped
318
319          If "pivot" is
320          0 No pivoting (so will just be choice of algorithm)
321          1 Simple pivoting e.g. gub
322          2 Mini iterations
323     */
324     COINLIBAPI int COINLINKAGE Clp_crash(Clp_Simplex * model, double gap, int pivot);
325     /*@}*/
326
327
328     /**@name most useful gets and sets */
329     /*@{*/
330     /** If problem is primal feasible */
331     COINLIBAPI int COINLINKAGE Clp_primalFeasible(Clp_Simplex * model);
332     /** If problem is dual feasible */
333     COINLIBAPI int COINLINKAGE Clp_dualFeasible(Clp_Simplex * model);
334     /** Dual bound */
335     COINLIBAPI double COINLINKAGE Clp_dualBound(Clp_Simplex * model);
336     COINLIBAPI void COINLINKAGE Clp_setDualBound(Clp_Simplex * model, double value);
337     /** Infeasibility cost */
338     COINLIBAPI double COINLINKAGE Clp_infeasibilityCost(Clp_Simplex * model);
339     COINLIBAPI void COINLINKAGE Clp_setInfeasibilityCost(Clp_Simplex * model, double value);
340     /** Perturbation:
341         50  - switch on perturbation
342         100 - auto perturb if takes too long (1.0e-6 largest nonzero)
343         101 - we are perturbed
344         102 - don't try perturbing again
345         default is 100
346         others are for playing
347     */
348     COINLIBAPI int COINLINKAGE Clp_perturbation(Clp_Simplex * model);
349     COINLIBAPI void COINLINKAGE Clp_setPerturbation(Clp_Simplex * model, int value);
350     /** Current (or last) algorithm */
351     COINLIBAPI int COINLINKAGE Clp_algorithm(Clp_Simplex * model);
352     /** Set algorithm */
353     COINLIBAPI void COINLINKAGE Clp_setAlgorithm(Clp_Simplex * model, int value);
354     /** Sum of dual infeasibilities */
355     COINLIBAPI double COINLINKAGE Clp_sumDualInfeasibilities(Clp_Simplex * model);
356     /** Number of dual infeasibilities */
357     COINLIBAPI int COINLINKAGE Clp_numberDualInfeasibilities(Clp_Simplex * model);
358     /** Sum of primal infeasibilities */
359     COINLIBAPI double COINLINKAGE Clp_sumPrimalInfeasibilities(Clp_Simplex * model);
360     /** Number of primal infeasibilities */
361     COINLIBAPI int COINLINKAGE Clp_numberPrimalInfeasibilities(Clp_Simplex * model);
362     /** Save model to file, returns 0 if success.  This is designed for
363         use outside algorithms so does not save iterating arrays etc.
364     It does not save any messaging information.
365     Does not save scaling values.
366     It does not know about all types of virtual functions.
367     */
368     COINLIBAPI int COINLINKAGE Clp_saveModel(Clp_Simplex * model, const char * fileName);
369     /** Restore model from file, returns 0 if success,
370         deletes current model */
371     COINLIBAPI int COINLINKAGE Clp_restoreModel(Clp_Simplex * model, const char * fileName);
372
373     /** Just check solution (for external use) - sets sum of
374         infeasibilities etc */
375     COINLIBAPI void COINLINKAGE Clp_checkSolution(Clp_Simplex * model);
376     /*@}*/
377
378     /******************** End of most useful part **************/
379     /**@name gets and sets - some synonyms */
380     /*@{*/
381     /** Number of rows */
382     COINLIBAPI int COINLINKAGE Clp_getNumRows(Clp_Simplex * model);
383     /** Number of columns */
384     COINLIBAPI int COINLINKAGE Clp_getNumCols(Clp_Simplex * model);
385     /** Number of iterations */
386     COINLIBAPI int COINLINKAGE Clp_getIterationCount(Clp_Simplex * model);
387     /** Are there a numerical difficulties? */
388     COINLIBAPI int COINLINKAGE Clp_isAbandoned(Clp_Simplex * model);
389     /** Is optimality proven? */
390     COINLIBAPI int COINLINKAGE Clp_isProvenOptimal(Clp_Simplex * model);
391     /** Is primal infeasiblity proven? */
392     COINLIBAPI int COINLINKAGE Clp_isProvenPrimalInfeasible(Clp_Simplex * model);
393     /** Is dual infeasiblity proven? */
394     COINLIBAPI int COINLINKAGE Clp_isProvenDualInfeasible(Clp_Simplex * model);
395     /** Is the given primal objective limit reached? */
396     COINLIBAPI int COINLINKAGE Clp_isPrimalObjectiveLimitReached(Clp_Simplex * model) ;
397     /** Is the given dual objective limit reached? */
398     COINLIBAPI int COINLINKAGE Clp_isDualObjectiveLimitReached(Clp_Simplex * model) ;
399     /** Iteration limit reached? */
400     COINLIBAPI int COINLINKAGE Clp_isIterationLimitReached(Clp_Simplex * model);
401     /** Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore */
402     COINLIBAPI double COINLINKAGE Clp_getObjSense(Clp_Simplex * model);
403     /** Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore */
404     COINLIBAPI void COINLINKAGE Clp_setObjSense(Clp_Simplex * model, double objsen);
405     /** Primal row solution */
406     COINLIBAPI const double * COINLINKAGE Clp_getRowActivity(Clp_Simplex * model);
407     /** Primal column solution */
408     COINLIBAPI const double * COINLINKAGE Clp_getColSolution(Clp_Simplex * model);
409     COINLIBAPI void COINLINKAGE Clp_setColSolution(Clp_Simplex * model, const double * input);
410     /** Dual row solution */
411     COINLIBAPI const double * COINLINKAGE Clp_getRowPrice(Clp_Simplex * model);
412     /** Reduced costs */
413     COINLIBAPI const double * COINLINKAGE Clp_getReducedCost(Clp_Simplex * model);
414     /** Row lower */
415     COINLIBAPI const double* COINLINKAGE Clp_getRowLower(Clp_Simplex * model);
416     /** Row upper  */
417     COINLIBAPI const double* COINLINKAGE Clp_getRowUpper(Clp_Simplex * model);
418     /** Objective */
419     COINLIBAPI const double * COINLINKAGE Clp_getObjCoefficients(Clp_Simplex * model);
420     /** Column Lower */
421     COINLIBAPI const double * COINLINKAGE Clp_getColLower(Clp_Simplex * model);
422     /** Column Upper */
423     COINLIBAPI const double * COINLINKAGE Clp_getColUpper(Clp_Simplex * model);
424     /** Objective value */
425     COINLIBAPI double COINLINKAGE Clp_getObjValue(Clp_Simplex * model);
426     /** Print model for debugging purposes */
427     COINLIBAPI void COINLINKAGE Clp_printModel(Clp_Simplex * model, const char * prefix);
428     /* Small element value - elements less than this set to zero,
429        default is 1.0e-20 */
430     COINLIBAPI double COINLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
431     COINLIBAPI void COINLINKAGE Clp_setSmallElementValue(Clp_Simplex * model, double value);
432     /*@}*/
433
434     
435     /**@name Get and set ClpSolve options
436     */
437     /*@{*/
438     COINLIBAPI void COINLINKAGE ClpSolve_setSpecialOption(Clp_Solve *, int which, int value, int extraInfo);
439     COINLIBAPI int COINLINKAGE ClpSolve_getSpecialOption(Clp_Solve *, int which);
440
441     /** method: (see ClpSolve::SolveType)
442         0 - dual simplex
443         1 - primal simplex
444         2 - primal or sprint
445         3 - barrier
446         4 - barrier no crossover
447         5 - automatic
448         6 - not implemented
449       -- pass extraInfo == -1 for default behavior */
450     COINLIBAPI void COINLINKAGE ClpSolve_setSolveType(Clp_Solve *, int method, int extraInfo);
451     COINLIBAPI int COINLINKAGE ClpSolve_getSolveType(Clp_Solve *);
452
453     /** amount: (see ClpSolve::PresolveType)
454         0 - presolve on
455         1 - presolve off
456         2 - presolve number
457         3 - presolve number cost
458       -- pass extraInfo == -1 for default behavior */
459     COINLIBAPI void COINLINKAGE ClpSolve_setPresolveType(Clp_Solve *, int amount, int extraInfo);
460     COINLIBAPI int COINLINKAGE ClpSolve_getPresolveType(Clp_Solve *);
461
462     COINLIBAPI int COINLINKAGE ClpSolve_getPresolvePasses(Clp_Solve *);
463     COINLIBAPI int COINLINKAGE ClpSolve_getExtraInfo(Clp_Solve *, int which);
464     COINLIBAPI void COINLINKAGE ClpSolve_setInfeasibleReturn(Clp_Solve *, int trueFalse);
465     COINLIBAPI int COINLINKAGE ClpSolve_infeasibleReturn(Clp_Solve *);
466
467     COINLIBAPI int COINLINKAGE ClpSolve_doDual(Clp_Solve *);
468     COINLIBAPI void COINLINKAGE ClpSolve_setDoDual(Clp_Solve *, int doDual);
469
470     COINLIBAPI int COINLINKAGE ClpSolve_doSingleton(Clp_Solve *);
471     COINLIBAPI void COINLINKAGE ClpSolve_setDoSingleton(Clp_Solve *, int doSingleton);
472
473     COINLIBAPI int COINLINKAGE ClpSolve_doDoubleton(Clp_Solve *);
474     COINLIBAPI void COINLINKAGE ClpSolve_setDoDoubleton(Clp_Solve *, int doDoubleton);
475
476     COINLIBAPI int COINLINKAGE ClpSolve_doTripleton(Clp_Solve *);
477     COINLIBAPI void COINLINKAGE ClpSolve_setDoTripleton(Clp_Solve *, int doTripleton);
478
479     COINLIBAPI int COINLINKAGE ClpSolve_doTighten(Clp_Solve *);
480     COINLIBAPI void COINLINKAGE ClpSolve_setDoTighten(Clp_Solve *, int doTighten);
481
482     COINLIBAPI int COINLINKAGE ClpSolve_doForcing(Clp_Solve *);
483     COINLIBAPI void COINLINKAGE ClpSolve_setDoForcing(Clp_Solve *, int doForcing);
484
485     COINLIBAPI int COINLINKAGE ClpSolve_doImpliedFree(Clp_Solve *);
486     COINLIBAPI void COINLINKAGE ClpSolve_setDoImpliedFree(Clp_Solve *, int doImpliedFree);
487     
488     COINLIBAPI int COINLINKAGE ClpSolve_doDupcol(Clp_Solve *);
489     COINLIBAPI void COINLINKAGE ClpSolve_setDoDupcol(Clp_Solve *, int doDupcol);
490     
491     COINLIBAPI int COINLINKAGE ClpSolve_doDuprow(Clp_Solve *);
492     COINLIBAPI void COINLINKAGE ClpSolve_setDoDuprow(Clp_Solve *, int doDuprow);
493
494     COINLIBAPI int COINLINKAGE ClpSolve_doSingletonColumn(Clp_Solve *);
495     COINLIBAPI void COINLINKAGE ClpSolve_setDoSingletonColumn(Clp_Solve *, int doSingleton);
496
497     COINLIBAPI int COINLINKAGE ClpSolve_presolveActions(Clp_Solve *);
498     COINLIBAPI void COINLINKAGE ClpSolve_setPresolveActions(Clp_Solve *, int action);
499
500     COINLIBAPI int COINLINKAGE ClpSolve_substitution(Clp_Solve *);
501     COINLIBAPI void COINLINKAGE ClpSolve_setSubstitution(Clp_Solve *, int value);
502
503     /*@}*/
504#ifdef __cplusplus
505}
506#endif
507#endif
Note: See TracBrowser for help on using the repository browser.