TimingData

(class from pyomo.contrib.pyros.util)

class pyomo.contrib.pyros.util.TimingData[source]

Bases: object

PyROS solver timing data object.

Implemented as a wrapper around common.timing.HierarchicalTimer, with added functionality for enforcing a standardized hierarchy of identifiers.

hierarchical_timer_full_ids

(Class attribute.) Valid identifiers for use with the encapsulated hierarchical timer.

Type:

set of str

__init__()[source]

Initialize self (see class docstring).

Methods

__init__()

Initialize self (see class docstring).

get_main_elapsed_time()

Get total time elapsed for main timer of the HierarchicalTimer contained in self.

get_total_time(full_identifier)

Get total time spent with identifier active.

start_timer(full_identifier)

Start timer for self.hierarchical_timer.

stop_timer(full_identifier)

Stop timer for self.hierarchical_timer.

Attributes

hierarchical_timer_full_ids

Member Documentation

get_main_elapsed_time()[source]

Get total time elapsed for main timer of the HierarchicalTimer contained in self.

Returns:

Total elapsed time.

Return type:

float

Note

This method is meant for use while the main timer is active. Otherwise, use self.get_total_time("main").

get_total_time(full_identifier)[source]

Get total time spent with identifier active.

Parameters:

full_identifier (str) – Full identifier for the timer of interest.

Returns:

Total time spent with identifier active.

Return type:

float

start_timer(full_identifier)[source]

Start timer for self.hierarchical_timer.

Parameters:

full_identifier (str) – Full identifier for the timer to be started. Must be an entry of TimingData.hierarchical_timer_full_ids.

stop_timer(full_identifier)[source]

Stop timer for self.hierarchical_timer.

Parameters:

full_identifier (str) – Full identifier for the timer to be stopped. Must be an entry of TimingData.hierarchical_timer_full_ids.