4.1. calc_deltas module

calc_deltas.calc_deltas_weighted(settings, dict_for_deltas)[source]

This function calculates deltas for action alternatives relative to the passed no action alternative specifically for the weighted cost per mile dictionaries.

Parameters:

settings: The SetInputs class.

dict_for_deltas: Dictionary; contains values for calculating deltas.

Returns:

An updated dictionary containing deltas relative to the no_action_alt. OptionIDs (numeric) for the deltas will be the alt_id followed by the no_action_alt.

For example, deltas for optionID=1 relative to optionID=0 would have optionID=10.

Note:

There is no age_id or discount rate in the key for the passed weighted dictionaries.

calc_deltas.calc_deltas(settings, dict_for_deltas)[source]

This function calculates deltas for action alternatives relative to the no action alternative set via the General Inputs.

Parameters:

settings: The SetInputs class.

dict_for_deltas: Dictionary; contains values for calculating deltas.

Returns:

An updated dictionary containing deltas relative to the no_action_alt. OptionIDs (numeric) for the deltas will be the alt_id followed by the no_action_alt.

For example, deltas for optionID=1 relative to optionID=0 will have optionID=10. OptionNames will also show as ‘OptionID=1_name minus OptionID=0_name’.