• Nie Znaleziono Wyników

Energy-level Aware Optimal Routing For Autonomous Vessels - Energiebewuste Optimale Routeplanning Voor Autonome Schepen

N/A
N/A
Protected

Academic year: 2021

Share "Energy-level Aware Optimal Routing For Autonomous Vessels - Energiebewuste Optimale Routeplanning Voor Autonome Schepen"

Copied!
89
0
0

Pełen tekst

(1)

Delft University of Technology

FACULTY MECHANICAL, MARITIME AND MATERIALS ENGINEERING

Department Maritime and Transport Technology Mekelweg 2 2628 CD Delft the Netherlands Phone +31 (0)15-2782889 Fax +31 (0)15-2781397 www.mtt.tudelft.nl

This report consists of 58 pages and 1 appendix. It may only be reproduced literally and as a whole. For commercial purposes only with written authorization of Delft University of Technology. Requests for consult are only taken into consideration under the condition that the applicant denies all legal rights on liabilities concerning the contents of the advice.

Specialization: Transport Engineering and Logistics

Report number:

2017.TEL.8150

Title:

Energy-level Aware Optimal Routing

For Autonomous Vessels

Author:

P.B. Noordhoek Hegt

Title (in Dutch) Energiebewuste Optimale Routeplanning Voor Autonome Schepen

Assignment: Computer assignment

Confidential: No

Initiator (university): Dr. R.R. Negenborn Supervisor: A. Haseltalab

(2)

2 Student: P.B. Noordhoek Hegt Assignment type: Computer

Supervisor (TUD): Dr. R.R. Negenborn Creditpoints (EC): 15 Supervisor (TUD) A. Haseltalab Specialization: TEL

Report number: 2017.TEL.8150 Confidential: No

Subject:

Energy-level Aware Optimal Routing For Autonomous Vessels

The increasing volume of transport flows is resulting in increasing shipping intensity in coastal waters and transport movements. In order to maintain safe transport, handle the increased traffic, and be cost-effective and competitive, new transport approaches must be employed. One possibility is Autonomous Surface Vessels (ASVs) for different offshore applications.

One of the problems to be addressed in this domain is passage planning, where the mission of the vessel should be planned and updated based on the vessel condition.

In this project, it is intended to consider the problem of passage planning for autonomous vessels by taking into account the energy storage level of the vessel. It is assumed that there exist stations to restore energy. As a result, the objective is to design a route planning algorithm that designs a suitable mission for the vessel regarding the energy level as well as the fuel consumption of the vessel. Therefore, the output of the proposed methodology should be a sequence of destinations to be visited by the vessel.

The main research problem for this assignment is designing an algorithm which creates the optimal order of mandatory destinations and optional charging stations.

Moreover, the three main research questions are:

• What kind of existing methodologies/algorithms can be adopted to address the above problem?

• How does optimal passage planning affect the energy consumption in electric ships? This research is part of the domain of Autonomous Vessels in the department of Maritime and Transport Technology.

It is expected that the student concludes his computer assignment with a written report, including conclusions and recommendations for future research directions. The report must be written in English and must comply with the guidelines of the section. Details can be found on the website.

(3)

Energy-level Aware Optimal

Routing For Autonomous

Vessels

P.B.K. Noordhoek Hegt

Technische Univ ersi tei t Del ft

(4)
(5)

Contents

1 Introduction 1

1.1 Scope. . . 1

1.2 Optimal Route Planning. . . 2

1.3 Research Questions . . . 4

1.4 Structure of the Report . . . 4

1.5 Summary . . . 4

2 Background 5 2.1 Passage Planning. . . 5

2.2 The Adoption of Autonomous Vessels. . . 6

2.2.1 Cargo Shipping. . . 6 2.2.2 Waterborne AGV . . . 8 2.2.3 Offshore Operations . . . 9 2.3 TU Delft Benchmarks . . . 9 2.4 Future Improvements . . . 10 2.5 Summary . . . 11 3 Problem Formulation 13 3.1 Energy Consumption . . . 13

3.2 Passage Planning Problem Formulation . . . 14

3.2.1 Travelling Salesman Problem. . . 14

3.2.2 Autonomous Ship Routing . . . 16

3.3 Summary . . . 17

4 Proposed Methodologies 19 4.1 Potential Solutions. . . 19

4.2 Solutions. . . 20

4.2.1 Brute force search solution. . . 20

4.2.2 Tabu Search Program . . . 23

4.2.3 Tabu search GUI . . . 29

4.3 Summary . . . 33 5 Experiments 35 5.1 Validation . . . 35 5.1.1 Validation input . . . 35 5.1.2 Validation hypothesis . . . 36 5.1.3 Program results. . . 38

5.2 On-shore destination simulation . . . 39

5.2.1 Simulation inputs . . . 39

5.2.2 Results. . . 40

5.3 Off-shore destination simulation. . . 44

5.3.1 Simulation inputs . . . 45

5.3.2 Results. . . 47

5.4 Home node variation. . . 51

5.4.1 Simulation inputs . . . 51 5.4.2 Results. . . 51 5.5 Summary . . . 54 6 Conclusion 55 6.1 Recommendations . . . 56 iii

(6)

iv Contents

Bibliography 57

A Matlab Codes 59

A.1 Brute Force Search. . . 59

A.1.1 All paths function . . . 59

A.1.2 Brute force main file. . . 62

A.2 Tabu Search. . . 64

A.2.1 Action functions . . . 64

A.2.2 Plot functions. . . 66

A.2.3 Create model function. . . 68

A.2.4 Tour length function. . . 69

(7)

1

Introduction

Autonomous transportation is the future of transport. Examples of this type of technology are the Google self-driving car and UCAV’s (Unmanned Combat Aerial Vehicle) (Bertram,2013). Both the auto-motive industry and the aerospace industry are represented within autonomous transportation, how-ever, the maritime industry has yet to follow this example. According to Waterborne TP, autonomous ships are not far from becoming a reality: “Next generation modular control systems and communica-tions technology will enable wireless monitoring and control funccommunica-tions both on and off board. These will include advanced decision support systems to provide a capability to operate ships remotely under semi or fully autonomous control.” (MUNIN,2016). The TU Delft is also working alongside other companies to explore the possibilities of autonomous ships. This project is just a small part of a large-scaled research on this topic. A ship’s path must be chosen taking into account factors such as time, energy level, obstacles, currents, and weather. Before such a detailed path is computed, a ship must first compute the optimal order in which to visit each individual destination. This research project focuses on solving and optimizing this problem.

1.1.

Scope

The goal of this project is designing an algorithm that will compute the optimal order of destinations a ship must visit while minimizing energy consumption and ensuring the energy level of the ship does not fall under 20 percent. A battery’s cycle life can be greatly increased by keeping the state of charge at a high level. ”The charge level in batteries is described in two ways. One description is called state of charge (SoC). If a cell is fully charged, it is said to be at 100% SoC. The other description is depth of discharge (DoD). If a cell is fully discharged, it is said to be at 100% DoD. That means a 100% SoC cell is the same as 0% DoD. SoC works like a fuel gauge. For maximum battery cycle life, 100% DoD must be avoided. Researchers have found that improvements in cycle life increase non-linearly as depth of discharge is reduced” (Arcus,2016). This non-linear increase can be seen in Figure1.1. In this Figure, we can see that the higher you keep a battery charged, the longer the life span. However, batteries are, of course, meant to be used so the standard has become a minimum charge of 20%. Furthermore, this project will focus solely on creating an order of destinations before the ship departs, and thus the algorithm will not work in real time. Weather, sea states, and other obstacles or environmental factors will also not be taken into account during this project. The scope limit starts with an input of the location of the mandatory destinations and charging stations and ends with the desired output of the algorithm, which is a visual graphic route including all required destinations and charging stations that must be visited for an optimal energy efficient journey.

