Dear Professor Bierlaire,
I'm using Biogeme to solve a Route Choice Model, but I cannot get the significant result. So I made a manual dataset to test my program: I defined a utility function: U = -2.78*prop1 + 0.69*prop2 + 6.55*prop3 + epsilon, and generated random numbers as values of properties.
I generated 3000 choices (as all alternatives in the choice set), and regarded every 3 alternatives in the same OD pair ([choice 0,1,2], [choice 3,4,5], as such). For each OD pair, the choice with the highest utility was picked as an observed record. Thus I got 1000 records of 'observation data'.
My purpose was to ensure that my code is right and Biogeme could estimate the True values of the parameters of the model (that is, [-2.78, 0.69, 6.55], or close values). Unluckily the result is still not significant. And the cause of termination is "Maximum number of iterations reached: 1000". (However, resetting the max number of iterations will not solve the problem, while making the estimation time-consuming. )
I noticed that many papers use Biogeme to implement the Route Choice Model, which means Biogeme CAN implement RCM and get the right result if everything goes well. So I think there could be something wrong with my code but I don't know where.
I am wondering whether there are any demos that use Biogeme for route choice model estimation? I didn't find relevant code on the internet. Thus I present the codes here and ask for help. Could you please point out the mistakes in my program? And it'd be appreciated if you can offer an example; so that I can refer to it and check where I am wrong. Thanks in advance.
BTW, the Biogeme version is 3.2.6.
DATA:
The data mentioned in the following codes would be like:
df (observed data ):
columns <choice, col0, col1, col2, ..., col2999> are usable
prop_ref (properties of all choices ):
columns <choice, prop1, prop2, prop3> are usable
CODE:
Best Wishes,
Zheren Liu
Sept. 14th, 2021