Lane Changing in SUMO - sumo

Is it possible to make a vehicle inside SUMO environment which is inserted on a specific lane to shift to other lane in a certain time period from one lane to the other?
Can this be done without using TraCI and is there any particular syntax format to do so?

No, without TraCI this is currently not possible. You could specify a stop on the target lane but this wouldn't be time triggered change but rather location triggered and furthermore the vehicle would stop there (or at least decelerate) and this probably not what you want.

Related

How to solve the scheduling problem with random durations? (undomoves will result different scores)

"A shadow variable is in essence the result of a formula/algo based on at least 1 planning variable (and maybe some problem properties). The same planning variables state should always deliver the exact same shadow variable state." However, for project scheduling problems with random durations, even the start time of a job remains the same as before move or undomove, the end time of the job will be different, because the duration is a random variable. Both the start time and the end time of a job are shadow variables. Then the score after undomove and beforemove will be different. How to deal with this situation?
When you say:
Then the score after undomove and beforemove will be different.
That is the root of your problem. Assume a solution X and a move M. Move M transforms solution X into solution Y. Undo move M2 must then transform solution Y back into solution X. (X and Y do not need to, and are not going to, be the same instance; they just need to represent the exact same state of the problem.)
Where you fall short is in modelling random duration of tasks. Every time the duration of a task changes, that is a change to the problem. When task duration changes, you are no longer solving the same problem - and you need to tell the solver that.
There are two ways of doing that:
Externally via ProblemChange. This will effectively restart the solver.
During a custom move, using ScoreDirector's before...() and after...() methods. But if you do that, then your undo moves must restore the solution back to its original state. They must reset the duration to what it was before.
There really is no way around this. Undo moves restore the solution to the exact same state as there was before the original move.
That said, I honestly do not understand how you implement randomness in your planning entities. If you share your code, maybe I will be able to give a more targetted answer.

Is there a parameter to allow drivers to jostle from an empty lane to a busy lane on Eclipse SUMO

I'm simulating drivers with Eclipse SUMO using TraCi. I have a road segment of 1Km (highway) that contains five lanes: two right lanes that are leading to a right turn (exit), and three left lanes that are leading straight. It seems that drivers that want to go right will stand on the right lanes regardless of the queue size, resulting in two lanes that are very slow, and beside them, three lanes that can have a speed of 120 Km/h.
In reality, some drivers are not waiting in the 1 Km queue, but deciding to jostle to the queue in the middle, while other might regret standing in the queue and decide to go straight instead. This is resulting in a slow down on the three left lanes i.e., it is rare to have two adjacent lanes
(lanes 2 and 3 from the right on this case) with a 100 km/h speed difference (safety reasons)
My question is if a parameter that limits the speed ratio between two adjacent lanes exists, or if there is another way to simulate this kind of behavior, as I could not find any.
There are two different behaviors you propose as alternative to standing in the queue. The first one is changing the lane later which you might achieve by reducing the eagerness to do a strategic lane change with the lcStrategic parameter.
The second idea is to change the route and/or the destination. To change the route automatically you can enable the rerouting device for the vehicles. This will work only if there really is a faster route (taking the jam into account) in your network which leads to the same destination. Another possibility is to employ rerouters to set new routes or destinations. You can define a probability here but it is not possible to let this depend on the size / delay of the jam .

Optaplanner - Why switching from mode full_assert to another gives totally different results?

I am developing a solver using drools to find the most likely date (start date = planningVariable) for which a medical analysis (planningEntity) will start. Then i calculate other dates from it whose calculation does not depend on the optaplanner mechanism (end date and other intermediate dates). For my problem, I need each rule to fire whenever the planningVariable value change.
When using FULL_ASSERT mode everything works but when i change to another mode, results are a mess. Almost no rule is respected or the solution gives null values and i don't understand why.
Is it because the full_assert mode is the only one that guarantees to fire all rules each time the planningVariable value changes?
Try running NON_INTRUSIVE_FULL_ASSERT, that doesn't trigger more fireAllRules().
Either way, switching on FULL_ASSERT etc, shouldn't change the behavior (unless you're explicitly using simulated annealing with walk clock time because it is time gradient sensitive). If it does change behavior, it's probably due to some sort of corruption. All the more reasons to run NON_INTRUSIVE_FULL_ASSERT and figure out where.

How to access the SUMO vehicles from highway_overtake.py in Webots?

I'm modifying the highway_overtake.py controller to be able to track the position and speed of the neighboring SUMO vehicles (the ones that are highlighted in transparent colored boxes). How can I access the SUMO vehicle information that is in close proximity of the Lincoln car? I want to get the position, acceleration, speed etc. of the SUMO cars highlighted near the Lincoln car. Here is what I have tried so far:
I have changed the 'supervisor' field to TRUE in the highway overtake world for the lincoln MKZ vehicle node.
I imported the Supervisor from controller in my higway_overtake.py controller file.
I tried calling the traci functions getIDList() and getPosition() but it gives an error that says controller doesn't have any such attributes.
I believe this information can be retrieved from the SumoSupervisor.py file which is the controller file for Sumo Interface. But I do not know how to access this file in my highway_overtake.py script either.
Any information that can help me solve this will be very helpful!
Thanks in advance.
If it's for debugging, you could use this supervisor function to get the positon of all cars in the simulation, and then figure out which one is closed to your target car (which ID you know).
https://cyberbotics.com/doc/guide/supervisor-programming#tracking-the-position-of-robots
Otherwise, if you want to use only functions that are available to actual machines, try the emitter/receiver devices. You might be able to use signal strength as a proxi for proximity, or, if there's a synced tick, use signal reception time as a proximity detector.
Or use GPS modules (with an high enough resolution) on each car and compare the coordinates.

How to represent a coffee machine using DFA?

I want to know how to represent a coffee machine using a Deterministic finite automata?
I've tried a lot to do this job.
I represented each and every processes as a set,by putting one to one correspondence with Natural numbers.
But I still don't know how to represent it using DFA.
First, try to imagine the states your automaton can be in. Something like:
Off, Ready, Working
Afterwards imagine the buttons or inputs you have to perform to switch between these states. Do not forget to define every input on every state. If you leave out several transitions, the automaton is not deterministic therefore is an NFA. Transitions could be:
0 for power off/on
1 for start/stop working
Off -0-> Ready
Ready -1-> Working
Ready -0-> Off
Working -1-> Ready (4 for the actual working process)
Off -1-> Off
Working -0-> Working (nothing happens in this cases)
Just connect the states with the given transitions, and voilá!