Download Dimple User Manual MATLAB Interface

Transcript
5.2.5
Real
A Real variable represents a variable that takes values on the real line, or on a contiguous
subset of the real line. The Real class corresponds to either a single Real variable or a
multidimensional array of Real variables. All properties/methods can either be called for
all elements in the collection or for individual elements of the collection.
5.2.5.1
Constructor
Real ([ domain ] , [ dimensions ])
All arguments are optional and can be used in any combination.
• domain specifies a bound on the domain of the variable. It can either be specified
as a two-element array or a RealDomain object (see section 5.2.10). If specified as
an array, the first element is the lower bound and the second element is the upper
bound. -Inf and Inf are allowed values for the lower or upper bound, respectively. If
no domain is specified, then a domain from −∞ to ∞ is assumed.
• dimensions specify the array dimensions. The behavior of the list of dimensions is
identical to that for Discrete variables as described in section 5.2.3.1.2.
Examples:
• Real() specifies a scalar real variable with an unbounded domain.
• Real(4,1) specifies a 4x1 vector of real variables with unbounded domain.
• Real([-1 1]) specifies a scalar real variable with domain from -1 to 1.
• Real([-Inf 0], 4, 10, 2) specifies a 4x10x2 array of real variables, each with the domain
from negative infinity to zero.
• Real(RealDomain(-pi, pi)) specifies a scalar real variable with domain from −π to π.
5.2.5.2
5.2.5.2.1
Properties
Belief
Read-only. The behavior of this property for Real variables is solver specific. Some solvers
do not support this property at all and will return an error when read. See section 5.6 for
more detail on each of the supported solvers.
131