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.

iteration

Iteration number.

Type:

int or None

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:

bool

max_violation

Maximum scaled violation of any second-stage constraint found during separation step.

Type:

int or None

elapsed_time

Total time elapsed up to the current iteration, in seconds.

Type:

float

__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_log_header_str()

Get string for iteration log header.

get_log_str()

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

static get_log_header_str()[source]

Get string for iteration log header.

get_log_str()[source]

Get iteration log string.

log(log_func, **log_func_kwargs)[source]

Log self.

static log_header(log_func, with_rules=True, **log_func_kwargs)[source]

Log header.

static log_header_rule(log_func, fillchar='-', **log_func_kwargs)[source]

Log header rule.