biogeme.mdcev.database_utils module¶
Implementation of useful database manipulations for the MDCEV model.
Michel Bierlaire Fri Jul 25 2025, 16:45:19
- biogeme.mdcev.database_utils.mdcev_count(database, list_of_columns, new_column)[source]¶
- For the MDCEV models, we calculate the number of
alternatives that are chosen, that is the number of columns with a non zero entry, and add this as a new column
- Parameters:
database (
Database
) – database to modifylist_of_columns (
list
[str
]) – list of columns containing the quantity of each good.new_column (
str
) – name of the new column where the result is stored
- Return type:
None