matsim-vsp / parallel_qsim_rust

Parallel and distributed implementation of the Qsim in Rust
8 stars 0 forks source link

Add global network #93

Closed Janekdererste closed 11 months ago

Janekdererste commented 1 year ago

Toolin messed up my branches. Hence, the *_2 branch

fixes #82 fixes #94

This turned out to be a major undertaking. To proceed with my project, I have removed all routing related code because the dependencies used caused to much maintanance burden. Basically, everytime I tried to pick up the project I had to fix something related to the rust_road_router. #94 gave the final push to remove the dependency, because not running on macOS is not an option. The code related to routing is now on branch adhoc_routing. Depending on how we want to proceed we can decide to take pieces from that branch into the main branch.

This PR also adds a network structure with proper Id support. Ids are now created like in MATSim classic. Due to Rust's ownership model I decided to not create a global Id-Cache, but the structure (e.g. network, population) which owns the original data also contains the IdStore which caches ids. Ids also contain a mapping between external MATSim Ids, which are string based and internal integer Ids. The id implementation is hidden behind an Rc<Id<T>>, so that ids can be passed around without head aches.