Tramp Steamer Problem using Python
Here's a Jupyter notebook I made a while back with a solution to the classic optimization problem of finding the most profitable route for a cargo ship. Sequential search and Binary search are implemented to solve a simple example. Source on Github Tramp Steamer Problem ¶ Al Duke 3/11/2022 Figure 1. Tramp Steamer Imagine you own a cargo ship that transports goods between ports for profit. There are several ports and each voyage between ports results in profit p and takes time t. The port-port pairs are determined by goods available at port A and desired at port B. Not all ports are connected and connections are one-way. You want to find the routes that generate the most profit in the shortest time. We can address this problem using Graph Theory. For this problem, we have a directed, weighted graph (digraph) which includes vertices V (ports) and edges E (connections) which have profits p and traversal times t. Example 1 below shows a simple graph. Figure 2...