Development of Marine Loading and Unloading System for Ro-Ro Vessel

⎯ ship stability is one of the important criteria for ship safety as required by IMO and Indonesia Classification Bureau (BKI) in various rules. One of it is the IMO code of Intact Stability. Many factors affect the stability of a ship, including ship load, which in application varies in weight and type of vehicle. Maxsurf has been used to analyze various conditions of the ship, including stability. However, Maxsurf is too complicated to be used by ordinary people. For that a package needed as mediator to Maxsurf to be easier to use. This research developed a package to assist in analyzing the ship stability with vary in weight and type of vehicle. The package was created in Microsoft Excel worksheet and is connected to Maxsurf Stability. Visual Basic for Application was use to write the codes (coding) for the package command. The target ship used in this analysis is a 500 GT ferry ship. After the package is working properly, the analysis simulation can be run. Simulation results show that maximum GZ of both fully loaded and overloaded conditions occur at tilt angle of around 30. Exceeding such value, the ship for both conditions slowly lose the turning moment. At fully loaded condition, the ship hardly turns back after reaching a tilt angle of 73 . At overload condition, the ship is still safe though losing its ability to turn back is faster, at heel angle of 71. Keywords⎯maxsurf, ship stability, ship loading unloading, ro-ro vessel, visual basic for application (vba) macro.


I. INTRODUCTION
The stability of a ship refers to the ability of the ship to maintain its position on water [1]. The failure of the ship to maintain stability can result in the ship experiencing various problems such as accidents, sinking, damage, etc. For this reason, it is important to pay attention to the stability of any type of ship sailing.
The same thing applies to the ro-ro ferry services that operate in Indonesia. Ferries are important in Indonesian transportation because of the large number of islands which make up the nation. Statistics provided by the. Directorate of Land Transportation, Ministry of Transportation show that there are 33 million passengers, 14 million tons of general cargo, and 9.8 million vehicles carried annually by ferries in Indonesia [2].
Ferries that carry many passengers and vehicles must pay attention to stability, because it concerns the safety of passengers on board. For that passenger capacity must be limited, as well as vehicles loading, so that the ship remains stable when sailing. These restrictions have been planned, both passengers and vehicles during the design process of the ship.
The plan also includes arranging vehicles when on board. Poor arrangement resulted in the weight not being distributed evenly to the ship resulting in the ship becoming unbalanced. This imbalance causes the stability of the ship to be disrupted, which in turn will cause problems as mentioned above. For this reason, planning in the arrangement of the vehicles on the ship is made, so that the weight distribution is evenly distributed throughout the ship.
But the real situation is more dynamic than planned. Vehicles that enter the ship are not always as planned because the condition of the port and vehicles entering the ship also vary, Because of the variety of traffic that arrives for each sailing, there has to be some flexibility and 100% consistency is not a practical objective [3]. Another thing that is also influential is the arrangement of vehicles on the ship because even though the vehicle that will enter has been weighed but the wrong arrangement of the ship will result in the ship losing its balance.
In its use, Maxsurf has been used to analyze various conditions of the ship, including stability. However, Maxsurf is too complicated to be used by ordinary people, and training is needed to run the program. For that a package needed as mediator to Maxsurf to be easier to use. But to do so a program is needed to make, which is too complicated to make.
Microsoft Excel is an alternative solution to the problems mentioned. Because it is user friendly and does not need to make software that must be installed again on the device. What needs to be done is to write the command on Visual Basic that is in Microsoft Excel itself or called Visual Basic for Application (VBA). This method has actually been made for various simple automation systems, such as in research from Wong [4], which uses in the field of chemical engineering. However, no one has made the package to help analyze the stability of the ship.
With mentioned backgrounds, this research is conducted. The purpose of this research is to make a software that can analyze the effect of vehicle load with the stability of the ship, when the vehicle enters the ship with dynamics that is different from the plan for loading the ship at the time of planning. This software is worksheet of Microsoft Excel that integrated with Maxsurf using the VBA, and the ship that analyzed was the ferry ro-ro.

