Base class for any Scenario. A scenario has a list of blocks and a list of links. Blocks and links each have an ID which is unique (a block and a link can’t either have the same ID) within a scenario and makes easier the reference to them. This ID is gotten from the get_new_id method when the object is added to the Scenario.
Activates this scenario, i.e. the links between ports of blocks become active: they are translated into observer-observed relationships.
Adds the block given as argument to the scenario and returns its ID within the scenario.
Adds a link from the source port of the source block to the destination port of the destination block given as arguments. The blocks and ports are referenced by their respective IDs. Returns the id of the new link.
Deactivates this scenario, i. e. resets all the observer-observed relationships previously set.
Returns an unique identifier in order to reference blocks and links within a scenario.
Removes the block whose ID has been specified from the list of blocks of this Scenario and returns the Block. If the ID is not found, the method returns False.
Removes the link whose ID has been specified from the list of links of this Scenario and returns the Link. If the ID is not found, the method returns False.