Is it possible to make car drive on the opposite direction lane in the road traffic library? - simulation

I'm currently doing simulation on autonomous vehicles in Anylogic. But the problem for me now is that I don't know in the road traffic library of Anylogic, if it's possible for the cars to change lane and drive on the opposite direction to avoid obstacles on the current lane(considering a road with one lane for each direction). Or is there any simulation software can simulate that scenario?
enter image description here

It's not possible to do that particular maneuver with the road traffic library. You will have to use the process modeling library (PML) to avoid obstacles and change lanes to the opposite direction. This means that you will have to construct the car intelligence in order to avoid collisions.
You can nevertheless use traffic library everywhere and mix it with PML in those particular segments, but that is quite complicated.
In general for autonomous vehicles it's better to use the PML... the road traffic library is quite limited.

Related

How can I modify driver "aggression" in the Road Traffic Library?

Im doing a road traffic simulation and have noticed that the vehicles are far too passive. I know for a fact that in the area this simulation is supposed to be the people at the wheel are far more "aggressive" and give less headway and dont yield as much.
I have scoured every piece of official and non official documentation but cannot find an answer.
You can't.
The library is a black box that only "opens" the settings that you can see in the blocks. The only additional settings you can play with (beyond the block properties) is the "Road Network descriptor":
But there is no aggressiveness setting. If this is the key purpose of your model, you either create your own ABM logic from scratch or you'd need to check other tools that are focused on cars (but typically, these are then far more restrictive on other dimensions that AnyLogic is flexible on, it all depends on your model purpose)

Is there any way to use AnyLogic traffic simulation by using GIS map without building all roads using "Road" from Road traffic library?

I am working on traffic volume simulation model for big city. The simulation can be done perfectly by building roads using "Road" from Road traffic library. However, The simulation model is for big city and it is very hard to draw all roads with detailes. Is there is any way to simulate the traffic roads directly by GIS or any other way?
the answer to this question is no.
The road traffic library is not compatible with GIS features, nevertheless if you have a shapefile with the roads, you can transform it into the road traffic objects, but you will need to fix a lot of small details and add traffic lights in a very manual way.
You can also automate the creation of all your road objects on startup if you have a file that has all the definitions, but you will need to do a lot of advanced coding for this.
I have always been scared to do a project like this because even with small models, the creation of roads is very hard.
I would suggest also to look into other better traffic simulators such as SUMO, which I think is the most popular on the topic.

Custom traffic light algorithm in AnyLogic

I'm trying to help my mom run a simulation for a smart traffic light switching algorithm for her PhD.
AnyLogic seems promising because I won't have to write the simulation for the traffic itself. Is it possible to have low-level control of the traffic lights based on where cars the cars are?
If not are there any other tools that could help me out?
Yes it's possible, in AnyLogic you have full control on how the traffic light works and you also have access to know what is going on with the cars on the road network... But remember that a road traffic simulation with the Personal learning edition only allows for 1 hour of simulation.
Other Software that is open source and quite good, specifically created for traffic simulations is sumo:
http://sumo.dlr.de/index.html

Controlling movement of vehicle agents on GIS roads

I am developing an anylogic simulation with GIS library. I have created vehicle as a population of agents on the GIS map. How can I use the roads of the gis map similar to the roads of Road Library? in order to control car movements on GIS map roads. I have also tried using shape files for roads to convert gis routes into Roads. But the shape file includes other areas too apart from just the main roads I want. Kindly guide If anyone has expertise over GIS Library Anylogic.
Create a shapefile yourself with what you need using arcGIS (it will not be easy and will require A LOT of work)
Creat a .osm or .pbf file where you can control the routing of cars yourself instead of relying in an external server that controls your routes (also arcGIS required and A LOT of work)
What you are asking is not easy and I have the feeling you are looking for an easy solution. And I think points 1 and 2 are necessary, but depending on what you want point 2 may be enough.
Nevertheless, no matter what you do, you will never have the same behavior as the road traffic library unless you create yourself the map with the traffic library itself (again an immense amount of work if you have a lot of routes). You can nevertheless use an image of the map you are interested in, and put the roads from the traffic library where you need them.
you CANNOT put roads from the traffic library on a GIS map.

2d pathfinding in unity tower defense

I'm trying to make 2d tower defense game.
For now I know there is way to place waypoints along the route, and order units to go via waypoints. But this way I don't like because of 2 problems. First the route is made of straight lines, second all units go via 1 line. I mean even if background picture shoes thick road which can handle several units marching side by side "waypoints" approach dos not allow me to do that. Any suggestions ?
Well if the issue with using way points and single lines is just that everyone is in the same line, you can design an algorithm for each group of creeps that makes them walk in a certain formation along a line toward a waypoint.
Alternatively, you could use a NavMesh, but that isn't necessarily required, and could get performance intensive with lots and lots of agents depending on your game; especially if you're planning on using mobile platforms.