78 d->
highs = Highs_create();
85 Highs_destroy(d->
highs);
90 void casadi_highs_work(
const casadi_highs_prob<T1>* p, casadi_int* sz_arg, casadi_int* sz_res, casadi_int* sz_iw, casadi_int* sz_w) {
91 casadi_qp_work(p->
qp, sz_arg, sz_res, sz_iw, sz_w);
96 void casadi_highs_init(
casadi_highs_data<T1>* d,
const T1*** arg, T1*** res, casadi_int** iw, T1** w) {
106 template<
typename T1>
107 int casadi_highs_solve(
casadi_highs_data<T1>* d,
const double** arg,
double** res, casadi_int* iw,
double* w) {
116 const int matrix_format = 1;
118 const double offset = 0.0;
121 matrix_format, matrix_format, sense, offset,
127 if (!(status==kHighsStatusOk || status==kHighsStatusWarning))
return 1;
130 status = Highs_run(d->
highs);
132 if (!(status==kHighsStatusOk || status==kHighsStatusWarning))
return 1;
138 casadi_scal(p_qp->
nx, -1., d_qp->
lam_x);
141 casadi_scal(p_qp->
na, -1., d_qp->
lam_a);
145 *d_qp->
f = Highs_getObjectiveValue(d->
highs);
148 status = Highs_getModelStatus(d->
highs);
150 d_qp->
success = status==kHighsModelStatusOptimal;
152 if (status==kHighsModelStatusOptimal)
155 if (status==kHighsModelStatusTimeLimit
156 || status==kHighsModelStatusIterationLimit)
165 if (Highs_getIntInfoValue(d->
highs,
"basis_validity", &d->
basis_validity)!=kHighsStatusOk)
return 1;
166 if (Highs_getDoubleInfoValue(d->
highs,
"mip_dual_bound", &d->
mip_dual_bound)!=kHighsStatusOk)
return 1;
167 if (Highs_getDoubleInfoValue(d->
highs,
"mip_gap", &d->
mip_gap)!=kHighsStatusOk)
return 1;
casadi_qp_data< T1 > * qp
T1 max_primal_infeasibility
int num_primal_infeasibilities
int simplex_iteration_count
T1 sum_primal_infeasibilities
int num_dual_infeasibilities
T1 sum_dual_infeasibilities
const casadi_highs_prob< T1 > * prob
int primal_solution_status
T1 max_dual_infeasibility
int crossover_iteration_count
const casadi_qp_prob< T1 > * qp
UnifiedReturnStatus unified_return_status