Optimization and control
Understand how we solve problems and why efficiency matters.
What is numerical optimization?
Numerical optimization is a mathematical framework for computing the best possible decision among many feasible alternatives. Every optimization problem consists of four key elements:
- Optimization variables — the quantities we are free to choose
- An objective — a function that defines what “better” means
- Constraints — conditions that restrict which choices are allowed
- An optimal solution — the feasible choice that minimizes the objective
The figure on the right illustrates a simple example. The goal is to minimize a function f(x), but only among points that satisfy a constraint g(x)≥0. The green region represents all feasible solutions. The optimal solution is the point within that region where the objective reaches its minimum.
While this process appears rather intuitive in one dimension, the situation becomes significantly more challenging in problems involving hundreds or even thousands of variables. In practice, the solution is obtained through an iterative process: starting from an initial guess, the algorithm generates a sequence of improving approximations that converge toward a minimizer.
Optimal control of train trajectories
Optimal control is a special class of numerical optimization problems in which the objective is to optimize the evolution of a dynamical system .
Dynamical systems describe processes that evolve according to a set of mathematical equations. They are characterized by states and controls. The states represent the internal condition or “memory” of the system, while the controls are the inputs through which we can influence its evolution. Unlike static optimization, the result of an optimal control problem is not just a set of numbers, but trajectories of states and controls defined over time or distance.
Train trajectory optimization provides a representative example of an optimal control problem:
- The optimization variables include traction and braking commands along the route.
- The objective may be to minimize energy consumption or travel time.
- The constraints include speed limits, motor specifications, and the physical dynamics of the train.
- The optimal solution is a speed and traction profile over the entire journey.
From intuition to computation
Human drivers rely on experience and anticipation to reduce energy consumption. They look ahead, consider gradients and signals, and adjust continuously.
Optimal control formalizes this process mathematically.
At each point along the track, the system answers a simple question:
What is the control action from this point onward such that the entire remaining trajectory is both feasible and optimal?
To answer this, the train’s motion and energy consumption are described by mathematical models. An objective defines what should be minimized, and operational constraints are encoded explicitly. A numerical solver computes the control strategy that best satisfies all these elements simultaneously.
Unlike static optimization, this process must be repeated continuously. As the train moves, conditions evolve: small delays occur, adhesion changes, signals update. Just as the human brain constantly reassesses and adjusts, the optimization is repeatedly re-solved using the latest information.
The faster this re-computation can be performed, the more responsive and adaptable the system becomes — enabling predictive control to remain effective under real-world variability.
Why optimization matters in railways
Small local decisions have long-term consequences. Accelerating too early may increase overall energy consumption. Braking too late may waste recoverable energy. Ignoring upcoming gradients, curves, or tunnels inevitably leads to sub-optimal driving.
Numerical optimization naturally accounts for what lies ahead, enabling decisions that are optimal over the entire route, not just the next few seconds.
Did we grab your interest?
We have only started to scratch the surface. Subscribe to our newsletter to get notified about future explainers and technical insights.