Function highs_sys::Highs_passModel
source · [−]pub unsafe extern "C" fn Highs_passModel(
highs: *mut c_void,
num_col: HighsInt,
num_row: HighsInt,
num_nz: HighsInt,
q_num_nz: HighsInt,
a_format: HighsInt,
q_format: HighsInt,
sense: HighsInt,
offset: f64,
col_cost: *const f64,
col_lower: *const f64,
col_upper: *const f64,
row_lower: *const f64,
row_upper: *const f64,
a_start: *const HighsInt,
a_index: *const HighsInt,
a_value: *const f64,
q_start: *const HighsInt,
q_index: *const HighsInt,
q_value: *const f64,
integrality: *const HighsInt
) -> HighsIntExpand description
Pass a model to HiGHS in a single function call. This is faster than
constructing the model using Highs_addRow and Highs_addCol.
@param highs a pointer to the Highs instance
@param num_col the number of columns
@param num_row the number of rows
@param num_nz the number of elements in the constraint matrix
@param q_num_nz the number of elements in the Hessian matrix
@param a_format the format of the constraint matrix to use in th form of a
kHighsMatrixFormat constant
@param q_format the format of the Hessian matrix to use in the form of a
kHighsHessianFormat constant
@param sense the optimization sense in the form of a kHighsObjSense
constant
@param offset the constant term in the objective function
@param col_cost array of length [num_col] with the objective coefficients
@param col_lower array of length [num_col] with the lower column bounds
@param col_upper array of length [num_col] with the upper column bounds
@param row_lower array of length [num_row] with the upper row bounds
@param row_upper array of length [num_row] with the upper row bounds
@param a_start the constraint matrix is provided to HiGHS in compressed
sparse column form (if a_format is
kHighsMatrixFormatColwise, otherwise compressed sparse
row form). The sparse matrix consists of three arrays,
a_start, a_index, and a_value. a_start is an array
of length [num_col] containing the starting index of each
column in a_index. If a_format is
kHighsMatrixFormatRowwise the array is of length
[num_row] corresponding to each row.
@param a_index array of length [num_nz] with indices of matrix entries
@param a_value array of length [num_nz] with values of matrix entries
@param q_start the Hessian matrix is provided in the same format as the
constraint matrix, using q_start, q_index, and
q_value in the place of a_start, a_index, and
a_value. If the model is linear, pass NULL.
@param q_index array of length [q_num_nz] with indices of matrix entries.
If the model is linear, pass NULL.
@param q_value array of length [q_num_nz] with values of matrix entries.
If the model is linear, pass NULL.
@param integrality an array of length [num_col] containing a kHighsVarType
consatnt for each column
@returns a kHighsStatus constant indicating whether the call succeeded