SCIPgetVarCopy

Function SCIPgetVarCopy 

Source
pub unsafe extern "C" fn SCIPgetVarCopy(
    sourcescip: *mut SCIP,
    targetscip: *mut SCIP,
    sourcevar: *mut SCIP_VAR,
    targetvar: *mut *mut SCIP_VAR,
    varmap: *mut SCIP_HASHMAP,
    consmap: *mut SCIP_HASHMAP,
    global: c_uint,
    success: *mut c_uint,
) -> SCIP_RETCODE
Expand description

returns copy of the source variable; if there already is a copy of the source variable in the variable hash map, it is just returned as target variable; otherwise, if the variables it not marked as relaxation-only, a new variable will be created and added to the target SCIP; this created variable is added to the variable hash map and returned as target variable; relaxation-only variables are not copied and FALSE is returned in *success

@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 @note if a new variable was created, this variable will be added to the target-SCIP, but it is not captured

@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 - \ref SCIP_STAGE_TRANSFORMED - \ref SCIP_STAGE_INITPRESOLVE - \ref SCIP_STAGE_PRESOLVING - \ref SCIP_STAGE_EXITPRESOLVE - \ref SCIP_STAGE_SOLVING

@note targetscip stage does not get changed

@note sourcescip stage does not get changed

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