(8)

2 1.Introduction

[h!]

1.2.

Optimal Route Planning

For autonomous performance in ships, the ship must be able to compute a path to each of its desti-nations. The process of creating such a route is called passage planning, of which more information is given in chapter 2. Although software can help with passage planning, it is currently still done manually for the most part. This is because of the unpredictable environment at sea. The weather and underwater obstacles such as sandbars are constantly changing. This makes it difficult for com-puters to safely and reliably create an optimal route. However, the fact that it is done manually by humans brings disadvantages as well. Passage planning is a time consuming process, but at the same time important to the safety of the crew. Automating this process will prove to be difficult but can make the passage planning process more efficient and rule out human error. Before the question of the importance of this research topic is answered, it is important to understand the exact definition of ”autonomous”, as this is often confused with ”automated”. Automation refers to a set of related functions performed automatically by equipment, whereas autonomy refers to a state of equipment in which it can perform the programmed operations under defined conditions without human input or guidance (Caterpillar,2016). Thus, automation still requires human inputs or actions and autonomy do not require a human at all, although usually autonomous equipment is supervised by humans. Figure 1.2shows this difference in more detail. Machines are starting to surpass humans in more skills and jobs than was thought possible a few years back. Fitts list is an overview of skills in which humans exceed machines and vice versa. It was created in 1951 and although some of the points on the list are somewhat outdated, it still serves as a pretty good overview to see if a task is better automated or not (de Winter,2016). Fitts list can be seen in Figure1.2.

(9)

1.2.Optimal Route Planning 3

[h!]

[h!]

Complex ships, such as container ships, are mostly automated, however, the captain remains in control. This is in accordance with Fitts list as the human can intervene in critical and unusual situations. However, due to the increasing amounts of automation in ships, the specialised knowledge of workers is declining (Lubeek,2011). This decrease in knowledge leads to workers not being able to handle a ship properly when automation fails. Thus, it would be safer and more reliable to make these ships fully autonomous. To do this, the ship must set its own destinations and be able to calculate an optimal route to these destinations. This research project serves to create such an algorithm where an optimal

(10)

4 1.Introduction

route is computed beforehand ensuring the ship does not run out of energy.

1.3.

Research Questions

As mentioned before, the objective of the project is to design an algorithm with which the optimal route is calculated. This gives us the main research problem.

Main research problem:

• Create an algorithm that gives the optimal, least energy consuming, order of mandatory des-tinations and optional charging stations that an electric ship must visit in order to complete its journey.

Before such an algorithm can be created, more information on this topic must be acquired. The following research questions will be answered throughout this report to help gain understanding of the topic and the algorithm.

Research questions:

• How is passage planning currently done and how would automation improve this process? • How can the energy consumption of an electric ship be reduced?

• What kind of existing methodologies in the literature can be used to address this problem?

1.4.

Structure of the Report

This report consists of 6 chapters. In Chapter 2, background information on the subject of autonomous ships and ship routing is given. This includes information on passage planning of ships, the possible future implementations of autonomous ships, current benchmarks, and possible future improvements in autonomous ship routing. In Chapter 3, two problems are discussed. The calculation of the energy consumption of an autonomous ship, as well as the formulation of the optimal routing problem with charging stations is discussed. In Chapter 4, possible solution algorithms that have proved successful in solving these types of problems are shown. A thought-out decision will be made on which algorithm to use in this particular problem. In Chapter 5, the actual Matlab program is shown and explained in a step by step manner on how to use it. Also, the code is explained and a few examples of simulations are shown. In Chapter 6, the report is briefly summarized and concluded.

1.5.

Summary

The future of transportation is automated transport and many examples of this type of transport can be found in aerial or road vehicles. However, recently the first tests have begun with autonomous ships. To make autonomous ships a reality, the ship must be able to compute its own route. The goal of this project is to create an algorithm that will compute the optimal order of destinations a ship must visit while minimizing energy consumption and ensuring the energy level of the ship does not fall under 20 percent. This is the start of the routing procedure. Automation technology is getting smarter and replacing humans in more ways than was thought possible a few decades back. However, the step from automation to autonomation is a big one. Autonomation gives the human solely a supervisory role. Thus, this project is relevant to make autonomous ships, where humans no longer set the route, possible. This introductory chapter has laid the foundation for this report. The following chapter explains the background of the subject of this research project and will help the understanding of the potential and reasoning behind this project.

(11)

2

Background

Autonomous ships have the potential to improve the modern way of transporting goods over water. To explore the new possibilities autonomous ships can grant, we will take a look at how shipping is currently done, where autonomous ships could be implemented, how it is being researched and tested, and what the current problems and possible areas of improvement are.

2.1.

Passage Planning

The computing of a ship’s route is called ”passage planning”. Passage planning is the legal responsibility of the ship captain, but the task is often delegated to the navigation officer (Wiki,2016). The goal of passage planning is to create a detailed and complete description of the route the ship will follow. It must take into account all obstacles, dangerous waters, and both national and, if needed, international regulations. There are four major stages within passage planning (Chopra,2016):

• Appraisal • Planning • Execution • Monitoring

These four stages are briefly explained below:

Appraisal: In the case that the passage planning task is delegated to the navigation officer, the

ship captain first discusses with the navigation officer how he intends to sail the route. The navigation officer then draws a rough overall sketch of the route on a small scale chart. This route sketch takes into account the ship’s characteristics, the captain’s and company’s guidelines, the ship cargo, the marine environment, and all other factors affecting the ship.

Planning: In the planning stage, the route is laid out on a larger chart and all relevant points are

marked on the chart. This includes all destinations as well as dangerous areas such as reefs, wrecks, and shallow waters. Any information that helps make the journey safer is laid out on the chart. The captain and navigation officer then make small changes to the route if needed. After this, the route is final and the journey can begin.

Execution: In the execution stage, the ship sets sail and makes sure the ship will arrive exactly

on time. This is done by checking the environmental conditions such as the weather and water current and adjusting the ship speed accordingly.

Monitoring: The final stage is monitoring. The ship crew must monitor the equipment and nearby

(12)

6 2.Background environment to ensure a safe journey. In certain situations, the captain and navi-gation officer might think it wise to deviate from the original route and make some changes during the trip.

This research project aims to compute the optimal direct graphical route along multiple destinations. This is a direct route, not considering any obstacles or regulations. Hence, this project is at the very beginning of the passage planning process and falls under the appraisal category. In the next section, we will look at where autonomous ships could potentially be implemented and how this research project in ship routing could play a part in this.

2.2.

The Adoption of Autonomous Vessels

There is no doubt that the future of transport lies in automation. The so-called ’Internet of Things’, the movement of networked IT into everyday objects, is also creating possibilities for re-imagining mobility (Goodall,2015). Within the maritime industry, autonomous ships could be used for different purposes. The purposes of autonomous ships are of importance to this research project because different environments and tasks can influence the routing procedure. Three possible future uses for autonomous ships that are currently being researched and investigated will each be discussed further.

