Open dynaryu opened 11 months ago
C matrix should be as follows given the corrected path_time_idx. C = [[3 2 1 2 2 2 2 2] [0 0 0 2 2 2 2 2] [0 1 0 2 1 2 0 2] [2 1 0 2 1 2 1 2] [0 1 0 0 0 2 2 2] [0 1 0 1 0 0 2 2] [0 1 0 1 0 1 2 0] [0 1 0 1 0 1 0 1] [1 1 0 1 0 1 1 1]]
Thank you for noticing this! I tried to correct the jupyter notebook file, but I could not for the function 'branch_and_bound' seems to have changed.
All these complications to model system event's C matrix seem to highlight the need for having a function that returns C directly from the inputs of get_all_paths_and_times. What do you think?
There are functions called get_branches and model_given_od_scen in model.py.
I noticed that path_time_idx in the notebook is incorrect in a sense that trans.eval_sys_state(path_time_idx, upper, 1) results in 1, which should be 3. [([], inf, 0), (['e1', 'e3', 'e5', 'e7', 'e6'], 0.2733333333333333, 1), (['e1', 'e4', 'e6'], 0.16666666666666669, 2), (['e2'], 0.06, 3)]
The path_time_idx list should be sorted by elapsed time. The correct one is [([], inf, 0), (['e2'], 0.06, 3), (['e1', 'e4', 'e6'], 0.167, 2), (['e1', 'e3', 'e5', 'e7', 'e6'], 0.274, 1)]