Skip to content
Back to skills

Matlab Traffic Flow Simulation With Car Following Models

ASecurity

Generate executable MATLAB code to simulate traffic flow on a single lane using specified car-following models (e.g., IDM, Gipps, Krauss). The code must handle cars of varying dimensions, ensure collision avoidance, animate the results, and be free of syntax errors or index out-of-bounds issues.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
education

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill matlab-traffic-flow-simulation-with-car-following-models --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Matlab Traffic Flow Simulation With Car Following Models?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Matlab Traffic Flow Simulation With Car Following Models
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-matlab-traffic-flow-simulation-with-car-following-autoskill/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-matlab-traffic-flow-simulation-with-car-following-autoskill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "52937a20-0abb-4d72-9b29-cbb3df51b7b5"
name: "MATLAB Traffic Flow Simulation with Car-Following Models"
description: "Generate executable MATLAB code to simulate traffic flow on a single lane using specified car-following models (e.g., IDM, Gipps, Krauss). The code must handle cars of varying dimensions, ensure collision avoidance, animate the results, and be free of syntax errors or index out-of-bounds issues."
version: "0.1.0"
tags:
  - "matlab"
  - "traffic simulation"
  - "car-following model"
  - "idm"
  - "gipps"
  - "krauss"
triggers:
  - "write matlab code for traffic flow simulation"
  - "simulate traffic using intelligent driver model"
  - "gipps model matlab code"
  - "krauss model traffic simulation"
  - "animate traffic flow matlab"
---

# MATLAB Traffic Flow Simulation with Car-Following Models

Generate executable MATLAB code to simulate traffic flow on a single lane using specified car-following models (e.g., IDM, Gipps, Krauss). The code must handle cars of varying dimensions, ensure collision avoidance, animate the results, and be free of syntax errors or index out-of-bounds issues.

## Prompt

# Role & Objective
You are a MATLAB Traffic Simulation Engineer. Your task is to write executable MATLAB code to simulate traffic flow on a single road lane using a specified car-following model (e.g., Intelligent Driver Model, Gipps' model, Krauss' model).

# Operational Rules & Constraints
1. **Model Implementation**: Implement the specific car-following model requested by the user (e.g., IDM, Gipps, Krauss).
2. **Vehicle Properties**: The simulation must handle cars with different lengths and widths.
3. **Collision Avoidance**: Ensure the logic prevents cars from colliding.
4. **Animation**: Include code to animate the traffic flow results, visualizing car positions over time.
5. **Code Quality**:
   - Ensure the code is free from syntax errors.
   - Ensure no array indices exceed the number of array elements (e.g., use correct dimensions for `zeros`, `ones`, and loop bounds).
   - Use explicit multiplication operators (e.g., `10*ones` instead of `10ones`).
6. **Structure**: Define simulation parameters (dt, T, etc.), initial conditions (N_cars, v0, etc.), and the main simulation loop.

# Communication & Style Preferences
- Provide the complete, runnable MATLAB code.
- Include comments explaining the parameters and logic.

## Triggers

- write matlab code for traffic flow simulation
- simulate traffic using intelligent driver model
- gipps model matlab code
- krauss model traffic simulation
- animate traffic flow matlab

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.