| 1 |
|
| 2 |
/* CoinOption.h */ |
| 3 |
|
| 4 |
|
| 5 |
#ifndef _COINOPTION_H_ |
| 6 |
#define _COINOPTION_H_ |
| 7 |
|
| 8 |
|
| 9 |
#if defined(_MSC_VER) && !defined(HAVE_CONFIG_H) |
| 10 |
#define SOLVCALL __stdcall |
| 11 |
#else |
| 12 |
#define SOLVCALL |
| 13 |
#endif |
| 14 |
|
| 15 |
|
| 16 |
#undef MAXINT |
| 17 |
#undef MAXREAL |
| 18 |
|
| 19 |
#define MAXINT 2100000000L |
| 20 |
#define MAXREAL COIN_DBL_MAX |
| 21 |
|
| 22 |
#define ROUND(x) (((x)>0)?((long)((x)+0.5)):((long)((x)-0.5))) |
| 23 |
|
| 24 |
|
| 25 |
#define OPT_NONE 0 |
| 26 |
#define OPT_ONOFF 1 |
| 27 |
#define OPT_LIST 2 |
| 28 |
#define OPT_INT 3 |
| 29 |
#define OPT_REAL 4 |
| 30 |
#define OPT_STRING 5 |
| 31 |
|
| 32 |
#define GRP_NONE 0 |
| 33 |
#define GRP_OTHER 0 |
| 34 |
|
| 35 |
#define GRP_SIMPLEX 1 |
| 36 |
#define GRP_PREPROC 2 |
| 37 |
#define GRP_LOGFILE 3 |
| 38 |
#define GRP_LIMITS 4 |
| 39 |
#define GRP_MIPSTRAT 5 |
| 40 |
#define GRP_MIPCUTS 6 |
| 41 |
#define GRP_MIPTOL 7 |
| 42 |
#define GRP_BARRIER 8 |
| 43 |
#define GRP_NETWORK 9 |
| 44 |
|
| 45 |
|
| 46 |
typedef int OPTINT; |
| 47 |
typedef double OPTVAL; |
| 48 |
|
| 49 |
typedef struct { |
| 50 |
char OptionName[32]; |
| 51 |
char ShortName[32]; |
| 52 |
int GroupType; |
| 53 |
OPTVAL DefaultValue; |
| 54 |
OPTVAL CurrentValue; |
| 55 |
OPTVAL MinValue; |
| 56 |
OPTVAL MaxValue; |
| 57 |
int OptionType; |
| 58 |
int changed; |
| 59 |
int OptionID; |
| 60 |
} SOLVOPTINFO, *PSOLVOPT; |
| 61 |
|
| 62 |
|
| 63 |
typedef PSOLVOPT OPTIONTABLE; |
| 64 |
|
| 65 |
|
| 66 |
typedef struct { |
| 67 |
int OptionCount; |
| 68 |
int OptionCopy; |
| 69 |
OPTIONTABLE OptionTable; |
| 70 |
|
| 71 |
} OPTIONINFO, *POPTION; |
| 72 |
|
| 73 |
|
| 74 |
#ifdef __cplusplus |
| 75 |
extern "C" { |
| 76 |
#endif |
| 77 |
|
| 78 |
|
| 79 |
POPTION coinCreateOptionObject(void); |
| 80 |
|
| 81 |
void coinClearOptionObject(POPTION pOption); |
| 82 |
|
| 83 |
void coinSetOptionTable(POPTION pOption, OPTIONTABLE OptionTable, int OptionCount); |
| 84 |
void coinCopyOptionTable(POPTION pOption, OPTIONTABLE OptionTable, int OptionCount); |
| 85 |
|
| 86 |
int coinGetOptionCount(POPTION pOption); |
| 87 |
int coinGetOptionID(POPTION pOption, int OptionNr); |
| 88 |
int coinLocateOptionID(POPTION pOption, int OptionID); |
| 89 |
|
| 90 |
int coinGetOptionType(POPTION pOption, int OptionID); |
| 91 |
int coinGetOptionGroup(POPTION pOption, int OptionID); |
| 92 |
|
| 93 |
int coinLocateOptionName(POPTION pOption, const char* OptionName); |
| 94 |
const char* coinGetOptionName(POPTION pOption, int OptionID); |
| 95 |
int coinGetOptionNameBuf(POPTION pOption, int OptionID, char* OptionName, int buflen); |
| 96 |
const char* coinGetOptionShortName(POPTION pOption, int OptionNr); |
| 97 |
int coinGetOptionShortNameBuf(POPTION pOption, int OptionNr, char* ShortName, int buflen); |
| 98 |
|
| 99 |
int coinGetIntOptionDefaultValue(POPTION pOption, int OptionID); |
| 100 |
int coinGetIntOptionMinValue(POPTION pOption, int OptionID); |
| 101 |
int coinGetIntOptionMaxValue(POPTION pOption, int OptionID); |
| 102 |
|
| 103 |
double coinGetRealOptionDefaultValue(POPTION pOption, int OptionID); |
| 104 |
double coinGetRealOptionMinValue(POPTION pOption, int OptionID); |
| 105 |
double coinGetRealOptionMaxValue(POPTION pOption, int OptionID); |
| 106 |
|
| 107 |
int coinGetOptionChanged(POPTION pOption, int OptionID); |
| 108 |
|
| 109 |
int coinGetIntOption(POPTION pOption, int OptionID); |
| 110 |
int coinSetIntOption(POPTION pOption, int OptionID, int IntValue); |
| 111 |
|
| 112 |
double coinGetRealOption(POPTION pOption, int OptionID); |
| 113 |
int coinSetRealOption(POPTION pOption, int OptionID, double RealValue); |
| 114 |
|
| 115 |
#ifdef __cplusplus |
| 116 |
} |
| 117 |
#endif |
| 118 |
|
| 119 |
|
| 120 |
#endif /* _COINOPTION_H_ */ |
| 121 |
|