Results
A technical manual for querying optimized InfiniteOpt
models. See the respective guide for more information.
Statuses
JuMP.termination_status
— MethodJuMP.termination_status(model::InfiniteModel)
Extend JuMP.termination_status
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.raw_status
— MethodJuMP.raw_status(model::InfiniteModel)
Extend JuMP.raw_status
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.primal_status
— MethodJuMP.primal_status(model::InfiniteModel; result::Int = 1)
Extend JuMP.primal_status
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't be solved. Accepts keyword result
to access the solution index of interest (if the solver/backend supports multiple solutions).
JuMP.dual_status
— MethodJuMP.dual_status(model::InfiniteModel; result::Int = 1)
Extend JuMP.dual_status
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't be solved. Accepts keyword result
to access the solution index of interest (if the solver/backend supports multiple solutions).
JuMP.is_solved_and_feasible
— MethodJuMP.is_solved_and_feasible(
model::InfiniteModel;
[dual::Bool = false,
allow_local::Bool = true,
allow_almost::Bool = false,
result::Int = 1]
)::Bool
Extend JuMP.is_solved_and_feasible
) for model
. See the JuMP docs details. For new transformation backend types, this relies on JuMP.termination_status
, JuMP.primal_status
, and JuMP.dual_status
.
General
JuMP.solve_time
— MethodJuMP.solve_time(model::InfiniteModel)
Extend JuMP.solve_time
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.relative_gap
— MethodJuMP.relative_gap(model::InfiniteModel)
Extend JuMP.relative_gap
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.simplex_iterations
— MethodJuMP.simplex_iterations(model::InfiniteModel)
Extend JuMP.simplex_iterations
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.barrier_iterations
— MethodJuMP.barrier_iterations(model::InfiniteModel)
Extend JuMP.barrier_iterations
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.node_count
— MethodJuMP.node_count(model::InfiniteModel)
Extend JuMP.node_count
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.result_count
— MethodJuMP.result_count(model::InfiniteModel)
Extend JuMP.result_count
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
Objective
JuMP.objective_bound
— MethodJuMP.objective_bound(model::InfiniteModel)
Extend JuMP.objective_bound
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't been solved.
JuMP.objective_value
— MethodJuMP.objective_value(model::InfiniteModel; result::Int = 1)
Extend JuMP.objective_value
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't be solved. Accepts keyword result
to access the solution index of interest (if the solver/backend supports multiple solutions).
JuMP.dual_objective_value
— MethodJuMP.dual_objective_value(model::InfiniteModel; result::Int = 1)
Extend JuMP.dual_objective_value
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't be solved. Accepts keyword result
to access the solution index of interest (if the solver/backend supports multiple solutions).
Variables
JuMP.has_values
— MethodJuMP.has_values(model::InfiniteModel; result::Int = 1)
Extend JuMP.has_values
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't be solved. Accepts keyword result
to access the solution index of interest (if the solver/backend supports multiple solutions).
JuMP.value
— MethodJuMP.value(vref::GeneralVariableRef; [kwargs...])
Extend JuMP.value
to return the value(s) of vref
in accordance with its reformulation variable(s) stored in the transformation backend. Use JuMP.has_values
to check whether a result exists before checking the values.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
result::Int = 1
: indexes the solution result to be queriedlabel::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the values are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the values, it may be helpful to also query the variable's parameter_refs
and supports
which will have a one-to-one correspondence with the value(s). It may also be helpful to query via transformation_variable
to retrieve the variables(s) that these values are based on. These functions should all be called with the same keyword arguments for consistency.
For extensions, this only works if transformation_variable
has been extended correctly and/or map_value
has been extended for variables.
Example
julia> value(z)
42.0
JuMP.reduced_cost
— MethodJuMP.reduced_cost(ref::GeneralVariableRef; [kwargs...])
Extend JuMP.reduced_cost
for ref
s in InfiniteModel. The exact format of output will depend on the transformation backend that is being used.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
label::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the values of infinite objects are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the values, it may be helpful to also query the parameter_refs
and supports
which will have a one-to-one correspondence with the output(s) of this function. These functions should all be called with the same keyword arguments for consistency.
JuMP.optimizer_index
— MethodJuMP.optimizer_index(ref::GeneralVariableRef; [kwargs...])
Extend JuMP.optimizer_index
for ref
s in InfiniteModel. The exact format of output will depend on the transformation backend that is being used.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
label::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the values of infinite objects are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the values, it may be helpful to also query the parameter_refs
and supports
which will have a one-to-one correspondence with the output(s) of this function. These functions should all be called with the same keyword arguments for consistency.
Constraints
JuMP.has_duals
— MethodJuMP.has_duals(model::InfiniteModel; result::Int = 1)
Extend JuMP.has_duals
for InfiniteModel
s in accordance with that reported by its transformation backend. Errors if such a query is not supported or if the transformation backend hasn't be solved. Accepts keyword result
to access the solution index of interest (if the solver/backend supports multiple solutions).
JuMP.value
— MethodJuMP.value(cref::InfOptConstraintRef; [kwargs...])
Extend JuMP.value
to return the value(s) of cref
in accordance with its reformulation constraint(s) stored in the transformation backend. Use JuMP.has_values
to check whether a result exists before checking the values.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
result::Int = 1
: indexes the solution result to be queriedlabel::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the values of infinite constraints are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the values, it may be helpful to also query the constraint's parameter_refs
and supports
which will have a one-to-one correspondence with the value(s). It may also be helpful to query via transformation_constraint
to retrieve the constraint(s) that these values are based on. These functions should all be called with the same keyword arguments for consistency.
For extensions, this only works if transformation_constraint
has been extended correctly and/or map_value
has been extended for constraints.
Example
julia> value(c1)
4-element Array{Float64,1}:
-0.0
20.9
20.9
20.9
JuMP.optimizer_index
— MethodJuMP.optimizer_index(ref::InfOptConstraintRef; [kwargs...])
Extend JuMP.optimizer_index
for ref
s in InfiniteModel. The exact format of output will depend on the transformation backend that is being used.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
label::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the values of infinite objects are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the values, it may be helpful to also query the parameter_refs
and supports
which will have a one-to-one correspondence with the output(s) of this function. These functions should all be called with the same keyword arguments for consistency.
JuMP.dual
— MethodJuMP.dual(cref::InfOptConstraintRef; [kwargs...])
Extend JuMP.dual
to return the dual(s) of cref
in accordance with its reformulation constraint(s) stored in the transformation backend. Use JuMP.has_duals
to check whether a result exists before checking the duals.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
result::Int = 1
: indexes the solution result to be queriedlabel::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the duals of infinite cosntraints are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the duals, it may be helpful to also query the constraint's parameter_refs
and supports
which will have a one-to-one correspondence with the value(s). It may also be helpful to query via transformation_constraint
to retrieve the constraint(s) that these values are based on. These functions should all be called with the same keyword arguments for consistency.
For extensions, this only works if transformation_constraint
has been extended correctly and/or map_dual
has been extended for constraints.
Example
julia> dual(c1)
4-element Array{Float64,1}:
-42.0
-42.0
32.3
0.0
JuMP.shadow_price
— MethodJuMP.shadow_price(ref::InfOptConstraintRef; [kwargs...])
Extend JuMP.shadow_price
for ref
s in InfiniteModel. The exact format of output will depend on the transformation backend that is being used.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
label::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the values of infinite objects are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the values, it may be helpful to also query the parameter_refs
and supports
which will have a one-to-one correspondence with the output(s) of this function. These functions should all be called with the same keyword arguments for consistency.
Expressions
JuMP.value
— MethodJuMP.value(expr::JuMP.AbstractJuMPScalar; [kwargs...])
Extend JuMP.value
to return the value(s) of vref
in accordance with its reformulation expression(s) stored in the transformation backend. Use JuMP.has_values
to check whether a result exists before checking the values.
Thw keyword arguments kwargs
depend on the transformation backend that is being used. The default backend TranscriptionOpt
uses the keyword arguments:
result::Int = 1
: indexes the solution result to be queriedlabel::Type{<:AbstractSupportLabel} = PublicLabel
: the label of supports to be returned
By default only the values associated with public supports (i.e., PublicLabel
s) are returned, the full set can be accessed via label = All
. Where possible, all the values of infinite expressions are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters they depend on.
To provide context for the values, it may be helpful to also query the expression's parameter_refs
and supports
which will have a one-to-one correspondence with the value(s). It may also be helpful to query via transformation_expression
to retrieve the expression(s) that these values are based on. These functions should all be called with the same keyword arguments for consistency.
For extensions, this only works if transformation_expression
has been extended correctly and/or map_value
has been extended for expressions.
Example
julia> value(my_finite_expr)
23.34
julia> value(my_infinite_expr)
4-element Array{Float64,1}:
-0.0
20.9
20.9
20.9
LP Sensitivity
JuMP.lp_sensitivity_report
— MethodJuMP.lp_sensitivity_report(
model::InfiniteModel;
[atol::Float64 = 1e-8]
)::InfOptSensitivityReport
Extends JuMP.lp_sensitivity_report
to generate and return an LP sensitivity report in accordance with the transformation backend. See InfOptSensitivityReport
for syntax details on how to query it. atol
denotes the optimality tolerance and should match that used by the solver to compute the basis. Please refer to JuMP
's documentation for more technical information on interpretting the output of the report.
Example
julia> report = lp_sensitivity_report(model);
julia> report[x]
(0.0, 0.5)
InfiniteOpt.InfOptSensitivityReport
— TypeInfOptSensitivityReport
A wrapper DataType
for JuMP.SensitivityReport
s in InfiniteOpt
. These are generated based on the transformation backend and should be made via the use of lp_sensitivity_report
. Once made these can be indexed to get the sensitivies with respect to variables and/or constraints. The indexing syntax for these is:
report[ref::[GeneralVariableRef/InfOptConstraintRef];
[label::Type{<:AbstractSupportLabel} = PublicLabel,
kwargs...]]
This is enabled for new transformation backends by appropriately extending transformation_variable
and transformation_constraint
.
Fields
opt_report::JuMP.SensitivityReport
: The LP sensitivity captured from the backend.
Transformation Backend Extension API
InfiniteOpt.map_value
— Methodmap_value([ref/expr], backend::AbstractTransformationBackend; [kwargs...])
Map the value(s) of ref
to its counterpart in the backend
. Here ref
need refer to methods for both variable references and constraint references. No extension is needed for JuMPBackend
s that support transformation_variable
, transformation_expression
, and transformation_constraint
. In this case, transformation_variable
, transformation_expression
, and transformation_constraint
are used to make these mappings by default where kwargs
are passed on these functions. For mapping the values of infinite parameters, refer to map_infinite_parameter_value
.
InfiniteOpt.map_infinite_parameter_value
— Functionmap_infinite_parameter_value(
pref::GeneralVariableRef,
backend::AbstractTransformationBackend;
[kwargs...]
)
Return the mapped value of the infinite parameter pref
according to the backend
. This serves as an optional extension point for new type of backends that do not rely on using supports. Otherwise, this defaults to:
map_infinite_parameter_value(pref; [label = PublicLabel]) = supports(pref, label = label)
InfiniteOpt.map_reduced_cost
— Methodmap_reduced_cost(
ref::GeneralVariableRef,
backend::AbstractTransformationBackend;
[kwargs...]
)
Map JuMP.reduced_cost
of ref
to its counterpart in the backend
. No extension is needed for JuMPBackend
s that support transformation_variable
, in which case, transformation_variable
is used to make these mappings using kwargs
.
InfiniteOpt.map_optimizer_index
— Methodmap_optimizer_index(
ref::GeneralVariableRef,
backend::AbstractTransformationBackend;
[kwargs...]
)
Map JuMP.optimizer_index
of ref
to its counterpart in the backend
. No extension is needed for JuMPBackend
s that support transformation_variable
, in which case, transformation_variable
is used to make these mappings using kwargs
.
InfiniteOpt.map_dual
— Methodmap_dual(
cref::InfOptConstraintRef,
backend::AbstractTransformationBackend;
[kwargs...]
)
Map the dual(s) of cref
to its counterpart in the backend
. No extension is needed for JuMPBackend
s that support transformation_constraint
. In this case, transformation_constraint
are used to make these mappings by default where kwargs
are passed on these functions.
InfiniteOpt.map_shadow_price
— Methodmap_shadow_price(
ref::InfOptConstraintRef,
backend::AbstractTransformationBackend;
[kwargs...]
)
Map JuMP.shadow_price
of ref
to its counterpart in the backend
. No extension is needed for JuMPBackend
s that support transformation_constraint
, in which case, transformation_constraint
is used to make these mappings using kwargs
.
InfiniteOpt.map_optimizer_index
— Methodmap_optimizer_index(
ref::InfOptConstraintRef,
backend::AbstractTransformationBackend;
[kwargs...]
)
Map JuMP.optimizer_index
of ref
to its counterpart in the backend
. No extension is needed for JuMPBackend
s that support transformation_constraint
, in which case, transformation_constraint
is used to make these mappings using kwargs
.
JuMP.lp_sensitivity_report
— MethodJuMP.lp_sensitivity_report(
backend::AbstractTransformationBackend;
[atol::Float64 = 1e-8]
)::InfOptSensitivityReport
Extend JuMP.lp_sensitivity_report
as appropriate for backend
. This is intended as an extension point. For JuMPBackend
s, this simply calls JuMP.lp_sensitivity_report
on the underlying JuMP model.