biogeme.configuration module
Represents the configuration of a multiple expression
- author:
Michel Bierlaire
- date:
Sun Apr 2 14:15:17 2023
- class biogeme.configuration.Configuration(selections=None)[source]
Bases:
object
Represents the configuration of a multiple expression. It is internally represented as a sorted list of tuples.
- Parameters:
selections (Iterable[SelectionTuple] | None)
- classmethod from_dict(dict_of_selections)[source]
Ctor from dict
- Parameters:
dict_of_selections (dict(str: str)) – dict associating a catalog name with the selected configuration
- Return type:
- classmethod from_string(string_id)[source]
Ctor from a string representation
- Parameters:
string_id (str) – string ID
- Return type:
- classmethod from_tuple_of_configurations(tuple_of_configurations)[source]
Ctor from tuple of configurations that are merged together.
In the presence of two different selections for the same catalog, the first one is selected, and the others ignored.
- Parameters:
tuple_of_configurations (tuple(Configuration)) – tuple of configurations to merge
- Return type:
- get_selection(controller_name)[source]
Retrieve the selection of a given controller
- Parameters:
controller_name (str) – name of the controller
- Returns:
name of the selected config, or None if controller is not known
- Return type:
str
- get_string_id()[source]
The string ID is a unique string representation of the configuration
- Returns:
string ID
- Return type:
str
- property selections: list[SelectionTuple]