A. Ship Modeling on Maxsurf
This step is taken before doing stability analysis on the ship, after all the vessel data collected is enough, then this step can be implemented. Making Lines Plan is the main key to the success of ship design before the model is carried out hydrodynamic analysis, structural strength and further detail. Often this model and analysis is always changing because of the incompatibility between design and analysis, so that the design process can be described as a complementary spiral design.

B. Connecting Maxsurf and Microsoft Excel
Microsoft Excel is used as input for Maxsurf software, as well as to regulate variations in vehicle arrangement within the ship. The input that have been send to Maxsurf will be analyzed. After that, the result of the analysis will be sent again to Microsoft Excel to be displayed.

a. Creating the User Interface
The ship data that has been obtained is then made a 3D model on Maxsurf software. After the 3D model has been completed, the next thing to do is to create interfaces in Microsoft Excel, which are needed for data input such as load cases, number of vehicles, placement, etc. The input will be sent to Maxsurf for later processing.
The first thing that needs to be displayed in Microsoft Excel as an interface is the load case. Load case interfaces in Microsoft Excel are made according to the load cases that Maxsurf has. However, what is made in this interface is only the load of vehicles and passengers, without making tank loads, such as ballast tanks, fuel tanks, etc. This is because this research only focuses on vehicle and passenger loads as the variable.
In determining these placements are added also general arrangement drawing of the ship, which is used as a reference. The drawing is changed by adding several sections which will later become the area of placement of the vehicle. After the instruction is made to make user understand how to use the worksheet. After all these things have been done.
After that a section that is used as a user interface to display output from the results of stability analysis carried out by Maxsurf is made, that is the output section in Microsoft Excel. The things that need to be displayed are the criteria for rules that need to be compliance, the value of the criteria, the value of the results of the analysis, the status of compliance, the data to display the GZ curve consisting of the heel degree and GZ point, and the graph to display the GZ curve.

b. Coding the Command in VBA
After the input is complete, the next thing is to integrate Microsoft Excel with Maxsurf. Microsoft Excel includes a comprehensive macro programming language called VBA [5]. VBA stands for Visual Basic for Applications an event-driven programming language from Microsoft that is now predominantly used with Microsoft office applications such as MS-Excel, MS-Word, and MS-Access [6].
To integrate the two software, VBA is used as a medium for coding. The code is a list of commands that are used to run both software as desired.
To be able to send commands to Maxsurf, various types of command codes on Maxsurf must be known. However, there is no documentation that explains these codes, so finding these command codes is quite difficult. The way to determine these codes is to look at the Excel file in the Maxsurf program itself. Then from the file we can learn the types of codes used.
In coding, first a variable declaration is needed. Variables are places in computer memory that are named (as identifiers) and are allocated to hold data. According to the data collected, the variable must have a data type that matches the contents.
To declare a variable, DIM, PRIVATE, STATIC, and PUBLIC commands are used by declaring the variable name and data type at the beginning of the procedure. declaring variables in this process is:

