Infinite Domains

A technical manual for infinite domains in InfiniteOpt. See the respective guide for more information.

Domain Types

InfiniteOpt.IntervalDomainType
IntervalDomain <: InfiniteScalarDomain

A DataType that stores the lower and upper interval bounds for infinite parameters that are continuous over a certain that interval. This is for use with a IndependentParameter.

Fields

  • lower_bound::Float64 Lower bound of the infinite parameter.
  • upper_bound::Float64 Upper bound of the infinite parameter.
source
InfiniteOpt.UniDistributionDomainType
UniDistributionDomain{T <: Distributions.UnivariateDistribution} <: InfiniteScalarDomain

A DataType that stores the distribution characterizing an infinite parameter that is random. This is for use with a IndependentParameter.

Fields

  • distribution::T Distribution of the random parameter.
source
InfiniteOpt.MultiDistributionDomainType
MultiDistributionDomain{T <: NonUnivariateDistribution} <: InfiniteArrayDomain

A DataType that stores the distribution characterizing a collection of infinite parameters that follows its form. This is for use with DependentParameters.

Fields

  • distribution::T Distribution of the random parameters.
source
InfiniteOpt.CollectionDomainType
CollectionDomain{T <: InfiniteScalarDomain} <: InfiniteArrayDomain

A DataType that stores a collection of InfiniteScalarDomains characterizing a collection of infinite parameters that follows its form. This is for use with DependentParameters.

Fields

  • domains::Array{T} The collection of scalar domains.
source

Domain Methods

InfiniteOpt.collection_domainsFunction
collection_domains(domain::AbstractInfiniteDomain)

Return the array of domains associated with a CollectionDomain. Error if the input domain is not a CollectionDomain.

source
JuMP.has_lower_boundMethod
JuMP.has_lower_bound(domain::AbstractInfiniteDomain)::Bool

Return Bool indicating if domain has a lower bound that can be determined. This should be extended for user-defined infinite domains. It defaults to false for unrecognized domain types.

Example

julia> domain = InfiniteDomain(0, 1);

julia> has_lower_bound(domain)
true
source
JuMP.lower_boundMethod
JuMP.lower_bound(domain::AbstractInfiniteDomain)::Union{Real, Vector{<:Real}}

Return the lower bound of domain if one exists. This should be extended for user-defined infinite domains if appropriate. Errors if JuMP.has_lower_bound returns false. Extensions are enabled by JuMP.has_lower_bound(domain) and JuMP.lower_bound(domain).

Example

julia> domain = InfiniteDomain(0, 1);

julia> lower_bound(domain)
0.0
source
JuMP.set_lower_boundMethod
JuMP.set_lower_bound(domain::AbstractInfiniteDomain,
                     lower::Union{Real, Vector{<:Real}})::AbstractInfiniteDomain

Set and return the lower bound of domain if such an operation makes sense. Errors if the type of domain does not support this operation or has not been extended. User-defined domain types should extend this if appropriate.

Example

julia> domain = InfiniteDomain(0, 1);

julia> set_lower_bound(domain, 0.5)
[0.5, 1]
source
JuMP.has_upper_boundMethod
JuMP.has_upper_bound(domain::AbstractInfiniteDomain)::Bool

Return Bool indicating if domain has a upper bound that can be determined. This should be extended for user-defined infinite domains. It defaults to false for unrecognized domain types.

Example

julia> domain = InfiniteDomain(0, 1);

julia> has_upper_bound(domain)
true
source
JuMP.upper_boundMethod
JuMP.upper_bound(domain::AbstractInfiniteDomain)::Union{Real, Vector{<:Real}}

Return the upper bound of domain if one exists. This should be extended for user-defined infinite domains if appropriate. Errors if JuMP.has_upper_bound returns false. Extensions are enabled by JuMP.has_upper_bound(domain) and JuMP.upper_bound(domain).

Example

julia> domain = InfiniteDomain(0, 1);

julia> upper_bound(domain)
1.0
source
JuMP.set_upper_boundMethod
JuMP.set_upper_bound(domain::AbstractInfiniteDomain,
                     upper::Real)::AbstractInfiniteDomain

Set and return the upper bound of domain if such an aoperation makes sense. Errors if the type of domain does not support this operation or has not been extended. User-defined domain types should extend this if appropriate.

Example

julia> domain = InfiniteDomain(0, 1);

julia> set_upper_bound(domain, 0.5)
[0, 0.5]
source

