Skip to main content

SCIPaddConsUpgrade

Function SCIPaddConsUpgrade 

Source
pub unsafe extern "C" fn SCIPaddConsUpgrade(
    scip: *mut SCIP,
    oldcons: *mut SCIP_CONS,
    newcons: *mut *mut SCIP_CONS,
) -> SCIP_RETCODE
Expand description

adds constraint to the problem and upgrades conflict in the conflict store; if oldcons is valid globally, newcons is added to the global problem; otherwise it is added to the local subproblem of the current node

@note must only be called once for both constraints

@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_TRANSFORMED - \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 this method will release the upgraded constraint