The Urban Sensing and Planning Engine is a Cognitive Decision Support System (CDSS) designed to enhance the efficiency, sustainability, and livability of urban environments. By integrating advanced data analysis with automated reasoning, the system assists city managers in planning territorial activities while reacting dynamically to real-time changes.
The system relies on the CoCo cognitive architecture and employs a dual-process cognitive architecture inspired by human cognition:
- System 1 (Thinking Fast): A rule-based system (implemented via CLIPS) that provides quick, automatic, and intuitive reactions to environmental data. It recognizes familiar patterns and triggers immediate actions, such as responding to sensor thresholds.
- System 2 (Thinking Slow): A timeline-based planner that handles deliberate, analytical thinking. It manages complex problem-solving, long-term planning, and the achievement of specific urban goals through logical and causal reasoning.
- Real-time Data Integration: Collects and processes data from various urban sensors and sources to maintain an up-to-date understanding of the environment.
- Dual-Process Reasoning: Utilizes both fast, rule-based reactions and slow, timeline-based planning to address immediate needs and long-term goals.
- Automated Planning: Generates and executes plans for urban activities, optimizing resource allocation and scheduling.
- Scalability: Designed to handle the complexities of large urban areas with multiple data streams and planning requirements.
- Modular Architecture: Built with Docker containers for easy deployment, scaling, and maintenance.
This project uses Docker Compose to manage and deploy the various services that make up the Urban Sensing and Planning Engine (USPE). Below are instructions for running the system in both production and development environments.
To deploy the full stack using Docker Swarm:
-
Ensure Docker and Docker Swarm are installed and initialized.
-
Build all required Docker images for your services. For example:
# Build the main Urban Sensing Engine image
docker build --build-arg BUILD_FCM=ON --build-arg BUILD_LLM=ON -t urban-sensing-engine:latest .
# Build the NESA Python service image (if used)
docker build -t uspe-nesa:latest ./nesa- Create all required secrets:
docker secret create fcm_json /path/to/fcm.json
docker secret create llm_api_key /path/to/llm_api_key.txt
docker secret create nesa_credentials /path/to/nesa_credentials.json- Deploy the stack:
docker stack deploy -c compose.swarm.yaml urban-sensingThis will start all services defined in compose.swarm.yaml, including USPE, MongoDB, MQTT, Swagger UI, and others.
For local development, use the development compose file:
docker compose -f compose.dev.yaml up --buildThis will start the services with development settings, allowing for easier debugging and code changes.
This work is supported by the project "House of emerging technologies of Matera" (CTEMT) funded by the Ministry of Economic Development of Italy, CUP I14E20000020001.