util
Utility functions for the PyROS solver
Enums
|
|
|
|
|
|
|
Enumeration of all possible PyROS termination conditions. |
Classes
|
|
Indicator for whether a bound on a variable/constraint is a lower bound, "equality" bound, or upper bound. |
|
|
PyROS solver iteration log record. |
|
Container for modeling objects from which the PyROS subproblems are constructed. |
|
A specialized logger object designed to cast log messages to Pyomo Preformatted objects prior to logging the messages. |
PyROS solver timing data object. |
|
|
Functions
|
Add decision rule equality constraints to the working model. |
|
Add variables parameterizing the (polynomial) decision rules to the working model. |
|
Obtain a repartitioning of the in-scope variables of the working model according to known adjustability to the uncertain parameters, and add this repartitioning to the working model. |
|
Adjust maximum time allowed for subordinate solver, based on total PyROS solver elapsed time up to this point. |
|
Solve a model with a given optimizer, keeping track of wall time requirements. |
|
Check all members in a provided sequence of Pyomo component objects are descended from a given ConcreteModel object. |
|
Return true if the PyROS solver time limit is reached, False otherwise. |
|
Check that all DOF and state variables of the model are continuous. |
|
Create a decorator which copies docstring of a callable source_func to a target callable passed to the decorator. |
|
Create a relational expression establishing a bound for a numeric expression of interest. |
|
Identify the per-stage summands of an objective of interest, according to the user-based variable partitioning. |
Determine the certain and uncertain lower or upper bound for a variable object, based on the specified domain and declared bound. |
|
|
Make decision rule polynomials of a given degree by fixing value of the appropriate subset of the decision rule coefficients to 0. |
|
Generate sequence of all decision rule equations. |
Generate a sequence of all decision rule variable data objects. |
|
|
Get all variables considered adjustable. |
|
Get all nonadjustable variables of the working model. |
|
Get DR expression corresponding to given second-stage variable. |
|
Get mapping from all decision rule variables in the working block to their corresponding DR equation monomials. |
|
Partition the in-scope variables of the input model according to known nonadjustability to the uncertain parameters. |
|
Returns the time since entering the main time_code context |
|
Recursively gather the individual summands of a numeric expression. |
|
Get the domain and declared lower/upper bound pairs of a variable data object. |
|
Determine the certain and uncertain lower/equality/upper bound triples for a variable data object, based on that variable's domain and declared bounds. |
|
Load variable values from the master problem to the original model. |
|
Log statistics for the preprocessed model. |
|
Preprocess user inputs to modeling objects from which PyROS subproblems can be efficiently constructed. |
|
Rearrange a lower/upper bound pair into a lower/equality/upper bound triple, according to whether or not the lower and upper bound are identical numerical values or expressions. |
Reformulate second-stage equality constraints that are independent of the state variables. |
|
Remove all the domain and declared bounds for a specified variable data object. |
|
|
Remove the specified declared bound(s) of a variable data object. |
|
Substitute ParamData objects for VarData objects in the Expression, Constraint, and Objective components declared on a block and all its sub-blocks. |
|
Revert solver options attribute to its state prior to a time limit adjustment performed via the routine adjust_solver_time_settings. |
|
Set up pyros logger. |
|
Setup a parameterized quadratic expression walker. |
|
Set up (construct) the working model based on user inputs, and add it to the model data object. |
|
Standardize the active objective of the working model. |
|
Cast an object to a list of Pyomo ComponentData objects. |
|
Classify the original active equality constraints of the working model as first-stage or second-stage constraints. |
|
Standardize the inequality constraints of the working model, and classify them as first-stage inequalities or second-stage inequalities. |
|
Starts timer at entry, stores elapsed time at exit. |
Reformulate domain and declared bounds for the adjustable (i.e., effective second-stage and effective state) variables of the working model to explicit constraints. |
|
Reformulate uncertain bounds for the nonadjustable (i.e. effective first-stage) variables of the working model to constraints. |
|
|
Validate deterministic model passed to PyROS solver. |
|
Perform advanced validation of PyROS solver arguments. |
|
Validate separation problem arguments to the PyROS solver. |
|
Validate specification of uncertain parameters and uncertainty set. |
|
Check that the partitioning of the in-scope variables of the model is valid. |