Please point me to relevant examples and/or APIs in ALGLIB.

I want to find the vector x whose objective function

- minimizes th L1 distance of x from a constant vector x0
- where L1 distance = sum of absolute values = sum abs((x(i)-x0(i))

and subject to this set of linear constraints:

- x(i+1) - x(i) >= constant(i) for i = 1..n-1 (i.e. x values in ascending order, with specified minimum spacing)
- x(1) >= min_constant
- x(n) <= max_constant

If I can get this working, then I want to try alternative distance metrics

- L2 distance = sum of squared differences = sum (x(i)-x0(i)**2
- L-infinity distance = max of absolute values = max abs((x(i)-x0(i))

Eventually, I want to extend the problem to two dimensions, with each x a point in the x-y plane.