-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elara is altering link ids #240
Comments
Very quick question - we had talked about indexing the network data because the string information for |
Reading through some of what is posted on slack, it seems like the feature of re-indexing elara outputs to reduce size (and improve run times) means the |
@divyasharma-arup I can see some link ids with the long node to node format i.e Though if |
I understand the reasons for reindexing link ids like you say above (run times) but would it not be better to just apply the reindexing at the genet/network creation stage? So we have a consistent network both pre/post |
Assuming this is the reason why the Just a note that elara's scope is MATSim outputs (I think). So things like synthesis inputs (population & network) will have their original information -- which we want to maintain for traceability of the process. Therefore, we should probably only be comparing elara outputs with each other. Have you ever worked with |
I haven't worked with ( |
I myself don't really have any experience using/parsing xml files hehe, can |
ersa object is useful for that: sample script. Your point is noted that the |
you can do this with ersa:
|
Ah yes of course, forgot |
Could you remind me where was conversation/thread about this please? @divyasharma-arup. TBH, I thought the Use ersa to load the matsim output network might be the easiest way and it's worth examining the elara code to check where the reindexing happens. |
hi @D-Dulius, I had a look into this, as I know it can drive issues when investigating potential network changes needed as part of validation/calibration. Here is what I found:
Initial loading of data:
Elara Link Counts
MATSim Output Network
MATSim Input Network
Therefore, @syhwawa, is there any way to confirm that there is a process where MATSim changes input link ids when running sims/writing outputs? I'm not sure if this might be part of Network Synthesis or Simulation. Is there any place that stores the "original" link id and the resulting "MATSim" link id? Without that, we may have to utilise Alex's process of matching |
Also just a note that I've checked different sims that use the same network and it seems the elara output networks match (visually spot checked by plotting specific |
So in summary |
Shall we rename the issue and move it somewhere else then? (currently opened as an |
The |
Actually sorry @D-Dulius , I think for this issue we were just looking at the wrong input network file. This is an original network file, that doesn't have "wider te".
This is the one that was ultimately used by the sim.
|
You've lost me hehe, I refer to the wider te network in the issue description when comparing against |
Yeah but when I look at the data I think I'm seeing something different from what you originally said. |
So there is no mismatch between |
I think that's my conclusion, we were just referring to the wrong network file. |
@neilmt When you flagged these mismatches do you remember which network file you used? |
I'm going through the old thread but now can't find the specific file path |
I think Daumantas if you can recreate your problem, then we can have a look. Otherwise perhaps we should close this issue. |
This was something flagged by @neilmt and I can't be certain which network he used to initially compare against the |
To avoid this problem in the future we should avoid using the standard |
There is something I am still not quite understanding though, if the sim ends up using the wider te network then what are we using the network without the wider te bit for? |
I don't think this is the case. There still are discrepancies between |
@neilmt What file specifically are you referring to when you say standard output? @divyasharma-arup saw zero link id mismatches comparing |
We have discovered an
elara
bug while working on the Basildon ABM build. For various validation exercises we use some of theelara
outputs, in this specific caselink_vehicle_speeds_car_average.geojson
.Comparing this network with the
genet
network used by the same sim we can see for links with the same node numbers, the link ids change.For example, sim
2019_baseline_new_network_controller_10pc_20250108
according to thematsim
config uses networkv5_mad_prairie
via:<param name="inputNetworkFile" value="/efs/basildon/network/v5_mad_prairie/plus_wider_te/network.xml"/>
For link id
402018
inlink_vehicle_speeds_car_average.geojson
, this link has the followingfrom, to
nodes:5177106139033910521
and5177106139066155527
. Whereas inv5_mad_prairie
the link id is68892
(samefrom, to
node ids).Upon finding this, I also remembered seeing this exact same issue flagged as a comment in Alex K's old BERTIE validation jupyter notebooks (some of which we still use and converted into scripts as part of our current BERTIE validation workflow), see: https://github.com/arup-group/te_post_processing/blob/6f141b0cdb94025df21c6174cf468b23ac8ff81f/benchmarking_2023_refresh/Dashboard/SERTM%20Benchmark%20-%20By%20Vehicle%20Type_v2.py#L189C5-L196C63
At the time I inherited the above I had no real idea about
elara
or what it did and because the notebooks were so old I assumed whatever this bug was, was fixed by the time I took over looking after validation for our V2 refresh ofBERTIE
in 2023. The current workaround used in the benchmarking scripts is to use thefrom, to
node ids and join to a version of the network pre-elara. This is what I have suggested we do currently for Basildon while we investigate this issue (elara
seems to be only altering link ids, node ids are unaffected, confirmed by the above example).The text was updated successfully, but these errors were encountered: