lookup#
- ParamDictND.lookup(*key)[source]#
Get the parameter value for the specified key, or zero if it is not found.
- Parameters:
- *keykey
- Returns:
- int or float
Examples
>>> demand = ParamDictND({('A', 'B'): 10, ('B', 'C'): 20, ('A', 'C'): 15, ('C', 'A'): 16}) >>> demand.lookup('A', 'B') 10 >>> demand.lookup('B', 'A') 0