biogeme.sampling_of_alternatives.choice_set_generation module
Module in charge of functionalities related to the choice set generation
For thew main sample, all alternatives except the last one must be used: 0 to J-1. For MEV models, the approximation of the sum capturing the nests requires another sample not based on the choice.
- author:
Michel Bierlaire
- date:
Fri Oct 27 12:50:06 2023
- class biogeme.sampling_of_alternatives.choice_set_generation.ChoiceSetsGeneration(context)[source]
Bases:
object
Class in charge of generationg the choice sets for each individual.
- Parameters:
context (SamplingContext)
- define_new_variables(database)[source]
Create the new variables
- Parameters:
database (
Database
) – database, in Biogeme format.
- get_attributes_from_expression(expression)[source]
Extract the names of the attributes of alternatives from an expression
- Return type:
set
[str
]- Parameters:
expression (Expression)