"Public hydromaxApp as New Bentley Stability Application"
The first code that needs to be found is the code to open the Maxsurf program and load the design file that we made in the previous process. The code for doing this is: "hydromaxApp.Design.Open ("file location")" After that the coding results are tested, if the process is successful then the next process is coding to determine the section area for vehicle placement. For this need one more button is made and assigned to the new sub-line code, after that the code is written in the following format: The above code can be interpreted "if cells (8.8) are filled with Section 1, then cell (8.10) will be filled with 4.45, cells (8.11) will be filled with 0, and cells (8.12) will fill 4.7, but if it is filled with Section 2, it will change according to the above, and if it is filled in other than the existing ones (Section 1, Section 2, ..., Section 8) then the values are filled in cell (8,10), cells (8,11), cells (8,12) will be 0.
Cells (8,10), cells (8,11), and cells (8,12)  from that coordinate. So, in placing the vehicle, coordinates are made according to the reference point. Longitudinal arm (cells (8,10)) is the long coordinate of the reference point, transverse arm (cells (8,11)) is the width coordinate of the reference point, and vertical arm (cells (8,12)) is the high coordinate of the point reference. By filling in all the coordinates, the coordinates of the ship will be formed.
In one row, there are eight possible laying on each section in the area of the vessel, therefore every single row has eight branching logic as above. This is also applying to the row below it, and also applies to truck and car vehicles. Then the results of the coding are tested, and if successful the next process can be carried out.
The next process is the coding for the input of load cases that have been created in Microsoft Excel, to Maxsurf. Just as before, the first one to be created is a new button and assign it to the new sub-line code. After that enter the code in the format as follows. The function of the code above is to change the loadcase value that is in maxsurf. If the change is quantity, the code that must be entered is "Quantity" and so on. For the amount to be changed from the loadcase, the value is filled in range (E8) or cells (5.5). After that the results of the coding were tested.
The last process of this connection is coding so that Maxsurf runs the analysis. The way is the same as before, which is creating a new button that will be assigned to the new sub-line in Visual Basic. After that the code entered is in the following format: "hydromaxApp.Design.ActiveAnalysisMode = hmAMStability" "hydromaxApp.Design.RunAnalysis" By running the code above, Maxsurf will start to analyze the loadcase that we have input into Maxsurf. After that coding is done to send commands to Maxsurf to send the desired stability analysis results to Microsoft Excel. To send the command the following code is used. The code above is the code used to display the results of the stability analysis, which is to display the heel value and the GZ value. Heel value in degree and GZ value in m. then from this value graph is created to find out the GZ curve of the analysis.
The next code is to display the required criteria, as described above. The code is as follows. The code above is the code used to display the required criteria. The code above means "if the criteria are included in the analysis, then in cell D52 displayed the criteria name, in cell G52 a required value is displayed, in cell I52 the actual value is displayed" and also the code to show if the analyzed value is comply with the required value is shown below. The code above mean "if the criterion is fulfilled K52 will be filled with Pass, if it fails then K52 will fill Fail, if not analyzed, K52 will be filled in Not Analyzed".

C. Stability Analysis
Making this load case is used to analyze the stability of the ship in each variation of vehicle arrangement.

202
Making the load case is done on two software, Microsoft Excel and Maxsurf. The first load case made on Maxsurf then made the same in Microsoft Excel. After that what variations are determined into the analysis.
Actually, the load case variation used depends on the real conditions that exist when loading the vehicle into the ship. However, in this research the load case variation used is the condition of the vessel with empty load or initial condition, the ship with half load condition, the ship with a three-quarter load condition, the ship with full load condition, the ship with overload condition.
Initial condition is the condition of the ship at no load or the ship is not filled by any vehicle with fully ballast. This condition is used as an ideal state of ship stability, which will later be compared with its stability graph with a loaded vessel. Ship with a half load condition are ships with a half load of payload, in this case the load used is 2 cars weighing around 3 tons and trucks weighing around 20 tons. The results of the stability chart will be compared with the condition of the ship during the initial condition.
Ships with three-quarter conditions are three-quarter payload vessels. In this case, the load used is 4 trucks and 4 cars. The results of the stability chart will be compared with the condition of the ship during the initial condition.
A ship with a full load condition is a ship that fulfills the entire payload. In this case, it was adjusted to the design of the ship, namely 8 trucks weighing around 20 tons. The results of the stability chart will be compared with the condition of the ship during the initial condition.
A ship with an overload condition is a ship with a heavy load that exceeds the payload. In this case 8 trucks weighing 25 tons were taken from the truck load at the Rafelia 2 [7] ship accident. The condition is used as an analysis to determine whether the condition of ship overload can still maintain its stability or not.