2.2.1.

Cargo Shipping

As can be seen in figure2.1, for longer distances (>150 km), water transport is the most used mode of transport for shipping products from the Netherlands (StatisticsNetherlands,2015). Although cargo planes have long surpassed ships in terms of delivering speed, no mode of transport can compete with the massive amount of cargo a single ship can carry. Rolls Royce has taken the first initiative to making autonomous cargo ships a reality. ”Two years ago talk of intelligent ships was considered by many as a futuristic fantasy. Today, the prospect of a remote controlled ship in commercial use by the end of the decade is a reality” (Jokioinen,2016). Autonomous container ships bring many advantages, with the most obvious and important being capacity. A large part of a ship is designed to house human operators such as the accommodation and control room. With human operators out of the picture, this leaves unfilled space for more containers. To understand the level of autonomy Rolls Royce wishes to achieve, we can take a look at Sheridan’s scale. This is a scale with 10 levels of increasing amounts of automation. This scale can be seen in figure 2.2. The Rolls Royce ship will most likely have an automation level of 7, allowing humans to remotely supervise the ship and take control if necessary. However, this level of automation is also dependent on the location and task of the ship. With benefits for both the economy and, of course, the environment, there seems to be no doubt that autonomous cargo ships are the future. As mentioned before, one of the largest obstacles to make this a reality is autonomous ship routing. That is what makes this project important and to fully understand the complexity, it is important to know the daily travel procedures of cargo ships.

There are two main types of situations during the journey of a cargo ship (Jokioinen,2016):

Unmooring and manoeuvring out of harbour/Port approach and docking: Fully automatic

mooring and unmooring would require changes to dockside infrastructure and thus the use of this depends on the economic feasibility of the infrastructure, for example, if the docking system can also be used for other manually controlled ships. Manoeuvring out of the harbour is a difficult task to automate due to the heavy congestion. This task will most probably either be fully remote controlled or heavily supervised. Remote controlling of a ship can mean one of two things. The first consists of the ship being controlled with a joystick-type operation. The operator can use the joystick for functions such as locking speed, heading, and relative position to other objects. The second, more practical way of remote controlling a ship is by sending waypoints to the ship. The ship then uses its dynamic positioning control computer and autonomous control system to move to the given waypoint (Jokioinen,2016). For this task, high bandwidth and low latency communication between the ship and the remote operator is crucial. Bandwidth is the amount of bits, or data, transferred in one second. Latency is delay, or the amount of time it takes for the data to travel from source to destination (DSLReports,2009). This communication can be provided by land-based communication networks or satellite communication systems. In the case of approaching a port and docking the situation is pretty much the same and thus this will be handled in the same way.

(13)

2.2.The Adoption of Autonomous Vessels 7

Figure 2.1: Modal split of freight by distance (StatisticsNetherlands,2015)

Figure 2.2: Sheridan’s 10 levels of automation (Evans,2014)

Operation at open sea: In open sea, it is usually quite calm and peaceful when it comes to

obstacles and disturbances. Thus, at open sea, the ship can often continue in normal autonomous mode traveling to each waypoint according to the defined plan. As the risks are low at this point, the data transfer between the ship and the operator is minimised and limited to only relevant status data such as the ship’s location, heading, speed, and ETA. Additional information is only provided if the situational awareness systems and the autonomous navigation system decision making threshold is exceeded and user notification, confirmation, or intervention is required (Jokioinen,2016). Hence, the ship is constantly switching in automation level depending on the nearby environment. figure2.3 shows the different scenarios the operator could deal with when supervising an autonomous ship:

• Monitoring: the ship has got everything under control and is sailing according to plan. • Replan: The ship must replan its route because of a nearby obstacle.

(14)

8 2.Background

• Pan-pan: Due to difficult circumstances in the ship’s nearby environment, it does not know what to do and needs user intervention.

Figure 2.3: Autonomous ship scenarios (Jokioinen,2016)

The information above shows that ship routes are often changing during the route and that a cargo ship’s route, especially harbours, are challenging environments to travel through.

2.2.2.

Waterborne AGV

Another possible commercial use for autonomous ships is waterborne AGVs. AGVs are currently heavily used and relied upon in multiple container terminals around the world including the Maasvlakte II in Rotterdam. Waterborne AGVs differ from AGVs on several aspect making it more difficult to create (Zheng,2016):

• Waterborne AGVs are for transportation over water and AGVs for transportation over land. • Waterborne AGVs cannot be navigated by following markers, wires, or magnets etc. in the floor,

which is the case for most of the existing AGVs.

• It is not possible to specify an area especially for waterborne AGVs without external traffic as has been done for AGVs that are applied in manufacturing industries, warehouses, and container terminals.

However, if waterborne AGVs can be made a reality, it potentially also brings along the following advantages (Zheng,2016):

• Waterborne AGVs could be almost labor cost free since no mariners are necessarily on board. • Waterborne AGVs could offer another transport mode to handle the expected large throughput

instead of exploiting the limited land in port areas for road traffic.

• Waterborne AGVs, comparable to land-side AGVs, could be optimally operated 24/7 with reliable performance and improve port efficiency exploiting automation.

• For terminals with longer distances by land than by water, waterborne AGVs could save energy compared to road vehicles.

The routing algorithm will differ for waterborne AGV’s compared to cargo ships. The goal of this project is to create an algorithm with multiple charging stations and destinations. A waterborne AGV will most likely have one charging point at the dock where it automatically returns when it runs out of energy.

(15)

2.3.TU Delft Benchmarks 9

2.2.3.

Offshore Operations

The last potential use of autonomous ships is to aid offshore operations. Automated Ships LTD. AND KONGSBERG are in the process of building the first unmanned and fully-automated vessel for offshore operations (KONGSBERG,2016). The ship has multiple intended uses such as surveillance, delivery to offshore installations, and even firefight support to offshore platforms.The idea is to have the ship start as a remotely piloted ship and slowly make the transition to a fully automated one. KONGSBERG believes it will be able to offer these ships at a competitive price. KONGSBERG also names multiple advantages of the autonomous ship: ”The advantages of unmanned ships are manifold, but primarily centre on the safe guarding of life and reduction in the cost of production and operations; removing people from the hazardous environment of at-sea operations and re-employing them on-shore to mon-itor and operate robotic vessels remotely, along with the significantly decreased cost in constructing ships, will revolutionise the marine industry” (KONGSBERG,2016).

This section shows that there is a wide variety of different implementations for autonomous ships. The three examples above are all very different, however, share a very similar routing procedure. Whether it be a cargo ship or a waterborne AGV, an autonomous ship needs an automatically computed optimal route. This research project is the start of this technology. The next section will explore the current benchmarks on autonomous ships and routing.

2.3.

TU Delft Benchmarks

Currently, research on autonomous ships is being done at the Technical University in Delft. 3ME, the faculty for mechanical and maritime engineering, has a pond in front of the building where tests can be done on autonomous shipping on a small scale. According to the TU Delft, autonomous shipping is one of the most important directions of research currently explored at the university (TU Delft,2016). This year, about three to five boats will be visible in the pond in front of the faculty. An example of such a boat can be seen in figure2.4. The small scale autonomous boats will undergo numerous tests such as overtaking another boat, crossing paths, and many other scenarios that are common in ship navigation (TU Delft,2016). The TU Delft expect to upscale the amount of ships to 20 by 2020.

