create_EF

(function from pyomo.contrib.parmest.utils.create_ef)

pyomo.contrib.parmest.utils.create_ef.create_EF(scenario_names, scenario_creator, scenario_creator_kwargs=None, EF_name=None, suppress_warnings=False, nonant_for_fixed_vars=True)[source]

Create a ConcreteModel of the extensive form.

Parameters:
  • scenario_names (list of str) – Names for each scenario to be passed to the scenario_creator function.

  • scenario_creator (callable) – Function which takes a scenario name as its first argument and returns a concrete model corresponding to that scenario.

  • scenario_creator_kwargs (dict, optional) – Options to pass to scenario_creator.

  • EF_name (str, optional) – Name of the ConcreteModel of the EF.

  • suppress_warnings (boolean, optional) – If true, do not display warnings. Default False.

  • nonant_for_fixed_vars (bool--optional) – If True, enforces non-anticipativity constraints for all variables, including those which have been fixed. Default is True.

Returns:

ConcreteModel of extensive form with explicit non-anticipativity constraints.

Return type:

EF_instance (ConcreteModel)

Note

If any of the scenarios produced by scenario_creator do not have a ._mpisppy_probability attribute, this function displays a warning, and assumes that all scenarios are equally likely.