Skip to content

JoshCu/route_rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experimental MC routing in rust

immitating t-route to help teach myself rust the code in here isn't very correct or good

Network Routing

A Rust implementation of network flow routing using the Muskingum-Cunge method.

Project Structure

src/
├── main.rs         # Main entry point
├── config.rs       # Configuration structures
├── network.rs      # Network topology and database operations
├── state.rs        # Network state management
├── routing.rs      # Core routing logic
├── mc_kernel.rs    # Muskingum-Cunge kernel (existing)
└── io/             # I/O operations
    ├── mod.rs      # Module declarations
    ├── csv.rs      # CSV reading/writing
    ├── netcdf.rs   # NetCDF output
    └── results.rs  # Simulation results storage

Dependencies

  • hdf5
  • netcdf
  • sqlite3

on ubuntu

sudo apt install -y libhdf5-dev libnetcdf-dev libsqlit3-dev

Building and Running

# Build in release mode for optimal performance
cargo build --release

# Run the simulation
cargo run --release

Performance Optimizations

  • Parallel loading of external flow CSV files
  • Serial routing computation (due to dependencies)
  • Efficient topological sorting for correct processing order

Future Improvements

  • Command-line argument parsing
  • Configuration file support
  • Additional output formats
  • Performance profiling and optimization
  • Unit tests for each module

About

Experimental rust MC routing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •