Subway ride
From Mintoc
| Subway ride | ||||||
|---|---|---|---|---|---|---|
| State dimension: | 1 | |||||
| Differential states: | 2 | |||||
| Discrete control functions: | 1 | |||||
| Interior point equalities: | 4 | |||||
Contents |
Mathematical formulation
The MIOCP reads as
The terminal time tf = 65 denotes the time of arrival of a subway train in the next station. The differential states
and
describe position and velocity of the train, respectively. The train can be operated in one of four different modes,
series,
parallel,
coasting, or
braking that accelerate or decelerate the train and have different energy consumption.
Acceleration and energy comsumption are velocity-dependent. Hence, we will need switching functions σi(x1) = vi − x1 for given velocities vi,i = 1..3.
The Lagrange term reads as

The right hand side function f1(x,w) reads as

The braking deceleration
can be varied between 0 and a given umax. It can be shown that only maximal braking can be optimal, hence we fixed
to umax without loss of generality.
Occurring forces are

Details about the derivation of this model and the assumptions made can be found in [1] or in [2].
Parameters
| Symbol | Value | Unit | Symbol | Value | Unit |
|---|---|---|---|---|---|
| W | 78000 | lbs | v1 | 0.979474 | mph |
| Weff | 85200 | lbs | v2 | 6.73211 | mph |
| S | 2112 | ft | v3 | 14.2658 | mph |
| S4 | 700 | ft | v4 | 22.0 | mph |
| S5 | 1200 | ft | v5 | 24.0 | mph |
| γ | | | a1 | 6017.611205 | lbs |
| a | 100 | ft2 | a2 | 12348.34865 | lbs |
| nwag | 10 | - | a3 | 11124.63729 | lbs |
| b | 0.045 | - | umax | 4.4 | ft / sec2 |
| C | 0.367 | - | p1 | 106.1951102 | - |
| g | 32.2 | | p2 | 180.9758408 | - |
| e | 1.0 | - | p3 | 354.136479 | - |
| Parameter | Value | Parameter | Value |
|---|---|---|---|
| b_0(1) | -0.1983670410E02 | c_0(1) | 0.3629738340E02 |
| b_1(1) | 0.1952738055E03 | c_1(1) | -0.2115281047E03 |
| b_2(1) | 0.2061789974E04 | c_2(1) | 0.7488955419E03 |
| b_3(1) | -0.7684409308E03 | c_3(1) | -0.9511076467E03 |
| b_4(1) | 0.2677869201E03 | c_4(1) | 0.5710015123E03 |
| b_5(1) | -0.3159629687E02 | c_5(1) | -0.1221306465E03 |
| b_0(2) | -0.1577169936E03 | c_0(2) | 0.4120568887E02 |
| b_1(2) | 0.3389010339E04 | c_1(2) | 0.3408049202E03 |
| b_2(2) | 0.6202054610E04 | c_1(2) | 0.3408049202E03 |
| b_3(2) | -0.4608734450E04 | c_3(2) | 0.8108316584E02 |
| b_4(2) | 0.2207757061E04 | c_4(2) | -0.5689703073E01 |
| b_5(2) | -0.3673344160E03 | c_5(2) | -0.2191905731E01 |
Reference Solutions
The optimal trajectory for this problem has been calculated by means of an indirect approach in [1][2], and based on the direct multiple shooting method in [3].
| Time t | | f1 = | x0 [ft] | x1 [mph] | x1 [ftps] | Energy |
|---|---|---|---|---|---|---|
| 0.00000 | 1 | | 0.0 | 0.0 | 0.0 | 0.0 |
| 0.63166 | 1 | | 0.453711 | 0.979474 | 1.43656 | 0.0186331 |
| 2.43955 | 1 | | 10.6776 | 6.73211 | 9.87375 | 0.109518 |
| 3.64338 | 2 | | 24.4836 | 8.65723 | 12.6973 | 0.147387 |
| 5.59988 | 2 | | 57.3729 | 14.2658 | 20.9232 | 0.339851 |
| 12.6070 | 1 | | 277.711 | 25.6452 | 37.6129 | 0.93519 |
| 45.7827 | 3 | f1(3) | 1556.5 | 26.8579 | 39.3915 | 1.14569 |
| 46.8938 | 3 | f1(3) | 1600 | 26.5306 | 38.9115 | 1.14569 |
| 57.1600 | 4 | f1(4) | 1976.78 | 23.5201 | 34.4961 | 1.14569 |
| 65.0000 | - | − | 2112 | 0.0 | 0.0 | 1.14569 |
Variants
The given parameters have to be modified to match different parts of the track, subway train types, or amount of passengers. A minimization of travel time might also be considered.
The problem becomes more challenging, when additional point or path constraints are considered.
Point constraint
We consider the point constraint

for a given distance 0 < S4 < S and velocity v4 > v3. Note that the state
is strictly monotonically increasing with time, as
for all
.
The optimal order of gears for S4 = 1200 and v4 = 22 / γ with the additional interior point constraints (\ref{FASOPOINTCON}) is 1,2,1,3,4,2,1,3,4. The stage lengths between switches are 2.86362, 10.722, 15.3108, 5.81821, 1.18383, 2.72451, 12.917, 5.47402, and 7.98594 with Φ = 1.3978. For different parameters S4 = 700 and v4 = 22 / γ we obtain the gear choice 1, 2, 1, 3, 2, 1, 3, 4 and stage lengths 2.98084, 6.28428, 11.0714, 4.77575, 6.0483, 18.6081, 6.4893, and 8.74202 with Φ = 1.32518.
Path constraint
A more practical restriction are path constraints on subsets of the track. We will consider a problem with additional path constraints

The additional path constraint changes the qualitative behavior of the relaxed solution. While all solutions considered this far were bang-bang and the main work consisted in finding the switching points, we now have a path-constrained arc. The optimal solutions for refined grids yield a series of monotonically decreasing objective function values, where the limit is the best value that can be approximated by an integer feasible solution. In our case we obtain 1.33108, 1.31070, 1.31058, 1.31058, ...
The plot shows two possible integer realizations, with a trade-off between energy consumption and number of switches. Note that the solutions approximate the optimal driving behavior (a convex combination of two operation modes) by switching between the two and causing a touching of the velocity constraint from below as many times as we switch.
The differential state velocity of a subway train over time. The dotted vertical line indicates the beginning of the path constraint, the horizontal line the maximum velocity. Left: one switch leading to one touch point. Right: optimal solution for three switches. The energy-optimal solution needs to stay as close as possible to the maximum velocity on this time interval to avoid even higher energy-intensive accelerations in the start-up phase to match the terminal time constraint
to reach the next station.
Source Code
Model descriptions are available in
References
- ↑ 1.0 1.1 1.2 Bock, H. G., & Longman, R. W. (1982). Computation of optimal controls on disjoint control sets for minimum energy subway operation. Paper presented at Proceedings of the American Astronomical Society. Symposium on Engineering Science and Mechanics, Taiwan. Bib
- ↑ 2.0 2.1 Krämer-Eis, P. (1985). Ein Mehrzielverfahren zur numerischen Berechnung optimaler Feedback–Steuerungen bei beschränkten nichtlinearen Steuerungsproblemen (Vol. 166). Bonn: Universität Bonn. Bib
- ↑ Sager, S., Reinelt, G., & Bock, H. G. (2009). Direct Methods With Maximal Lower Bound for Mixed-Integer Optimal Control Problems. Mathematical Programming, 118(1), 109. Bib