• 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

    Visualizing Agent Movement

    Agent movement in a geo-based coordination system can be visualized using Kepler.


    How to generate a visual animation of simulation results

    1. Enable an output to generate trips-layer convenient output, add the tag trips to your output of the desired type. MARS will create an trips.geojson file in your working directory, containing the trajectory data of your spatial objects.

      {
       "agents": [
         {
           "name": "Citizen",
           "outputs": [
             {
               "kind":"trips"
             }
           ]
         }
       ]
      }
      

      Distinct objects

      When you want to differentiate between multiple trajectories (e.g., using a different color based on given value) you can add string collection of tripsFields which will be added as property to respective trajectory. For example when agents provide a modal type, then trajectories can be visualized, highlighting their current modality.

      {
       "agents": [
         {
           "name": "Citizen",
           "outputs": [
             {
               "kind":"trips",
               "outputConfiguration": {
                 "tripsFields": ["ModalType"]
               }
             }
           ]
         }
       ]
      }
      
    2. Use kepler.gl and upload the generated trips.geojson The color can be configured by expanding the color tab, clicking on the three dots, select Color Based On.

      Kepler visualization of trips

    Back to top Copyright © MARS GROUP.
    HAW Hamburg