• 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

    TODO: under construction

    1. New Project
    2. Console Application
    3. Nuget -> Mars.Life.Simulations -> Install for Project
    4. Set up project structure in root directory:
      1. Add directory ModelStarter
      2. Drag Program.cs into ModelStarter
      3. Add directory: Agents (create new classes Sheep.cs, Wolf.cs, Grass.cs)
      4. Add directory: Layers (create new class Grassland.cs; agents who interact with each other can be placed on the same layer)
    5. GrassLayer.cs:
      1. Choose layer type -> RasterLayer
      2. Must implement ILayer
    6. Grass.cs:
      1. Must implement IAgent -> provides a Tick method (contains the agent's behavioral logic which is executed during each time step of the simulation) and an ID (identifies a single agent)
    7. Program.cs:
      1. Define a ModelDescription description
      2. Add layer to description
      3. Add agents to description
      4. Define a SimulationConfig config (its return is provided by the method CreateDefaultConfig)
      5. Define a method CreateDefaultConfig() that returns a SimulationConfig
        1. Define variables -> startPoint, suffix
        2. Define a SimulationConfig config and open it with a curly brace
          1. Define Globals -> StartPoint, EndPoint, DeltaTUnit, OutputTarget, CsvOptions (FileSuffix, Delimiter, )
          2. Define LayerMappings ->
    Back to top Copyright © MARS GROUP.
    HAW Hamburg