> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veydra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Models

> Creating and managing system dynamics models in Veydra

## Overview

Models are the core building blocks in Veydra. Each model represents a system dynamics simulation that captures the structure and behavior of real-world systems through stocks, flows, and feedback loops.

## Creating a New Model

You can create a new model in several ways:

### From the Dashboard

1. Navigate to your **Dashboard**
2. Click **+ New Project** to create a new project with a model
3. Configure your model settings and click **Create**

### From an Existing Project

1. Open your project from the Dashboard
2. In the **Models & Activities** section, click **+ New Model**
3. Your new model will be added to the existing project

<Tip>
  Creating models within an existing project helps organize related simulations and share team access.
</Tip>

### From the Library

1. Browse the **Model Library** for existing models
2. Click **Fork** on any public model
3. A copy will be created in your workspace that you can modify

## Model Components

Every model consists of several key elements:

<CardGroup cols={2}>
  <Card title="Stocks" icon="database">
    Accumulations that represent the state of your system (e.g., Population, Inventory, Capital)
  </Card>

  <Card title="Flows" icon="arrow-right">
    Rates of change that increase or decrease stocks over time
  </Card>

  <Card title="Parameters" icon="sliders">
    Constants and coefficients that control model behavior
  </Card>

  <Card title="Auxiliaries" icon="calculator">
    Calculated variables that depend on stocks and parameters
  </Card>
</CardGroup>

## Model Settings

Model editing is split into two scopes so it is clear what you are configuring:

### Model-Level Settings

These settings belong to the model entity itself:

* **Title**: Display name for your model
* **Description**: Brief explanation of what the model represents
* **Model Status**: Lifecycle state for the model (draft, active, completed, archived)
* **GitHub Integration**: Link or manage the model repository
* **Activities List**: Create, edit, and manage attached activities

### Default Playground Settings

These settings are edited on the dedicated **Playground Settings** page for a model and control the default playground experience:

* **Default mode** for the model playground
* **Available modes** in the default playground
* **Library/discoverability settings** (include in library, access level, complexity, category, tags)

Use these defaults when users open the model playground without selecting a specific activity.

### Simulation Settings

* **Time Horizon**: How far into the future to simulate
* **Time Step (DT)**: Granularity of calculations
* **Integration Method**: Euler or Runge-Kutta

### Activities

Models can have multiple **Activities** attached to them. Activities provide interactive scenarios where users can manipulate parameters and compete to achieve goals.

Activity statuses are independent from the model lifecycle status. See [Activities](/features/activities) for more details.

## Model Workflow

<Steps>
  <Step title="Design">
    Build your model structure in [Design Mode](/playground/overview#design-mode) using the stock-flow diagram editor and code panel
  </Step>

  <Step title="Test">
    Run simulations in [Experiment Mode](/playground/overview#experiment-mode) to verify behavior matches expectations
  </Step>

  <Step title="Calibrate">
    Fine-tune parameters to match real-world data using built-in calibration tools
  </Step>

  <Step title="Share">
    Publish your model to the library or share directly with collaborators
  </Step>
</Steps>

## Best Practices

<AccordionGroup>
  <Accordion icon="tag" title="Use Descriptive Names">
    Name your stocks, flows, and parameters clearly. Future you (and your collaborators) will thank you.
  </Accordion>

  <Accordion icon="file-lines" title="Document Your Assumptions">
    Use the model description and comments to explain key assumptions and data sources.
  </Accordion>

  <Accordion icon="code-branch" title="Version Your Work">
    Create new model versions when making significant changes to preserve previous states.
  </Accordion>

  <Accordion icon="users" title="Test with Others">
    Share your model with colleagues to catch errors and improve clarity.
  </Accordion>
</AccordionGroup>

## Related Resources

* [Model Playground](/playground/overview) - Interactive modeling environment
* [Activities](/features/activities) - Create interactive scenarios
* [Projects](/features/projects) - Organize models into projects
* [Collaboration](/features/collaboration) - Team sharing and permissions
