4 way traffic model using SARL

6 views
Skip to first unread message

Akram Seid Endris

unread,
May 13, 2024, 9:40:59 AMMay 13
to sarl

Hello nice people!

I have taken computational models for complex systems course and the professor requested us to do a seminar or a project on a complex systems and from the list of topics We have given I saw the SARL programming language listed for a project.I have never wrote a code with SARL but Having a background in java and spring boot I found the SARL interesting to me and I am planning to do a 4 way cross section traffic model with it.

My idea is this: I will have 4 traffic lights 🚦 which will work sequentially meaning one will stay green for a couple of seconds while the others are red similar to the typical traffic lights and also I will have cars which will be crossing the roads and will take different amount of time to cross based on the type of the vehicle that means if I assigned 20 seconds for the green light and if I have 5 vehicles which takes 5 seconds to pass after the 4th vehicle I want to stop the last car because the passing time is up and so on.

When the time of the light ends or 3 seconds before the light ends I want to fire an event and trigger the other traffic agent to be ready to kick off.

Before starting running the program I will be feeding how many cars and the time that will require them to pass to the program and the simulation continues.

Is it easily implementable in SARL ? I have 10 days until the deadline

Thank you all in advance.

Stéphane Galland

unread,
May 21, 2024, 8:01:23 AMMay 21
to sarl
Hello.
Sorry for the delay of my answer. Your message was in my spams.

Writing the logic of the simulator in fully possible within 10 days wiith SARL. However, I exclude user-interface implementation that may take a long time too.

We have implemented more complex simulators more or less in the same time window, e.g. https://bitbucket.org/sgalland/zayed-fogsimu/src/master/

Reply all
Reply to author
Forward
0 new messages