D. Comparing Output with Rules
After the analysis results are obtained, the results that displayed in the output section in Microsoft excel are compared with the regulations of the IMO code of Intact Stability. If the results are in accordance with the regulations, the process will continue. If not, process must be repeated from the Connection between Maxsurf and Microsoft Excel.
All results obtained from the analysis carried out by Maxsurf must be verified by comparing the results displayed in the output with the results found in the Maxsurf software itself. If it is not appropriate, an evaluation of the coding used must be done. If the comparison results are correct, then the software can be used properly.

III. RESULTS AND DISCUSSION
After conducting research based on the research methodology outlined in the previous chapter, it was obtained several results based on the processes that had been carried out.

A. Ship Model
The following is the design of the ship that has been modeled as a ship in Maxsurf, as can be seen in Figure 1. below. In figure below shows the 3D model of the ship. All the ship models are necessary to make the stability analysis more accurate. The more accurate the design, the more accurate the result.

B. Maxsurf and Microsoft Excel Connection
The results of the input interface created are in following Figure 2. From the figure can be seen that shows the input interface that have been completely made, also shows the button that will be use as command according the coding that have been written on the VBA. In the interface also show the ship deck drawing, the drawing is use as the reference for load to be placed on the ship and also shown in the ship deck drawing that there are 8 sections for 8 vehicles to loaded on the ship.
After creating an interface in Microsoft Excel, the next is the result of the Maxsurf and Microsoft Excel connection. The following are the results of the demonstration from the connection.
The initial condition of this design is without load or all load cases are 0. After that, all loads, quantities and sections are filled according to the loads that will loaded to the ship.
After all the input and the section column has been filled, click the "section input" button, as shown in, then the coordinate for vehicle arrangement will be change according to the coding that has been done.
Then click the "Input loadcase" button, then the data that have been filled in input section will be send to Maxsurf load case. So that the load case on Maxsurf changes according to what is in Microsoft Excel.
Another result of this connection is that Microsoft Excel can also order Maxsurf to analyze the load case that International Journal of Marine Engineering Innovation and Research, Vol. 4(3), Sept. 2019. 174-182  (pISSN: 2541-5972, eISSN: 2548-1479) 203 was entered earlier. If we click "Start Analysis", then Maxsurf will immediately start analysis. After that the result of the stability will be displayed on the the output section in the Microsoft Excel. After that analysis result can be discussed.

