Coral reef larval dispersal simulation and marine protected area network connectivity analysis library in MoonBit.
src/
├── types/ Geometry, reef nodes, larval traits, flow fields, and validation
├── simulation/ Particle lifecycle, settlement, ensembles, diagnostics, and replicates
├── matrix/ Dense/CSR matrices, decompositions, Markov analysis, and diagnostics
├── network/ Graph algorithms, centrality, paths, reachability, and robustness
├── mpa/ Portfolio constraints, optimizers, Pareto analysis, and stress tests
├── io/ JSON/CSV/GeoJSON/HTML exports and benchmark report formatting
├── cli/ Sample fixtures, analysis pipeline, and benchmark command
└── main.mbt Command-line entry pointmoon version --allmoon fmt --check
moon check --target all --deny-warn
moon test --target all --deny-warnmoon run src/main.mbt -- simmoon run src/main.mbt -- json
moon run src/main.mbt -- geojson
moon run src/main.mbt -- csv
moon run src/main.mbt -- benchmarklet diagnostics = @matrix.validate_transition_matrix(transition_matrix)
let graph = @network.ReefGraph::from_dispersal_matrix(reefs, transition_matrix)
let route = @network.compute_weighted_path(graph, source_idx, target_idx)
let summary = @simulation.SimulationDiagnostics::from_result(simulation_result)Coral reef larval dispersal simulation and marine protected area network connectivity analysis library in MoonBit.