Overview
The Model Playground is Veydra’s central workspace where you build, modify, and test your system dynamics models. It provides an interactive environment with real-time feedback and powerful visualization tools.Key Components
The Model Playground consists of several integrated panels that work together:Model Controls
Parameter adjustment and simulation controls
Stock-Flow Diagram
Visual representation of your model structure
Chart Area
Real-time simulation results and comparisons
Code Editor
Direct Python code editing and customization
Model Controls Panel
Parameter Management
The Model Controls panel is your command center for model interaction:- Active Parameters: Parameters available for real-time adjustment
- Parameter Sliders: Interactive controls for each parameter
- Reset Functions: Quickly return to default values
- Scenario Management: Save and load different parameter sets
Control Features
Parameter Activation
Parameter Activation
Mark parameters as “Active” to enable real-time slider controls during simulation
Reset All Parameters
Reset All Parameters
Use the refresh button to reset all parameters to defaults while keeping them active for quick experimentation
Scenario Comparison
Scenario Comparison
Enable “Compare Mode” to see baseline vs current scenario side-by-side
Stock-Flow Diagram Area
Visual Model Building
The diagram area provides an interactive view of your model’s structure:- Stock Elements: Rectangular boxes representing accumulations
- Flow Elements: Arrows showing rates of change
- Connectors: Links showing influence relationships
- Parameters: Variable elements that can be adjusted
Interactive Features
- Drag and Drop: Reposition elements for better layout
- Real-time Updates: See value changes during simulation
- Zoom and Pan: Navigate large, complex models
- Element Properties: Click to edit element details
The diagram automatically updates to reflect changes made in the code editor
Chart Area
Visualization Options
Single Stock View
Focus on individual model components
Multi-Stock View
Display all stocks simultaneously
Comparison Mode
Baseline vs scenario analysis
Data Export
Export simulation results
Chart Features
- Interactive Legends: Show/hide data series
- Zoom and Pan: Explore different time ranges
- Tooltips: Detailed value information on hover
- Time Units: Automatic scaling (days, weeks, months, years)
Code Editor
Python-Based Models
Veydra uses Python for model execution, giving you full flexibility:Editor Features
- Syntax Highlighting: Python code formatting
- Auto-completion: Intelligent code suggestions
- Error Detection: Real-time syntax checking
- Version Control: Git integration for change tracking
Simulation Engine
Real-Time Execution
The simulation engine processes your models using:- Pyodide Integration: Python execution in the browser
- WebAssembly: High-performance computation
- Incremental Updates: Fast parameter changes
- Memory Management: Efficient data handling
Performance Features
- Caching: Smart caching of model files and configurations
- Parallel Processing: Multiple scenario execution
- Optimization: Automatic performance tuning
- Error Handling: Graceful failure recovery
Workflow Example
1
Model Setup
- Load or create a new model
- Review the stock-flow diagram
- Identify key parameters to activate
2
Parameter Configuration
- Mark important parameters as “Active”
- Set initial values using sliders
- Configure simulation time range
3
Simulation
- Run initial baseline simulation
- Adjust parameters in real-time
- Compare different scenarios
4
Analysis
- Review chart results
- Export data for further analysis
- Save interesting scenarios
Advanced Features
Git Integration
- Version Control: Track all model changes
- Branching: Experiment with different approaches
- Merging: Collaborate on model development
- History: Review past versions and changes
Collaboration Tools
- Real-time Sharing: Multiple users in same playground
- Comments: Annotate models and results
- Permissions: Control who can edit vs view
- Change Notifications: Track team member activities
Use the Model Playground’s reset functionality to quickly experiment with different parameter combinations while maintaining your baseline for comparison