|
23 | 23 | // |
24 | 24 | #include "lp_data/HighsCallbackStruct.h" |
25 | 25 |
|
26 | | -const HighsInt kHighsMaximumStringLength = 512; |
27 | | - |
28 | | -const HighsInt kHighsStatusError = -1; |
29 | | -const HighsInt kHighsStatusOk = 0; |
30 | | -const HighsInt kHighsStatusWarning = 1; |
31 | | - |
32 | | -const HighsInt kHighsVarTypeContinuous = 0; |
33 | | -const HighsInt kHighsVarTypeInteger = 1; |
34 | | -const HighsInt kHighsVarTypeSemiContinuous = 2; |
35 | | -const HighsInt kHighsVarTypeSemiInteger = 3; |
36 | | -const HighsInt kHighsVarTypeImplicitInteger = 4; |
37 | | - |
38 | | -const HighsInt kHighsOptionTypeBool = 0; |
39 | | -const HighsInt kHighsOptionTypeInt = 1; |
40 | | -const HighsInt kHighsOptionTypeDouble = 2; |
41 | | -const HighsInt kHighsOptionTypeString = 3; |
42 | | - |
43 | | -const HighsInt kHighsInfoTypeInt64 = -1; |
44 | | -const HighsInt kHighsInfoTypeInt = 1; |
45 | | -const HighsInt kHighsInfoTypeDouble = 2; |
46 | | - |
47 | | -const HighsInt kHighsObjSenseMinimize = 1; |
48 | | -const HighsInt kHighsObjSenseMaximize = -1; |
49 | | - |
50 | | -const HighsInt kHighsMatrixFormatColwise = 1; |
51 | | -const HighsInt kHighsMatrixFormatRowwise = 2; |
52 | | - |
53 | | -const HighsInt kHighsHessianFormatTriangular = 1; |
54 | | -const HighsInt kHighsHessianFormatSquare = 2; |
55 | | - |
56 | | -const HighsInt kHighsSolutionStatusNone = 0; |
57 | | -const HighsInt kHighsSolutionStatusInfeasible = 1; |
58 | | -const HighsInt kHighsSolutionStatusFeasible = 2; |
59 | | - |
60 | | -const HighsInt kHighsBasisValidityInvalid = 0; |
61 | | -const HighsInt kHighsBasisValidityValid = 1; |
62 | | - |
63 | | -const HighsInt kHighsPresolveStatusNotPresolved = -1; |
64 | | -const HighsInt kHighsPresolveStatusNotReduced = 0; |
65 | | -const HighsInt kHighsPresolveStatusInfeasible = 1; |
66 | | -const HighsInt kHighsPresolveStatusUnboundedOrInfeasible = 2; |
67 | | -const HighsInt kHighsPresolveStatusReduced = 3; |
68 | | -const HighsInt kHighsPresolveStatusReducedToEmpty = 4; |
69 | | -const HighsInt kHighsPresolveStatusTimeout = 5; |
70 | | -const HighsInt kHighsPresolveStatusNullError = 6; |
71 | | -const HighsInt kHighsPresolveStatusOptionsError = 7; |
72 | | -const HighsInt kHighsPresolveStatusOutOfMemory = 8; |
73 | | - |
74 | | -const HighsInt kHighsModelStatusNotset = 0; |
75 | | -const HighsInt kHighsModelStatusLoadError = 1; |
76 | | -const HighsInt kHighsModelStatusModelError = 2; |
77 | | -const HighsInt kHighsModelStatusPresolveError = 3; |
78 | | -const HighsInt kHighsModelStatusSolveError = 4; |
79 | | -const HighsInt kHighsModelStatusPostsolveError = 5; |
80 | | -const HighsInt kHighsModelStatusModelEmpty = 6; |
81 | | -const HighsInt kHighsModelStatusOptimal = 7; |
82 | | -const HighsInt kHighsModelStatusInfeasible = 8; |
83 | | -const HighsInt kHighsModelStatusUnboundedOrInfeasible = 9; |
84 | | -const HighsInt kHighsModelStatusUnbounded = 10; |
85 | | -const HighsInt kHighsModelStatusObjectiveBound = 11; |
86 | | -const HighsInt kHighsModelStatusObjectiveTarget = 12; |
87 | | -const HighsInt kHighsModelStatusTimeLimit = 13; |
88 | | -const HighsInt kHighsModelStatusIterationLimit = 14; |
89 | | -const HighsInt kHighsModelStatusUnknown = 15; |
90 | | -const HighsInt kHighsModelStatusSolutionLimit = 16; |
91 | | -const HighsInt kHighsModelStatusInterrupt = 17; |
92 | | - |
93 | | -const HighsInt kHighsBasisStatusLower = 0; |
94 | | -const HighsInt kHighsBasisStatusBasic = 1; |
95 | | -const HighsInt kHighsBasisStatusUpper = 2; |
96 | | -const HighsInt kHighsBasisStatusZero = 3; |
97 | | -const HighsInt kHighsBasisStatusNonbasic = 4; |
98 | | - |
99 | | -const HighsInt kHighsCallbackLogging = 0; |
100 | | -const HighsInt kHighsCallbackSimplexInterrupt = 1; |
101 | | -const HighsInt kHighsCallbackIpmInterrupt = 2; |
102 | | -const HighsInt kHighsCallbackMipSolution = 3; |
103 | | -const HighsInt kHighsCallbackMipImprovingSolution = 4; |
104 | | -const HighsInt kHighsCallbackMipLogging = 5; |
105 | | -const HighsInt kHighsCallbackMipInterrupt = 6; |
106 | | -const HighsInt kHighsCallbackMipGetCutPool = 7; |
107 | | -const HighsInt kHighsCallbackMipDefineLazyConstraints = 8; |
108 | | -const HighsInt kHighsCallbackCallbackMipUserSolution = 9; |
109 | | - |
110 | | -const char* const kHighsCallbackDataOutLogTypeName = "log_type"; |
111 | | -const char* const kHighsCallbackDataOutRunningTimeName = "running_time"; |
112 | | -const char* const kHighsCallbackDataOutSimplexIterationCountName = |
| 26 | +static const HighsInt kHighsMaximumStringLength = 512; |
| 27 | + |
| 28 | +static const HighsInt kHighsStatusError = -1; |
| 29 | +static const HighsInt kHighsStatusOk = 0; |
| 30 | +static const HighsInt kHighsStatusWarning = 1; |
| 31 | + |
| 32 | +static const HighsInt kHighsVarTypeContinuous = 0; |
| 33 | +static const HighsInt kHighsVarTypeInteger = 1; |
| 34 | +static const HighsInt kHighsVarTypeSemiContinuous = 2; |
| 35 | +static const HighsInt kHighsVarTypeSemiInteger = 3; |
| 36 | +static const HighsInt kHighsVarTypeImplicitInteger = 4; |
| 37 | + |
| 38 | +static const HighsInt kHighsOptionTypeBool = 0; |
| 39 | +static const HighsInt kHighsOptionTypeInt = 1; |
| 40 | +static const HighsInt kHighsOptionTypeDouble = 2; |
| 41 | +static const HighsInt kHighsOptionTypeString = 3; |
| 42 | + |
| 43 | +static const HighsInt kHighsInfoTypeInt64 = -1; |
| 44 | +static const HighsInt kHighsInfoTypeInt = 1; |
| 45 | +static const HighsInt kHighsInfoTypeDouble = 2; |
| 46 | + |
| 47 | +static const HighsInt kHighsObjSenseMinimize = 1; |
| 48 | +static const HighsInt kHighsObjSenseMaximize = -1; |
| 49 | + |
| 50 | +static const HighsInt kHighsMatrixFormatColwise = 1; |
| 51 | +static const HighsInt kHighsMatrixFormatRowwise = 2; |
| 52 | + |
| 53 | +static const HighsInt kHighsHessianFormatTriangular = 1; |
| 54 | +static const HighsInt kHighsHessianFormatSquare = 2; |
| 55 | + |
| 56 | +static const HighsInt kHighsSolutionStatusNone = 0; |
| 57 | +static const HighsInt kHighsSolutionStatusInfeasible = 1; |
| 58 | +static const HighsInt kHighsSolutionStatusFeasible = 2; |
| 59 | + |
| 60 | +static const HighsInt kHighsBasisValidityInvalid = 0; |
| 61 | +static const HighsInt kHighsBasisValidityValid = 1; |
| 62 | + |
| 63 | +static const HighsInt kHighsPresolveStatusNotPresolved = -1; |
| 64 | +static const HighsInt kHighsPresolveStatusNotReduced = 0; |
| 65 | +static const HighsInt kHighsPresolveStatusInfeasible = 1; |
| 66 | +static const HighsInt kHighsPresolveStatusUnboundedOrInfeasible = 2; |
| 67 | +static const HighsInt kHighsPresolveStatusReduced = 3; |
| 68 | +static const HighsInt kHighsPresolveStatusReducedToEmpty = 4; |
| 69 | +static const HighsInt kHighsPresolveStatusTimeout = 5; |
| 70 | +static const HighsInt kHighsPresolveStatusNullError = 6; |
| 71 | +static const HighsInt kHighsPresolveStatusOptionsError = 7; |
| 72 | +static const HighsInt kHighsPresolveStatusOutOfMemory = 8; |
| 73 | + |
| 74 | +static const HighsInt kHighsModelStatusNotset = 0; |
| 75 | +static const HighsInt kHighsModelStatusLoadError = 1; |
| 76 | +static const HighsInt kHighsModelStatusModelError = 2; |
| 77 | +static const HighsInt kHighsModelStatusPresolveError = 3; |
| 78 | +static const HighsInt kHighsModelStatusSolveError = 4; |
| 79 | +static const HighsInt kHighsModelStatusPostsolveError = 5; |
| 80 | +static const HighsInt kHighsModelStatusModelEmpty = 6; |
| 81 | +static const HighsInt kHighsModelStatusOptimal = 7; |
| 82 | +static const HighsInt kHighsModelStatusInfeasible = 8; |
| 83 | +static const HighsInt kHighsModelStatusUnboundedOrInfeasible = 9; |
| 84 | +static const HighsInt kHighsModelStatusUnbounded = 10; |
| 85 | +static const HighsInt kHighsModelStatusObjectiveBound = 11; |
| 86 | +static const HighsInt kHighsModelStatusObjectiveTarget = 12; |
| 87 | +static const HighsInt kHighsModelStatusTimeLimit = 13; |
| 88 | +static const HighsInt kHighsModelStatusIterationLimit = 14; |
| 89 | +static const HighsInt kHighsModelStatusUnknown = 15; |
| 90 | +static const HighsInt kHighsModelStatusSolutionLimit = 16; |
| 91 | +static const HighsInt kHighsModelStatusInterrupt = 17; |
| 92 | + |
| 93 | +static const HighsInt kHighsBasisStatusLower = 0; |
| 94 | +static const HighsInt kHighsBasisStatusBasic = 1; |
| 95 | +static const HighsInt kHighsBasisStatusUpper = 2; |
| 96 | +static const HighsInt kHighsBasisStatusZero = 3; |
| 97 | +static const HighsInt kHighsBasisStatusNonbasic = 4; |
| 98 | + |
| 99 | +static const HighsInt kHighsCallbackLogging = 0; |
| 100 | +static const HighsInt kHighsCallbackSimplexInterrupt = 1; |
| 101 | +static const HighsInt kHighsCallbackIpmInterrupt = 2; |
| 102 | +static const HighsInt kHighsCallbackMipSolution = 3; |
| 103 | +static const HighsInt kHighsCallbackMipImprovingSolution = 4; |
| 104 | +static const HighsInt kHighsCallbackMipLogging = 5; |
| 105 | +static const HighsInt kHighsCallbackMipInterrupt = 6; |
| 106 | +static const HighsInt kHighsCallbackMipGetCutPool = 7; |
| 107 | +static const HighsInt kHighsCallbackMipDefineLazyConstraints = 8; |
| 108 | +static const HighsInt kHighsCallbackCallbackMipUserSolution = 9; |
| 109 | + |
| 110 | +static const char* const kHighsCallbackDataOutLogTypeName = "log_type"; |
| 111 | +static const char* const kHighsCallbackDataOutRunningTimeName = "running_time"; |
| 112 | +static const char* const kHighsCallbackDataOutSimplexIterationCountName = |
113 | 113 | "simplex_iteration_count"; |
114 | | -const char* const kHighsCallbackDataOutIpmIterationCountName = |
| 114 | +static const char* const kHighsCallbackDataOutIpmIterationCountName = |
115 | 115 | "ipm_iteration_count"; |
116 | | -const char* const kHighsCallbackDataOutPdlpIterationCountName = |
| 116 | +static const char* const kHighsCallbackDataOutPdlpIterationCountName = |
117 | 117 | "pdlp_iteration_count"; |
118 | | -const char* const kHighsCallbackDataOutObjectiveFunctionValueName = |
| 118 | +static const char* const kHighsCallbackDataOutObjectiveFunctionValueName = |
119 | 119 | "objective_function_value"; |
120 | | -const char* const kHighsCallbackDataOutMipNodeCountName = "mip_node_count"; |
121 | | -const char* const kHighsCallbackDataOutMipTotalLpIterationsName = |
| 120 | +static const char* const kHighsCallbackDataOutMipNodeCountName = "mip_node_count"; |
| 121 | +static const char* const kHighsCallbackDataOutMipTotalLpIterationsName = |
122 | 122 | "mip_total_lp_iterations"; |
123 | | -const char* const kHighsCallbackDataOutMipPrimalBoundName = "mip_primal_bound"; |
124 | | -const char* const kHighsCallbackDataOutMipDualBoundName = "mip_dual_bound"; |
125 | | -const char* const kHighsCallbackDataOutMipGapName = "mip_gap"; |
126 | | -const char* const kHighsCallbackDataOutMipSolutionName = "mip_solution"; |
127 | | -const char* const kHighsCallbackDataOutCutpoolNumColName = "cutpool_num_col"; |
128 | | -const char* const kHighsCallbackDataOutCutpoolNumCutName = "cutpool_num_cut"; |
129 | | -const char* const kHighsCallbackDataOutCutpoolNumNzName = "cutpool_num_nz"; |
130 | | -const char* const kHighsCallbackDataOutCutpoolStartName = "cutpool_start"; |
131 | | -const char* const kHighsCallbackDataOutCutpoolIndexName = "cutpool_index"; |
132 | | -const char* const kHighsCallbackDataOutCutpoolValueName = "cutpool_value"; |
133 | | -const char* const kHighsCallbackDataOutCutpoolLowerName = "cutpool_lower"; |
134 | | -const char* const kHighsCallbackDataOutCutpoolUpperName = "cutpool_upper"; |
| 123 | +static const char* const kHighsCallbackDataOutMipPrimalBoundName = "mip_primal_bound"; |
| 124 | +static const char* const kHighsCallbackDataOutMipDualBoundName = "mip_dual_bound"; |
| 125 | +static const char* const kHighsCallbackDataOutMipGapName = "mip_gap"; |
| 126 | +static const char* const kHighsCallbackDataOutMipSolutionName = "mip_solution"; |
| 127 | +static const char* const kHighsCallbackDataOutCutpoolNumColName = "cutpool_num_col"; |
| 128 | +static const char* const kHighsCallbackDataOutCutpoolNumCutName = "cutpool_num_cut"; |
| 129 | +static const char* const kHighsCallbackDataOutCutpoolNumNzName = "cutpool_num_nz"; |
| 130 | +static const char* const kHighsCallbackDataOutCutpoolStartName = "cutpool_start"; |
| 131 | +static const char* const kHighsCallbackDataOutCutpoolIndexName = "cutpool_index"; |
| 132 | +static const char* const kHighsCallbackDataOutCutpoolValueName = "cutpool_value"; |
| 133 | +static const char* const kHighsCallbackDataOutCutpoolLowerName = "cutpool_lower"; |
| 134 | +static const char* const kHighsCallbackDataOutCutpoolUpperName = "cutpool_upper"; |
135 | 135 |
|
136 | 136 | const HighsInt kHighsIisStrategyLight = 0; |
137 | 137 | const HighsInt kHighsIisStrategyFromLpRowPriority = 1; // WIP |
@@ -2527,13 +2527,13 @@ HighsInt Highs_repairCallbackSolution(HighsCallbackDataIn* data_in); |
2527 | 2527 | * |
2528 | 2528 | * @returns Thse HiGHS compilation date. |
2529 | 2529 | */ |
2530 | | -const char* Highs_compilationDate(void); |
| 2530 | +static const char* Highs_compilationDate(void); |
2531 | 2531 |
|
2532 | 2532 | // These are deprecated because they don't follow the style guide. Constants |
2533 | 2533 | // must begin with `k`. |
2534 | | -const HighsInt HighsStatuskError = -1; |
2535 | | -const HighsInt HighsStatuskOk = 0; |
2536 | | -const HighsInt HighsStatuskWarning = 1; |
| 2534 | +static const HighsInt HighsStatuskError = -1; |
| 2535 | +static const HighsInt HighsStatuskOk = 0; |
| 2536 | +static const HighsInt HighsStatuskWarning = 1; |
2537 | 2537 |
|
2538 | 2538 | HighsInt Highs_call(const HighsInt num_col, const HighsInt num_row, |
2539 | 2539 | const HighsInt num_nz, const double* col_cost, |
|
0 commit comments