ElseIf#

class gamspy.ElseIf(condition: ConditionType, container: Container | None = None)[source]#

Bases: object

A context manager to conditionally execute a group of statements if the preceding If or ElseIf condition was False and the current condition is True.

Parameters:
conditionConditionType

The logical condition that must be satisfied to execute the nested statements.

containerContainer, optional

The container to add the statements to. Required only if the container cannot be deduced from the condition.