solve_consistent_initial_conditions

(function from pyomo.dae.initialization)

pyomo.dae.initialization.solve_consistent_initial_conditions(model, time, solver, tee=False, allow_skip=True, suppress_warnings=False)[source]

Solves a model with all Constraints and Blocks deactivated except at the initial value of the Set time. Reactivates Constraints and Blocks that got deactivated.

Parameters:
  • model – Model that will be solved

  • time – Set whose initial conditions will remain active for solve

  • solver – Something that implements a solve method that accepts a model and tee keyword as arguments

  • tee – tee argument that will be sent to solver’s solve method

  • allow_skip – If True, KeyErrors due to Constraint.Skip being used will be ignored

  • suppress_warnings – If True, warnings due to ignored KeyErrors will be suppressed

Returns:

The object returned by the solver’s solve method