| 1 |
/************************************************************************/ |
| 2 |
/* */ |
| 3 |
/* CoinMP Solver Maximal Software */ |
| 4 |
/* */ |
| 5 |
/* File : 'coinmp.h' */ |
| 6 |
/* */ |
| 7 |
/* Version : 1.8 */ |
| 8 |
/* */ |
| 9 |
/* Author : Bjarni Kristjansson, Maximal Software */ |
| 10 |
/* */ |
| 11 |
/* Copyright (c) 2002-2015 Bjarni Kristjansson */ |
| 12 |
/* */ |
| 13 |
/************************************************************************/ |
| 14 |
|
| 15 |
/* $Id: CoinMP.h 674 2019-02-23 18:35:11Z stefan $ */ |
| 16 |
|
| 17 |
#ifndef _COINMP_H_ |
| 18 |
#define _COINMP_H_ |
| 19 |
|
| 20 |
|
| 21 |
#if defined(_MSC_VER) && !defined(HAVE_CONFIG_H) |
| 22 |
|
| 23 |
# define SOLVCALL __stdcall |
| 24 |
# if defined(SOLVER_EXPORT) && !defined(_WIN64) |
| 25 |
# define SOLVAPI __declspec(dllexport) |
| 26 |
# endif |
| 27 |
# if defined(SOLVER_IMPORT) |
| 28 |
# define SOLVAPI __declspec(dllimport) |
| 29 |
# endif |
| 30 |
|
| 31 |
#endif |
| 32 |
|
| 33 |
#ifndef SOLVAPI |
| 34 |
#define SOLVAPI |
| 35 |
#endif |
| 36 |
|
| 37 |
#ifndef SOLVCALL |
| 38 |
#define SOLVCALL |
| 39 |
#endif |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
#ifndef SOLV_LINK_LIB |
| 44 |
#ifndef SOLV_LINK_DLL |
| 45 |
#ifndef SOLV_LINK_DYN |
| 46 |
#define SOLV_LINK_LIB |
| 47 |
#endif |
| 48 |
#endif |
| 49 |
#endif |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
#define SOLV_CALL_SUCCESS 0 |
| 54 |
#define SOLV_CALL_FAILED -1 |
| 55 |
|
| 56 |
#define SOLV_METHOD_DEFAULT 0x00000000L |
| 57 |
|
| 58 |
#define SOLV_METHOD_PRIMAL 0x00000001L |
| 59 |
#define SOLV_METHOD_DUAL 0x00000002L |
| 60 |
#define SOLV_METHOD_NETWORK 0x00000004L |
| 61 |
#define SOLV_METHOD_BARRIER 0x00000008L |
| 62 |
|
| 63 |
#define SOLV_METHOD_BENDERS 0x00000100L |
| 64 |
#define SOLV_METHOD_DEQ 0x00000200L |
| 65 |
#define SOLV_METHOD_EV 0x00000400L |
| 66 |
|
| 67 |
|
| 68 |
#define SOLV_FEATURE_LP 0x00000001L |
| 69 |
#define SOLV_FEATURE_QP 0x00000002L |
| 70 |
#define SOLV_FEATURE_QCP 0x00000004L |
| 71 |
#define SOLV_FEATURE_NLP 0x00000008L |
| 72 |
|
| 73 |
#define SOLV_FEATURE_MIP 0x00000010L |
| 74 |
#define SOLV_FEATURE_MIQP 0x00000020L |
| 75 |
#define SOLV_FEATURE_MIQCP 0x00000040L |
| 76 |
#define SOLV_FEATURE_MINLP 0x00000080L |
| 77 |
|
| 78 |
#define SOLV_FEATURE_SP 0x00010000L |
| 79 |
|
| 80 |
|
| 81 |
#define SOLV_OBJSENS_MAX -1 |
| 82 |
#define SOLV_OBJSENS_MIN 1 |
| 83 |
|
| 84 |
|
| 85 |
#define SOLV_FILE_LOG 0 |
| 86 |
#define SOLV_FILE_BASIS 1 |
| 87 |
#define SOLV_FILE_MIPSTART 2 |
| 88 |
#define SOLV_FILE_MPS 3 |
| 89 |
#define SOLV_FILE_LP 4 |
| 90 |
#define SOLV_FILE_BINARY 5 |
| 91 |
#define SOLV_FILE_OUTPUT 6 |
| 92 |
#define SOLV_FILE_BINOUT 7 |
| 93 |
#define SOLV_FILE_IIS 8 |
| 94 |
|
| 95 |
#define SOLV_CHECK_COLCOUNT 1 |
| 96 |
#define SOLV_CHECK_ROWCOUNT 2 |
| 97 |
#define SOLV_CHECK_RANGECOUNT 3 |
| 98 |
#define SOLV_CHECK_OBJSENSE 4 |
| 99 |
#define SOLV_CHECK_ROWTYPE 5 |
| 100 |
#define SOLV_CHECK_MATBEGIN 6 |
| 101 |
#define SOLV_CHECK_MATCOUNT 7 |
| 102 |
#define SOLV_CHECK_MATBEGCNT 8 |
| 103 |
#define SOLV_CHECK_MATBEGNZ 9 |
| 104 |
#define SOLV_CHECK_MATINDEX 10 |
| 105 |
#define SOLV_CHECK_MATINDEXROW 11 |
| 106 |
#define SOLV_CHECK_BOUNDS 12 |
| 107 |
#define SOLV_CHECK_COLTYPE 13 |
| 108 |
#define SOLV_CHECK_COLNAMES 14 |
| 109 |
#define SOLV_CHECK_COLNAMESLEN 15 |
| 110 |
#define SOLV_CHECK_ROWNAMES 16 |
| 111 |
#define SOLV_CHECK_ROWNAMSLEN 17 |
| 112 |
|
| 113 |
|
| 114 |
typedef void *HPROB; |
| 115 |
|
| 116 |
#ifdef __cplusplus |
| 117 |
extern "C" { |
| 118 |
#endif |
| 119 |
|
| 120 |
typedef int (SOLVCALL * COIN_MSGLOG_CB)(const char* MessageStr, |
| 121 |
void* UserParam); |
| 122 |
|
| 123 |
typedef int (SOLVCALL *COIN_LPITER_CB)(int IterCount, |
| 124 |
double ObjectValue, |
| 125 |
int IsFeasible, |
| 126 |
double InfeasValue, |
| 127 |
void* UserParam); |
| 128 |
|
| 129 |
typedef int (SOLVCALL *COIN_MIPNODE_CB)(int IterCount, |
| 130 |
int MipNodeCount, |
| 131 |
double BestBound, |
| 132 |
double BestInteger, |
| 133 |
int IsMipImproved, |
| 134 |
void* UserParam); |
| 135 |
|
| 136 |
|
| 137 |
/* Depreciated, use COIN_XXX_CB instead */ |
| 138 |
typedef int (SOLVCALL * MSGLOGCALLBACK)(const char* MessageStr); |
| 139 |
|
| 140 |
typedef int (SOLVCALL *ITERCALLBACK)(int IterCount, |
| 141 |
double ObjectValue, |
| 142 |
int IsFeasible, |
| 143 |
double InfeasValue); |
| 144 |
|
| 145 |
typedef int (SOLVCALL *MIPNODECALLBACK)(int IterCount, |
| 146 |
int MipNodeCount, |
| 147 |
double BestBound, |
| 148 |
double BestInteger, |
| 149 |
int IsMipImproved); |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
#ifdef SOLV_LINK_LIB |
| 154 |
|
| 155 |
SOLVAPI int SOLVCALL CoinInitSolver(const char* LicenseStr); |
| 156 |
SOLVAPI int SOLVCALL CoinFreeSolver(void); |
| 157 |
|
| 158 |
SOLVAPI const char* SOLVCALL CoinGetSolverName(void); |
| 159 |
SOLVAPI int SOLVCALL CoinGetSolverNameBuf(char* SolverName, int buflen); |
| 160 |
|
| 161 |
SOLVAPI const char* SOLVCALL CoinGetVersionStr(void); |
| 162 |
SOLVAPI int SOLVCALL CoinGetVersionStrBuf(char* VersionStr, int buflen); |
| 163 |
SOLVAPI double SOLVCALL CoinGetVersion(void); |
| 164 |
|
| 165 |
SOLVAPI int SOLVCALL CoinGetFeatures(void); |
| 166 |
SOLVAPI int SOLVCALL CoinGetMethods(void); |
| 167 |
SOLVAPI double SOLVCALL CoinGetInfinity(void); |
| 168 |
|
| 169 |
SOLVAPI HPROB SOLVCALL CoinCreateProblem(const char* ProblemName); |
| 170 |
|
| 171 |
SOLVAPI int SOLVCALL CoinLoadMatrix(HPROB hProb, |
| 172 |
int ColCount, int RowCount, int NZCount, int RangeCount, |
| 173 |
int ObjectSense, double ObjectConst, double* ObjectCoeffs, |
| 174 |
double* LowerBounds, double* UpperBounds, const char* RowType, |
| 175 |
double* RHSValues, double* RangeValues, int* MatrixBegin, |
| 176 |
int* MatrixCount, int* MatrixIndex, double* MatrixValues); |
| 177 |
|
| 178 |
SOLVAPI int SOLVCALL CoinLoadNames(HPROB hProb, char** ColNamesList, |
| 179 |
char** RowNamesList, const char* ObjectName); |
| 180 |
|
| 181 |
SOLVAPI int SOLVCALL CoinLoadNamesBuf(HPROB hProb, const char* ColNamesBuf, |
| 182 |
const char* RowNamesBuf, const char* ObjectName); |
| 183 |
|
| 184 |
SOLVAPI int SOLVCALL CoinLoadProblem(HPROB hProb, |
| 185 |
int ColCount, int RowCount, int NZCount, int RangeCount, |
| 186 |
int ObjectSense, double ObjectConst, double* ObjectCoeffs, |
| 187 |
double* LowerBounds, double* UpperBounds, const char* RowType, |
| 188 |
double* RHSValues, double* RangeValues, int* MatrixBegin, |
| 189 |
int* MatrixCount, int* MatrixIndex, double* MatrixValues, |
| 190 |
char** ColNamesList, char** RowNamesList, const char* ObjectName); |
| 191 |
|
| 192 |
SOLVAPI int SOLVCALL CoinLoadProblemBuf(HPROB hProb, |
| 193 |
int ColCount, int RowCount, int NZCount, int RangeCount, |
| 194 |
int ObjectSense, double ObjectConst, double* ObjectCoeffs, |
| 195 |
double* LowerBounds, double* UpperBounds, char* RowType, |
| 196 |
double* RHSValues, double* RangeValues, int* MatrixBegin, |
| 197 |
int* MatrixCount, int* MatrixIndex, double* MatrixValues, |
| 198 |
const char* ColNamesBuf, const char* RowNamesBuf, const char* ObjectName); |
| 199 |
|
| 200 |
SOLVAPI int SOLVCALL CoinLoadInitValues(HPROB hProb, double* InitValues); |
| 201 |
|
| 202 |
SOLVAPI int SOLVCALL CoinLoadInteger(HPROB hProb, const char* ColumnType); |
| 203 |
|
| 204 |
|
| 205 |
SOLVAPI int SOLVCALL CoinLoadPriority(HPROB hProb, int PriorCount, int* PriorIndex, |
| 206 |
int* PriorValues, int* PriorBranch); |
| 207 |
|
| 208 |
SOLVAPI int SOLVCALL CoinLoadSos(HPROB hProb, int SosCount, int SosNZCount, |
| 209 |
int* SosType, int* SosPrior, int* SosBegin, |
| 210 |
int* SosIndex, double* SosRef); |
| 211 |
|
| 212 |
SOLVAPI int SOLVCALL CoinLoadSemiCont(HPROB hProb, int SemiCount, int* SemiIndex); |
| 213 |
|
| 214 |
SOLVAPI int SOLVCALL CoinLoadQuadratic(HPROB hProb, int* QuadBegin, int* QuadCount, |
| 215 |
int* QuadIndex, double* QuadValues); |
| 216 |
|
| 217 |
SOLVAPI int SOLVCALL CoinLoadNonlinear(HPROB hProb, int NlpTreeCount, int NlpLineCount, |
| 218 |
int* NlpBegin, int* NlpOper, int* NlpArg1, |
| 219 |
int* NlpArg2, int* NlpIndex1, int* NlpIndex2, |
| 220 |
double* NlpValue1, double* NlpValue2); |
| 221 |
|
| 222 |
SOLVAPI int SOLVCALL CoinUnloadProblem(HPROB hProb); |
| 223 |
|
| 224 |
SOLVAPI int SOLVCALL CoinCheckProblem(HPROB hProb); |
| 225 |
|
| 226 |
/* Depreciated, use CoinLoadNamesBuf instead |
| 227 |
//SOLVAPI int SOLVCALL CoinSetLoadNamesType(HPROB hProb, int LoadNamesType); |
| 228 |
*/ |
| 229 |
|
| 230 |
SOLVAPI const char* SOLVCALL CoinGetProblemName(HPROB hProb); |
| 231 |
SOLVAPI int SOLVCALL CoinGetProblemNameBuf(HPROB hProb, char* ProblemName, int buflen); |
| 232 |
|
| 233 |
SOLVAPI int SOLVCALL CoinGetColCount(HPROB hProb); |
| 234 |
SOLVAPI int SOLVCALL CoinGetRowCount(HPROB hProb); |
| 235 |
|
| 236 |
SOLVAPI const char* SOLVCALL CoinGetColName(HPROB hProb, int col); |
| 237 |
SOLVAPI int SOLVCALL CoinGetColNameBuf(HPROB hProb, int col, char* ColName, int buflen); |
| 238 |
|
| 239 |
SOLVAPI const char* SOLVCALL CoinGetRowName(HPROB hProb, int row); |
| 240 |
SOLVAPI int SOLVCALL CoinGetRowNameBuf(HPROB hProb, int row, char* RowName, int buflen); |
| 241 |
|
| 242 |
SOLVAPI int SOLVCALL CoinRegisterMsgLogCallback(HPROB hProb, COIN_MSGLOG_CB MsgLogCB, void* UserParam); |
| 243 |
SOLVAPI int SOLVCALL CoinRegisterLPIterCallback(HPROB hProb, COIN_LPITER_CB LPIterCB, void* UserParam); |
| 244 |
SOLVAPI int SOLVCALL CoinRegisterMipNodeCallback(HPROB hProb, COIN_MIPNODE_CB MipNodeCB, void* UserParam); |
| 245 |
|
| 246 |
/* Depreciated, use CoinRegisterXxxCallback instead */ |
| 247 |
SOLVAPI int SOLVCALL CoinSetMsgLogCallback(HPROB hProb, MSGLOGCALLBACK MsgLogCallback); |
| 248 |
SOLVAPI int SOLVCALL CoinSetIterCallback(HPROB hProb, ITERCALLBACK IterCallback); |
| 249 |
SOLVAPI int SOLVCALL CoinSetMipNodeCallback(HPROB hProb, MIPNODECALLBACK MipNodeCallback); |
| 250 |
|
| 251 |
SOLVAPI int SOLVCALL CoinOptimizeProblem(HPROB hProb, int Method); |
| 252 |
|
| 253 |
SOLVAPI int SOLVCALL CoinGetSolutionStatus(HPROB hProb); |
| 254 |
SOLVAPI const char* SOLVCALL CoinGetSolutionText(HPROB hProb); |
| 255 |
SOLVAPI int SOLVCALL CoinGetSolutionTextBuf(HPROB hProb, char* SolutionText, int buflen); |
| 256 |
|
| 257 |
SOLVAPI double SOLVCALL CoinGetObjectValue(HPROB hProb); |
| 258 |
SOLVAPI double SOLVCALL CoinGetMipBestBound(HPROB hProb); |
| 259 |
|
| 260 |
SOLVAPI int SOLVCALL CoinGetIterCount(HPROB hProb); |
| 261 |
SOLVAPI int SOLVCALL CoinGetMipNodeCount(HPROB hProb); |
| 262 |
|
| 263 |
SOLVAPI int SOLVCALL CoinGetSolutionValues(HPROB hProb, double* Activity, double* ReducedCost, |
| 264 |
double* SlackValues, double* ShadowPrice); |
| 265 |
SOLVAPI int SOLVCALL CoinGetSolutionRanges(HPROB hProb, double* ObjLoRange, double* ObjUpRange, |
| 266 |
double* RhsLoRange, double* RhsUpRange); |
| 267 |
SOLVAPI int SOLVCALL CoinGetSolutionBasis(HPROB hProb, int* ColStatus, int* RowStatus); |
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
SOLVAPI int SOLVCALL CoinReadFile(HPROB hProb, int FileType, const char* ReadFilename); |
| 272 |
SOLVAPI int SOLVCALL CoinWriteFile(HPROB hProb, int FileType, const char* WriteFilename); |
| 273 |
|
| 274 |
SOLVAPI int SOLVCALL CoinOpenLogFile(HPROB hProb, const char* LogFilename); |
| 275 |
SOLVAPI int SOLVCALL CoinCloseLogFile(HPROB hProb); |
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
SOLVAPI int SOLVCALL CoinGetOptionCount(HPROB hProb); |
| 280 |
SOLVAPI int SOLVCALL CoinLocateOptionID(HPROB hProb, int OptionID); |
| 281 |
SOLVAPI int SOLVCALL CoinLocateOptionName(HPROB hProb, const char* OptionName); |
| 282 |
|
| 283 |
SOLVAPI int SOLVCALL CoinGetOptionID(HPROB hProb, int OptionNr); |
| 284 |
SOLVAPI int SOLVCALL CoinGetOptionInfo(HPROB hProb, int OptionNr, int* OptionID, int* GroupType, int* OptionType); |
| 285 |
SOLVAPI int SOLVCALL CoinGetIntOptionMinMax(HPROB hProb, int OptionNr, int* MinValue, int* MaxValue); |
| 286 |
SOLVAPI int SOLVCALL CoinGetRealOptionMinMax(HPROB hProb, int OptionNr, double* MinValue, double* MaxValue); |
| 287 |
SOLVAPI int SOLVCALL CoinGetOptionNamesBuf(HPROB hProb, int OptionNr, char* OptionName, char* ShortName, int buflen); |
| 288 |
|
| 289 |
|
| 290 |
SOLVAPI int SOLVCALL CoinGetOptionGroup(HPROB hProb, int OptionID); |
| 291 |
SOLVAPI int SOLVCALL CoinGetOptionType(HPROB hProb, int OptionID); |
| 292 |
|
| 293 |
SOLVAPI int SOLVCALL CoinGetIntOptionDefaultValue(HPROB hProb, int OptionID); |
| 294 |
SOLVAPI int SOLVCALL CoinGetIntOptionMinValue(HPROB hProb, int OptionID); |
| 295 |
SOLVAPI int SOLVCALL CoinGetIntOptionMaxValue(HPROB hProb, int OptionID); |
| 296 |
|
| 297 |
SOLVAPI double SOLVCALL CoinGetRealOptionDefaultValue(HPROB hProb, int OptionID); |
| 298 |
SOLVAPI double SOLVCALL CoinGetRealOptionMinValue(HPROB hProb, int OptionID); |
| 299 |
SOLVAPI double SOLVCALL CoinGetRealOptionMaxValue(HPROB hProb, int OptionID); |
| 300 |
|
| 301 |
SOLVAPI const char* SOLVCALL CoinGetOptionName(HPROB hProb, int OptionID); |
| 302 |
SOLVAPI int SOLVCALL CoinGetOptionNameBuf(HPROB hProb, int OptionID, char* OptionName, int buflen); |
| 303 |
SOLVAPI const char* SOLVCALL CoinGetOptionShortName(HPROB hProb, int OptionID); |
| 304 |
SOLVAPI int SOLVCALL CoinGetOptionShortNameBuf(HPROB hProb, int OptionID, char* ShortName, int buflen); |
| 305 |
|
| 306 |
|
| 307 |
SOLVAPI int SOLVCALL CoinGetOptionChanged(HPROB hProb, int OptionID); |
| 308 |
|
| 309 |
SOLVAPI int SOLVCALL CoinGetIntOption(HPROB hProb, int OptionID); |
| 310 |
SOLVAPI int SOLVCALL CoinSetIntOption(HPROB hProb, int OptionID, int IntValue); |
| 311 |
|
| 312 |
SOLVAPI double SOLVCALL CoinGetRealOption(HPROB hProb, int OptionID); |
| 313 |
SOLVAPI int SOLVCALL CoinSetRealOption(HPROB hProb, int OptionID, double RealValue); |
| 314 |
|
| 315 |
SOLVAPI const char* SOLVCALL CoinGetStringOption(HPROB hProb, int OptionID); |
| 316 |
SOLVAPI int SOLVCALL CoinGetStringOptionBuf(HPROB hProb, int OptionID, char* StringValue, int buflen); |
| 317 |
SOLVAPI int SOLVCALL CoinSetStringOption(HPROB hProb, int OptionID, const char* StringValue); |
| 318 |
|
| 319 |
|
| 320 |
#endif |
| 321 |
|
| 322 |
|
| 323 |
#if defined(SOLV_LINK_DLL) || defined(SOLV_LINK_DYN) |
| 324 |
|
| 325 |
int (SOLVCALL *CoinInitSolver)(const char* LicenseStr); |
| 326 |
int (SOLVCALL *CoinFreeSolver)(void); |
| 327 |
|
| 328 |
const char* (SOLVCALL *CoinGetSolverName)(void); |
| 329 |
int (SOLVCALL *CoinGetSolverNameBuf)(char* SolverName, int buflen); |
| 330 |
const char* (SOLVCALL *CoinGetVersionStr)(void); |
| 331 |
int (SOLVCALL *CoinGetVersionStrBuf)(char* VersionStr, int buflen); |
| 332 |
double (SOLVCALL *CoinGetVersion)(void); |
| 333 |
int (SOLVCALL *CoinGetFeatures)(void); |
| 334 |
int (SOLVCALL *CoinGetMethods)(void); |
| 335 |
double (SOLVCALL *CoinGetInfinity)(void); |
| 336 |
|
| 337 |
HPROB (SOLVCALL *CoinCreateProblem)(const char* ProblemName); |
| 338 |
|
| 339 |
int (SOLVCALL *CoinLoadMatrix)(HPROB hProb, |
| 340 |
int ColCount, int RowCount, int NZCount, int RangeCount, |
| 341 |
int ObjectSense, double ObjectConst, double* ObjectCoeffs, |
| 342 |
double* LowerBounds, double* UpperBounds, const char* RowType, |
| 343 |
double* RHSValues, double* RangeValues, int* MatrixBegin, |
| 344 |
int* MatrixCount, int* MatrixIndex, double* MatrixValues); |
| 345 |
|
| 346 |
int (SOLVCALL *CoinLoadNames)(HPROB hProb, char** ColNamesList, |
| 347 |
char** RowNamesList, const char* ObjectName); |
| 348 |
|
| 349 |
int (SOLVCALL *CoinLoadNamesBuf)(HPROB hProb, const char* ColNamesBuf, |
| 350 |
const char* RowNamesBuf, const char* ObjectName); |
| 351 |
|
| 352 |
int (SOLVCALL *CoinLoadProblem)(HPROB hProb, |
| 353 |
int ColCount, int RowCount, int NonZeroCount, int RangeCount, |
| 354 |
int ObjectSense, double ObjectConst, double* ObjectCoeffs, |
| 355 |
double* LowerBounds, double* UpperBounds, const char* RowType, |
| 356 |
double* RHSValues, double* RangeValues, int* MatrixBegin, |
| 357 |
int* MatrixCount, int* MatrixIndex, double* MatrixValues, |
| 358 |
char** ColNamesList, char** RowNamesList, const char* objName); |
| 359 |
|
| 360 |
int (SOLVCALL *CoinLoadProblemBuf)(HPROB hProb, |
| 361 |
int ColCount, int RowCount, int NonZeroCount, int RangeCount, |
| 362 |
int ObjectSense, double ObjectConst, double* ObjectCoeffs, |
| 363 |
double* LowerBounds, double* UpperBounds, char* RowType, |
| 364 |
double* RHSValues, double* RangeValues, int* MatrixBegin, |
| 365 |
int* MatrixCount, int* MatrixIndex, double* MatrixValues, |
| 366 |
const char* ColNamesBuf, const char* RowNamesBuf, const char* ObjectName); |
| 367 |
|
| 368 |
int (SOLVCALL *CoinLoadInitValues)(HPROB hProb, double* InitValues); |
| 369 |
|
| 370 |
int (SOLVCALL *CoinLoadInteger)(HPROB hProb, const char* ColumnType); |
| 371 |
|
| 372 |
int (SOLVCALL *CoinLoadPriority)(HPROB hProb, int PriorCount, int* PriorIndex, |
| 373 |
int* PriorValues, int* PriorBranch); |
| 374 |
|
| 375 |
int (SOLVCALL *CoinLoadSos)(HPROB hProb, int SosCount, int SosNZCount, |
| 376 |
int* SosType, int* SosPrior, int* SosBegin, |
| 377 |
int* SosIndex, double* SosRef); |
| 378 |
|
| 379 |
int (SOLVCALL *CoinLoadSemiCont)(HPROB hProb, int SemiCount, int* SemiIndex); |
| 380 |
|
| 381 |
int (SOLVCALL *CoinLoadQuadratic)(HPROB hProb, int* QuadBegin, int* QuadCount, |
| 382 |
int* QuadIndex, double* QuadValues); |
| 383 |
|
| 384 |
int (SOLVCALL *CoinLoadNonlinear)(HPROB hProb, int NlpTreeCount, int NlpLineCount, |
| 385 |
int* NlpBegin, int* NlpOper, int* NlpArg1, |
| 386 |
int* NlpArg2, int* NlpIndex1, int* NlpIndex2, |
| 387 |
double* NlpValue1, double* NlpValue2); |
| 388 |
|
| 389 |
int (SOLVCALL *CoinUnloadProblem)(HPROB hProb); |
| 390 |
|
| 391 |
int (SOLVCALL *CoinCheckProblem)(HPROB hProb); |
| 392 |
|
| 393 |
/* int (SOLVCALL *CoinSetLoadNamesType)(HPROB hProb, int LoadNamesType); */ |
| 394 |
|
| 395 |
const char* (SOLVCALL *CoinGetProblemName)(HPROB hProb); |
| 396 |
int (SOLVCALL *CoinGetProblemNameBuf)(HPROB hProb, char* ProblemName, int buflen); |
| 397 |
|
| 398 |
int (SOLVCALL *CoinGetColCount)(HPROB hProb); |
| 399 |
int (SOLVCALL *CoinGetRowCount)(HPROB hProb); |
| 400 |
|
| 401 |
const char* (SOLVCALL *CoinGetColName)(HPROB hProb, int col); |
| 402 |
int (SOLVCALL *CoinGetColNameBuf)(HPROB hProb, int col, char* ColName, int buflen); |
| 403 |
const char* (SOLVCALL *CoinGetRowName)(HPROB hProb, int row); |
| 404 |
int (SOLVCALL *CoinGetRowNameBuf)(HPROB hProb, int row, char* RowName, int buflen); |
| 405 |
|
| 406 |
int (SOLVCALL *CoinRegisterMsgLogCallback)(HPROB hProb, COIN_MSGLOG_CB MsgLogCB, void* UserParam); |
| 407 |
int (SOLVCALL *CoinRegisterLPIterCallback)(HPROB hProb, COIN_LPITER_CB LPIterCB, void* UserParam); |
| 408 |
int (SOLVCALL *CoinRegisterMipNodeCallback)(HPROB hProb, COIN_MIPNODE_CB MipNodeCB, void* UserParam); |
| 409 |
|
| 410 |
/* Depreciated, use CoinRegisterXxxCallback instead */ |
| 411 |
int (SOLVCALL *CoinSetMsgLogCallback)(HPROB hProb, MSGLOGCALLBACK MsgLogCallback); |
| 412 |
int (SOLVCALL *CoinSetIterCallback)(HPROB hProb, ITERCALLBACK IterCallback); |
| 413 |
int (SOLVCALL *CoinSetMipNodeCallback)(HPROB hProb, MIPNODECALLBACK MipNodeCallback); |
| 414 |
|
| 415 |
int (SOLVCALL *CoinOptimizeProblem)(HPROB hProb, int Method); |
| 416 |
|
| 417 |
int (SOLVCALL *CoinGetSolutionStatus)(HPROB hProb); |
| 418 |
const char* (SOLVCALL *CoinGetSolutionText)(HPROB hProb); |
| 419 |
int (SOLVCALL *CoinGetSolutionTextBuf)(HPROB hProb, char* SolutionText, int buflen); |
| 420 |
|
| 421 |
double (SOLVCALL *CoinGetObjectValue)(HPROB hProb); |
| 422 |
double (SOLVCALL *CoinGetMipBestBound)(HPROB hProb); |
| 423 |
|
| 424 |
int (SOLVCALL *CoinGetIterCount)(HPROB hProb); |
| 425 |
int (SOLVCALL *CoinGetMipNodeCount)(HPROB hProb); |
| 426 |
|
| 427 |
int (SOLVCALL *CoinGetSolutionValues)(HPROB hProb, double* Activity, double* ReducedCost, |
| 428 |
double* SlackValues, double* ShadowPrice); |
| 429 |
int (SOLVCALL *CoinGetSolutionRanges)(HPROB hProb, double* ObjLoRange, double* ObjUpRange, |
| 430 |
double* RhsLoRange, double* RhsUpRange); |
| 431 |
int (SOLVCALL *CoinGetSolutionBasis)(HPROB hProb, int* ColStatus, int* RowStatus); |
| 432 |
|
| 433 |
|
| 434 |
int (SOLVCALL *CoinReadFile)(HPROB hProb, int FileType, const char* ReadFilename); |
| 435 |
int (SOLVCALL *CoinWriteFile)(HPROB hProb, int FileType, const char* WriteFilename); |
| 436 |
|
| 437 |
int (SOLVCALL *CoinOpenLogFile)(HPROB hProb, const char* LogFilename); |
| 438 |
int (SOLVCALL *CoinCloseLogFile)(HPROB hProb); |
| 439 |
|
| 440 |
|
| 441 |
int (SOLVCALL *CoinGetOptionCount)(HPROB hProb); |
| 442 |
int (SOLVCALL *CoinLocateOptionID)(HPROB hProb, int OptionID); |
| 443 |
int (SOLVCALL *CoinLocateOptionName)(HPROB hProb, const char* OptionName); |
| 444 |
|
| 445 |
int (SOLVCALL *CoinGetOptionID)(HPROB hProb, int OptionNr); |
| 446 |
int (SOLVCALL *CoinGetOptionInfo)(HPROB hProb, int OptionNr, int* OptionID, int* GroupType, int* OptionType); |
| 447 |
int (SOLVCALL *CoinGetIntOptionMinMax)(HPROB hProb, int OptionNr, int* MinValue, int* MaxValue); |
| 448 |
int (SOLVCALL *CoinGetRealOptionMinMax)(HPROB hProb, int OptionNr, double* MinValue, double* MaxValue); |
| 449 |
int (SOLVCALL *CoinGetOptionNames)(HPROB hProb, int OptionNr, char* OptionName, char* ShortName, int buflen); |
| 450 |
|
| 451 |
|
| 452 |
int (SOLVCALL *CoinGetOptionGroup)(HPROB hProb, int OptionID); |
| 453 |
int (SOLVCALL *CoinGetOptionType)(HPROB hProb, int OptionID); |
| 454 |
|
| 455 |
int (SOLVCALL *CoinGetIntOptionDefaultValue)(HPROB hProb, int OptionID); |
| 456 |
int (SOLVCALL *CoinGetIntOptionMinValue)(HPROB hProb, int OptionID); |
| 457 |
int (SOLVCALL *CoinGetIntOptionMaxValue)(HPROB hProb, int OptionID); |
| 458 |
|
| 459 |
double (SOLVCALL *CoinGetRealOptionDefaultValue)(HPROB hProb, int OptionID); |
| 460 |
double (SOLVCALL *CoinGetRealOptionMinValue)(HPROB hProb, int OptionID); |
| 461 |
double (SOLVCALL *CoinGetRealOptionMaxValue)(HPROB hProb, int OptionID); |
| 462 |
|
| 463 |
const char* (SOLVCALL *CoinGetOptionName)(HPROB hProb, int OptionID); |
| 464 |
int (SOLVCALL *CoinGetOptionNameBuf)(HPROB hProb, int OptionID, char* OptionName, int buflen); |
| 465 |
const char* (SOLVCALL *CoinGetOptionShortName)(HPROB hProb, int OptionID); |
| 466 |
int (SOLVCALL *CoinGetOptionShortNameBuf)(HPROB hProb, int OptionID, char* ShortName, int buflen); |
| 467 |
|
| 468 |
|
| 469 |
int (SOLVCALL *CoinGetOptionChanged)(HPROB hProb, int OptionID); |
| 470 |
|
| 471 |
int (SOLVCALL *CoinGetIntOption)(HPROB hProb, int OptionID); |
| 472 |
int (SOLVCALL *CoinSetIntOption)(HPROB hProb, int OptionID, int IntValue); |
| 473 |
|
| 474 |
double (SOLVCALL *CoinGetRealOption)(HPROB hProb, int OptionID); |
| 475 |
int (SOLVCALL *CoinSetRealOption)(HPROB hProb, int OptionID, double RealValue); |
| 476 |
|
| 477 |
const char* (SOLVCALL *CoinGetStringOption)(HPROB hProb, int OptionID); |
| 478 |
int (SOLVCALL *CoinGetStringOptionBuf)(HPROB hProb, int OptionID, char* StringValue, int buflen); |
| 479 |
int (SOLVCALL *CoinSetStringOption)(HPROB hProb, int OptionID, const char* StringValue); |
| 480 |
|
| 481 |
#endif |
| 482 |
|
| 483 |
#ifdef __cplusplus |
| 484 |
} |
| 485 |
#endif |
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
#define COIN_INT_SOLVEMETHOD 1 |
| 490 |
#define COIN_INT_PRESOLVETYPE 2 |
| 491 |
#define COIN_INT_SCALING 3 |
| 492 |
#define COIN_INT_PERTURBATION 4 |
| 493 |
#define COIN_INT_PRIMALPIVOTALG 5 |
| 494 |
#define COIN_INT_DUALPIVOTALG 6 |
| 495 |
#define COIN_INT_LOGLEVEL 7 |
| 496 |
#define COIN_INT_MAXITER 8 |
| 497 |
#define COIN_INT_CRASHIND 9 |
| 498 |
#define COIN_INT_CRASHPIVOT 10 |
| 499 |
#define COIN_REAL_CRASHGAP 11 |
| 500 |
#define COIN_REAL_PRIMALOBJLIM 12 |
| 501 |
#define COIN_REAL_DUALOBJLIM 13 |
| 502 |
#define COIN_REAL_PRIMALOBJTOL 14 |
| 503 |
#define COIN_REAL_DUALOBJTOL 15 |
| 504 |
#define COIN_REAL_MAXSECONDS 16 |
| 505 |
|
| 506 |
#define COIN_INT_MIPMAXNODES 17 |
| 507 |
#define COIN_INT_MIPMAXSOL 18 |
| 508 |
#define COIN_REAL_MIPMAXSEC 19 |
| 509 |
|
| 510 |
#define COIN_INT_MIPFATHOMDISC 20 |
| 511 |
#define COIN_INT_MIPHOTSTART 21 |
| 512 |
/* #define COIN_INT_MIPFORCEPRIOR 21 */ |
| 513 |
#define COIN_INT_MIPMINIMUMDROP 22 |
| 514 |
#define COIN_INT_MIPMAXCUTPASS 23 |
| 515 |
#define COIN_INT_MIPMAXPASSROOT 24 |
| 516 |
#define COIN_INT_MIPSTRONGBRANCH 25 |
| 517 |
#define COIN_INT_MIPSCANGLOBCUTS 26 |
| 518 |
|
| 519 |
#define COIN_REAL_MIPINTTOL 30 |
| 520 |
#define COIN_REAL_MIPINFWEIGHT 31 |
| 521 |
#define COIN_REAL_MIPCUTOFF 32 |
| 522 |
#define COIN_REAL_MIPABSGAP 33 |
| 523 |
#define COIN_REAL_MIPFRACGAP 34 |
| 524 |
|
| 525 |
#define COIN_INT_MIPCUT_PROBING 110 |
| 526 |
#define COIN_INT_MIPPROBE_FREQ 111 |
| 527 |
#define COIN_INT_MIPPROBE_MODE 112 |
| 528 |
#define COIN_INT_MIPPROBE_USEOBJ 113 |
| 529 |
#define COIN_INT_MIPPROBE_MAXPASS 114 |
| 530 |
#define COIN_INT_MIPPROBE_MAXPROBE 115 |
| 531 |
#define COIN_INT_MIPPROBE_MAXLOOK 116 |
| 532 |
#define COIN_INT_MIPPROBE_ROWCUTS 117 |
| 533 |
|
| 534 |
#define COIN_INT_MIPCUT_GOMORY 120 |
| 535 |
#define COIN_INT_MIPGOMORY_FREQ 121 |
| 536 |
#define COIN_INT_MIPGOMORY_LIMIT 122 |
| 537 |
#define COIN_REAL_MIPGOMORY_AWAY 123 |
| 538 |
|
| 539 |
|
| 540 |
#define COIN_INT_MIPCUT_KNAPSACK 130 |
| 541 |
#define COIN_INT_MIPKNAPSACK_FREQ 131 |
| 542 |
#define COIN_INT_MIPKNAPSACK_MAXIN 132 |
| 543 |
|
| 544 |
#define COIN_INT_MIPCUT_ODDHOLE 140 |
| 545 |
#define COIN_INT_MIPODDHOLE_FREQ 141 |
| 546 |
#define COIN_REAL_MIPODDHOLE_MINVIOL 142 |
| 547 |
#define COIN_REAL_MIPODDHOLE_MINVIOLPER 143 |
| 548 |
#define COIN_INT_MIPODDHOLE_MAXENTRIES 144 |
| 549 |
|
| 550 |
#define COIN_INT_MIPCUT_CLIQUE 150 |
| 551 |
#define COIN_INT_MIPCLIQUE_FREQ 151 |
| 552 |
#define COIN_INT_MIPCLIQUE_PACKING 152 |
| 553 |
#define COIN_INT_MIPCLIQUE_STAR 153 |
| 554 |
#define COIN_INT_MIPCLIQUE_STARMETHOD 154 |
| 555 |
#define COIN_INT_MIPCLIQUE_STARMAXLEN 155 |
| 556 |
#define COIN_INT_MIPCLIQUE_STARREPORT 156 |
| 557 |
#define COIN_INT_MIPCLIQUE_ROW 157 |
| 558 |
#define COIN_INT_MIPCLIQUE_ROWMAXLEN 158 |
| 559 |
#define COIN_INT_MIPCLIQUE_ROWREPORT 159 |
| 560 |
#define COIN_REAL_MIPCLIQUE_MINVIOL 160 |
| 561 |
|
| 562 |
#define COIN_INT_MIPCUT_LIFTPROJECT 170 |
| 563 |
#define COIN_INT_MIPLIFTPRO_FREQ 171 |
| 564 |
#define COIN_INT_MIPLIFTPRO_BETAONE 172 |
| 565 |
|
| 566 |
#define COIN_INT_MIPCUT_SIMPROUND 180 |
| 567 |
#define COIN_INT_MIPSIMPROUND_FREQ 181 |
| 568 |
|
| 569 |
#define COIN_INT_MIPUSECBCMAIN 200 |
| 570 |
|
| 571 |
|
| 572 |
#endif /* _COINMP_H_ */ |