Nada-Khafagy / optimization_project

optimize merging vehicles on highway ramps
GNU General Public License v3.0
2 stars 0 forks source link

Question Help #20

Closed wudadiaod closed 5 months ago

wudadiaod commented 5 months ago

Hello, author. I'm a graduate student from China, and I'm very interested in your optimization_project on GitHub. After reading through it, I have two questions I'd like to ask: 1. Can I set r1 to 0 in equation 3.1 of the code? This would ensure that all locally optimal vehicles I set are included. 2. The code currently optimizes merging single vehicles with single vehicles. Can I modify it to optimize single vehicles joining a fleet, or fleets merging with other fleets? Thank you for addressing my questions, and I wish you smooth progress with your work!

Nada-Khafagy commented 5 months ago

Hello! I didn't think anyone would look into this project glad it interests you :)

for Question 1: yes you can, me and my teammates were just trying to make this code dynamic in case that was not the case. Question 2: yes, if you want to make it a fleet (units of cars), you can think of one car as a group of cars, so any car object will be replaced with a list of car objects, so you have to modify any function that deals with a single car to be able to accept a list of cars instead.

For example the arguments to the function randomize_sequence in the file sequence can take the number of fleet units and the number of fleets on the ramp line, if the output sequence from it is [0,1,0] it will mean you have a fleet from the main line between two fleet of the ramp. for main_cars_list and ramp_cars_list in the main code, they would be a list of lists of car objects (list of fleets) and so on. Hope you understand what I mean.

Good luck! If you have any other questions I can answer them :)

wudadiaod commented 5 months ago

Thank you for your reply. The reason I'm interested is because I'm also working on merging vehicles from ramps to main roads. The common sequence is first come first serve, but this method is too outdated. I want to try finding a more sophisticated vehicle merging sequence. Originally, I thought of using game theory to write about it, but I found my foundation lacking, so I didn't know where to start. Then I came across this article by the author who designed a sequence for vehicles passing through merging points, so I want to delve deeper into learning about it. Thanks again for the author's reply!

wudadiaod commented 5 months ago

Hello author, I have a few more questions. (1) What are the physical meanings of ( t_i ) and ( l_i ) in Equation (3.2)? (2) What are the specific meanings of each letter in Equation (3.4)? (3) Are the decision points and merging points mentioned in the text the same thing? How are they distributed along the lanes, and what is the range of the control area? Does the author provide clear diagrams? Thank you for reading the message, and I look forward to your reply. Best wishes for your work!

Nada-Khafagy commented 5 months ago

Hello!

I am happy that my work intrigues you, this was a project done for a university course called thee optimization of multi agent systems at my university, we studied different heuristic techniques like the simulated annealing and genetic algorithm, I think they are easier to understand, the field of optimization include a lot techniques and different algorithms , depending on the problem it might result in an optimal solution or sub optimal solution, from my understanding game theory is also used to get optimum solution but I haven't delved deep into it to be honest.

Q1: t_i is the total travel time of the vehicle from the current position till the merging point. Q2: for Equation 3.4, it represents the acceleration of the following vehicle (front), α β and γ are the weights for each component, first component is the acceleration of the vehicle preceding the current one (a_l), the second component is the difference in velocity between the following vehicle (ν_f) and preceding vehicle (ν_l), the last component is the difference between the desired distance between the two vehicles (following and preceding) (s_d) and the current distance between the vehicle (s).

Q3: The decision point and the merging point are different, the optimizing algorithm we have is supposed to output an optimum sequence of the vehicles, this output sequence is supposed to be outputted at the [decision point], now for the vehicles to actually follow this sequence it will take time to so but it must accelerate and decelerate and stuff to ensure that at the [merging point] it is in the correct position to merge with the rest of the platoon.

Now the control area includes all that, decision point and merging point and the even start of the optimization problem, How did we choose the range? we actually used our sense to choose what seems fit, how many meters for you as a human would need to think of a decision and achieve it ? in the code i believe it was 180 (decision position + merging position) if we assume our start is the reference.

In our implementation we only had one decision point and one merging point, because we wanted to simplify the problem, the more you have in the problem, the longer it will take for the algorithm to converge to a solution, which is a common problem in this field from my understanding, you don't want autonomous vehicles to stop moving in the middle of the road till the algorithm takes a decision, then of course it will depend on the computational power on the device computing these algorithm (control unit), and it doesn't need to be on the vehicle itself , it might be a decentralized control unit and maybe the computations is happening over the cloud for example.

The equations you see in the report are quoted from another paper, (the first one in the references list ) and I would advise you to read it as it offers more details on the equations and variables, and they have better diagrams as well :)

wudadiaod commented 5 months ago

Hello, Author! After receiving your letter, I promptly went to read the first referenced article in your bibliography. Then, I proceeded to compare your paper with the first referenced article, and I have a few questions I'd like to ask for clarification: (1) I feel like you replicated the first referenced article, but why is the objective function different (lacking vehicle speed error and intervehicle spacing error components)? Is it because it's difficult to code? (2) I understand that the impressive aspect of your work is that you implemented three additional optimization algorithms on top of the replicated framework and compared them with a genetic algorithm to see which algorithm could better determine the sequence of vehicles on the main road and the ramp. Is my understanding correct? (3) Did you also use a Poisson distribution to generate vehicles? Thank you for taking the time to read my message amidst your busy schedule, and I wish you smooth work and happiness every day!

Nada-Khafagy commented 5 months ago

Hello! Q1- for simplicity! our goal was to compare different algorithms, so we neglected these errors since we were not looking for the most precise model. Q2- Yes indeed you are correct in your understanding. Q3- We didn't use a Poisson distribution, we made our code generate the initial cars and their position randomly, we wanted to make it using a Poisson distribution like the referenced paper, but we didn't have time for that unfortunately and we needed to submit the project to be graded, but this is something that I wanted to work on in the next holiday :)

wudadiaod commented 5 months ago

Thank you for your response. I look forward to your next steps and wish you success in your work. May you achieve your goals soon!

wudadiaod commented 4 months ago

Dear author, hello! After studying the code for a while, I have a few questions I'd like to ask you:

  1. Earlier, I mentioned that I wanted to create a platoon of vehicles. I have three ideas: The first idea is for vehicles to form a platoon after passing through a merge point. The second idea is for vehicles on the main road and the vehicles on the ramp to form separate platoons before merging. For example, if there are 10 vehicles on the main road, they could form platoons of 4 and 6 vehicles respectively. The third idea is to add a detection area outside the control zone, where vehicles in this area would form a group and then merge into a platoon after passing through the merge point. These are my ideas, but I'm not sure how to modify the code. Do you have any suggestions? It would be great if you could provide detailed modification advice.
  2. In line 97 of the main file, the generated positions of the vehicles on the main road may have negative values. Is this reasonable? 3.The target vehicle sequence has been generated in the 4th line of the objective_func file, but in the 10th line of code, the check_feasibilitycheck_feasibility function in the sequence file is entered, and the 54th line of code generates the vehicle sequence again. This is the same as the one generated before. Why is this extra step needed? And in the objective_func file, lines 6 and 7 of the code have reset the vehicle, and lines 55 and 56 have been reset again. What does this mean? image image Thank you for taking the time out of your busy schedule to read my message. I wish you smooth work and happiness every day!