import{_ as i,c as a,a2 as n,o as t}from"./chunks/framework.DYF6f1aH.js";const E=JSON.parse('{"title":"Simulation Configuration Guide","description":"","frontmatter":{},"headers":[],"relativePath":"Simulation_Config_Guide.md","filePath":"Simulation_Config_Guide.md"}'),e={name:"Simulation_Config_Guide.md"};function l(h,s,p,k,o,r){return t(),a("div",null,s[0]||(s[0]=[n(`

Simulation Configuration Guide

This guide provides instructions on how to configure the simulation by editing the configuration files. You can customize interceptor and threat behaviors, simulation parameters, and more to suit your needs.

Configuration Files

The main configuration files you will work with are located in the Assets/StreamingAssets/Configs/ directory. In a deployment context, these files are located in the micromissiles_Data/StreamingAssets/Configs/ directory.

File Locations

Development context:

Deployment context:

Overview of Simulation Configurations

Simulation Configuration Examples

The simulation configurations are defined in JSON files that specify the initial setup for missiles and targets.

1_salvo_1_hydra_7_drones.json

This is a basic configuration featuring a single salvo with one interceptor type (HYDRA_70) and seven threat drones.

json
{
  "timeScale": 1,
  "interceptor_swarm_configs": [
    {
      "num_agents": 1,
      "agent_config": {
        "interceptor_type": "HYDRA_70",
        "initial_state": {
          "position": { "x": 0, "y": 20, "z": 0 },
          "rotation": { "x": -45, "y": 0, "z": 0 },
          "velocity": { "x": 0, "y": 10, "z": 10 }
        },
        "dynamic_config": {
          "launch_config": { "launch_time": 0 },
          "sensor_config": {
            "type": "IDEAL",
            "frequency": 100
          }
        },
        "submunitions_config": {
          "num_submunitions": 7,
          "launch_config": { "launch_time": 4 },
          "agent_config": {
            "interceptor_type": "MICROMISSILE",
            // Submunition configuration...
          }
        }
      }
    }
  ],
  "threat_swarm_configs": [
    {
      "num_agents": 7,
      "agent_config": {
        "threat_type": "DRONE",
        "initial_state": {
          "position": { "x": 0, "y": 600, "z": 6000 },
          "rotation": { "x": 90, "y": 0, "z": 0 },
          "velocity": { "x": 0, "y": 0, "z": -50 }
        },
        // Other threat configurations...
      }
    }
  ]
}

3_salvo_10_hydra_200_drones.json

This configuration demonstrates a more complex scenario with three salvos, each launching ten HYDRA_70 missiles at different times against 200 threat drones. This results in a total of 210 missiles (including submunitions) engaging 200 targets.

json
{
  "timeScale": 1,
  "interceptor_swarm_configs": [
    {
      "num_agents": 10,
      "agent_config": {
        "interceptor_type": "HYDRA_70",
        "initial_state": {
          "position": { "x": 0, "y": 20, "z": 0 },
          "rotation": { "x": -45, "y": 0, "z": 0 },
          "velocity": { "x": 0, "y": 10, "z": 10 }
        },
        "dynamic_config": {
          "launch_config": { "launch_time": 0 },
          "sensor_config": {
            "type": "IDEAL",
            "frequency": 100
          }
        },
        "submunitions_config": {
          "num_submunitions": 7,
          "launch_config": { "launch_time": 4 },
          "agent_config": {
            "interceptor_type": "MICROMISSILE",
            // Submunition configuration...
          }
        }
      }
    },
    // Two more similar interceptor_swarm_configs with different launch times...
  ],
  "threat_swarm_configs": [
    {
      "num_agents": 200,
      "agent_config": {
        "threat_type": "DRONE",
        "initial_state": {
          "position": { "x": 0, "y": 600, "z": 6000 },
          "rotation": { "x": 90, "y": 0, "z": 0 },
          "velocity": { "x": 0, "y": 0, "z": -50 }
        },
        // Other threat configurations...
      }
    }
  ]
}

Key Differences Between the Examples:

The key difference between the examples is that the Number of Salvos in 3_salvo_10_hydra_200_drones.json file includes multiple salvos by adding multiple entries in the interceptor_swarm_configs array, each with its own launch_time.

Achieving Multiple Salvos:

Multiple salvos are achieved by:

Key Configuration Parameters

Within Each Swarm Configuration

Adding or Modifying Agents

  1. Add a New Swarm Configuration:

    To introduce a new interceptor or threat swarm (or an additional salvo), create a new entry in interceptor_swarm_configs or threat_swarm_configs.

    json
    {
      "num_agents": 5,
      "agent_config": {
        "interceptor_type": "MICROMISSILE",
        // Additional configurations...
        "dynamic_config": {
          "launch_config": { "launch_time": 15 },
          // Other dynamic settings...
        }
      }
    }
  2. Modify Existing Configurations:

    Adjust parameters like num_agents, initial_state, or dynamic_config to change the behavior of existing agents or salvos.

Model Configurations

The model configurations define the physical and performance characteristics of interceptor and threat models. The default models provided can be customized to suit your research needs.

Available Models

The Models directory contains the following default model configurations:

These JSON files serve as templates and can be tweaked to modify the behavior of the corresponding models.

Editing Model Configurations

Example: micromissile.json

This file defines parameters for the micromissile model.

json:Assets/StreamingAssets/Configs/Models/micromissile.json
{
  "accelerationConfig": {
    "maxReferenceAcceleration": 300,
    "referenceSpeed": 1000
  },
  "boostConfig": {
    "boostTime": 0.3,
    "boostAcceleration": 350
  },
  "liftDragConfig": {
    "liftCoefficient": 0.2,
    "dragCoefficient": 0.7,
    "liftDragRatio": 5
  },
  // Other configurations...
}

Configurable Parameters:

Modifying Parameters

You can tweak the parameters in these model files to adjust performance. For example:

Adding New Models

To define a new inte or threat model:

  1. Create a New JSON File in Assets/StreamingAssets/Configs/Models/.

  2. Define Model Parameters similar to the existing model files.

  3. Update the Code to recognize and load the new model if necessary.

Note: Ensure that any new parameters added to the model configuration are reflected in the corresponding C# classes.

Relevant C# Scripts

SimulationConfig.cs

This script defines the data structures used to interpret the JSON simulation configuration files.

Assets/Scripts/Config/SimulationConfig.cs

Classes:

Enums:

StaticConfig.cs

This script defines the classes corresponding to the model configuration JSON structure.

Assets/Scripts/Config/StaticConfig.cs

For example:

csharp
[Serializable]
public class StaticConfig {
  [Serializable]
  public class AccelerationConfig {
    public float maxReferenceAcceleration = 300f;
    public float referenceSpeed = 1000f;
  }

  [Serializable]
  public class BoostConfig {
    public float boostTime = 0.3f;
    public float boostAcceleration = 350f;
  }

  [Serializable]
  public class LiftDragConfig {
    public float liftCoefficient = 0.2f;
    public float dragCoefficient = 0.7f;
    public float liftDragRatio = 5f;
  }

  // Other configuration classes...

  public AccelerationConfig accelerationConfig;
  public BoostConfig boostConfig;
  public LiftDragConfig liftDragConfig;
  public BodyConfig bodyConfig;
  public HitConfig hitConfig;
}

Updating Classes:

If you add new parameters to the JSON model files, ensure the corresponding classes in StaticConfig.cs are updated to include these new fields.

Using the Deployment Build

When using the deployment build:

While the simulation is running, you can load a new Simulation Configuration JSON file at runtime by opening the panel with 'L'.


Note: Always back up configuration files before making significant changes. Incorrect configurations can lead to simulation errors.

For further assistance, refer to the comments and documentation within the code files:


This guide aims to help you set up and customize the simulation project effectively. If you encounter any issues or have questions, please reach out to the project maintainers.

`,75)]))}const g=i(e,[["render",l]]);export{E as __pageData,g as default};