add_scenario_block_to_master_problem
(function from pyomo.contrib.pyros.master_problem_methods)
- pyomo.contrib.pyros.master_problem_methods.add_scenario_block_to_master_problem(master_model, scenario_idx, param_realization, from_block, clone_first_stage_components)[source]
Add new scenario block to the master model.
- Parameters:
master_model (ConcreteModel) – Master model.
scenario_idx (tuple) – Index of
master_model.scenariosfor the new block.param_realization (Iterable of numeric type) – Uncertain parameter realization for new block.
from_block (BlockData) – Block from which to transfer attributes. This can be an existing scenario block, or a block with the same hierarchical structure as the preprocessed working model.
clone_first_stage_components (bool) – True to clone first-stage variables when transferring attributes to the new block to the new block (as opposed to using the objects as they are in from_block), False otherwise.