SCIPcreateCons

Function SCIPcreateCons 

Source
pub unsafe extern "C" fn SCIPcreateCons(
    scip: *mut SCIP,
    cons: *mut *mut SCIP_CONS,
    name: *const c_char,
    conshdlr: *mut SCIP_CONSHDLR,
    consdata: *mut SCIP_CONSDATA,
    initial: c_uint,
    separate: c_uint,
    enforce: c_uint,
    check: c_uint,
    propagate: c_uint,
    local: c_uint,
    modifiable: c_uint,
    dynamic: c_uint,
    removable: c_uint,
    stickingatnode: c_uint,
) -> SCIP_RETCODE
Expand description

creates and captures a constraint of the given constraint handler

@warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution may be declared feasible even if it violates this particular constraint. This constellation should only be used, if no LP or pseudo solution can violate the constraint – e.g. if a local constraint is redundant due to the variable’s local bounds.

@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_INITSOLVE - \ref SCIP_STAGE_SOLVING - \ref SCIP_STAGE_EXITSOLVE

@note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()