Sailing Strategies

An Application Involving Stochastics, Optimization, and Statistics (SOS)


Optimal Sailing Strategies — JavaScript Replacement for the Java Applet

Edit the fields, then press Calculate.
To
FromNNEESESSWWNW
starboard tack port tack neutral/direct wind
The yellow square is the lake boundary. Gray dots mark start and finish.

Introduction

A Sailboat

Consider a sailor who wishes to sail from one point (A) to another (B) in the shortest possible time (for example, in a race). To create a simple model of such a situation, suppose that the lake is represented by a 2-dimensional square n-by-n grid of waypoints. Every path from A to B consists of a sequence of legs, the endpoints of which must be waypoints. Suppose further that the only legs that the sailor considers are legs connecting one waypoint to one of its 8 neighbors: N, S, E, W, NE, SE, SW, or NW.

Time as a Function of Wind Angle

The boat's speed depends on the relative angle between the boat's heading and the wind's direction. The boat cannot sail directly into the wind. Upwind, crosswind, downwind, and away tacks can be assigned different travel times in the app above.

Starboard Vs. Port Tacks

Changing from a port to a starboard tack, or vice versa, takes time. The field called Delay gives the tacking penalty used by the dynamic program.

Deterministic Vs. Stochastic Models

The wind direction can change from one leg to the next. The transition matrix above gives the probabilities of the new wind direction conditional on the old wind direction.

Stochastic Optimization

The data are solved using a dynamic programming model. The value iteration step computes the best expected remaining time for each location, previous tack, and current wind direction.

Simulation

After calculation, simulations show sample random realizations of the changing wind and the corresponding optimal strategy.

Statistics

The histogram view summarizes all simulations since the last calculation, including minimum time, maximum time, mean time, and median time.