45 for i,v
in V.items() :
52 sumdict.append(Elem({0:0.0,1: y[i] ** m[0]},availability[i]!=0))
53 sum = bioMultSum(sumdict)
55 Gi[i] = Elem({0:0,1:y[i]**(m[0]-1.0) * sum ** (1.0/m[0] - 1.0)},availability[i]!=0)
90 def nested(V,availability,nests,choice) :
92 P =
mev(V,Gi,availability,choice)
126 def lognested(V,availability,nests,choice) :
128 logP =
logmev(V,Gi,availability,choice)
173 for i,v
in V.items() :
180 sum[i] = Elem({0:0,1: y[i] ** m[0]},availability[i]!=0)
182 Gi[i] = Elem({0:0,1:mu * y[i]**(m[0]-1.0) * bioMultSum(sum) ** (mu/m[0] - 1.0)},availability[i]!=0)
183 P =
mev(V,Gi,availability,choice)
227 for i,v
in V.items() :
234 sum[i] = Elem({0:0,1: y[i] ** m[0]},availability[i]!=0)
236 Gi[i] = Elem({0:0,1:mu * y[i]**(m[0]-1.0) * bioMultSum(sum) ** (mu/m[0] - 1.0)},availability[i]!=0)
237 logP =
logmev(V,Gi,availability,choice)
def logmev(V, Gi, av, choice)
Log of the choice probability for a MEV model.
def lognested(V, availability, nests, choice)
Implements the log of a nested logit model as a MEV model.
def getMevForNested(V, availability, nests)
Implements the MEV generating function for the nested logit model.
def lognestedMevMu(V, availability, nests, choice, mu)
Implements the log of the nested logit model as a MEV model, where mu is also a parameter, if the user wants to test different normalization schemes.
def nested(V, availability, nests, choice)
Implements the nested logit model as a MEV model.
def nestedMevMu(V, availability, nests, choice, mu)
Implements the nested logit model as a MEV model, where mu is also a parameter, if the user wants to ...