Skip to content

BKZhao/Spatially-Agent-Based-Model-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spatially Agent-Based Model Demo

Project Overview

This project is a demonstration of a Geographic Information System (GIS) Agent-Based Model using Repast Simphony. It simulates the creation of agents based on real-world geographical data and integrates external datasets to enrich agent attributes.

The core functionality involves initializing agents from a vector Shapefile (.shp) and matching them with travel time data from a CSV file using a common identifier.

Key Features

  • GIS Integration: Loads agents spatially using GeoTools/Repast Geography from Shapefiles.
  • Data Fusion: Merges attribute data from CSV files into spatial agents. Implements an efficient lookup mechanism (HashMap-based) to merge.
    • Spatial Attributes : From Shapefiles (e.g., Region, Cluster ID, Urban/Rural status).
    • Socio-Economic Attributes : From CSV files (e.g., Travel Times, Access Costs).
  • Scheduled Monitoring: Includes a monitoring class that dumps agent states to the console at specific simulation ticks.
  • Utility Testing: Includes a standalone CSV parser test.

Project Structure

src/
└── gisdemo/
    ├── Agent.java           # Agent entity class with getters/setters and step logic
    ├── GISAgentBuilder.java # ContextBuilder: Loads Shapefile & CSV, creates agents
    ├── Monitor.java         # Observer: Collects and prints data 
    └── CSVTest.java         # Utility: Standalone script to test CSV reading logic

.

About

This project is a Spatially Agent-Based Model Demo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published