C. Stability Profile
After conducting research based on the research methodology outlined in the previous chapter, it was obtained several results based on the processes that had been carried out. These results are expected to be able to answer the purpose of this study. To that end, all these things will be discussed in this section Ships with no load is vessels that are when trucks and cars are not loaded to vessel and have only a full ballast. Ships with no load conditions like this will be used as a comparison with other ship conditions, such as the condition of the ship in a half load, three quarters of the load, full load, overload condition. The following is the result of analysis of the vessel with an empty load condition.
Interval of initial stability of the ship with initial condition load case is at 0 o -90 o . At this interval it can be seen that the ship still has a positive GZ value to a heel angle of 90 o . From Figure 3. it can also be seen that maximum GZ is at a heel angle of around 40 o , after that the ship will slowly lose its turning moment, so until the is heeling around 78 o the ship will start to flip over.
The next situation is on the condition of the ship which has a half load. This condition occurs when the load on the ship is filled halfway on the deck of the vehicle placement area, with 2 trucks and 2 cars.
It can be seen in Figure 4, that the initial stability interval for the condition of the half-loaded vessel is around 0 o -80 o . at that interval the ship still has a positive GZ up to a heel angle of 80o. But the ship is only allowed to tilt around 30 o , if it exceeds the tilt angle the ship will lose its turning moment, until around 65 o the ship will be hardly back after heel and start to flip over.
The next load case for the ship load is a three-quarters loaded. The load for the condition is four trucks and four cars, with different weight conditions.
In Figure 5, it can be seen that the initial stability interval for the condition of the ship with three-quarter load condition is around 0 o -80 o . At that interval the ship still has a positive GZ up to a heel angle of 78 o . But the ship is only allowed to tilt around 30 o , if it exceeds the tilt angle the ship will slowly lose its turning moment, until  174-182 (pISSN: 2541-5972, eISSN: 2548-1479 204 around 64 o the ship will be hardly back after heel and will start to flip over.
The next condition is the condition where the ship in fully loaded. The load of the ship is taken from its maximum payload, that is eight trucks with 20 tons each. To make the situation more realistic, the weight is variated at around 20 tons.
After the analysis is done, the stability curve can be seen on the following Figure 6. From the curve we can see that the initial stability interval for the condition of a fully loaded vessel is around 0 o -75 o . At that interval the ship still has a positive GZ up to a heel angle of 72 o . But the ship is only allowed to tilt around 30 o , if it exceeds the tilt angle the ship will slowly lose its turning moment, until around 62 o the ship will be hardly back after heel.
The last condition is the condition where the ship is at overloaded condition. For this condition the load that taken is about 26 tons each truck.
After the analysis is done, the stability curve can be seen on the following Figure 7. From the curve we can see that the initial stability interval for the condition of the overloaded condition of ship is around 0 o -72 o . At that interval the ship still has a positive GZ up to a heel angle of 72 o . But the ship is only allowed to tilt around 30 o , if it exceeds the tilt angle the ship will slowly lose its turning moment, until around 62 o the ship will be hardly back after heel.

D. Compliance of The Stability Analysis Output to IMO Rules
The results of the analysis that have been done before will be displayed in the output section in Microsoft Excel. But it is necessary to know whether the software output is the same output in Maxsurf in accordance with the rules, in this case the IMO A.749 Code of Intact Stability [8] is used.
After coding as explained previously, this worksheet in Microsoft Excel is able to display the results of compliance rules from ship analysis. The output results are compared with the output analysis that is in Maxsurf, as seen in Figure 8, this is done so that the analysis results displayed are correct. After the comparison process is complete and the results on the output displayed are correct, then this software is in accordance with its purpose. The Maxsurf data result for compliance is presented on Table. 1.

1) Connecting Microsoft Excel with Maxsurf Stability
can be done by recording VBA in Microsoft Excel itself, where Microsoft Excel can be used as input and display output, Maxsurf as software that processes input 2) VBA is used as a place for coding to connect Microsoft Excel and Maxsurf. The code in VBA is obtained from the example in Maxsurf itself 3) In carrying out stability analysis, there are several conditions with variations of weight and vehicle that are used 4) The first condition is the vessel with no load or initial condition. The ship still has a positive GZ value to a heel angle of 90o. The maximum GZ is at a heel angle of around 40o, after that the ship will slowly lose its turning moment, so until around 78 o the ship will start to flip over. 5) The second condition is vessel with half load. This condition occurs when the load on the ship is filled halfway on the deck of the vehicle placement area, with 2 trucks and 2 cars. The ship still has a positive GZ up to a heel angle of 80o. But the ship is only allowed to tilt around 30o, if it exceeds the tilt angle the ship will lose its turning moment, until around 75o the ship will be hardly back after heel. 6) The third condition is where vessel have third-quarter load. The load for the condition is four trucks and four cars. ship still has a positive GZ up to a heel angle of 78o. But the ship is only allowed to tilt around 30o, if it exceeds the tilt angle the ship will slowly lose its turning moment, until around 58o the ship will be hardly back after heel. 7) The fourth condition is where vessel have fully loaded load. The load of the ship is taken from its maximum payload, that is eight trucks with 20 tons each. ship still has a positive GZ up to a sloping angle of 75o. But the ship is only allowed to tilt around 30o, if it exceeds the tilt angle the ship will slowly lose its turning moment, until around 60o the ship will be hardly back after heel. 8) Last condition is when the ship is loaded with overload load. For this condition the load that taken is about 26 tons each truck the ship still has a positive GZ up to a heel angle of 72o. But the ship is only allowed to tilt around 30o, if it exceeds the tilt angle the ship will slowly lose its turning moment, until around 60o the ship will be hardly back after heel. 9) The output used to display the results of compliance rules is good to use, this is proven by matching the results of the compliance rules on Maxsurf.