* Constraints are enforced by separation, where cuts are generated by linearizing the (convex) nonlinear function on the left-hand-side of the constraint.
* Further, a linear outer-approximation (which includes new variables) based on Ben-Tal & Nemirovski or Glineur can be added.
* See also
*
* @par
* Timo Berthold and Stefan Heinz and Stefan Vigerske@n
* <a href="http://dx.doi.org/10.1007/978-1-4614-1927-3">Extending a CIP framework to solve MIQCPs</a>@n
* In: Jon Lee and Sven Leyffer (eds.),
* Mixed-integer nonlinear optimization: Algorithmic advances and applications,
* IMA volumes in Mathematics and its Applications, volume 154, 427-444, 2012.
*
* @par
* Aharon Ben-Tal and Arkadi Nemirovski@n
* On Polyhedral Approximations of the Second-order Cone@n
* Mathematics of Operations Research 26:2, 193-205, 2001
*
* @par
* François Glineur@n
* Computational experiments with a linear approximation of second order cone optimization@n
* Technical Report 2000:1, Faculté Polytechnique de Mons, Belgium
*/
/** creates and captures a second order cone constraint
*
* @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
*/
SCIP_EXPORT
SCIP_RETCODESCIPcreateConsSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS**cons,/**< pointer to hold the created constraint */
constchar*name,/**< name of constraint */
intnvars,/**< number of variables on left hand side of constraint (n) */
SCIP_VAR**vars,/**< array with variables on left hand side (x_i) */
SCIP_Real*coefs,/**< array with coefficients of left hand side variables (alpha_i), or NULL if all 1.0 */
SCIP_Real*offsets,/**< array with offsets of variables (beta_i), or NULL if all 0.0 */
SCIP_Realconstant,/**< constant on left hand side (gamma) */
SCIP_VAR*rhsvar,/**< variable on right hand side of constraint (x_{n+1}) */
SCIP_Realrhscoeff,/**< coefficient of variable on right hand side (alpha_{n+1}) */
SCIP_Realrhsoffset,/**< offset of variable on right hand side (beta_{n+1}) */
SCIP_Boolinitial,/**< should the LP relaxation of constraint be in the initial LP?
* Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
SCIP_Boolseparate,/**< should the constraint be separated during LP processing?
* Usually set to TRUE. */
SCIP_Boolenforce,/**< should the constraint be enforced during node processing?
* TRUE for model constraints, FALSE for additional, redundant constraints. */
SCIP_Boolcheck,/**< should the constraint be checked for feasibility?
* TRUE for model constraints, FALSE for additional, redundant constraints. */
SCIP_Boolpropagate,/**< should the constraint be propagated during node processing?
* Usually set to TRUE. */
SCIP_Boollocal,/**< is constraint only valid locally?
* Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
SCIP_Boolmodifiable,/**< is constraint modifiable (subject to column generation)?
* Usually set to FALSE. In column generation applications, set to TRUE if pricing
* adds coefficients to this constraint. */
SCIP_Booldynamic,/**< is constraint subject to aging?
* Usually set to FALSE. Set to TRUE for own cuts which
* are separated as constraints. */
SCIP_Boolremovable/**< should the relaxation be removed from the LP due to aging or cleanup?
* Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
);
/** creates and captures a second order cone constraint
* in its most basic variant, i. e., with all constraint flags set to their default values, which can be set
* afterwards using SCIPsetConsFLAGNAME() in scip.h
*
* @see SCIPcreateConsSOC() for the default constraint flag configuration
*
* @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
*/
SCIP_EXPORT
SCIP_RETCODESCIPcreateConsBasicSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS**cons,/**< pointer to hold the created constraint */
constchar*name,/**< name of constraint */
intnvars,/**< number of variables on left hand side of constraint (n) */
SCIP_VAR**vars,/**< array with variables on left hand side (x_i) */
SCIP_Real*coefs,/**< array with coefficients of left hand side variables (alpha_i), or NULL if all 1.0 */
SCIP_Real*offsets,/**< array with offsets of variables (beta_i), or NULL if all 0.0 */
SCIP_Realconstant,/**< constant on left hand side (gamma) */
SCIP_VAR*rhsvar,/**< variable on right hand side of constraint (x_{n+1}) */
SCIP_Realrhscoeff,/**< coefficient of variable on right hand side (alpha_{n+1}) */
SCIP_Realrhsoffset/**< offset of variable on right hand side (beta_{n+1}) */
);
/** Gets the SOC constraint as a nonlinear row representation.
*/
SCIP_EXPORT
SCIP_RETCODESCIPgetNlRowSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons,/**< constraint */
SCIP_NLROW**nlrow/**< pointer to store nonlinear row */
);
/** Gets the number of variables on the left hand side of a SOC constraint.
*/
SCIP_EXPORT
intSCIPgetNLhsVarsSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Gets the variables on the left hand side of a SOC constraint.
*/
SCIP_EXPORT
SCIP_VAR**SCIPgetLhsVarsSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Gets the coefficients of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 1.0.
*/
SCIP_EXPORT
SCIP_Real*SCIPgetLhsCoefsSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Gets the offsets of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 0.0.
*/
SCIP_EXPORT
SCIP_Real*SCIPgetLhsOffsetsSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Gets the constant on the left hand side of a SOC constraint.
*/
SCIP_EXPORT
SCIP_RealSCIPgetLhsConstantSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Gets the variable on the right hand side of a SOC constraint.
*/
SCIP_EXPORT
SCIP_VAR*SCIPgetRhsVarSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Gets the coefficient of the variable on the right hand side of a SOC constraint.
*/
SCIP_EXPORT
SCIP_RealSCIPgetRhsCoefSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Gets the offset of the variables on the right hand side of a SOC constraint.
*/
SCIP_EXPORT
SCIP_RealSCIPgetRhsOffsetSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons/**< constraint data */
);
/** Adds the constraint to an NLPI problem.
* Uses nonconvex formulation as quadratic function.
*/
SCIP_EXPORT
SCIP_RETCODESCIPaddToNlpiProblemSOC(
SCIP*scip,/**< SCIP data structure */
SCIP_CONS*cons,/**< SOC constraint */
SCIP_NLPI*nlpi,/**< interface to NLP solver */
SCIP_NLPIPROBLEM*nlpiprob,/**< NLPI problem where to add constraint */
SCIP_HASHMAP*scipvar2nlpivar,/**< mapping from SCIP variables to variable indices in NLPI */
SCIP_Boolnames/**< whether to pass constraint names to NLPI */