This index provides a comprehensive guide to understanding the Multi-Heart-Model codebase architecture and structure.
-
QUICK_REFERENCE.md - Start here for quick answers
- Quick start code examples
- Key files and their purposes
- Parameter ranges and defaults
- Common usage patterns
- Troubleshooting guide
- Best for: Developers familiar with the project or quick lookups
-
CODEBASE_ANALYSIS_SUMMARY.md - Executive overview
- High-level summary of architecture
- Key findings and strengths
- Technical specifications
- Next steps for integration
- Best for: Project managers and system architects
-
ARCHITECTURE_OVERVIEW.md - Comprehensive technical guide
- Complete module descriptions
- All existing models and their specifications
- Architecture patterns and design decisions
- Coupling and integration mechanisms
- Testing framework details
- Extensibility patterns
- Best for: Developers implementing new features
-
ARCHITECTURE_DIAGRAM.txt - Visual reference
- System architecture diagrams (ASCII)
- Data flow illustrations
- Component relationship diagrams
- Testing infrastructure overview
- Configuration structure
- Best for: Understanding system flow visually
-
architecture.md - Original architecture document
- Mathematical formulation
- Subsystem responsibilities
- Configuration flow
- Output specifications
-
hbcm_overview.md - HBCM model overview
- Core mathematical formulation
- Model capabilities
- Use cases and applications
- Workflow integration
-
microprocessor_motorhand_integration.md - Hardware integration details
- Primal Logic Processor specifications
- MotorHandPro integration
- Hardware deployment information
-
NODERED_NODEJS_INTEGRATION.md - Node-RED and Node.js integration architecture
- Node-RED orchestration patterns
- Node.js API gateway design
- OpenSim biomechanical integration
- WebSocket bridging and real-time data
- IoT device aggregation
- Implementation roadmap
- Best for: Developers adding web services, IoT integration, or OpenSim coupling
- Start with QUICK_REFERENCE.md (5 min read)
- Review ARCHITECTURE_DIAGRAM.txt for visual understanding (10 min)
- Read ARCHITECTURE_OVERVIEW.md for complete context (30 min)
- Examine code in
src/directory - Run tests:
pytest tests/ -v
- Review ARCHITECTURE_OVERVIEW.md section "10. PATTERNS FOR ORGAN CHIP SYSTEM INTEGRATION"
- Check QUICK_REFERENCE.md "Integration Testing Checklist"
- Study existing models in
src/cardiac/andsrc/neural/ - Follow the modular composition pattern
- Add comprehensive tests
- Read ARCHITECTURE_OVERVIEW.md section "9. PERFORMANCE CHARACTERISTICS"
- Review QUICK_REFERENCE.md "Performance Tips"
- Profile using Python's cProfile or pytest-benchmark
- Consider upgrading from Euler to RK4 integration
- Evaluate vectorization opportunities
- Review CODEBASE_ANALYSIS_SUMMARY.md "Hardware Deployment Ready"
- Study
src/integration/motorhand_bridge.pyfor QUANT interface - Review Arduino code generation in
generate_arduino_interface() - Read QUICK_REFERENCE.md "Hardware Deployment Path"
- Follow integration testing checklist
- Check QUICK_REFERENCE.md "Troubleshooting" section
- Review relevant test file for expected behavior
- Consult ARCHITECTURE_OVERVIEW.md for implementation details
- Check parameter ranges in QUICK_REFERENCE.md
- Neural Model: See ARCHITECTURE_OVERVIEW.md § 2.B
- Cardiac Model: See ARCHITECTURE_OVERVIEW.md § 2.A
- Coupling Model: See ARCHITECTURE_OVERVIEW.md § 2.C
- Primal Logic Processor: See ARCHITECTURE_OVERVIEW.md § 2.D
- Motor Integration: See ARCHITECTURE_OVERVIEW.md § 2.E
- Model Interface: See ARCHITECTURE_OVERVIEW.md § 3.A
- Coupling Pattern: See ARCHITECTURE_OVERVIEW.md § 3.B
- Extensibility Pattern: See ARCHITECTURE_OVERVIEW.md § 10
- Unit Tests: See ARCHITECTURE_OVERVIEW.md § 6
- Integration Tests: See ARCHITECTURE_DIAGRAM.txt "TESTING & VALIDATION"
- YAML Configuration: See ARCHITECTURE_DIAGRAM.txt "CONFIGURATION SYSTEM"
- Parameter Ranges: See QUICK_REFERENCE.md "Parameter Ranges & Defaults"
src/
├── cardiac/ → VanDerPolOscillator model
├── neural/ → FitzHughNagumo model
├── coupling/ → HeartBrainCouplingModel orchestrator
├── microprocessor/ → PrimalLogicProcessor controller
└── integration/ → MotorHandBridge interface
tests/
├── test_models.py → Unit tests
└── integration/test_microprocessor_motorhand.py → Integration tests
config/
└── default.yaml → YAML parameters
examples/
└── microprocessor_motorhand_demo.py → Complete demo script
| Metric | Value |
|---|---|
| Total Python LOC | 1,153 |
| Test Coverage | ~100% of production code |
| Test Methods | 30+ |
| Main Modules | 5 |
| Dependencies | NumPy (core only) |
| Default Timestep | 0.01s (100 Hz) |
| Integration Pattern | Explicit Euler |
| State Dimensionality | 4D (extendable) |
| Control Performance | 75% jerk reduction |
| Hardware Target | SkyWater 90nm |
- Quick start examples
- Parameter tables
- Common patterns
- Troubleshooting
- High-level architecture
- Key findings
- Next steps
- Conclusions
- Complete module descriptions
- All equations and mathematics
- Data structures
- Integration mechanisms
- ASCII diagrams
- Data flow illustrations
- Component relationships
- Research background
- Mathematical derivations
- Hardware specifications
Read: QUICK_REFERENCE.md → Module Relationships Time: 5 minutes
Read: ARCHITECTURE_OVERVIEW.md § 10 → QUICK_REFERENCE.md § Integration Testing Checklist Time: 30 minutes planning + implementation
Read: QUICK_REFERENCE.md § Parameter Ranges & Defaults Time: 5 minutes
Read: ARCHITECTURE_OVERVIEW.md § 9 → QUICK_REFERENCE.md § Performance Tips Time: 20 minutes analysis + optimization
Read: CODEBASE_ANALYSIS_SUMMARY.md → QUICK_REFERENCE.md § Hardware Deployment Path Time: 2-4 hours
Read: QUICK_REFERENCE.md § Troubleshooting → ARCHITECTURE_OVERVIEW.md relevant section Time: 10-30 minutes
When reading documentation, you can jump to actual code files:
- Cardiac model:
/src/cardiac/van_der_pol.py - Neural model:
/src/neural/fhn.py - Coupling model:
/src/coupling/hbcm.py - Primal Logic:
/src/microprocessor/primal_processor.py - Control utilities:
/src/microprocessor/control_system.py - Motor bridge:
/src/integration/motorhand_bridge.py - Unit tests:
/tests/test_models.py - Integration tests:
/tests/integration/test_microprocessor_motorhand.py - Example:
/examples/microprocessor_motorhand_demo.py
QUICK_REFERENCE.md (Start here)
↓
├→ ARCHITECTURE_DIAGRAM.txt (Visual overview)
│ ↓
└→ ARCHITECTURE_OVERVIEW.md (Deep technical details)
↓
└→ CODEBASE_ANALYSIS_SUMMARY.md (Executive summary)
↓
└→ Original documentation (Research details)
This documentation was generated on: November 12, 2025
For updates or clarifications:
- Check original
.mdfiles in thedocs/directory - Review relevant code files in
src/ - Run test suite to validate understanding
- Refer to example scripts in
examples/
- Documentation Version: 1.0
- Repository: Multi-Heart-Model
- License: MIT
- Patent: U.S. Provisional Patent Application No. 63/842,846
- Status: Production-ready
Last Updated: November 12, 2025 Total Documentation Pages: 4 comprehensive guides + this index Total Words: ~30,000 Code References: 100+ specific file references Diagrams: 5+ ASCII diagrams