SCIPparseVarsLinearsumExact

Function SCIPparseVarsLinearsumExact 

Source
pub unsafe extern "C" fn SCIPparseVarsLinearsumExact(
    scip: *mut SCIP,
    str_: *mut c_char,
    vars: *mut *mut SCIP_VAR,
    vals: *mut *mut SCIP_RATIONAL,
    nvars: *mut c_int,
    varssize: c_int,
    requiredsize: *mut c_int,
    endptr: *mut *mut c_char,
    success: *mut c_uint,
) -> SCIP_RETCODE
Expand description

parse the given string as linear sum of variables and coefficients (c1 <x1> + c2 <x2> + … + cn <xn>) (see SCIPwriteVarsLinearsum() ); if it was successful, the pointer success is set to TRUE

@return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref SCIP_Retcode “SCIP_RETCODE” for a complete list of error codes.

@pre This method can be called if @p scip is in one of the following stages: - \ref SCIP_STAGE_PROBLEM - \ref SCIP_STAGE_TRANSFORMING - \ref SCIP_STAGE_INITPRESOLVE - \ref SCIP_STAGE_PRESOLVING - \ref SCIP_STAGE_EXITPRESOLVE - \ref SCIP_STAGE_PRESOLVED - \ref SCIP_STAGE_SOLVING

@note The pointer success in only set to FALSE in the case that a variable with a parsed variable name does not exist.

@note If the number of (parsed) variables is greater than the available slots in the variable array, nothing happens except that the required size is stored in the corresponding integer; the reason for this approach is that we cannot reallocate memory, since we do not know how the memory has been allocated (e.g., by a C++ ‘new’ or SCIP memory functions).