• Documentation
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API

    Show / Hide Table of Contents
    • MARS DSL Language
    • MARS Runtime System
      • Getting started with MARS
      • Basic Concepts
        • Multi-Agent-Simulation
        • Agents
        • Layers
        • Entities
        • Environments
          • SpatialHashEnvironment
          • GeoHashEnvironment
          • SpatialGraphEnvironment
          • CollisionEnvironment
        • Model Setup
      • Model Configuration
        • Agent and Entity Configuration
        • Layer Configuration
        • Output Filter
        • Simulation Configuration Options
        • Simulation Output Formats
      • Data Sources
        • Geospatial Data Sources
        • Geospatial Data Types
        • ASCII grid (.asc)
        • CSV
        • Time-series Data
      • Analysis and Visualization
        • Visualizing Agent Movement Trajectories
        • Simple Live Visualization
        • Analyzing Output Data
      • Tutorials
        • Creating a new MARS C# project
        • Creating a starting point for your model
        • Creating vector and raster layer files
        • Building your first model (wolf-sheep-grass)
        • Common problems and solutions
        • Acquire geo data for layers
        • Build and start your model in Kubernetes cluster
    • SmartOpenHamburg
      • Quick Start
      • Ready to use scenarios (boxes)
        • Ferry Transfer
        • Green4Bikes
        • Results
        • Result Schemas
      • Layer
        • Multimodal Layer
        • Modal Layer
        • Scheduling Layer
        • Vector Layer
      • Agents
        • Behaviour Model
        • Multimodal
        • Multi-Capable
        • Multi-Modality
        • Citizen
        • Traveler
      • Entities
        • Referencing
        • Street Vehicles
        • Bicycle Vehicles
        • Ferry

    Simple Live Visualization

    It is possible to visualise your own simulation. To get this visualisation it is necessary to make a few adjustments in the "config.json". The following describes how exactly the installation and execution works.

    Installation

    The visualization tool can be found here. Please clone or download the folder.

    Open your terminal and navigate into this directory.

    Install python3.8 (getting from Python)

    Execute the following command:

    pip3 install -r requirements.txt
    

    Start the Visualization Frontend

    Start the simple visualization by calling:

    python3 main.py
    

    Now your visualization is running and waiting in background for incoming simulation results ✨

    Start the Simulation with Visualization output

    Start you desired simulation and activate the visualization output in your configuration by setting the field pythonVisualization to true

    {
    
     "globals": {
    
      "deltaT": 1,
      "steps": 1000,
      "console": true,
    
       // Add the new field and activate the output
      "pythonVisualization" : true
    
     }
    
     // ... your agent, entities and layer mappings
    
    }
    

    If the model is configured from within the Program.cs file, then setting the field EnableSimpleVisualization to true enables the visualization mode.

    Globals =
    
    {
    
      DeltaTUnit = TimeSpanUnit.Seconds,
      Steps = 1000,
      ShowConsoleProgress = true,
    
      EnableSimpleVisualization = true
    
    }
    
    // ... your agent, entities and layer mappings
    
    Back to top Copyright © MARS GROUP.
    HAW Hamburg