Figure 2.4: Autonomous ship TU Delft (TU Delft,2016)

Another place where autonomous boats might soon be sailing are in the Amsterdam canals. MIT, TU Delft, and Wageningen University are working together on ”Roboat” (AMSInstitute,2016). This is a five year program with a budget of 25 million dollars. The goal of the project is to explore the possibilities and uses of autonomous ships in the canals, for example movement of goods, movement of people, and temporary bridges. figure shows a first render of what such a boat might look like.

The benchmarks above show that routing and navigation are one of the largest obstacles to over-come when it over-comes to autonomous ships. It is difficult to manoeuvre a ship through dangerous waters without a pair of eyes on board. This makes this research vital to the realization of autonomous ships. The further improvements autonomous ships can bring to the shipping industry are explained in the next section.

(16)

10 2.Background

Figure 2.5: Roboat in the amsterdam canal (AMSInstitute,2016)

2.4.

Future Improvements

To understand the importance of this project from an economical point of view, it is important to look at the improvements and solutions it can bring to the marine economy. One of the major problems for the shipping industry is a growing shortage of employees (Allen,2016). Although the supply of shipping officers is expected to increase in the near future, the demand for shipping is expected to far outpace the employee increase. The result of this would mean that shipping industries will be unable to satisfy the demand. Where the current shortfall of employees is estimated at about 16500, the shortfall in 2025 is estimated to be around 147500 employees (Allen,2016). This can be seen in figures2.6,2.7, and2.8. These figures are obtained from the manpower report, which is published every five years by BIMCO and the ICS (International Chamber of Shipping). Officers are actual maritime workers with a degree, whereas ratings are mariners without a certificate of competence who assist in tasks such as cleaning and mooring of the ship.

Figure 2.6: Current demand of shippers (BIMCO,2015)

Figure 2.7: Current supply of shippers (BIMCO,2015)

Figure 2.8: Expected future supply and demand of shippers (BIMCO,2015)

(17)

2.5.Summary 11

important to keep trying to minimize risks and prevent accidents before they happen. In more than 75% of cargo ship accidents, the cause is human error. (Veysey,2013). Although human error is not an unusual phenomenon, it is often caused by something else. A report by Bowels and Langley showed the most likely causes for human error in the marine industry (Rothblum,2013):

• Fatigue

• Inadequate Communications

• Inadequate General Technical Knowledge • Inadequate Knowledge of Own Ship Systems • Poor Design of Automation

• Decisions Based on Inadequate Information • Faulty standards, policies, or practices • Poor maintenance

• Hazardous natural environment

Hence, often these accidents are not seen as the ”fault” of the human, but rather the fault of the working conditions, organizational factors, or technologies.

Autonomous ships do not share the problems in the current way of shipping explained above. Autonomy can increase safety while decreasing costs and errors as is further explained below:

Autonomy in ships can decrease the amount of human errors and mistakes. When looking at the causes for human error in the report of Bowels and Langley, autonomy alone fixes 6 of those 9 causes by taking the human out of the equation. Machine error rates are lower than that of humans, meaning that an autonomous ship would cause less errors than a human-controlled ship in the same amount of cycles (de Winter,2016). Furthermore, autonomous ships would be supervised by humans, lowering the risk of errors even more.

Another point of improvement is smart communication. Currently, all traffic in and out of a port is controlled and supervised by traffic centres (PortofRotterdam,2017). When near a port, a ship must constantly have an officer on duty listening to the traffic control centre for updates on traffic. When using autonomous ships, all data can easily be sent to both the traffic control centre, as well as to all other ships and parties involved. Rudy Negenborn, a professor at the TU Delft, believes in this principle as well: ”The cost of shipping will decrease because ships, container terminals, bridges, sluices, and other parties in the port automatically share information, causing them to be able to optimally configure how fast, where, and in what way they must go to deposit or pick up their cargo” (TU Delft,2016).

Probably the largest improvement concerning autonomous ships is the unnecessity of the crew. First of all, in the case of rough seas or even a sinking ship, there are no possible casualties so there is no human danger anymore. Secondly, the profit will increase due to both the disappearance of crew salary and the increase in shipped goods as there is more room for containers with no crew on board (KONGSBERG,2016).

2.5.

Summary

The four stages of passage planning are appraisal, planning, execution, and monitoring. This project falls under the first stage. This stage creates the first rough draft of the route to be traveled. The routing algorithm can be implemented in autonomous ships with numerous different goals. Three examples of implementations are in cargo shipping, waterborne AGV’s, and offshore operations. Cargo shipping is the most difficult implementation because of the different situations it encounters such as mooring/unmooring, traveling within a terminal, and traveling in open sea. Also, Waterborne AGV’s and offshore operation ships have less distance to cover and thus are most likely only charged at a single dock, whereas cargo ships need multiple charging points. Currently there are not many benchmarks for autonomous ships. The TU Delft, alongside MIT and Wageningen University, are testing small scaled autonomous ships in the pond at the TU Delft faculty of mechanical engineering and in the Amsterdam canals. The routing algorithm to be created in this project could have numerous advantages

(18)

12 2.Background

and improvements for the future of marine transport. There is a growing shortage of employees in the marine industry. Also, due to automation, the employees are becoming less skilled. Lastly, ship accidents are often in some way, directly or indirectly, caused by human error. The human is, however, not always to be blamed as the error could have been caused due to fatigue, poor automation design, or other factors. Automated routing algorithms could decrease the number of errors as well as solve the employee shortage problem.

As stated before, this research project does not necessarily focus on one of the previous implemen-tations, but rather on computing an optimal route from a set of destinations for an autonomous ship in general. These destinations could be ports for container ships, but could also be simple waypoints for smaller ships. In this chapter, we have seen the where this technology can be implemented and what improvements this can give to the current passage planning process. In the next chapter, the exact problem of this research project will be further explained and formulated.

(19)

3

Problem Formulation

In the previous chapter, the background to this research project was explained. This chapter will focus on creating a model to formulate the problem of finding an optimal order of destinations for an autonomous ship. We first formulate the cost function of the problem and the energy consumption. Then the passage planning problem will be devised and explained.

3.1.

Energy Consumption

Before formulating the problem, a formula must be computed that correctly calculates a ship’s energy consumption. As mentioned before, the ship’s energy consumption is calculated as a percentage of the maximum battery charge. Below we will compute the formula for the state of charge of the ship.

Variables:

𝑃 = Ship movement power 𝑅(𝑣 ) = Hull resistance 𝑣 = Ship speed 𝐶 = Constant 𝑃 = Battery power 𝑉 = Battery voltage 𝐼 = Battery current

𝑆𝑜𝐶 = State of charge of the battery 𝑄 = Maximum battery charge

𝑡 = time

𝛼 = efficiency constant between 0 and 1 𝐸 = Energy consumption

𝑑 = distance from node i to node j

𝑐 = Energy consumption from node i to node j

(20)

