biogeme.catalog.controller module¶
Defines controllers for multiple expressions.
- author:
Michel Bierlaire
- date:
Sun Jul 16 15:23:46 2023
- class biogeme.catalog.controller.Controller(controller_name, specification_names)[source]¶
Bases:
object
Class controlling the specification of the Catalogs
- Parameters:
controller_name (str)
specification_names (Iterable[str])
- all_configurations()[source]¶
Return the code of all configurations
- Returns:
set of codes
- Return type:
set(str)
- modify_controller(step, circular)[source]¶
Modify the specification of the controller
- Parameters:
step (int) – increment of the modifications. Can be negative.
circular (bool) – If True, the modification is always made. If the selection needs to move past the last one, it comes back to the first one. For instance, if the catalog is currently at its last value, and the step is 1, it is set to its first value. If circular is False, and the selection needs to move past the last one, the selection is set to the last one. It works symmetrically if the step is negative
- Returns:
number of actual modifications
- Return type:
int
- set_index(index)[source]¶
Set the index of the controller, and update the controlled catalogs
- Parameters:
index (int) – value of the index
- Raises:
BiogemeError – if index is out of range
- Return type:
None