How to increase the vehicle density in Veins-lte during simulation - simulation

I would like to increase the number of vehicles per area i.e vehicle density. In case of veins; the number of vehilces as well as speed can be increased or decreased via erlagen.rou.xml. I tried to change the number of vehicles from heterogeneous.rou.xml, but i faced some errors like :
Error in module (HeterogeneousToLTE) scenario.node[1].heterogeneousToLTE (id=89) at event #192976, t=20.6: IPvXAddressResolver: module `node[21]' not found
How to solve this issue?
Thanks

To increase the number of vehicles you have to generate/build a new scenario for SUMO. Veins LTE only covers the network simulation part.
The error you posted has a different reason: You are trying to send a message to a node that does not yet exist. To fix this, you have to change either the provided SimpleApp.cc, or even better, write your own application.

Related

Simulation stuck while producing the agents in AnyLogic

I have 100 cubic meter tank and I have 133,333 bottles to fill. When tank get fill I am using
source.injact(133,333)
My first issue was a lack of memory, which I resolved, and now agents are being produced; however, once the source began producing, the simulation stuck and run very slow. How can I solve this issue?
if you have 100,000 agents and if all of them are using the fluid library, there's a chance that things will be very slow.
That's all i can say with the information provided.
I wouldn't use the fluid library inside a bottle agent... I would model that differently (if you are doing that, which i don't know if you are)
It can also be that your computer is slow

Bulk conveyors are rounding batch sizes and losing material... What causes this and how do you fix it?

In my model I have bulk conveyors filling tanks throughout the model, and delays which are stopped upon the tanks becoming full with a delay.stopDelayForAll() command. However, occasionally the tanks fill up to 999.999 / 1000 and never completely fill due to some amount being rounded and lost on the bulk conveyor (as shown in the console warning in the picture), so my agents in the delay blocks get stuck and never leave the delay. When this happens, the conveyor shows that it is still moving and still has some material (on the order of anywhere from 1E-6 to 1E-3 kilograms), but this material never actually flows to the tank.
I have a variable (type double) called d_conveyorThroughputTPH representing the throughput in tons per hour, and in the conveyor I had the tons/sec input set to d_conveyorThroughputTPH/3600 - I initially thought the machine precision of this division was causing the rounding error, but even after changing that conveyor parameter to roundToDecimal(d_conveyorThroughputTPH/3600, 3), the issue still persists.
My conveyor lengths are 'Defined by conveyor belt shape' and the speeds are 500fpm.
Does anybody know what may be the cause of this issue, or how to solve it?
Thanks
The fluid library has some tolerance levels that apply that can cause this problem
https://anylogic.help/library-reference-guides/fluid-library/index.html#handling-numeric-errors
The biggest issue with this, is that in a model, this might happen with such an extremely low probability that it's easy to get confused
It's not super easy to find a solution.

Simulating loading facilities/charger for electric vehicles in a VRP (with Google OR-Tools)

As the title says, I am facing a certain problem with implementing loading facilities in my VRP with time window and capacity constraints. The battery of the electric vehicles is represented by the capacity constraint, so electric vehicles don't visit nodes which would drain their battery live to/below zero.
After implementing nodes that represent bus stops with positive demands, the next step was to simulate loading facilities by implementing nodes with negative demand.
The idea was the following: a charger is represented by a node which 'service time' is 1 [min] and 'demand' is negative (f.ex. 0.5 [kWh]). With this logic, a vehicle could visit the node f.ex. 20 consecutive times to load its battery for 10 [kWh] in 20 [min].
All charger nodes are part of a disjunction, so if a vehicle doesn't need to load its battery, it doesn't have to visit the charger nodes.
So far so good, but the problem is, that this idea of visiting a node multiple times is against the very nature of a VRP, so I came up with the following ideas:
Idea 1:
The first solution I came up with would be to duplicate each charger node by 100 or so, so that there were enough charger nodes for all vehicles to visit and recharge their batteries. In my eyes this is a feasible, but not very elegant solution and it would make my distance matrix even huger, than they already are.
Idea 2:
The next idea I came up with was if it was possible to "reset" the state of specific nodes (in this case the charger nodes) after each routing step. If this was possible, one could reset the "visited state" of the charger nodes after each step (so they would be marked as "not visited") and only implement a duplication of the charger nodes by a number n with n being the number of the vehicles.
Now, even if all vehicles were to load at the same charger at the same time, they were able to rotate through the charger duplicate nodes. In my eyes, this solution would be much more elegant.
Do you think it is possible to implement idea 2? If not, do you think idea 1 would be the only solution for my problem or do you maybe have another ideas to solve this problem?
Thanks for any advice in advance!
Idea 2 is not possible as you can't change the state of a node while the solver is running. In other words, the distance matrix is static.
Idea 1 is how I'd do in OR-Tools. I'd also add penalties to visiting each of them such as to visit as few charging nodes as possible.

Too many splitting iterations while enforcing constraints

I am getting the following error in anylogic: Too many splitting iterations while enforcing constraints. Last split point was at: [ POINT ( -1028.5788383248864 -1017.4999999999998 ) ]. I can't figure out why this is happening. This happens with the placement of a particular item in the simulation environment, but I can't figure out why. Any insights would be highly appreciated.
According to anylogic support this is a known bug which will be fixed in the next release. So at this point not much that can be done.
I assume this is from an optimization experiment? You might want to consider relaxing your constraints or reducing some of the parameters of your model. Perhaps also consider sending your model to AnyLogic support for details about the error as it is an internal error.

How to model breakdowns of transporters (in a transporter fleet)?

I want to model breakdowns of a Transporter (using the TransporterFleet). When breaking down, the transporter should stop its movements, and go on moving when repaired.
I found the function "Agent.stop()" to stop the movement.
Are you aware of a function like "goOn() / resumeMovement()"... ?
Is there another best practise, how to model breakdowns of transporters?
Thanks and happy homeofficing!
I found a partial answer:
To stop (breakdown) a transporter temporarily it is possible to set the maximum speed to 0. After the breakdown the original maximum speed can be set again.
Transporter.setMaximumSpeed(double speed, SpeedUnits units)
Warning: This can cause internal Anylogic Errors when using version < 8.5.2