deactivate_model_at

(function from pyomo.dae.set_utils)

pyomo.dae.set_utils.deactivate_model_at(b, cset, pts, allow_skip=True, suppress_warnings=False)[source]

Finds any block or constraint in block b, indexed explicitly (and not implicitly) by cset, and deactivates it at points specified. Implicitly indexed components are excluded because one of their parent blocks will be deactivated, so deactivating them too would be redundant.

Parameters:
  • b – Block to search

  • cset – ContinuousSet of interest

  • pts – Value or list of values, in ContinuousSet, to deactivate at

Returns:

A dictionary mapping points in pts to lists of component data that have been deactivated there