(function from pyomo.contrib.pyros.util)
pyomo.contrib.pyros.util
Solve a model with a given optimizer, keeping track of wall time requirements.
model (ConcreteModel) – Model of interest.
solver (Pyomo solver type) – Subordinate optimizer.
config (ConfigDict) – PyROS solver settings.
timing_obj (TimingData) – PyROS solver timing data object.
timer_name (str) – Name of sub timer under the hierarchical timer contained in timing_obj to start/stop for keeping track of solve time requirements.
timing_obj
err_msg (str) – Message to log through config.progress_logger.exception() in event an ApplicationError is raised while attempting to solve the model.
config.progress_logger.exception()
Solve results. Note that results.solver contains an additional attribute, named after TIC_TOC_SOLVE_TIME_ATTR, of which the value is set to the recorded solver wall time.
results.solver
TIC_TOC_SOLVE_TIME_ATTR
SolverResults
ApplicationError – If ApplicationError is raised by the solver. In this case, err_msg is logged through config.progress_logger.exception() before the exception is raised.