File Exchange

image thumbnail

Agent-Based Modeling

version 1.0.5 (694 KB) by wgl
Demonstrations of Agent-Based Modeling in the scenarios of driver-assistance driving.

24 Downloads

Updated 13 Dec 2018

View License

Agent-Based Modeling (ABM) is a style of modelling to investigate and predict the emergence of complex group behaviors through simulating the actions and interactions of a large among of autonomous agents in given scenarios. ABM has been extensively used in the academia, e.g., game theory, complex system and computational sociology. With respect to autonomous driving, ABM is also a popular simulation approach, e.g., in developing driving policies and safety verification. The conventional motion planning and control methods, e.g., PID control, feedback linearization or model predictive control, expect a prediction over the future trajectories of other traffic participants in order to avoid collisions, but real traffic scenarios involve complex interactions among various road users (Schwarting, Planning and Decision-Making for Autonomous Vehicles, MIT, 2018). To conquer this challenge, the emerging trends are the behavior-aware motion planning and learning-based approaches. ABM is then could be naturally exploited to handle the complex, cluttered environments while modeling the uncertain interactions with each other. This would expend Simulink as an integrated platform to develop and verify learning-based algorithms. For a description, you can see this video: https://www.youtube.com/watch?v=nKOleGGEwJI

Cite As

wgl (2019). Agent-Based Modeling (https://www.mathworks.com/matlabcentral/fileexchange/68720-agent-based-modeling), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (15)

cao kaifa

Hi, TK, it is good work, thanks. I'd like to know what documents are available for work?

Fu Zhang

@Linfeng Zhang: Probably you don't have write permission of your D drive. Just download the file to a directory you have write permission, unzip it and click run in R2018b.

I have some errors when i run this program, here is the details, the version is R2018b.
Updating Model Reference SIM Targets 1
Elapsed: 24 sec
Building mDriver 1
Elapsed: 23 sec
### Build procedure for model: 'mDriver' aborted due to an error.
Line 1: Keyword expectedcannot open output file "D:\study\matlab.dll:
Component:Simulink | Category:Model error
Error while bringing model references of model AgentBasedModeling up to date: see errors reported above for details.
Component:Simulink | Category:Model error

Junwei Zhao

i have some truble when i run it( My matlab is 2018b),here is the error message when i first run it:
Building mDriver:###Build procedure for model:'mDriver' aborted due to an error.
Line1:Keyword expectedMissing exports.Aborting
Component Simulink | Category:Model error
Error while bringing model references of model AgentBasedModeling up to date: see error reported above for details.
There have two Error when i run the simulation.
Anyone who can help me ? Thanks

Fu, thank you for your response. The version was the issue.

Fu Zhang

@Jorge: I just download the file to a directory \AMB and open AgentBasedModeling.slx, click play. The model runs fine without any issue. I am using MATLAB 2018b. What version of MATLAB are you using? Can you try download and run it again?

Thanks!

It is a very useful tool to start using Simulink to build ABM. However, when running the AgentBasedModeling.slx file, I got the following error: "The model 'mvehicle1' referenced by 'AgentBasedModeling/Agents Pool/Vehicle 1: Driver Strategy & Vehicle Model' is not found.
Component:Simulink | Category:Block error"

Could anyone point out where this file is or what's the error?
Thanks in advance,

Nick Sarnie

@medianto Hi, are you able to reproduce the error you mentioned in your previous comment?

It appears to be an error during code generation for one of the models in this file exchange submission. If you can reproduce it, can you please let me know of the reproduction steps?

Thank you!

TK

@wgl
Thank you for your reply. I realized that the software is guaranteed to run on Standard license but Home license.

wgl

@medianto
Thanks for your interests in our demo. I have never seen that error message before. I would like to suggest to remove all the .slxc files and the slprj folder and run it again, or just unzip the files into a new folder and rerun.

medianto

thank,
but i have problem while running it
this is the error massage

"Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
Undefined function or variable 'writeCodeInfoFcn'.
Variable 'writeCodeInfoFcn' does not exist.
Suggested Actions
Load a file into base workspace."

best regard

wgl

@TK
Thanks for your interests in our demo. This demo was created in R2018b. I can run this demo using R2018b:
1. Open AgentBasedModeling.slx (Don't need to load mVehOut.mat. It will be loaded automatically.)
2. Click Play button

I wonder may you provide more information regarding your problem, like error messages, as well as the version of MATLAB you are using?

TK

Please help me.
It doesn't work.

I tried this 3 steps.
#1. Open [AgentBasedModeling.slx].
#2. Load [mVehOut.mat].
#3. Run the simulation

medianto

Updates

1.0.5

Update bus objects in mVehOut.mat and preview figures.

1.0.4

Add YouTube link.

1.0.3

Add Tags

1.0.2

Update MATLAB Release Compatibility

MATLAB Release Compatibility
Created with R2018b
Compatible with R2018b
Platform Compatibility
Windows macOS Linux