IterationLogRecord
(class from pyomo.contrib.pyros.util
)
- class pyomo.contrib.pyros.util.IterationLogRecord(iteration, objective, first_stage_var_shift, second_stage_var_shift, dr_var_shift, dr_polishing_success, num_violated_cons, all_sep_problems_solved, global_separation, max_violation, elapsed_time)[source]
Bases:
object
PyROS solver iteration log record.
- Parameters:
iteration (int or None, optional) – Iteration number.
objective (int or None, optional) – Master problem objective value. Note: if the sense of the original model is maximization, then this is the negative of the objective value of the original model.
first_stage_var_shift (float or None, optional) – Infinity norm of the difference between first-stage variable vectors for the current and previous iterations.
second_stage_var_shift (float or None, optional) – Infinity norm of the difference between decision rule variable vectors for the current and previous iterations.
dr_polishing_success (bool or None, optional) – True if DR polishing solved successfully, False otherwise.
num_violated_cons (int or None, optional) – Number of second-stage constraints found to be violated during separation step.
all_sep_problems_solved (int or None, optional) – True if all separation problems were solved successfully, False otherwise (such as if there was a time out, subsolver error, or only a subset of the problems were solved due to custom constraint prioritization).
global_separation (bool, optional) – True if separation problems were solved with the subordinate global optimizer(s), False otherwise.
max_violation (int or None) – Maximum scaled violation of any second-stage constraint found during separation step.
elapsed_time (float, optional) – Total time elapsed up to the current iteration, in seconds.
- objective
Master problem objective value. Note: if the sense of the original model is maximization, then this is the negative of the objective value of the original model.
- Type:
int or None
- first_stage_var_shift
Infinity norm of the relative difference between first-stage variable vectors for the current and previous iterations.
- Type:
float or None
- second_stage_var_shift
Infinity norm of the relative difference between second-stage variable vectors (evaluated subject to the nominal uncertain parameter realization) for the current and previous iterations.
- Type:
float or None
- dr_var_shift
Infinity norm of the relative difference between decision rule variable vectors for the current and previous iterations. NOTE: This value is not reported in log messages.
- Type:
float or None
- dr_polishing_success
True if DR polishing was solved successfully, False otherwise.
- Type:
bool or None
- num_violated_cons
Number of second-stage constraints found to be violated during separation step.
- Type:
int or None
- all_sep_problems_solved
True if all separation problems were solved successfully, False otherwise (such as if there was a time out, subsolver error, or only a subset of the problems were solved due to custom constraint prioritization).
- Type:
int or None
- global_separation
True if separation problems were solved with the subordinate global optimizer(s), False otherwise.
- Type:
- max_violation
Maximum scaled violation of any second-stage constraint found during separation step.
- Type:
int or None
- __init__(iteration, objective, first_stage_var_shift, second_stage_var_shift, dr_var_shift, dr_polishing_success, num_violated_cons, all_sep_problems_solved, global_separation, max_violation, elapsed_time)[source]
Initialize self (see class docstring).
Methods
__init__
(iteration, objective, ...)Initialize self (see class docstring).
Get string for iteration log header.
Get iteration log string.
log
(log_func, **log_func_kwargs)Log self.
log_header
(log_func[, with_rules])Log header.
log_header_rule
(log_func[, fillchar])Log header rule.
Member Documentation