Purpose
Used for setting the type of a splinctr.
Synopsis
spsettype(c: splinctr, type: string)
Arguments
c
|
stochastic linear constraint
|
type
|
type of c
XSP_GLOBAL
|
set c as global constraint
|
|
Example
declarations
Z: spvar
Prob: splinctr
end-declarations
Z is_binary
spsetstage(Z,T) ! associating Z to last stage
Prob:=Z<=0.5
spsettype(Prob,XSP_GLOBAL) ! internally expanded as
! sum(s in 1..S) P(s).Z(s)<=0.5,
! i.e., Pr{event corresponding to Z=1}<=0.5
Further information
1. Global constraints are useful for modeling chance constraints.
2. Global constraints consist of variable terms across all scenrios, weighted by probabilities of the scenarios.
3. Global constraints are simply ignored in Expected Value problems.
4. Global constraints are simply ignored in an instance of the problem in a scenario or at a node in a scenario tree.
5. Global constraints cannot contain fixed variables.
6. Stochastic constraints can also be of type sos_1 and sos_2.
7. Stochastic variables can be of type is_binary, is_integer, or is_free.
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.