Loading method of ro-ro ship based on polygon intersection detection
Optimizing the loading of the robo-roll-off ship through the polygon intersection detection algorithm, solving the problems of manual operation dependence and low deck utilization in the existing technology, achieving efficient multi-model loading and vehicle layout with large size differences, and improving the utilization of the deck Rate.
Patent Information
- Application Number
- CN202410910123.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-09
AI Technical Summary
The existing Ro-ro-ship loading algorithms rely on manual operation, are inefficient and cannot effectively utilize deck space, especially when facing vehicles with large differences in sizes, resulting in a decrease in deck utilization.
The loading method based on polygon intersection detection is adopted. By determining the loading area and vehicle geometric parameters, the polygon intersection detection algorithm is used to judge the vehicle placement position, and the loading reference point is automatically adjusted to optimize the vehicle layout to ensure effective loading of multiple models.
It improves the utilization rate of the deck, can handle multiple models at once, and effectively loads models with large differences in sizes, significantly improving loading efficiency.
Smart Images

Figure CN118504927B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of ro-ro ship stowage, and in particular to a ro-ro ship stowage method based on polygon intersection detection. Background Art
[0002] Ro-ro ships evolved from car ferries. The deck inside the hull is generally flat and full, with fewer columns, which allows great flexibility in loading. At present, large-scale special ships for automobile transportation generally rely on manual loading, which is very dependent on experience, time-consuming and labor-intensive, and is greatly affected by human factors. In order to solve the increased labor costs caused by manual loading, loading algorithms can be used to improve assembly efficiency. At present, most loading algorithms are divided into lanes for loading, that is, according to the size of the vehicle, the lanes are divided parallel from the bow to the stern, and the loading is carried out according to the length of the vehicle. This lane-dividing loading algorithm requires a single vehicle model in the lane, and it is impossible to load vehicles with large size differences on a single lane. When faced with a variety of vehicle models and a large number of vehicles, loading is difficult, and it will waste space at the edge of the deck, resulting in reduced deck utilization. Summary of the invention
[0003] In view of the shortcomings of the prior art, the present invention proposes a ro-ro ship loading method based on polygon intersection detection, which can handle multiple types of vehicles at one time and has a high utilization rate of the deck; and can also load vehicle types with large size differences.
[0004] The technical solution of the present invention is achieved in this way:
[0005] A ro-ro ship loading method based on polygon intersection detection comprises the following steps:
[0006] Step 1: Select the loading start point and loading end point, and determine the loading area according to the loading start point and loading end point;
[0007] Step 2, selecting one of the vehicle types from the imported pallet list, and loading the vehicles in the loading area with the loading starting point as the loading reference point; the pallet list includes the vehicle type, the number of each vehicle type, the geometric parameters of each vehicle type, and the vehicle spacing;
[0008] Step 3: Determine whether the loading area where the current loading reference point is located can normally accommodate the vehicle based on the geometric parameters of the vehicle type and the polygon intersection detection algorithm; if yes, divide the parking space and offset the loading reference point based on the geometric parameters of the vehicle type and the vehicle spacing in the pallet list, and then proceed to step 4; if no, proceed to step 8;
[0009] Step 4: Determine whether the current loading vehicle type is loaded according to the quantity of the vehicle type in the pallet list; if yes, proceed to step 5; if no, proceed to step 6;
[0010] Step 5, traverse the pallet list to determine whether there is an unloaded vehicle type in the pallet list. If yes, select one of the unloaded vehicle types and proceed to step 6; if no, the loading is completed;
[0011] Step 6, determine whether the offset loading reference point is within the loading area determined by the loading start point and the loading end point; if yes, repeat step 3; if no, proceed to step 7;
[0012] Step 7, offset the loading reference point according to the geometric parameters of the vehicle type, the vehicle spacing and the coordinates of the current loading reference point, and determine whether the offset loading reference point is within the loading area determined by the loading start point and the loading end point; if yes, proceed to step 3; if no, the loading ends;
[0013] Step 8, determine the problem type that does not meet the placement requirements based on the polygon detection algorithm, offset the loading reference point based on the problem type, and then enter step 6; the problem type includes the non-deck type and the obstacle intersection type.
[0014] Preferably, in step 3, the step of determining whether the loading area where the current loading reference point is located can normally place the vehicle according to the geometric parameters of the vehicle type and the polygon intersection detection algorithm includes:
[0015] Step 301a, establish a coordinate system with the loading starting point as the coordinate origin, and then determine whether the current loading reference point (x, y) is outside the deck of the ro-ro ship according to the polygon intersection detection algorithm; if yes, the vehicle cannot be placed; if not, proceed to step 302a;
[0016] Step 302a, using the current loading reference point (x, y) as the coordinate of the lower left corner of the vehicle, and determining the vehicle loading outline according to the geometric parameters of the current vehicle type, and then determining whether there are obstacles intersecting with the vehicle loading outline according to the polygon intersection detection algorithm, wherein the obstacles include but are not limited to pre-defined obstacles in the deck, other vehicle outlines and deck outlines; if yes, the vehicle cannot be placed; if no, the vehicle can be placed.
[0017] Preferably, in step 301a, a ray method is used to determine whether the stowage reference point (x, y) is within the outline formed by the deck. If the number of intersections between the ray extending from the stowage reference point (x, y) to the direction of the deck outline and the deck outline is an odd number, the stowage reference point (x, y) is within the outline formed by the deck; if the number of intersections between the ray extending from the stowage reference point (x, y) to the direction of the deck outline and the deck outline is an even number, the stowage reference point (x, y) is within the outline formed by the deck.
[0018] Preferably, in step 301a, the method for determining whether a ray extending from the stowage reference point (x, y) to the deck contour direction intersects any edge of the deck contour line is:
[0019] Assume that the coordinates of the two endpoints of any side of the deck contour are (x11, y11) and (x22, y22), then when the following relationship is satisfied:
[0020] ;
[0021] and ;
[0022] Then the ray extending from the loading reference point (x, y) in the direction of the deck contour intersects with the edge of the deck contour line.
[0023] Preferably, in step 302a, if the obstacle is polygon a, it is determined whether any line segment of polygon a intersects with any line segment of polygon b formed by the vehicle loading contour; or
[0024] Determine whether each point of any line segment of polygon a is in polygon b formed by the vehicle loading contour;
[0025] If yes, there is an obstacle intersecting the vehicle loading profile.
[0026] Preferably, in step 302a, the method for determining whether any line segment of polygon a intersects with any line segment of polygon b formed by the vehicle loading profile is:
[0027] Suppose the coordinates of the two endpoints of any line segment on polygon a are known to be The coordinates of the two endpoints of any line segment on the polygon b formed by the vehicle loading contour are b and b ;
[0028] Then the vector product u of the vector from point a1 to point a2 and the vector from point b1 to b2 is:
[0029] ;
[0030] The vector product ub of the vector a1 to b1 and the vector b1 to b2 is:
[0031] ;
[0032] The vector product ua of the vector a1 to b1 and the vector a1 to a2 is:
[0033] ;
[0034] When the size of the vector product u is 0, the line segment on polygon a does not intersect with the line segment on polygon b;
[0035] when , then the line segment on polygon a intersects with the line segment on polygon b.
[0036] Preferably, in step 302a, if the obstacle is circular, it is determined whether the center of the obstacle is within the polygon b formed by the vehicle loading contour. If so, the obstacle intersects the vehicle loading contour; if not, it is determined whether the distance between the center of the obstacle and each side of the polygon is greater than the radius. If any of the distances is less than the radius, the obstacle intersects the vehicle loading contour.
[0037] Preferably, in step 8, when the problem type is a type not located inside the deck, the step of offsetting the stowage reference point according to the problem type includes:
[0038] The coordinate system is established with the loading starting point as the coordinate origin, and y=y+d in the current loading reference point (x, y). The offset coordinates of the loading reference point are (x, y+d), where d is the preset unit spacing.
[0039] Preferably, in step 8, when the problem type is an obstacle intersection type, the step of offsetting the loading reference point according to the problem type includes:
[0040] Determine the maximum value y_max of the y coordinate of the obstacle on the deck that intersects the vehicle stowage profile, and determine whether y_max is greater than the ordinate y of the stowage reference point;
[0041] If yes, let y = y_max, then the coordinates of the loading reference point after offset are (x, y_max);
[0042] If not, let y=y+d, where d is the preset unit spacing, and the coordinates of the loading reference point after offset are (x, y+d).
[0043] Preferably, in step 6 and step 7, the step of determining whether the offset stowage reference point is within the stowage area determined by the stowage starting point and the stowage ending point comprises:
[0044] The coordinate system is established with the loading starting point as the coordinate origin, and the loading end point is set as (x1, y1);
[0045] If x>x1 or y>y1 in the reference point coordinates (x, y), the loading reference point is not within the loading area determined by the loading starting point and the loading ending point.
[0046] Compared with the prior art, the present invention has the following advantages: after determining the loading area according to the loading starting point and the loading ending point, the present invention first selects one of the vehicle types from the pallet list for loading; and in the loading process, each loading is determined by a polygon intersection detection algorithm whether the loading area where the current loading reference point is located can normally place the vehicle, and if the vehicle can be normally placed, the loading continues until the loading of the number of vehicles of the type is completed; if the loading area where the current loading reference point is located cannot normally place the vehicle, the loading reference point is offset and then the polygon intersection detection algorithm is used to determine whether the vehicle can be normally placed before loading is performed until the loading of the number of vehicles of the type is completed; and when the loading of the vehicle type currently loaded is completed, the pallet list is traversed to continue loading the vehicle types that have not been loaded, and this cycle is repeated until the loading reference point exceeds the loading area and the vehicle placement position has not been found, which means that there is no suitable loading position in the loading area, and the loading is terminated; or the loading of all vehicle types in the pallet list is completed, and the loading is terminated. Compared with the existing lane division algorithm, the present invention can process multiple types of vehicles at one time, with a higher utilization rate of the deck; and can also load vehicle types with large size differences. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0048] Figure 1 It is a flow chart of the ro-ro ship loading method based on polygon intersection detection of the present invention;
[0049] Figure 2 It is a schematic diagram of finding a position in an embodiment of a ro-ro ship stowage method based on polygon intersection detection of the present invention;
[0050] Figure 3 It is a schematic diagram of a process of finding a stowage position based on polygon intersection detection in one embodiment of a ro-ro ship stowage method based on polygon intersection detection of the present invention;
[0051] Figure 4 The position relationship diagram of the point and polygon determined by the ray method;
[0052] Figure 5 It is a schematic diagram of demarcating the stowage area in one application example of the ro-ro ship stowage method based on polygon intersection detection of the present invention;
[0053] Figure 6 This is a configuration result diagram of one application example of the ro-ro ship loading method based on polygon intersection detection of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] See also Figure 1 The embodiment of the present invention discloses a ro-ro ship loading method based on polygon intersection detection, comprising the following steps:
[0056] Step 1: Select the loading start point and loading end point, and determine the loading area according to the loading start point and loading end point;
[0057] Step 2, selecting one of the vehicle types from the imported pallet list, and loading the vehicles in the loading area with the loading starting point as the loading reference point; the pallet list includes the vehicle type, the number of each vehicle type, the geometric parameters of each vehicle type, and the vehicle spacing;
[0058] Step 3: Determine whether the loading area where the current loading reference point is located can normally place the vehicle based on the geometric parameters of the vehicle type and the polygon intersection detection algorithm; if yes, divide the parking space and offset the loading reference point based on the geometric parameters of the vehicle type and the vehicle spacing in the pallet list, and then proceed to step 4; if no, proceed to step 8;
[0059] Step 4: Determine whether the current loading vehicle type is loaded according to the quantity of the vehicle type in the pallet list; if yes, proceed to step 5; if no, proceed to step 6;
[0060] Step 5, traverse the pallet list to determine whether there is an unloaded vehicle type in the pallet list. If yes, select one of the unloaded vehicle types and proceed to step 6; if no, the loading is completed;
[0061] Step 6, determine whether the offset loading reference point is within the loading area determined by the loading start point and the loading end point; if yes, repeat step 3; if no, proceed to step 7;
[0062] Step 7, offset the loading reference point according to the geometric parameters of the vehicle type, the vehicle spacing and the coordinates of the current loading reference point, and determine whether the offset loading reference point is within the loading area determined by the loading start point and the loading end point; if yes, proceed to step 3; if no, the loading ends;
[0063] Step 8, determine the problem type that does not meet the placement requirements based on the polygon detection algorithm, offset the loading reference point based on the problem type, and then enter step 6; the problem type includes the non-deck type and the obstacle intersection type.
[0064] In the implementation mode of the present invention, before loading, all vehicles to be loaded are first classified, and a pallet list is prepared according to the vehicle type; the pallet list should include information such as vehicle type, number of each vehicle type, geometric parameters of each vehicle type, and vehicle spacing, such as vehicle length, width, height and other vehicle type geometric parameters. After the pallet list is prepared, the pallet list is imported, and then the vehicle type to be loaded can be selected.
[0065] In step 1, after the positions of the loading start point and the loading end point are selected, a rectangle can be generated according to the positions of the loading start point and the loading end point, and the rectangle is the loading area.
[0066] In step 2, after the loading area is demarcated, the loading starting point is used as the loading reference point to prepare for loading vehicles in the loading area. In the pallet list, the first unloaded vehicle model is searched downward from the selected loading model (including the currently selected model). If the loading of the currently selected model is completed and no unloaded model is found, the loading process is terminated.
[0067] In step 3, during the loading process, each loading is determined through a polygon intersection detection algorithm to determine whether the loading area where the current loading reference point is located can normally place the vehicle. If it can be placed, the loading reference point is offset according to the geometric parameters of the currently selected vehicle type until all vehicles in the pallet list can be placed normally, or the loading position cannot be found when the loading end point is reached, then the program is terminated.
[0068] Generally, there are four loading angles for vehicles: -90°, 0°, 90°, and 180°. The vehicle's steering wheel is on the left or right, for a total of 8 different loading conditions. The present invention is described by taking the loading angle of 0° and the vehicle's steering wheel on the left as an example. For details, see Figure 2 In this loading situation, the loading position is searched from the lower left corner to the upper right corner of the loading area, and the loading position is searched upward from the lower left first, and polygon intersection detection is used to determine whether the current loading reference point can be loaded; after searching upward to the top, move to the right, and then search upward from the bottom, and so on.
[0069] by Figure 2 For example, assuming that the loading starting point is (x0, y0), the loading end point is (x1, y1), the loading reference point is (x, y), and the next loading reference point is (x_next, y_next); then refer to Figure 3, first, determine whether the current loading reference point can be placed in the vehicle according to the geometric parameters of the vehicle type, that is, whether the length and width of the loading area can accommodate a vehicle, that is, whether the value of x + CarLength is greater than x1. If so, it means that there is no more space to accommodate a vehicle, and the program is terminated; when x + CarLength < x1, the vehicle is placed starting from the current loading reference point (x, y) as the lower left corner coordinate point of the vehicle, and the loading reference point is offset according to the geometric parameters of the vehicle type and the vehicle spacing in the pallet list. Since this embodiment describes finding the loading position from the lower left corner to the upper right corner of the loading area, after reaching the top when moving upward, then moving to the right. Therefore, when finding the loading position upward, x_next = x and y_next = y + Carwidth + D1 in the next loading reference point (x_next, y_next), that is, the offset loading reference point is (x, y + Carwidth + D1), where CarLength is the length of the vehicle type, Carwidth is the width of the vehicle type, and D1 is the preset longitudinal vehicle spacing in the pallet list.
[0070] Loop like this until y + Carwidth + D1 > y1, indicating that the search for the loading position has reached the top of the loading area and needs to move to the right; that is, as shown in step 6, whether the offset loading reference point is within the loading area determined by the loading start point and the loading end point. This embodiment is described by taking the selected loading angle as 0° and the vehicle steering wheel position on the left as an example. Therefore, in this embodiment, it can be judged whether the ordinate y of the loading reference point is greater than y1 according to the width of the vehicle type and the vehicle spacing. When loading with the selected loading angle of 90° and the vehicle steering wheel position on the left, the coordinates of the offset loading reference point are (x, y + CarLength + D1); it can be seen that since the principle is basically the same when loading vehicles with different loading angles and loading directions, whether starting from the lower left corner to the upper right corner to find the loading position, or from the lower right corner to the upper left corner, or from the upper right corner to the lower left corner, or from the upper left corner to the lower right corner, etc., after offsetting the loading reference point according to the geometric parameters of the vehicle type and the vehicle spacing in the pallet list, then judge whether the offset loading reference point is within the loading area determined by the loading start point and the loading end point. Therefore, the present invention will not give more examples here.
[0071] When y+Carwidth+D1≥y1, the loading position has reached the top of the loading area and needs to move to the right, that is, from the first train position on the left to the second train position on the right, and then search for the loading position from the bottom upwards, so the loading reference point needs to be reset; as shown in step 7, the loading reference point needs to be offset according to the geometric parameters of the vehicle type, the vehicle spacing and the current loading reference point coordinates. In this embodiment of the present invention, Figure 2 For example, when moving from the first train position on the left to the second train position on the right, the loading reference point is offset according to the length of the vehicle type, the vehicle spacing and the coordinates of the current loading reference point. Then, in the next loading reference point (x_next, y_next), x_next=x+CarLength+D2, y_next=0, that is, the offset loading reference point is (x+CarLength+D2, 0), where D2 is the preset horizontal vehicle spacing in the pallet list, and D1 and D2 can be the same or different, which is not limited to the present invention. Similarly, this embodiment is explained by taking the loading angle of 0° and the vehicle steering wheel position on the left as an example. If the loading angle is selected as 90° and the vehicle steering wheel position is on the left for loading, the offset loading reference point coordinates are (x+Carwidth+D2, 0). It can be seen that when loading vehicles at different loading angles and loading directions, the principles are basically the same. Whether searching for the loading position from the lower left corner to the upper right corner, or searching for the loading position from the lower right corner to the upper left corner, or searching for the loading position from the upper right corner to the lower left corner, or searching for the loading position light from the upper left corner to the lower right corner, the loading reference point is offset according to the geometric parameters of the vehicle type, the vehicle spacing and the current loading reference point coordinates. Therefore, the present invention will not be described in detail with too many examples.
[0072] When moving from the first train position on the left to the second train position on the right, it is necessary to determine whether the offset loading reference point is within the loading area determined by the loading starting point and the loading end point through step 7. Figure 2 For example, whether x+CarLength+D2 is greater than x1; when x+CarLength+D2≥y1, it means that the search for the loading position has reached the rightmost end of the loading area and has exceeded the range of the loading area, indicating that the vehicle loading area has not been found when searching for the loading area upwards or to the right, which means that there is no suitable loading position in the loading area and the loading is completed.
[0073] During the loading process, when there are still loading positions in the loading area and the number of currently loaded vehicles has been loaded, it is necessary to traverse the pallet list through step 3 to select one of the unloaded vehicle types and continue to find the loading position. This cycle continues until all vehicle types in the pallet list have been loaded, or no vehicle loading area can be found, then the loading is completed. Compared with the existing lane division algorithm, it can handle multiple vehicle types at a time, and can also realize loading for vehicle types with large size differences, which greatly improves the loading efficiency and has a higher utilization rate for the deck.
[0074] Specifically, in step 3, the step of determining whether the loading area where the current loading reference point is located can normally place the vehicle according to the geometric parameters of the vehicle type and the polygon intersection detection algorithm includes:
[0075] Step 301a, establish a coordinate system with the loading starting point as the coordinate origin, and then determine whether the current loading reference point (x, y) is outside the deck of the ro-ro ship according to the polygon intersection detection algorithm; if yes, the vehicle cannot be placed; if not, proceed to step 302a;
[0076] Step 302a, using the current loading reference point (x, y) as the coordinate of the lower left corner of the vehicle, and determining the vehicle loading outline according to the geometric parameters of the current vehicle type, and then determining whether there are obstacles intersecting with the vehicle loading outline according to the polygon intersection detection algorithm, wherein the obstacles include but are not limited to pre-defined obstacles in the deck, other vehicle outlines and deck outlines; if yes, the vehicle cannot be placed; if no, the vehicle can be placed.
[0077] Among them, in step 301a, the ray method can be used to determine whether the stowage reference point (x, y) is within the outline formed by the deck. If the number of intersections between the ray extending from the stowage reference point (x, y) to the deck outline and the deck outline is an odd number, the stowage reference point (x, y) is within the outline formed by the deck; if the number of intersections between the ray extending from the stowage reference point (x, y) to the deck outline and the deck outline is an even number, the stowage reference point (x, y) is within the outline formed by the deck. For details, please refer to Figure 4 , assuming the deck profile is Figure 4 The polygon in the figure is a ray extending from the stowage reference point (x, y) to the deck outline. It can be seen that when the number of intersections is an odd number, the stowage reference point (x, y) is inside the polygon (i.e., the deck outline); when the number of intersections is an even number, the stowage reference point (x, y) is outside the polygon (i.e., the deck outline).
[0078] In step 301a, the method for determining whether the ray extending from the stowage reference point (x, y) to the deck contour intersects any edge of the deck contour is as follows:
[0079] Assume that the coordinates of the two endpoints of any side of the deck contour are (x11, y11) and (x22, y22), then when the following relationship is satisfied:
[0080] ;
[0081] and ;
[0082] At this time, a straight line L is drawn with (x11, y11) and (x22, y22). The x coordinate of the straight line L at y0 must be greater than x0, and y0 must be between y11 and y22. This means that the ray extending from the loading reference point (x, y) in the direction of the deck contour intersects with the line segment of the deck contour line.
[0083] Since the endpoint coordinates of any line segment of the deck contour are known, the above method can be used to determine whether the ray extending from the loading reference point (x, y) to the deck contour has an intersection with any line segment of the deck contour; finally, by determining the number of intersections, it is confirmed whether the loading reference point (x, y) is inside or outside the deck contour.
[0084] Wherein, in step 302a, if the obstacle is polygon a, it is determined whether any line segment of polygon a intersects with any line segment of polygon b formed by the vehicle loading contour; or
[0085] Determine whether each point of any line segment of polygon a is in polygon b formed by the vehicle loading contour;
[0086] If yes, there is an obstacle intersecting the vehicle loading profile.
[0087] In the embodiment of the present invention, since the obstacles on the deck have been pre-set, the coordinates of each obstacle on the deck can be determined. When there is an obstacle near the current configuration reference point, it can be determined whether the obstacle intersects with the vehicle loading contour based on the polygon intersection detection algorithm.
[0088] When the obstacle is polygon a, as long as any line segment of polygon a intersects with any line segment of polygon b formed by the vehicle loading contour, it means that the obstacle intersects with the vehicle loading contour. At this time, the loading area where the current loading reference point is located cannot place the vehicle normally.
[0089] When the obstacle is located within the vehicle loading contour, any line segment of polygon a does not intersect with any line segment in polygon b formed by the vehicle loading contour, but the vehicle cannot be placed normally in the loading area where the current loading reference point is located; therefore, it can be determined whether the obstacle is located within the vehicle loading contour by judging whether each point of any line segment of polygon a is within polygon b formed by the vehicle loading contour.
[0090] In this embodiment, specifically, in step 302a, the method for determining whether any line segment of polygon a intersects with any line segment of polygon b formed by the vehicle loading contour is:
[0091] Suppose the coordinates of the two endpoints of any line segment on polygon a are known to be The coordinates of the two endpoints of any line segment on the polygon b formed by the vehicle loading contour are b and b ;
[0092] Then the vector product u of the vector from point a1 to point a2 and the vector from point b1 to b2 is:
[0093] ;
[0094] The vector product ub of the vector a1 to b1 and the vector b1 to b2 is:
[0095] ;
[0096] The vector product ua of the vector a1 to b1 and the vector a1 to a2 is:
[0097] ;
[0098] When the size of the vector product u is 0, the line segment on polygon a does not intersect with the line segment on polygon b;
[0099] when , then the line segment on polygon a intersects with the line segment on polygon b.
[0100] In this embodiment, since the obstacle is pre-set on the deck, the coordinates of the two endpoints of any line segment in the polygon a formed by the obstacle are known; and according to the coordinates of the loading reference point and the geometric parameters of the vehicle type, the coordinates of the two endpoints of any line segment on the polygon b formed by the vehicle loading contour can also be determined. According to the coordinates of the two endpoints of any line segment on polygon a and the coordinates of the two endpoints of any line segment on polygon b formed by the vehicle loading contour, it can be determined whether there is a line segment on polygon a that intersects with any line segment on polygon b according to the above method of obtaining the product of each vector. If there is, it means that the obstacle intersects with the vehicle loading contour, and at this time, the loading area where the current loading reference point is located cannot normally place the vehicle.
[0101] Among them, in step 302a, if the obstacle is circular, it is determined whether the center of the obstacle is within the polygon b formed by the vehicle loading contour. If so, the obstacle intersects with the vehicle loading contour; if not, it is determined whether the distance between the center of the obstacle and each side of the polygon is greater than the radius. If any of them is less than the radius, the obstacle intersects with the vehicle loading contour.
[0102] Specifically, in step 8, when the problem type is not the type located inside the deck, the step of offsetting the stowage reference point according to the problem type includes:
[0103] Taking the stowage starting point as the coordinate origin to establish a coordinate system, then let y = y + d in the current stowage reference point (x, y), and the coordinate of the offset stowage reference point is (x, y + d), where d is the preset unit spacing.
[0104] In the embodiment of the present invention, when the stowage reference point (x, y) is located outside the deck and vehicles cannot be placed normally at this time, after moving up by d unit distances, it is continued to determine whether vehicles can be placed normally, and thus the stowage reference point (x, y) is gradually moved inside the deck; since the stowage reference point (x, y) is moved in preset unit spacings to gradually move the stowage reference point (x, y) inside the deck, the utilization rate of the deck can be greatly improved.
[0105] Specifically, in step 8, when the problem type is the type of obstacle intersection, the step of offsetting the stowage reference point according to the problem type includes:
[0106] Determine the maximum value y_max of the y coordinates in all obstacle contour lines intersecting with the vehicle stowage contour on the deck, and determine whether y_max is greater than the ordinate y of the stowage reference point;
[0107] If yes, then let y = y_max, and the coordinate of the offset stowage reference point is (x, y_max);
[0108] If no, then let y = y + d, where d is the preset unit spacing, and the coordinate of the offset stowage reference point is (x, y + d).
[0109] In this embodiment, when the polygon intersection detection algorithm detects a problem of obstacle intersection inside the deck, the position of the stowage reference point needs to be moved up above the uppermost obstacle detected in this polygon detection. When it is detected that the vehicle stowage area intersects with multiple obstacles, determine the maximum value of the y coordinates in all obstacle contour lines, and then take out the largest y_max among them, and determine whether y_max is greater than the ordinate y of the stowage reference point. When y_max > y, at this time, it can be directly let y = y_max, so that the stowage reference point can quickly move out of the obstacle area in one step, saving stowage time; since the shape of the obstacle may not be a convex polygon, there may also be a situation where y_max is less than the ordinate y of the stowage reference point. When y_max < y, then let y = y + d, and after gradually moving up by d unit distances for judgment, the stowage reference point (x, y) is gradually moved inside the deck, and the utilization rate of the deck is also greatly improved; for the specific process, reference can be made to Figure 3 .
[0110] Furthermore, in step 6 and step 7, the step of determining whether the offset stowage reference point is within the stowage area determined by the stowage starting point and the stowage ending point includes:
[0111] The coordinate system is established with the loading starting point as the coordinate origin, and the loading end point is set as (x1, y1);
[0112] If x>x1 or y>y1 in the reference point coordinates (x, y), the loading reference point is not within the loading area determined by the loading starting point and the loading ending point.
[0113] In this embodiment, in step 6, Figure 2 For example, when searching for the loading position upwards, when y>y1, the loading reference point is not within the loading area determined by the loading starting point and the loading ending point.
[0114] In step 7, when searching for the loading position to the left, if x>x1, the loading reference point is not within the loading area determined by the loading starting point and the loading ending point.
[0115] The following is an example of a specific application:
[0116] Assume that the partial cargo list of a voyage is as shown in Table 1:
[0117] Table 1 Partial pallet list
[0118]
[0119] After importing the pallet list in Table 1 above, select the loading start point and loading end point. For details, please refer to Figure 5 After the ro-ro ship loading method based on polygon intersection detection of the present invention is run, the loading result is as follows Figure 6 shown.
[0120] The pallet list after loading is shown in Table 2:
[0121] Table 2 Pallet list after loading
[0122]
[0123] It can be seen that the loading efficiency demonstrated by this loading result can reach 95.86%, which realizes the simultaneous loading of multiple types of vehicles and greatly improves the utilization rate of the deck.
[0124] In summary, the present invention is based on the ro-ro ship loading method based on polygon intersection detection of the present invention. After determining the loading area according to the loading starting point and the loading ending point, one of the vehicle types is first selected from the pallet list for loading; and in the loading process, each loading is determined by a polygon intersection detection algorithm whether the loading area where the current loading reference point is located can normally place the vehicle. If the vehicle can be placed normally, the loading continues until the number of vehicles of the type is loaded; if the loading area where the current loading reference point is located cannot normally place the vehicle, the loading reference point is offset and then the polygon intersection detection algorithm is continued to determine whether the vehicle can be placed normally before loading, until the number of vehicles of the type is loaded; and when the loading of the vehicle type currently loaded is completed, the pallet list is traversed to continue loading the vehicle type that has not been loaded, and this cycle is repeated until the loading reference point exceeds the loading area and the vehicle placement position has not been found, which means that there is no suitable loading position in the loading area, and the loading is terminated; or all vehicle types in the pallet list are loaded and loaded. Compared with the existing lane division algorithm, the present invention can process multiple types of vehicles at one time, with a higher utilization rate of the deck; and can also load vehicle types with large size differences.
[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A ro-ro ship loading method based on polygon intersection detection, It is characterized in that The following steps are involved: Step 1: Select the loading start point and loading end point, and determine the loading area according to the loading start point and loading end point; Step 2, select one of the vehicle types from the imported pallet list, and load the vehicle in the loading area using the loading starting point as the loading reference point; The pallet list includes vehicle types, the number of each type, geometric parameters of each type, and the distance between vehicles; Step 3, determining whether the loading area where the current loading reference point is located can normally place the vehicle based on the geometric parameters of the vehicle type and the polygon intersection detection algorithm; If yes, divide the parking spaces and offset the loading reference point according to the geometric parameters of the vehicle type and the vehicle spacing in the pallet list, and then go to step 4; If not, proceed to step 8; Step 4, determining whether the current loading vehicle type is loaded according to the quantity of the vehicle type in the pallet list; If yes, go to step 5; If not, proceed to step 6; Step 5, traverse the pallet list to determine whether there is an unloaded vehicle type in the pallet list. If yes, select one of the unloaded vehicle types and proceed to step 6; if no, the loading is completed; Step 6, determining whether the offset loading reference point is within the loading area determined by the loading starting point and the loading ending point; If yes, repeat step 3; If not, proceed to step 7; Step 7, offsetting the loading reference point according to the geometric parameters of the vehicle type, the vehicle spacing and the coordinates of the current loading reference point, and determining whether the offset loading reference point is within the loading area determined by the loading start point and the loading end point; If yes, go to step 3; If not, the loading is finished; Step 8, determining the problem type that does not meet the placement requirements according to the polygon detection algorithm, shifting the stowage reference point according to the problem type, and then proceeding to step 6; the problem type includes the type that is not located in the deck and the type that intersects with obstacles; In step 3, the step of determining whether the loading area where the current loading reference point is located can normally place the vehicle according to the geometric parameters of the vehicle type and the polygon intersection detection algorithm includes: Step 301a, establish a coordinate system with the loading starting point as the coordinate origin, and then determine whether the current loading reference point (x, y) is outside the deck of the ro-ro ship according to the polygon intersection detection algorithm; if yes, the vehicle cannot be placed; if not, proceed to step 302a; Step 302a, using the current loading reference point (x, y) as the coordinate of the lower left corner of the vehicle, and determining the vehicle loading outline according to the geometric parameters of the current vehicle type, and then determining whether there are obstacles intersecting with the vehicle loading outline according to the polygon intersection detection algorithm, wherein the obstacles include but are not limited to pre-defined obstacles in the deck, other vehicle outlines and deck outlines; if yes, the vehicle cannot be placed; if no, the vehicle can be placed.
2. According to the method for loading ro-ro ships based on polygon intersection detection according to claim 1, It is characterized in that In step 301a, the ray method is used to determine whether the stowage reference point (x, y) is within the outline formed by the deck. If the number of intersections between the ray extending from the stowage reference point (x, y) to the deck outline and the deck outline is an odd number, the stowage reference point (x, y) is within the outline formed by the deck; if the number of intersections between the ray extending from the stowage reference point (x, y) to the deck outline and the deck outline is an even number, the stowage reference point (x, y) is outside the outline formed by the deck.
3. According to the method for loading ro-ro ships based on polygon intersection detection according to claim 2, It is characterized in that In step 301a, the method for determining whether a ray extending from the stowage reference point (x, y) to the deck contour direction intersects any edge of the deck contour line is: Assume that the coordinates of the two endpoints of any side of the deck contour are (x11, y11) and (x22, y22), then when the following relationship is satisfied: ; and ; Then the ray extending from the loading reference point (x, y) in the direction of the deck contour intersects with the edge of the deck contour line.
4. According to the method for loading ro-ro ships based on polygon intersection detection according to claim 1, It is characterized in that In step 302a, if the obstacle is polygon a, it is determined whether any line segment of polygon a intersects with any line segment of polygon b formed by the vehicle loading contour; or Determine whether each point of any line segment of polygon a is in polygon b formed by the vehicle loading contour; If yes, there is an obstacle intersecting the vehicle loading profile.
5. According to the method for loading ro-ro ships based on polygon intersection detection according to claim 4, It is characterized in that In step 302a, the method for determining whether any line segment of polygon a intersects with any line segment of polygon b formed by the vehicle loading contour is: Suppose the coordinates of the two endpoints of any line segment on polygon a are known to be The coordinates of the two endpoints of any line segment on the polygon b formed by the vehicle loading contour are and ; Then the vector product u of the vector from point a1 to point a2 and the vector from point b1 to b2 is: ; The vector product ub of the vector a1 to b1 and the vector b1 to b2 is: ; The vector product ua of the vector a1 to b1 and the vector a1 to a2 is: ; When the size of the vector product u is 0, the line segment on polygon a does not intersect with the line segment on polygon b; when , then the line segment on polygon a intersects with the line segment on polygon b.
6. According to claim 1, the ro-ro ship loading method based on polygon intersection detection, It is characterized in that In step 302a, if the obstacle is circular, it is determined whether the center of the obstacle is within the polygon b formed by the vehicle loading contour. If so, the obstacle intersects the vehicle loading contour; if not, it is determined whether the distance between the center of the obstacle and each side of the polygon is greater than the radius. If any distance is less than the radius, the obstacle intersects the vehicle loading contour.
7. According to claim 1, the ro-ro ship loading method based on polygon intersection detection, It is characterized in that In step 8, when the problem type is a type not located inside the deck, the step of offsetting the stowage reference point according to the problem type includes: The coordinate system is established with the loading starting point as the coordinate origin, and y=y+d in the current loading reference point (x, y). The offset coordinates of the loading reference point are (x, y+d), where d is the preset unit spacing.
8. According to claim 1, the ro-ro ship loading method based on polygon intersection detection, It is characterized in that In step 8, when the problem type is an obstacle intersection type, the step of offsetting the loading reference point according to the problem type includes: Determine the maximum value y_max of the y coordinate of the obstacle on the deck that intersects the vehicle stowage profile, and determine whether y_max is greater than the ordinate y of the stowage reference point; If yes, let y = y_max, then the coordinates of the loading reference point after offset are (x, y_max); If not, let y=y+d, where d is the preset unit spacing, and the coordinates of the loading reference point after offset are (x, y+d).
9. The ro-ro ship loading method based on polygon intersection detection according to claim 1, It is characterized in that In step 6 and step 7, the step of determining whether the offset stowage reference point is within the stowage area determined by the stowage starting point and the stowage ending point includes: The coordinate system is established with the loading starting point as the coordinate origin, and the loading end point is set as (x1, y1); If x>x1 or y>y1 in the reference point coordinates (x, y), the loading reference point is not within the loading area determined by the loading starting point and the loading ending point.
