Private project case study
Ecological Pyramid Simulator
A food-web simulator using a generic ternary tree, dietary constraints, traversal queries, and reversible snapshots.
Java · Data structures · JSON
- DFS + BFS
- JSON / snapshots / undo
- 80+ tests in project notes

01 / Problem
The constraint
Keep parent/child relationships and dietary rules valid as users mutate and restore a tree-based ecosystem model.
02 / Structure
Architecture at a glance
- CLI commands
- Generic ternary tree + constraint checks
- Traversal queries + JSON snapshots
03 / Implementation
Engineering decisions
- A generic ternary tree uses bidirectional parent pointers and DFS/BFS traversal.
- The constraint engine enforces herbivore, carnivore, and omnivore relationships and checks cycles/orphaned subtrees.
- JSON persistence and snapshots support undo/redo and analytical queries.
04 / Evidence
Measurement context
Based on author-supplied project notes. The 80+ test cases and constraint coverage have not been independently verified from public source.
05 / Trade-offs
Limits worth stating
- A ternary tree is a deliberately constrained model, not a general ecological network.
- Snapshot-based undo favors straightforward recovery over minimal storage.
- The simulator models structural rules; it is not a scientific population predictor.