SCIPcopyConss

Function SCIPcopyConss 

Source
pub unsafe extern "C" fn SCIPcopyConss(
    sourcescip: *mut SCIP,
    targetscip: *mut SCIP,
    varmap: *mut SCIP_HASHMAP,
    consmap: *mut SCIP_HASHMAP,
    global: c_uint,
    enablepricing: c_uint,
    valid: *mut c_uint,
) -> SCIP_RETCODE
Expand description

copies constraints from the source-SCIP and adds these to the target-SCIP; for mapping the variables between the source and the target SCIP a hash map can be given; if the variable hash map is NULL or necessary variable mapping is missing, the required variables are created in the target-SCIP and added to the hash map, if not NULL; all variables which are created are added to the target-SCIP but not (user) captured; if the constraint hash map is not NULL the mapping between the constraints of the source and target-SCIP is stored

*valid is set to TRUE iff all constraints that are marked as checked or enforced were copied successfully. If other constraints could not be copied, *valid can still be set to TRUE.

@note the constraints are added to the target-SCIP but are not (user) captured in the target SCIP. (If you mix SCIPgetConsCopy() with SCIPcopyConss() you should pay attention to what you add explicitly and what is already added.) You can check whether a constraint is added by calling SCIPconsIsAdded().

@note In a multi thread case, you need to lock the copying procedure from outside with a mutex. @note Do not change the source SCIP environment during the copying process

@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 sourcescip 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_SOLVED

@pre This method can be called if targetscip is in one of the following stages: - \ref SCIP_STAGE_PROBLEM

@note sourcescip stage does not get changed

@note targetscip stage does not get changed

See \ref SCIP_Stage “SCIP_STAGE” for a complete list of all possible solving stages.