0

Let me see if I can describe this problem adequately without pictures.

Let's say I have two variables which both linearly affect velocity, a and b. As a increases, velocity increases linearly, and vice versa. Same goes for b- as it increases, velocity increases linearly, and vice versa. Now let's say that velocity over time has already been determined, and is a nice smooth spline, call it v(t). We also know that a given time, v = f(a,b), where f is some basic linear function determining v from a and b. Finally, we have some cost function c(a,b,t) which defines cost at a particular time and a and b value.

What I'm trying to do is plot a cost-minimizing spline where each point determines a and b at a particular time, with the hard condition that f(a,b,t) = v(t) for all times, and the soft condition that we try to minimize c(a,b,t). If you flatten this to two dimensions, with a on one axis, and b on the other, for a particular time, you'll see that in order to satisfy the hard constraint, that there is some line in the a-b plane we have to be on, but where on that line we should place a point depends on the cost function.

If the cost function was simple, this would be a relatively easy problem to solve- at each t, just determine a and b such as to minimize cost, and be done. However, it is possible for cost to change suddenly at retain boundaries (e.g. for t >= 5, costs of a < 0.6 increase dramatically), and I'd want my spline to anticipate that and start increasing a before we get to t = 5, so as to smooth things out.

Where it's breaking down for me is that all spline formulas that I can find require fixed points in n-space. They may not travel through those points, but they do require them. My case does not require the spline travel through a specific point in [a,b,t] but does require they pass through a line for a particular t value (and the rest is a minimization). Is there some way to simplify this problem to a basic spline one by looking at derivatives, etc.?

This paper describes how to solve a similar problem, but it seems to require the spline to be a best fit through points, not lines. http://www.cs.berkeley.edu/~ravir/dspline.pdf

Thanks for any help you can provide.

dbromberg
  • 97
  • 8

1 Answers1

0

May have figured it out myself- Because I can at any point in time, t, given a, easily solve for b, given I know v(t), that reduces the problem to just choosing an 'a' to minimize c(a,b) at any given t. I can use the procedure at the link I provided at that point, by picking some number of discrete points (just find the absolute minimum at each these points) and letting the algorithm pick the rest. If I know in advance where these points of extreme discontinuity in cost occur (and I do), I can specifically place points at the local minima there in order to hint to the spline to start turning early.

Not sure if that made sense to anyone but myself. Enjoy.

dbromberg
  • 97
  • 8