14 3.Problem Formulation Calculation 𝑃 = 𝑅(𝑣 ) ∗ 𝑣 (3.1) 𝑅(𝑣 ) = 𝐶 ∗ 𝑣 (3.2) 𝑃 = 𝐶 ∗ 𝑣 (3.3) 𝑃 = 𝑉 ∗ 𝐼 (3.4) 𝑃 = 𝛼 ∗ 𝑃 (3.5) 𝑃 = 𝛼 ∗ 𝑉 ∗ 𝐼 (3.6) 𝑣 = √𝑉 ∗ 𝐼 𝐶 𝛼 (3.7)

(3.1) shows that the hull resistance multiplied by the ship speed gives the movement power of a ship. The hull resistance is a difficult variable to calculate exactly and it is different for each ship. Thus we will simply assume the hull resistance as a constant multiplied by the speed squared as seen in (3.2). In (3.3), these two previous equations are combined to give the ship movement power as a function of the same constant and the cubic ship speed. An electric ship consists of a battery to deliver the energy to move the ship. The battery power is shown in (3.4) as the voltage multiplied by the electric current. Just as with a diesel motor, the battery power is different from the actual ship movement power due to losses. Hence, the ship movement power is the battery power multiplied by and efficiency constant, depicted in (3.5). By combining (3.4) and (3.5), a new equation for the ship movement power can be derived (3.6). By putting equation (3.6) into equation (3.3), we can calculate the ship speed, which is needed when calculating the state of charge, as we will learn later. (3.7) shows the ship speed formula. With this knowledge, we can now compute the state of charge. The state of charge is the percentage of battery capacity that an autonomous ship has left. The existing formula for the state of charge relative to the travelled time is as follows:

Δ𝑆𝑜𝐶 Δ𝑡 = −

𝐼 𝑄

Now the ship travel time can be moved to the right of the equation and be given as a function of distance and speed:

Δ𝑆𝑜𝐶 = −𝐼 𝑄

𝑑 𝑣

Thus, this formula above can be used to calculate the state of charge, which, in this research project, is the cost (𝑐 ) in the integer linear programming formulation. In this section, all necessary variables have been explained and computed. This will be used in the next section to formulate the problem.

3.2.

Passage Planning Problem Formulation

Using the variables and formulas computed in the previous section, we can now formulate and model the problem. First a similar type of problem will be formulated, which will then be used to formulate the actual problem of this research project.

3.2.1.

Travelling Salesman Problem

The basis of this routing problem is similar to the so-called ’Travelling Salesman Problem’ (TSP). TSP is a problem that asks the following question: Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?. A TSP can be formulated using integer linear programming (ILP), which is used in mathematical optimization problems. ILP consists of an objective function, to minimize or maximize a certain value, and a set of constraints that must be met when solving the objective function. The standard TSP integer linear programming formulation is shown below:

(21)

3.2.Passage Planning Problem Formulation 15

Figure 3.1: (Papadimitiou,1998)

The objective function in this case is:

𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒 ∶ ∑ ∑

,

𝑐 𝑥

𝑐 is the cost of travelling from point i to point j and 𝑥 is a variable equalling either 0 or 1 depending on if the path from point i to point j is taken, thus this objective function aims to minimize the total cost of the route. The first and second set of constraints, seen below, ensure that each node has exactly one path to and from it and thus each node is only visited once.

∑ , 𝑥 = 1 ∑ , 𝑥 = 1

The last constraint ensures that the computed route is a single one with no sub tours. A solution with sub tours means that the route is not fully connected, as can be seen in figure3.2.𝑢 is a dummy variable that equals the step t at which node i is reached. The constraint ensures that all feasible solutions must pass through the starting city 1.

Figure 3.2: TSP sub tour solution (Gurobi,2016)

To compute an optimal route for an autonomous ship, more things come into play than with just a simple TSP. In the following section, the TSP above will be expanded to formulate the problem of this

(22)

16 3.Problem Formulation

research project.

3.2.2.

Autonomous Ship Routing

To formulate the integer linear program for an autonomous ship, more factors such as energy level and charging stations must be taken into account. As can be seen below, the objective function is similar to the TSP example above, however there are numerous differences and additions to the constraints. This is because this model must account for optional charging stations and a ship battery capacity and energy consumption. The autonomous ship routing problem formulation is shown and fully explained below:

Variables:

𝐴 = set of all arcs 𝑁 = set of all nodes

𝑆 = subsets of nodes N 𝐷 = set of destination nodes 𝐶 = set of charging station nodes 𝑄 = maximum battery capacity

