|
18 | 18 | // Highs_mipCall or Highs_qpCall, and these methods return the |
19 | 19 | // appropriate solution information |
20 | 20 | // |
21 | | -// For sophisticated applications, where esoteric solutiuon |
| 21 | +// For sophisticated applications, where esoteric solution |
22 | 22 | // information is needed, or if a sequence of modified models need to |
23 | 23 | // be solved, use the Highs_create method to generate a pointer to an |
24 | 24 | // instance of the C++ Highs class, and then use any of a large number |
@@ -120,6 +120,8 @@ const char* const kHighsCallbackDataOutPdlpIterationCountName = |
120 | 120 | const char* const kHighsCallbackDataOutObjectiveFunctionValueName = |
121 | 121 | "objective_function_value"; |
122 | 122 | const char* const kHighsCallbackDataOutMipNodeCountName = "mip_node_count"; |
| 123 | +const char* const kHighsCallbackDataOutMipTotalLpIterationsName = |
| 124 | + "mip_total_lp_iterations"; |
123 | 125 | const char* const kHighsCallbackDataOutMipPrimalBoundName = "mip_primal_bound"; |
124 | 126 | const char* const kHighsCallbackDataOutMipDualBoundName = "mip_dual_bound"; |
125 | 127 | const char* const kHighsCallbackDataOutMipGapName = "mip_gap"; |
@@ -227,11 +229,14 @@ HighsInt Highs_mipCall(const HighsInt num_col, const HighsInt num_row, |
227 | 229 | * @param q_format The format of the Hessian matrix in the form of a |
228 | 230 | * `kHighsHessianStatus` constant. If q_num_nz > 0, this must |
229 | 231 | * be `kHighsHessianFormatTriangular`. |
230 | | - * @param q_start The Hessian matrix is provided in the same format as the |
231 | | - * constraint matrix, using `q_start`, `q_index`, and `q_value` |
232 | | - * in the place of `a_start`, `a_index`, and `a_value`. |
| 232 | + * @param q_start The Hessian matrix is provided to HiGHS as the lower |
| 233 | + * triangular component in compressed sparse column form |
| 234 | + * (or, equivalently, as the upper triangular component |
| 235 | + * in compressed sparse row form). The sparse matrix consists |
| 236 | + * of three arrays, `q_start`, `q_index`, and `q_value`. |
| 237 | + * `q_start` is an array of length [num_col]. |
233 | 238 | * @param q_index An array of length [q_num_nz] with indices of matrix |
234 | | - * sentries. |
| 239 | + * entries. |
235 | 240 | * @param q_value An array of length [q_num_nz] with values of matrix entries. |
236 | 241 | * |
237 | 242 | * @returns A `kHighsStatus` constant indicating whether the call succeeded. |
@@ -496,10 +501,13 @@ HighsInt Highs_passMip(void* highs, const HighsInt num_col, |
496 | 501 | * @param a_index An array of length [num_nz] with indices of matrix |
497 | 502 | * entries. |
498 | 503 | * @param a_value An array of length [num_nz] with values of matrix entries. |
499 | | - * @param q_start The Hessian matrix is provided in the same format as the |
500 | | - * constraint matrix, using `q_start`, `q_index`, and |
501 | | - * `q_value` in the place of `a_start`, `a_index`, and |
502 | | - * `a_value`. If the model is linear, pass NULL. |
| 504 | + * @param q_start The Hessian matrix is provided to HiGHS as the lower |
| 505 | + * triangular component in compressed sparse column form |
| 506 | + * (or, equivalently, as the upper triangular component |
| 507 | + * in compressed sparse row form). The sparse matrix consists |
| 508 | + * of three arrays, `q_start`, `q_index`, and `q_value`. |
| 509 | + * `q_start` is an array of length [num_col]. If the model |
| 510 | + * is linear, pass NULL. |
503 | 511 | * @param q_index An array of length [q_num_nz] with indices of matrix |
504 | 512 | * entries. If the model is linear, pass NULL. |
505 | 513 | * @param q_value An array of length [q_num_nz] with values of matrix |
@@ -529,11 +537,16 @@ HighsInt Highs_passModel(void* highs, const HighsInt num_col, |
529 | 537 | * @param num_nz The number of non-zero elements in the Hessian matrix. |
530 | 538 | * @param format The format of the Hessian matrix as a `kHighsHessianFormat` |
531 | 539 | * constant. This must be `kHighsHessianFormatTriangular`. |
532 | | - * @param start The Hessian matrix is provided to HiGHS as the upper |
533 | | - * triangular component in compressed sparse column form. The |
534 | | - * sparse matrix consists of three arrays, `start`, `index`, |
535 | | - * and `value`. `start` is an array of length [num_col] |
536 | | - * containing the starting index of each column in `index`. |
| 540 | + * @param start The Hessian matrix is provided to HiGHS as the lower |
| 541 | + * triangular component in compressed sparse column form |
| 542 | + * (or, equivalently, as the upper triangular component |
| 543 | + * in compressed sparse row form), using `q_start`, `q_index`, |
| 544 | + * and `q_value`.The Hessian matrix is provided to HiGHS as the |
| 545 | + * lower triangular component in compressed sparse column form. |
| 546 | + * The sparse matrix consists of three arrays, `start`, |
| 547 | + * `index`, and `value`. `start` is an array of length |
| 548 | + * [num_col] containing the starting index of each column in |
| 549 | + * `index`. |
537 | 550 | * @param index An array of length [num_nz] with indices of matrix entries. |
538 | 551 | * @param value An array of length [num_nz] with values of matrix entries. |
539 | 552 | * |
@@ -568,6 +581,16 @@ HighsInt Highs_passRowName(const void* highs, const HighsInt row, |
568 | 581 | HighsInt Highs_passColName(const void* highs, const HighsInt col, |
569 | 582 | const char* name); |
570 | 583 |
|
| 584 | +/** |
| 585 | + * Pass the name of the model. |
| 586 | + * |
| 587 | + * @param highs A pointer to the Highs instance. |
| 588 | + * @param name The name of the model. |
| 589 | + * |
| 590 | + * @returns A `kHighsStatus` constant indicating whether the call succeeded. |
| 591 | + */ |
| 592 | +HighsInt Highs_passModelName(const void* highs, const char* name); |
| 593 | + |
571 | 594 | /** |
572 | 595 | * Read the option values from file. |
573 | 596 | * |
@@ -1137,6 +1160,19 @@ HighsInt Highs_setSolution(void* highs, const double* col_value, |
1137 | 1160 | const double* row_value, const double* col_dual, |
1138 | 1161 | const double* row_dual); |
1139 | 1162 |
|
| 1163 | +/** |
| 1164 | + * Set a partial primal solution by passing values for a set of variables |
| 1165 | + * |
| 1166 | + * @param highs A pointer to the Highs instance. |
| 1167 | + * @param num_entries Number of variables in the set |
| 1168 | + * @param index Indices of variables in the set |
| 1169 | + * @param value Values of variables in the set |
| 1170 | + * |
| 1171 | + * @returns A `kHighsStatus` constant indicating whether the call succeeded. |
| 1172 | + */ |
| 1173 | +HighsInt Highs_setSparseSolution(void* highs, const HighsInt num_entries, |
| 1174 | + const HighsInt* index, const double* value); |
| 1175 | + |
1140 | 1176 | /** |
1141 | 1177 | * Set the callback method to use for HiGHS |
1142 | 1178 | * |
@@ -2149,6 +2185,38 @@ HighsInt Highs_getRanging( |
2149 | 2185 | double* row_bound_dn_value, double* row_bound_dn_objective, |
2150 | 2186 | HighsInt* row_bound_dn_in_var, HighsInt* row_bound_dn_ou_var); |
2151 | 2187 |
|
| 2188 | +/** |
| 2189 | + * Compute the solution corresponding to a (possibly weighted) sum of |
| 2190 | + * (allowable) infeasibilities in an LP/MIP. |
| 2191 | + * |
| 2192 | + * If local penalties are not defined, pass NULL, and the global |
| 2193 | + * penalty will be used. Negative penalty values imply that the bound |
| 2194 | + * or RHS value cannot be violated |
| 2195 | + * |
| 2196 | + * @param highs A pointer to the Highs instance. |
| 2197 | + * @param const double global_lower_penalty The penalty for violating lower |
| 2198 | + * bounds on variables |
| 2199 | + * @param const double global_upper_penalty The penalty for violating upper |
| 2200 | + * bounds on variables |
| 2201 | + * @param const double global_rhs_penalty The penalty for violating constraint |
| 2202 | + * RHS values |
| 2203 | + * @param const double* local_lower_penalty The penalties for violating specific |
| 2204 | + * lower bounds on variables |
| 2205 | + * @param const double* local_upper_penalty The penalties for violating specific |
| 2206 | + * upper bounds on variables |
| 2207 | + * @param const double* local_rhs_penalty The penalties for violating specific |
| 2208 | + * constraint RHS values |
| 2209 | + * @returns A `kHighsStatus` constant indicating whether the call succeeded. |
| 2210 | + */ |
| 2211 | + |
| 2212 | +HighsInt Highs_feasibilityRelaxation(void* highs, |
| 2213 | + const double global_lower_penalty, |
| 2214 | + const double global_upper_penalty, |
| 2215 | + const double global_rhs_penalty, |
| 2216 | + const double* local_lower_penalty, |
| 2217 | + const double* local_upper_penalty, |
| 2218 | + const double* local_rhs_penalty); |
| 2219 | + |
2152 | 2220 | /** |
2153 | 2221 | * Releases all resources held by the global scheduler instance. |
2154 | 2222 | * |
|
0 commit comments