# Choosing best path of travel that maximizes certain parameters...

1. Jan 31, 2016

### jumbo1985

Hello All,

I only have a vary basic understanding of physical concepts so please bear with me.

I'm an object with mass greater than 0, a maximum speed, a maximum rate of acceleration and deceleration.

Suppose I want to travel from point A to point B. The path is chosen for me and it leads through point C (the red path in the image below). I need to stay on the chosen path (primary goal) And also, I wish to maintain a target constant speed k for as much of my travel time as possible and try not go too much below k unless I am at point A or point B (primary goal). I also wish to avoid rapid changes in acceleration because it takes a large amount of energy for me to accelerate and decelerate to my target speed and just makes me nauseous in general (secondary goal).

The red path is safe for me to travel on (it is clear of debris and patrol cars) I don't necessarily like it because when I get to point C, I will need to decrease my speed to 0, turn, then work my way up to the desired speed k again (that conflicts with one of my goals). Otherwise I would overshoot my path and get a couple of bruises (that also conflicts with the other one of my goals).

I have an opportunity to modify my path of travel a little bit so that I have a better chance of reaching my goals (maximize my chances of staying on the path, maximize the time I spend traveling at my target speed k, avoid jerking - I want to have as smooth of a ride as possible) but I don't want to stray away from the red path too much (think of a Hausdorff distance restriction).

Given a max distance D by which I can stray from the red path, is it possible to alter the red path so that I have a better chance of achieving my goals? What physical properties do I desire my new path (curve) to have?

Is there anything that makes the green or blue paths more suitable for me to travel on? My intuition tells me yes but I can't quite put my finger on it (they may not be the most optimal paths for achieving my goals).

(if D is large enough, I will probably get away with traveling from A to B in straight line but that would be very rare)

Your thoughts appreciated! I apologize if this is all a little to vague.

Thanks!

2. Jan 31, 2016

### Staff: Mentor

This is called the calculus of variations. Basically, you have some criteria that you want to minimize along your path. This is called a functional, it maps a path (function) to a value. All you have to do is to express that functional in the form of a specific kind of integral and then you can apply the Euler Lagrange equation to find the function that minimizes the functional.

3. Feb 2, 2016

### jumbo1985

Thank you Dale for giving me a starting point.

4. Feb 2, 2016

### Khashishi

It is often easier to do the math for "soft constraints" where there isn't a hard threshold for how far you are allowed to stray from the path (your score gradually decreases as you get farther from the path) than for a "hard constraint" where there is no penalty for choosing a path within a given distance but any larger distance is strictly forbidden. The way you worded it sounds like you have hard constraints, but maybe you have some flexibility in your problem. You probably won't be able to do calculus of variations if you just have hard constraints.

5. Feb 2, 2016

### A.T.

You will have to define how speed is related to path curvature, otherwise your goal of a target speed is completely independent from the path shape.

6. Feb 2, 2016

### Khashishi

OP clearly elaborated that there was a maximum acceleration and deceleration so it's not possible to maintain constant speed while turning at c.

7. Feb 2, 2016

### A.T.

When someone talks about "acceleration and deceleration" I assume he means positive and negative change of speed (scalar).

8. Feb 3, 2016

### Svein

I read a treatise on this sort of problem some time (say 40 years) ago. The result was that the fastest way was to stay at the top speed as long as possible, decelerate as hard as possible and then accelerate as hard as possible. The author noted that he was glad the average driver did not know that.

9. Feb 4, 2016

### jumbo1985

Thanks for the replies guys. Yes, my problem is somewhat analogous to a race track scenario.

There exists an ugly race track with no curved sections but it does have a uniform width anywhere along its length.

If the width of the track barely allows a car to fit on it then there's probably no way to traverse the track without stopping at every turn.

If the width of the track is large enough to allow the car to maneuver with more freedom then it can probably traverse the track in many different ways.

I would like to paint a path along the track so that I minimize the amount of braking that any speed-demon driver traversing the track has to perform in order to stay on the path.

A one-size-fit-all type of a solution (though more favorable to faster drivers).

As the speed (magnitude of velocity) of my drivers goes to infinity (wild theory), will there eventually be one best path that depends only on the geometry of the track?

10. Feb 4, 2016

### jbriggs444

If one imagines cornering and braking ability increasing without bound with acceleration ability held constant then one would expect convergence on a single limiting trajectory. It will be the path that minimizes curvature while staying within the track boundaries.

11. Feb 4, 2016

### Staff: Mentor

You need some quantitative way to tell which path is better, for any pair of paths. You cannot optimize all different constraints at the same time, so there has to be some way to compare them.