wiver.wiver_cython module¶
- exception wiver.wiver_cython.DataConsistencyError¶
Bases:
IndexError
Data is not consistent and could lead to IndexErrors when running the model with these data
- exception wiver.wiver_cython.DestinationChoiceError¶
Bases:
ValueError
Error in destination choice model, no accessible destinations found for demand
- class wiver.wiver_cython._WIVER¶
Bases:
ArrayShapes
BaseClass for WIVER model
- __reduce_cython__(self)¶
- __setstate_cython__(self, __pyx_state)¶
- adjust_linking_trips(g)¶
Adjust the number of linking trips for the group to the target value to account for rounding errors with small probabilities which do not sum um to 1.0
- Parameters:
g (long32) –
- aggregate_to_modes(self)¶
Aggregate result matrices to mode-matrices
- assert_data_consistency(self)¶
assert the data consistency
- assert_data_consistency_of_array(self, unicode attrname, unicode dim)¶
assert the consistency of array attrname
- Parameters:
attrname – the name of the attribute to test
dim – the name of the dimension to test
- calc_daily_trips(self, long32 g) char ¶
Calc the daily trips for all groups and zones
- Parameters:
g (long32) – the group
- Returns:
-1, if an exeption is raised, 0 otherwise
- Return type:
long32
- calc_destination_choice(self, long32 t, long32 g, long32 h)¶
- calc_linking_trip_choice(self, long32 t, long32 g, long32 h)¶
- calc_linking_trips(g, tours)¶
- Return type:
float
- calc_mean_distance(self)¶
calculate mean distance for groups
- calc_mean_distance_mode(self)¶
calculate mean distance for modes
- calc_p_destination(g, m, h, j)¶
- Return type:
float
- calc_savings(g, m, h, i, j)¶
calc the savings for group g with home zone h from zone i to j
- Return type:
float
- calc_savings_factor(g, m, h, i, j)¶
calc the saving factor for group g with home zone h from zone i to j
- Return type:
float
- calc_time_series(self)¶
Calc the time series
- calc_tours(g, h)¶
- Return type:
float
- calc_trips(self, long32 t, long32 g, long32 h, double tours, double linking_trips)¶
- normalise_time_series(self, ndarray time_series)¶
normalise a time_series to ensure it adds up to 100 %
- raise_destination_choice_error(g, h)¶
raise a DestinationChoiceError for destination trips
- Parameters:
g (long32) –
h (long32) –
- raise_linking_trips_error(g, h)¶
raise a DestinationChoiceError for linking trips
- Parameters:
g (long32) –
h (long32) –
- _active_g¶
‘ARRAY_1D_i1’
- Type:
_active_g
- _balancing_factor_gj¶
‘ARRAY_2D_d’
- Type:
_balancing_factor_gj
- _converged_g¶
‘ARRAY_1D_i2’
- Type:
_converged_g
- _home_based_trips_gij¶
‘ARRAY_3D_d’
- Type:
_home_based_trips_gij
- _km_ij¶
‘ARRAY_2D_d’
- Type:
_km_ij
- _linking_trips_gij¶
‘ARRAY_3D_d’
- Type:
_linking_trips_gij
- _mean_distance_first_trips_g¶
‘ARRAY_1D_d’
- Type:
_mean_distance_first_trips_g
- _mean_distance_g¶
‘ARRAY_1D_d’
- Type:
_mean_distance_g
- _mean_distance_linking_trips_g¶
‘ARRAY_1D_d’
- Type:
_mean_distance_linking_trips_g
- _mean_distance_m¶
‘ARRAY_1D_d’
- Type:
_mean_distance_m
- _mode_g¶
‘ARRAY_1D_i1’
- Type:
_mode_g
- _p_destination_tj¶
‘ARRAY_2D_d’
- Type:
_p_destination_tj
- _p_links_tij¶
‘ARRAY_3D_d’
- Type:
_p_links_tij
- _param_dist_g¶
‘ARRAY_1D_d’
- Type:
_param_dist_g
- _return_trips_gij¶
‘ARRAY_3D_d’
- Type:
_return_trips_gij
- _savings_param_g¶
‘ARRAY_1D_d’
- Type:
_savings_param_g
- _sector_g¶
‘ARRAY_1D_i1’
- Type:
_sector_g
- _sink_potential_gj¶
‘ARRAY_2D_d’
- Type:
_sink_potential_gj
- _source_potential_gh¶
‘ARRAY_2D_d’
- Type:
_source_potential_gh
- _stops_per_tour_g¶
‘ARRAY_1D_d’
- Type:
_stops_per_tour_g
- _time_series_ending_trips_g¶
‘ARRAY_1D_i1’
- Type:
_time_series_ending_trips_g
- _time_series_linking_trips_g¶
‘ARRAY_1D_i1’
- Type:
_time_series_linking_trips_g
- _time_series_starting_trips_g¶
‘ARRAY_1D_i1’
- Type:
_time_series_starting_trips_g
- _time_series_values_rs¶
‘ARRAY_2D_d’
- Type:
_time_series_values_rs
- _tour_rates_g¶
‘ARRAY_1D_d’
- Type:
_tour_rates_g
- _travel_time_mij¶
‘ARRAY_3D_d’
- Type:
_travel_time_mij
- _trips_gij¶
‘ARRAY_3D_d’
- Type:
_trips_gij
- _trips_gsij¶
‘ARRAY_4D_d’
- Type:
_trips_gsij
- _trips_mij¶
‘ARRAY_3D_d’
- Type:
_trips_mij
- _trips_msij¶
‘ARRAY_4D_d’
- Type:
_trips_msij
- _trips_to_destination_gj¶
‘ARRAY_2D_d’
- Type:
_trips_to_destination_gj
- _zone_no¶
‘ARRAY_1D_i8’
- Type:
_zone_no
- n_groups¶
‘long32’
- Type:
n_groups
- n_modes¶
‘char’
- Type:
n_modes
- n_sectors¶
‘char’
- Type:
n_sectors
- n_threads¶
‘char’
- Type:
n_threads
- n_time_series¶
‘char’
- Type:
n_time_series
- n_time_slices¶
‘char’
- Type:
n_time_slices
- n_zones¶
‘long32’
- Type:
n_zones
- wiver.wiver_cython.__pyx_unpickle__WIVER(__pyx_type, long __pyx_checksum, __pyx_state)¶