larch.numba.Model.utility_co

larch.numba.Model.utility_co

Model.utility_co

The portion of the utility function computed from idco data.

The keys of this mapping are alternative codes for the applicable elemental alteratives, and the values are linear functions to compute for the indicated alternative. Each alternative that has any idco utility components must have a unique linear function given.

Examples

>>> from larch import Model, P, X
>>> m = Model()
>>> m.utility_co = {
...     1: P.ParamA1 * X.DataA,
...     2: P.ParamA2 * X.DataA + P.ParamASC2,
... }
>>> print(m.utility_co)
DictOfLinearFunction_C({1: P.ParamA1 * X.DataA, 2: P.ParamA2 * X.DataA + P.ParamASC2})
Type

DictOfLinearFunction_C