𝑦 = remaining battery charge upon arrival at node j 𝑐 = energy consumption from node i to node j 𝑥 = {1 if path is taken from node𝑖 to node j

0 otherwise Objective function: 𝒫 ∶ 𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒 ∑ ( , )∈ 𝑐 𝑥 (3.8) Subject to: ∑ ∈ , 𝑥 = 1 ∀𝑖 ∈ 𝐷 (3.9) ∑ ∈ , 𝑥 ≤ 1 ∀𝑖 ∈ 𝐶 (3.10) ∑ ( , )∈ 𝑥 ≤ |𝑆| − 1 ∀𝑆 ∈ 𝑁 (3.11) ∑ ∈ , 𝑥 − ∑ ∈ , 𝑥 = 0 ∀𝑗 ∈ 𝑁 (3.12) 𝑦 ≤ 𝑦 − 𝑐 + 𝑄(1 − 𝑥 ) ∀𝑗 ∈ 𝐷 and 𝑖 ∈ 𝑁, 𝑗 ≠ 𝑖 (3.13) 𝑦 = 𝑄 ∀𝑗 ∈ 𝐶 (3.14) 𝑦 ≥ 0, 2𝑄 ∀𝑗 ∈ 𝑁 (3.15) 𝑥 ∈ {0, 1} (3.16)

Objective function explanation:

Equation (3.8) is the objective function of the problem formulation. 𝑐 is the cost of travelling from node i to node j. 𝑥 has a value of either 1 or 0 depending on whether the route i to j has been traveled. The cost, in this case, is a percentage of the energy level of the ship. The sum of these costs is taken and is minimized. Hence, the objective of the algorithm is to minimize the total energy cost of the ship.

(23)

3.3.Summary 17

Constraint explanations:

(3.9) All nodes i in the set of destination nodes D have exactly one successor. In other words, each destination node is visited exactly once.

(3.10) All nodes i in the set of charging station nodes C have at most one successor. In other words, charging stations are not mandatory destinations and thus do not have to be visited, however, they can be visited once if needed.

(3.11) For each subset, or sub tours, of nodes S, the amount of paths must be at most |S|-1. This is impossible unless there are no separate subsets, thus subsets are eliminated by this constraint.

(3.12) The number of arrivals at a node must equal the number of departures. This counts for both destination nodes as well as charging stations.

(3.13) The state of charge of the ship at node j in the set of destinations D is equal to the state of charge at node i minus the cost of the path from node i to node j.

(3.14) The state of charge of the ship at node j in the set of charging station nodes C is equal to the maximum battery charge of the ship.

(3.15) The state of charge of the ship must always be at least 20% of the maximum battery charge.

(3.16) 𝑥 has a value of either 0 or 1.

As can be seen from the formulation and constraint explanations above, this model ensures that an autonomous ship must visit all mandatory destinations in one round trip without running out of energy. Charging stations are optional and may be visited once if needed in the route. The order of destinations is chosen such that the energy consumption of the ship is minimized.

3.3.

Summary

In the previous chapter, the passage planning problem has been formulated and the final model that will be used to create the solution algorithm has been computed. The energy consumption of the ship was formulated first as this is important when creating a model that thrives to find a route that minimizes energy consumption. In this project, the energy consumption of a ship is formulated as the difference in state of charge of the battery of the ship. Thus the energy consumption is measured as a percentage. The basis of this research problem of finding an optimal order of destinations is similar to the Traveling Salesman Problem, which finds the shortest route past different destinations. The model has been formulated as an integer linear programming problem with added constraints that ensure it complies with the guidelines of this research project. In the next chapter, the different ways of solving the this model will be explored and the chosen solution algorithms are explained.

(24)
(25)

4

Proposed Methodologies

In the previous chapter, the problem has been formulated as an integer linear programming model and the necessary and relevant variables and information to try to solve it has been given. In this chapter, the aim is to show and explain the approach to an optimal solution for the autonomous ship routing problem. First, the different possible methods will be explored and after that the chosen solution(s) will be shown and explained.

4.1.

Potential Solutions

Now that the problem is properly formulated, it can be solved in different ways using different algo-rithms. There are multiple ways to solve such a problem, each with their own advantages and disad-vantages. There exists no perfect solution and the best algorithm is usually different for each problem. Ideally, we would like a solution that guarantees the optimal route. The following two algorithms are examples of exact algorithms that satisfy this demand:

1. Brute force search: this algorithm simply searches all possible routes and calculates the cost for each of these routes. It then gives the route with the minimum cost out of all the possibilities. 2. Branch-and-bound: this algorithm also starts to compute all the possibilities by adding branches after each node and immediately calculating the cost of the route thus far. Once a route exceeds the minimum total cost, that route branch is stopped and not calculated further.

One of the solution programs, explained later, is based on the brute force search algorithm. How-ever, the problem with exact algorithms is that all possibilities must be explored to be 100% sure of the output. The total amount of routes for n nodes is𝑛! and thus increases tremendously with each added node. This also increases the running time of a model and thus exact algorithms are only possible for a maximum of about 40-60 nodes in the simplest cases. Our problem is more complex than a simple travelling salesman problem meaning that an exact algorithm is not a realistic option. Other algorithms are called approximation algorithms and, when implemented correctly, these algorithms can yield near to exact solutions. Two examples of approximation algorithms are explained below:

1. Ant colony optimization: This algorithm is based on actual ant colonies. When ants search for food they leave pheromones. This leaves a scent that slowly fades. The next ant then knows that the stronger the smell, the more ants have taken that route and the closer the food. This algorithm can be very effective but is difficult to optimize. The fading of the ”pheromones” is depicted as a variable𝛼. If 𝛼 is chosen too large, the program checks more routes and this slows the computation time. If𝛼 is chosen too low, the output might be far from the optimal route. 2. Tabu search: Tabu search is a somewhat more random approach. It starts with a completely

random solution and searches for neighbouring solutions. If a neighbouring solution is better, the previous solution is put on a so-called tabu list. Tabu search distinguishes itself from other algorithms in that it can choose to follow a lesser solution in a next iteration instead of a better

(26)

20 4.Proposed Methodologies

seeming one. The tabu search algorithm also keeps track of made changes for a short while. If a certain change made a great impact, the neighbouring solutions are not checked anymore as the chance of a better one is very small.

Tabu search and ant colony optimization are quite similar, however, one has not been proved to be better than the other. The second solution program is, however, based on the tabu search algorithm as the pheromone variable𝛼 is a risky approach compared to the simpler and more random approach of a tabu list.

4.2.

Solutions

In this next section, the brute force search algorithm and the tabu search algorithm will be explained. These solution algorithms serve to solve the problem formulation in the previous section and give the optimal route for an autonomous ship to sail.

4.2.1.

Brute force search solution

The first solution is based on the brute force search algorithm. This Matlab model works for up to 10 nodes and finds the exact most optimal route for a ship to travel because it checks all possible routes. The program consists of a function that acquires all necessary information and puts it into one matrix of arrays and a main code file that gives the output of the program. Both these files are explained below:

Allpaths function

The allpaths function computes every single possible route and then checks if these routes comply with the problem constraints. Below is explained how this function works:

Begin

– For the given number of nodes, create a matrix with a move from the last node to each other node.

– Make any previously visited nodes in the matrix zero. If there are no more moves available, stop the program.

– For each possible move, create a new path by including this new move into the old path. – Calculate the costs of the new paths by adding the old cost to the cost of the new edge. – Move any path that finishes at the end node, as well as the corresponding costs, to the array

with finished paths.

– Calculate the SoC at then end of each route by deleting the distances before the last charge node. – If the cost of a path is above 80 percent of the maximum travel distance and the path contains no charging stations, remove the path from the array. If the path does contain charging stations, check if the distance between these nodes exceeds 80 percent of the maximum travel distance and remove the path if it does.

– If a path does not contain all the mandatory destinations, remove the path from the array. – Put the acquired possible paths, costs, and SoC’s in the information matrix.

End

The information matrix made by this function is then used by the main code file to show the solu-tion output.

(27)

4.2.Solutions 21

Brute force search main file

The main file computes the wanted output by using the information acquired by the function explained above. This main file works as follows:

Begin

– Create two random arrays, the size of the amount of nodes, of x-coordinates and y-coordinates with a value limit of 1 to the chosen x-coordinate limit and y-coordinate limit in the GUI.

– Create a matrix of zeros with the same amount of rows and columns as the total amount of nodes.

– For each possible pair of nodes i and j, calculate the distance between the nodes with the Pythago-ras theorem and add this value to the previously created matrix in both spot (i,j) and (j,i) as the distance is the same to and from each node.

– Gather the information from the allpaths function.

– Find the route with the minimum cost within this information. – Write the route, route cost, and SoC to the command window.

End

All the Matlab file codes belonging to the brute force search algorithm can be found in appendix chapter A.1.

Brute force search GUI

The GUI is the control room of the Matlab model. The GUI interface, seen in figure 4.1has both a ”user-defined” panel and a ”random” panel. The options in the user-defined panel are automatically used if they are not empty. If the user-defined panel is empty, the random variables are automatically used. The random panel is advantageous for carrying out multiple tests, whereas the user-defined panel is beneficial for testing certain specific situations. Below, the interface is shown and the different variables are explained.

Interface: Variables:

Number of nodes= Total number of nodes

Number of charge nodes= Number of nodes that are charging stations Number of destinations= Number of nodes that are mandatory destinations

x-coordinate limit= The maximum value of the x coordinate of a node

in the percentage of battery charge it takes to travel that distance y-coordinate limit= The maximum value of the y coordinate of a node

in the percentage of battery charge it takes to travel that distance Node coordinates= The arrays of x and y coordinates of each node

Charge nodes= The array of all nodes that are charging stations Destinations= The array of all nodes that are mandatory destinations

Start node= The node at which the ship’s route starts End node= The node at which the ship’s route ends

(28)

22 4.Proposed Methodologies

Figure 4.1: Brute force Matlab GUI interface

Step-by-step tabu search algorithm Below is summarized how the program works:

Step 1 Gather input from the GUI edit boxes and/or tables.

Step 2 The program gathers the information from the function ’allpaths’ as explained above.

Step 3 The best route, cost, and SoC is displayed in the command window. creates initial route solution by randomly shuffling the node numbers.

Guideline to the brute force search model

The brute force search model is easy to use and self-explanatory. The options located in the ’user-defined’ panel of the GUI are automatically used when filled in and if this is not the case, the ’random’ panel is automatically used. A step-by-step user guide has been given in figure4.2.

(29)

4.2.Solutions 23

Figure 4.2: Guideline to use the brute force search model

4.2.2.

Tabu Search Program

The program is a consists of different functions and a main file that uses these functions to solve the routing problem. Below, the different functions are first explained and the main file afterwards. The program is a modified and added to version based on the standard tabu search algorithm by Yarpiz

(30)

24 4.Proposed Methodologies

(2015). Actions

There are three action functions used in the program. These different actions have been listed and explained below:

1. Neighbour swap: Two neighbouring nodes swap places with each other.

Figure 4.3: Neighbour swap action

2. Switch places: Two nodes, that are not neighbours, switch places with each other.

Figure 4.4: Switch places action

3. Back of the line: A node is taken from its place and put behind another node.

Figure 4.5: Back of the line action

These short functions are used by the ”CreatePermActionList” function to create a list of all possible actions that the program can apply to try to find a better route. This is done as follows:

Begin

– The total amount of possible actions of all three action types is calculated and an array of this size is created.

– For each of the action types, all node pair possibilities are determined and put into the ”ActionList” array created earlier. Each action in this array consists of the respective node pair as well as a number from 1 to 3 that states to which action type it belongs.

End

Lastly, the ”DoAction” function can now be used to retrieve these possible actions. Thus, the ”DoAction” function is used in the main code to apply actions.

Plot Solution

There are two functions for plotting solutions, the PlotSolution function and the PlotIdealSolution func-tion. These functions plot a route in a figure. The PlotSolution function plots the actual optimal route taking the charge nodes into consideration. The PlotIdealSolution function plots the optimal route as-suming that charging can be done at any node. The route is plotted on an image of the pond in front of the faculty of mechanical engineering at the TU Delft where autonomous ship testing will be taking place. In the PlotSolution function, mandatory destinations are rendered as yellow dots, charge nodes as green dots, nodes that are both mandatory destinations and charge stations as blue dots, and the start node as a red dot. Below a brief explanation of the code is given:

(31)

4.2.Solutions 25

– Create array for both the x and y coordinates of all charge nodes.

– Create array for both the x and y coordinates of all nodes that are both mandatory destinations and charge nodes.

– Create an array with all numbers from 1 to the total amount of nodes to label the plotted nodes. – Plot the image of the TU Delft ship testing pond.

– Plot all nodes on the route as a yellow dot with connecting lines in between in the order of the respective route.

– Plot the charge nodes on the route as a green dot. This green dot covers the earlier plotted yellow dot.

– Plot the nodes that are both mandatory destinations and charge nodes as a blue dot. This blue dot covers the earlier plotted yellow or green dot.

– Plot the start node as a red dot. This red dot covers the earlier plotted yellow dot. – Plot the legend of the figure next to the top right corner of the plotted route.

– Label the nodes in the figure by plotting the node numbers in the earlier plotted dots.

End

The PlotIdealSolution function essentially works in the same way with the following differences: • An array consisting of the most ideal places to recharge, considering charging is possible at any

node, is made in the main code.

• The mandatory destinations are plotted as yellow dots, the ideal charging points as green dots, and the start node as a red dot. Thus, the blue dot is not present because in a situation where charging is possible at any node, no charging stations have to be visited if they are not mandatory destinations.

An example of the plots that each of these functions create is given in figures4.6and4.7.

(32)

26 4.Proposed Methodologies

Figure 4.7: Plot ideal solution output

Create Model

This function creates an adjacency matrix. An adjacency matrix is a symmetrical matrix consisting of all the distances between the different nodes. It works as follows:

Begin

– Create two random arrays, the size of the amount of nodes, of x-coordinates and y-coordinates with a value limit of 1 to the chosen x-coordinate limit and y-coordinate limit in the GUI.

– Create a matrix of zeros with the same amount of rows and columns as the total amount of nodes.

– For each possible pair of nodes i and j, calculate the distance between the nodes with the Pythago-ras theorem and add this value to the previously created matrix in both spot (i,j) and (j,i) as the distance is the same to and from each node.

Tour Length

The TourLength function calculates the total distance of a given route. The total distance is computed as explained below:

Begin

– The amount of nodes in the route is determined

– The start node is added to the end of the route to make sure the ship returns to its origin. – Set total distance L to zero.

– For each node in the route, set the current node as i and the node after as j. determine the distance between these nodes using the adjacency matrix. Add this distance to the total distance L.

(33)

4.2.Solutions 27

Main Tabu Search File

The main code file uses the functions above to compute an optimal route past all destinations. The first part of this code aims to find an optimal route past all the nodes, including mandatory destinations, charging stations, and destinations that need not be visited. This is done as follows:

Begin

– Create an initial random solution to start with.

– Create a solution structure consisting of the route and the cost. – Create an array that will hold the best solution for every iteration. – For each iteration, apply all the actions in the action list one by one.

– After each action, check if the route cost has improved and if so, save the current route as the best new solution.

– After all the actions have been applied, put the action that resulted in the best new route in the tabu list.

– After each iteration, check if the best route of the respective iteration is the best route found in all the iterations so far and if so, set this route as the best solution ever found

– Plot the best solution ever found in a figure and add the solution to the best solution array.

End

After this ”for loop”, that runs for the chosen amount of iterations, an optimal route past all the nodes is given. However, not all nodes must be visited and sometimes the route covers too much distance between charging stations. This is fixed in the rest of the code. First, the useless nodes are taken away. These are the nodes that are neither mandatory destinations nor charging stations and thus serve no further purpose.

Begin

– Sort the array of best solutions from lowest to highest cost.

– Take the first route of the array and check if there are any nodes in the route that are neither mandatory destinations nor charging stations.

– If there are useless nodes, take these nodes out of the route.

End

The next step in the code is to check if the ship doesn’t run out of fuel during the route. The distance between two charging station is not allowed to be larger than 80 percent of the maximum distance the ship can travel on one full battery charge.

Begin

– For the length of the route, check each node to see if it is a charge node.

– If a node is a charge node, calculate the distance from this node to the previous charge node or start node.

– If this distance is larger than the tolerated 80 percent of the maximum travel distance of the ship, try switching the charge node with the node one or two places before it.

– If one of these options works, save the current route. If both options don’t fix the problem, this route is not possible and try the next route in the best solutions array. If all these routes have already been tried, show an error that it is not possible to travel past all the nodes in the current situation.

(34)

28 4.Proposed Methodologies

– Lastly, check the distance from the last node (the start node), to the previous charge node, as this is not checked in the previous piece of code. If this distance is too large, try the next route in the best solutions array or show an error that the route is not possible if all solutions have already been checked.

End

The last step to optimize the route is to get rid of any optional charge nodes that are not needed. This would mean the ship could make it to the next following charge node without running out of fuel.

Begin

– Check each node in the route to see if it is an optional charge node, meaning a charge node that is not also a mandatory destination.

– If a node is an optional charge node, take it out of the route and calculate the distance from the following charge node to the previous one.

– If this distance is possible for the ship, save this as the new route. If not, leave the optional charge node in the route.

End

Now the optimal route has been computed, other desired output information must be acquired. First, the SoC at the end of the route is calculated by calculating the distance from the last node to the first previous charge node. Second, it could be interesting for some to know the ideal route and charging points assuming charging can be done at any node. This is done as shown below:

Begin

– Get rid of all nodes in the route that are not mandatory destinations or the start node.

– Starting from the start node, calculate the distance to each next node until it exceeds 80 percent of the maximum travel distance of the ship. Mark the current node as an ideal charge node. Continue this process for the rest of the route.

End

Just as with the optimal route, the SoC is calculated for this ideal route in the same way. Eventu-ally the output is shown in the command window and figures. The output of the model includes the following:

• Ideal route

• Ideal charging points • Ideal route total cost • Ideal route SoC • Optimal route

• Optimal route total cost • Optimal route SoC • figure optimal route • figure ideal route

• figure best cost per iteration

• figure SoC throughout optimal route • figure SoC throughout ideal route

(35)

4.2.Solutions 29

Home node variation

The home node variation is a feature added to allow autonomous ship testing on a small scale. This feature works with a single charging node, the home node, to which the ship returns to recharge. The home node is the only charging point for the ship as it passes its destinations. The most important factor to take into account in this algorithm is to ensure that the ship always has enough energy to return to the home node for recharging. For example, if a ship has enough energy to reach the next destination, the ship must not be sent to that destination before it has computed that it will have enough energy left at that respective destination to return home. If not, it must first turn back to the home node before continuing. The home node variation is automatically used when the x and y coordinate of the home node are given in the GUI. The algorithm then works as follows:

Begin

– Create the arrays of x and y coordinates of nodes by putting the home node coordinates first and randomly generating the other coordinates.

– Set the start node as node 1, which is the home node.

– Set node 1, the home node, as the only charging node and set the rest of the nodes as destina-tions.

– Compute the shortest route, considering endless energy supply, past all destinations in the given amount of iterations.

– Check within this route, node for node, when the ship does not have enough energy left to visit the next destination and return home. Each time this is the case, add the home node to the route at that point.

– Compute the outputs

End

The two Matlab file codes belonging to the tabu search algorithm can be found in appendix chap-ter A.2.

4.2.3.

Tabu search GUI

As stated before, the GUI is the control room of the Matlab model. The GUI interface, seen in figure 4.8has both a ”user-defined” panel and a ”random” panel. The options in the user-defined panel are automatically used if they are not empty. If the user-defined panel is empty, the random variables are automatically used. The random panel is good for doing multiple tests, whereas the user-defined panel is good for testing certain specific situations. Below, the interface is shown and the different variables are explained.

Interface: Variables:

(36)

30 4.Proposed Methodologies

Figure 4.8: Tabu Matlab GUI interface

Number of nodes= Total number of nodes

Number of destinations= Number of nodes that are mandatory destinations Number of charge nodes= Number of nodes that are charging stations

x-coordinate limit= The maximum value of the x coordinate of a node

in the percentage of battery charge it takes to travel that distance y-coordinate limit= The maximum value of the y coordinate of a node

in the percentage of battery charge it takes to travel that distance Max distance per charge= The maximum distance the ship can travel on one full charge Maximum number of iterations= The maximum amount of iterations the program is allowed to run

Start node= The node at which the ship’s route starts and ends Node coordinates= The arrays of x and y coordinates of each node

Destinations= The array of all nodes that are mandatory destinations Charge nodes= The array of all nodes that are charging stations Home node coordinates= the x and y coordinate of the home node of the ship Step-by-step tabu search algorithm

Below is summarized how the program works and when the different functions explained above are used:

Step 1 Gather input from the GUI edit boxes and/or tables.

Step 2 The program uses the function ‘CreateModel’ to create the adjacency matrix of distances between all nodes.

(37)

4.2.Solutions 31

Step 4 The program uses the function ‘CreatePermActionList’ to create a list of actions to be applied to the route. This function uses the three other action functions ‘SwitchPlaces’, ‘NeighbourSwap’, and ‘BackOfTheLine’ to create the action list.

Step 5 For the given amount of iterations, the program uses the function ‘DoAction’ to apply the actions in the action list defined by the function ‘CreatePermActionList’.

Step 6 If the action results in a better solution, the change remains. If the action results in a worse solu-tion, the change is reversed. The cost of the route is determined using the function ‘TourLength’. The action giving the best result is put on the tabu list to keep it from being reversed in a later iteration.

Step 7 After each iteration, the function ‘PlotSolution’ is used to plot the best solution thus far.

Step 8 After the given amount of iterations, the array with the best solution of each individual iteration is sorted from best to worst cost.

Step 9 The best solution is taken from the array and tested and modified as explained in detail in the tabu search main file section.

Step 10 If the solution passes these tests, the modified version of the route is the optimal solution. If it fails any test, the second best route in the array is tried. If all routes have been tried, no route is possible under the current circumstances.

Step 11 The ideal route is computed along with the ideal charging points, the ideal SoC, and the optimal SoC.

Step 12 The functions ’PlotSolution’ and ’PlotIdealSolution’ are used to display the optimal and ideal route in a graph.

Step 13 The SoC is calculated throughout both the optimal and ideal route and displayed in a graph. Guideline to the tabu search model

The tabu search model is very similar in use compared to the brute force search model. The options located in the ’user-defined’ panel of the GUI are automatically used when filled in and if this is not the case, the ’random’ panel is automatically used. A step-by-step user guide has been given in figure4.9.

(38)

32 4.Proposed Methodologies

(39)

4.3.Summary 33

4.3.

Summary

This chapter focused on explaining the two models that have been created to solve the routing opti-mization problem. The brute force search program searches and checks every possible route through all destinations. The processing time for such a search algorithm increases exponentially with each added node and thus this program is only suitable for up to 10 nodes. That is why also a tabu search program has been created. This program starts with an initial random route and uses specific types of actions to try and improve this route. If an action significantly improves the route, the action is put on the tabu list to ensure it is not undone. The more iterations the program is allowed to run, the larger the chance that the result is the optimal solution. However, more iterations takes a toll on the processing time. In the next chapter, the simulations conducted with these models will be shown and the relevance and importance of this project will be visualized.

(40)

Cytaty

Powiązane dokumenty

Niezaprzeczalnym  walorem  książki  jest  rów- nież fakt, iż jest to jedyna (nie licząc poprzed- niej  publikacji  tej  samej  autorki: 

Często dzieje się tak, że tekst literacki jest zatytułowany tak samo jak dzieło sztuki (jest to przypadek obydwu cytowanych powyżej wierszy) lub tytuł tego dzieła pojawia się

The performance of an indoor positioning system is highly related to the placement of the transmitting nodes that are used as references for the positioning estimations. In this

The simulation results in the previous section suggest that the graphs should contain many paths, have a large expected hopcount, and the link weights should have a

Abstract—Finding a path in a network based on multiple con- straints (the MCP problem) is often considered an integral part of quality of service (QoS) routing. QoS routing

nieobecnos´c´ na rozprawie, wynikaja˛ca z takich przyczyn, jak pobyt za granica˛, niemoz˙nos´c´ jego wezwania na rozprawe˛, niestawiennictwo z powodu ,,niedaja˛cych sie˛

On the other hand, Mitsubishi Shipbuilding Co., Ltd., to which the Nagasaki Experimental Tank belonged pro- posed a hull form derived from the new advanced method.. of hull

On the graph, indicate any asymptotes and local maxima or minima, and write down their equations