Defining requirements
As we have seen in previous practical chapters, we will start by defining the problem and the objectives that we will achieve during this project's development.
In this chapter, we'll build a program that allows us to calculate the optimal route to get from point A to point B, considering that each of the possible paths chosen could directly impact the calculation of time or cost.
To simplify the problem and to facilitate the design of an adequate algorithm, we are going to simplify the problem. See the diagram on the left side of the following figure. Now imagine you can move from point A to point B using any path, without any problems:
On the right side of Figure 14.1, you can see that you can choose several paths. However, if you consider the obstacles (marked by the dotted lines), our options are reduced but still, you could choose paths 1 or 2.
If we want to bring our representation...