Support Point Labels

InfiniteOpt.AbstractSupportLabelType
AbstractSupportLabel

An abstract type for support label types. These are used to distinguish different kinds of supports that are added to infinite parameters.

source
InfiniteOpt.AllType
All <: AbstractSupportLabel

This support label is unique in that it isn't associated with a particular set of supports, but rather is used used to indicate that all supports should be used.

source
InfiniteOpt.PublicLabelType
PublicLabel <: AbstractSupportLabel

An abstract type used to denote that labels that should be given to the user by default.

source
InfiniteOpt.UserDefinedType
UserDefined <: PublicLabel

A support label for supports that are supplied by the user directly to an infinite parameter.

source
InfiniteOpt.UniformGridType
UniformGrid <: PublicLabel

A support label for supports that are generated uniformly accross a given interval.

source
InfiniteOpt.SampleLabelType
SampleLabel <: PublicLabel

An abstract type for labels of supports that are generated via some sampling technique.

source
InfiniteOpt.MCSampleType
MCSample <: SampleLabel

A support label for supports that are generated via Monte Carlo Sampling.

source
InfiniteOpt.WeightedSampleType
WeightedSample <: SampleLabel

A support label for supports that are generated by sampling from a statistical distribution.

source
InfiniteOpt.MixtureType
Mixture <: PublicLabel

A support label for multi-dimensional supports that are generated from a variety of methods.

source
InfiniteOpt.UniqueMeasureType
UniqueMeasure{S::Symbol} <: PublicLabel

A support label for supports that are provided from the DiscreteMeasureData associated with a measure where a unique label is generated to distinguish those supports. This is done by invoking generate_unique_label.

source
InfiniteOpt.MeasureBoundType
MeasureBound <: PublicLabel

A support label for supports that are generated using the upper and lower bounds for FunctionalDiscreteMeasureData.

source
InfiniteOpt.InternalLabelType
InternalLabel <: AbstractSupportLabel

An abstract type for support labels that are associated with supports that should not be reported to the user by default.

source

Support Point Methods

InfiniteOpt.supports_in_domainFunction
supports_in_domain(supports::Union{Real, Vector{<:Real}, Array{<:Real, 2}},
                domain::AbstractInfiniteDomain)::Bool

Used to check if supports are in the domain of domain. Returns true if supports are in domain of domain and returns false otherwise. This is primarily an internal method for performing checks but can be extended for user-defined domain types. Extending this is optional, but recommended where possible. Note by fallback, this returns true for unrecognized domain types such that an error won't be thrown.

source
InfiniteOpt.generate_supportsFunction
generate_supports(domain::AbstractInfiniteDomain
                  [method::Type{<:AbstractSupportLabel}];
                  [num_supports::Int = DefaultNumSupports,
                  sig_digits::Int = DefaultSigDigits]
                  )::Tuple{Array{<:Real}, DataType}

Generate num_supports support values with sig_digits significant digits in accordance with domain and return them along with the correct generation label(s). IntervalDomains generate supports uniformly with label UniformGrid and distribution domains generate them randomly accordingly to the underlying distribution. Moreover, method indicates the generation method that should be used. These methods correspond to parameter support labels. Current labels that can be used as generation methods include (but may not be defined for certain domain types):

  • MCSample: Uniformly distributed Monte Carlo samples.
  • WeightedSample: Monte Carlo samples that are weighted by an underlying PDF.
  • UniformGrid: Samples that are generated uniformly over the domain.

Extensions that employ user-defined infinite domain types and/or methods should extend generate_support_values to enable this. Errors if the domain type and /or methods are unrecognized. This is intended as an internal method to be used by methods such as generate_and_add_supports!.

source
InfiniteOpt.generate_support_valuesFunction
generate_support_values(domain::AbstractInfiniteDomain,
                        [method::Type{MyMethod} = MyMethod];
                        [num_supports::Int = DefaultNumSupports,
                        sig_digits::Int = DefaultSigDigits]
                        )::Tuple{Array{<:Real}, Symbol}

A multiple dispatch method for generate_supports. This will return a tuple where the first element are the supports and the second is their label. This can be extended for user-defined infinite domains and/or generation methods. When defining a new domain type the default method dispatch should make method an optional argument (making it the default). Otherwise, other method dispatches for a given domain must ensure that method is positional argument without a default value (contrary to the definition above). Note that the method must be a subtype of either PublicLabel or InternalLabel.

source