A road element modeling method and system for war game maps

By obtaining and arranging the intersection of the road and the hexagonal grid in the wargame map, and retaining or deleting the grid according to the preset length threshold, the problem of inaccurate road simulation in the existing technology is solved, and the accurate simulation of the road and the efficiency of wargame deduction is improved.

CN114926597BActive Publication Date: 2025-03-18NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210578733.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2025-03-18
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

It is difficult for the existing technology to accurately complete road simulation in the war chess map according to the actual length and direction of the road, resulting in uncertain deviations from the actual road length and direction of the simulation results, and cannot accurately reflect the detailed direction of the road, affecting the efficiency of war chess deduction.

Method used

By obtaining the intersection of the road and the hexagonal mesh network of the Warga Map, arrange the hexagonal mesh in the path order of the road, and obtain the length of the road in each hexagonal mesh in sequence, compare it with the preset length threshold, retain the grid with a length greater than or equal to the threshold, and delete the grid with a length less than the threshold, thereby obtaining the mesh path of the road in the Warga Map.

Benefits of technology

Accurate simulation of the original road is achieved, the deviation between the simulation results and the actual road length and direction is reduced, and the deduction efficiency of the war chess map is improved. There is no need to improve the hexagonal network of the original war chess map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114926597B_ABST
    Figure CN114926597B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer simulation technology, and provides a method and system for modeling road elements of a war game map. The method comprises: obtaining the intersection of any road and the hexagonal grid network of the war game map, arranging the hexagonal grids in the intersection according to the path order of the road; obtaining the length of the road in each hexagonal grid in sequence according to the path order, and comparing it with a preset length threshold, retaining the hexagonal grids with a length greater than or equal to the preset length threshold, and deleting the hexagonal grids with a length less than the preset length threshold; arranging the retained hexagonal grids in the path order, and obtaining the grid path of the road in the war game map. Through the above method, both the order relationship of the road passing through the grid and the length of the road passing through the grid are considered, avoiding the defect of excessive deviation between the war game map and the actual road, improving the rationality of modeling, and being conducive to coping with war game deductions in complex situations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer simulation technology, and in particular to a method and system for modeling road elements of a war chess map. Background Art

[0002] Wargame simulation based on wargame maps can effectively improve the ability of defense commanders to study and solve combat problems. Through wargame maps, the entire or local terrain area can be hexagonal gridded, and the terrain information can be converted into the attributes of the hexagonal grid unit face or edge according to certain rules. In practical applications, in order to accurately reflect the terrain information, the hexagonal grid often has a large number of hexagonal units.

[0003] Road elements are one of the main elements in battlefield terrain environments. How to scientifically and rationally quantify road data in vector format to a regular hexagonal grid network is one of the key technologies for building wargame maps. A road is usually composed of a series of line segments connected end to end. Therefore, the position mapping relationship between the road and the underlying regular hexagonal grid can be established through the coordinates of the line segment endpoints.

[0004] At present, the description of linear elements is achieved by connecting the centers of regular hexagonal grids and combining the attribute information of road elements (such as grade, width, maximum speed, etc.), so that road elements are quantified into regular hexagonal grids. This quantification method has the advantages of being intuitive, small in calculation and high in simulation efficiency. However, this method only connects all the grids passed by the actual road to the corresponding grid centers one by one in sequence to form the road reduction result. The actual length of the road passing through the grid is not considered. Only the judgment of whether the road and the grid intersect is performed. If there is an intersection, the grid is regarded as having a road passing through, and if there is no intersection, the grid is regarded as having no road passing through.

[0005] Therefore, after quantizing the road directly to the center of the hexagon through this method, the simulated road length and direction will have uncertain deviations from the actual road length and direction, which cannot accurately reflect the detailed direction of the road and is not conducive to war game simulation in complex situations. Summary of the invention

[0006] The present invention provides a road element modeling method for a war game map, which is used to overcome the defect that it is difficult to accurately complete road simulation according to the actual length and direction of the road in the war game map in the prior art, and realize accurate simulation of the original road to improve the deduction efficiency of the war game map.

[0007] The present invention provides a method for modeling road elements of a war game map, comprising the steps of:

[0008] Get any road and chess piece Figure 6 The intersection of the hexagonal grid network is arranged in the order of the path of the road;

[0009] Obtain the length of the road in each hexagonal grid in order of the path, and compare it with a preset length threshold, retain the hexagonal grids whose length is greater than or equal to the preset length threshold, and delete the hexagonal grids whose length is less than the preset length threshold;

[0010] Arrange the retained hexagonal grids in path order to obtain the grid path of the road in the war game map.

[0011] According to a method for modeling road elements of a war game map provided by the present invention, the length of the road in each hexagonal grid is obtained in sequence according to the path order, and compared with a preset length threshold, specifically comprising the steps of:

[0012] Arranging the hexagonal grids in the intersection according to the path order of the road to generate a first road grid set;

[0013] Select the hexagonal grids in the first road grid set in order, add the current hexagonal grid to the second road grid set and delete it from the first road grid set; traverse the six adjacent hexagonal grids of the current hexagonal grid to obtain the number of grids belonging to the first road grid set;

[0014] If the number of grids is 1, the corresponding adjacent hexagonal grids are added to the second road grid set and deleted from the first road grid set;

[0015] If the number of grids is greater than 1, the length of the road in the adjacent hexagonal grid is further compared with the preset length threshold. If it is greater than or equal to the preset length threshold, the corresponding adjacent hexagonal grid is added to the second road grid set and deleted from the first road grid set; otherwise, the corresponding adjacent hexagonal grid is deleted from the first road grid set.

[0016] The hexagonal grids in the second road grid set are arranged in path order to obtain the grid path of the road in the war game map.

[0017] A method for modeling road elements of a war game map provided by the present invention comprises the following steps:

[0018] Traverse each hexagonal grid in the first road grid set until the first road grid set is an empty set, output a second road grid set, arrange the hexagonal grids in the second road grid set in order, and obtain a grid path of the road in the war chess map.

[0019] According to a method for modeling road elements of a war game map provided by the present invention, if the number of grids is greater than 1, further determining whether the length of the road in the corresponding adjacent hexagonal grid is greater than or equal to the preset length threshold, specifically includes the steps of:

[0020] If the length of a road in at least one adjacent hexagonal grid is greater than or equal to the preset length threshold, then, according to the path order of the roads, the adjacent hexagonal grids greater than or equal to the preset length threshold are added to the second road grid set and deleted from the first road grid set;

[0021] If both are smaller than the preset length threshold, it is further determined whether the adjacent hexagonal grids smaller than the preset length threshold have secondary adjacent hexagonal grids belonging to the first road grid set, and the secondary adjacent hexagonal grids belonging to the first road grid set are added to the second road grid set and deleted from the first road grid set.

[0022] A method for modeling road elements of a war game map provided by the present invention further comprises:

[0023] For any hexagonal grid belonging to the first road grid set, if the lengths of roads in two adjacent hexagonal grids of the hexagonal grid are equal to the preset length threshold, and the two adjacent hexagonal grids both belong to the first road grid set, then any one of the two adjacent hexagonal grids is added to the second road grid set and deleted from the first road grid set.

[0024] According to a method for modeling road elements in a war game map provided by the present invention, the preferred value of the preset length threshold is

[0025] Wherein, L is the side length of the hexagonal grid.

[0026] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for modeling road elements of a war chess map as described in any one of the above are implemented.

[0027] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for modeling road elements of a war chess map as described in any one of the above.

[0028] The present invention provides a method for modeling road elements of a war game map, which has the following technical effects:

[0029] (1) By obtaining any road and chess piece Figure 6The intersection of the hexagonal grid network is used to arrange the hexagonal grids in the intersection according to the path order of the road, and the length of the road in the hexagonal grid is compared with the preset length threshold, which takes into account both the order of the roads passing through the grids and the length of the roads passing through the grids, thereby avoiding the defect of excessive deviation between the war game map and the actual road, which is conducive to improving the rationality of modeling, and there is no need to improve the hexagonal network of the original war game map;

[0030] (2) Each hexagonal grid is judged in turn according to the road path, so that the road obtained after modeling the continuous road is also continuous, which effectively improves the rationality of road element modeling and reduces the length error caused by modeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 It is a schematic diagram of the principle of modeling road data using the prior art grid-based element center method;

[0033] Figure 2 This is one of the schematic diagrams of the modeling effect of the regression element center method in the prior art;

[0034] Figure 3 This is the second schematic diagram of the modeling effect of the regression element center method in the prior art;

[0035] Figure 4 It is a flow chart of the road element modeling method of the war game map provided by the present invention;

[0036] Figure 5 This is one of the modeling effect schematic diagrams of the road element modeling method of the war game map provided by the present invention;

[0037] Figure 6 This is the second schematic diagram of the modeling effect of the road element modeling method of the war game map provided by the present invention;

[0038] Figure 7 This is the third schematic diagram of the modeling effect of the road element modeling method of the war game map provided by the present invention;

[0039] Figure 8 It is a comparison diagram of the modeling effect of the road element modeling method of the war game map provided by the present invention and the prior art; DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.

[0041] It should be noted that the terms "first\second" used in the present invention are only used to distinguish similar objects, and do not represent a specific order for the objects. It is understandable that "first\second" can be interchanged with a specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those described or illustrated herein.

[0042] It should be noted that, in current war game simulations, the principle of using the grid center method to model road data is as follows: Figure 1 As shown in the figure, on a regular hexagonal grid, the endpoints of a line segment have two distributions within the hexagonal grid:

[0043] (1) One is that the starting point and the end point of the line segment are in the same hexagonal grid;

[0044] (2) The other is that the starting point and the end point of the road are in different hexagonal grids.

[0045] For the first case, the regular hexagonal grid that the road passes through can be determined by using the formula for converting rectangular coordinates to grid coordinates;

[0046] In the second case, it is necessary to record the regular hexagonal grid that the line connecting the starting point and the end point of the line segment passes through, which can be quantified by using the full path rasterization method;

[0047] The roads in a certain area of ​​a city in Taiwan Province of my country were modeled by using the grid center method. The grid modeling resolution ranged from 100 meters to 1600 meters. The original length of the road was 323939.2415 meters. The modeled lengths at 16 grid resolutions from 100 meters to 1600 meters are shown in Table 1. The average length of the road after being converted to the grid center point at these 16 grid resolutions is 375651.2545 meters, and the error with the actual length of the road is as high as 15.96%. This shows that there are certain problems with the current road modeling algorithm. This is because during the implementation of the algorithm, only the center coordinate points of the grids through which the original road passes are connected in sequence to form the road conversion result, without considering the length of the road passing through the grid. It only determines whether the road and the grid intersect. If they intersect, the grid is regarded as having a road passing through, and if they do not intersect, the grid is regarded as having no road passing through. Obviously, the current method is too rough and the modeling results are not accurate enough. Figure 2 and Figure 3 As shown in the figure, the gray line is the actual road, and the black line is the quantified road element obtained after modeling. It should be noted that, as shown in the quantized results of the road elements marked by the circles in the figure, when only a small part of the road intersects with the hexagonal grid, the road will also be judged to pass through the grid, so a series of Figure 2-3 The quantization results of the jagged road shown in the figure show that the more jagged the road is, the greater the deviation between the length of the modeled road and the actual road will be, and the lower the modeling accuracy will be.

[0048] Table 1 Length of roads after modeling under different resolution grids

[0049]

[0050] Based on the above defects of the prior art, in one embodiment, the present invention provides a method for modeling road elements of a war game map to avoid the above situation of low modeling accuracy, which specifically includes the steps of:

[0051] Get any road and chess piece Figure 6 The intersection of the hexagonal grid network is arranged in the order of the path of the road;

[0052] Obtain the length of the road in each hexagonal grid in order of the path, and compare it with a preset length threshold, retain the hexagonal grids whose length is greater than or equal to the preset length threshold, and delete the hexagonal grids whose length is less than the preset length threshold;

[0053] Arrange the retained hexagonal grids in path order to obtain the grid path of the road in the war game map.

[0054] In one embodiment, Figure 4 As shown, the present invention provides a method for modeling road elements of a war chess map, which specifically includes the steps of:

[0055] Get any road and chess piece Figure 6 The intersection of the hexagonal grid network is arranged in the order of the path of the road;

[0056] Arranging the hexagonal grids in the intersection according to the path order of the road to generate a first road grid set;

[0057] Select the hexagonal grids in the first road grid set in order, add the current hexagonal grid to the second road grid set and delete it from the first road grid set; traverse the six adjacent hexagonal grids of the current hexagonal grid to obtain the number of grids belonging to the first road grid set;

[0058] If the number of grids is 1, the corresponding adjacent hexagonal grids are added to the second road grid set and deleted from the first road grid set;

[0059] If the number of grids is greater than 1, further comparing the length of the road in the adjacent hexagonal grid with the preset length threshold, if it is greater than or equal to the preset length threshold, adding the corresponding adjacent hexagonal grid to the second road grid set and deleting it from the first road grid set; otherwise, deleting the corresponding adjacent hexagonal grid from the first road grid set;

[0060] The hexagonal grids in the second road grid set are arranged in path order to obtain the grid path of the road in the war game map.

[0061] Specifically, each hexagonal grid in the first road grid set is traversed in turn until the first road grid set is an empty set, which means that all grids passed by the current road have been analyzed, and all grids in the first road grid set have been processed. At this time, all grids that meet the conditions have been output to the second road grid set, and the hexagonal grids in the second road grid set are arranged in order to obtain the grid path of the road in the war chess map.

[0062] Specifically, if the number of grids is greater than 1, further determining whether the length of the road in the corresponding adjacent hexagonal grid is greater than or equal to the preset length threshold includes:

[0063] If the length of a road in at least one adjacent hexagonal grid is greater than or equal to the preset length threshold, then, according to the path order of the roads, the adjacent hexagonal grids greater than or equal to the preset length threshold are added to the second road grid set and deleted from the first road grid set;

[0064] If both are less than the preset length threshold, further determine whether the adjacent hexagonal grids less than the preset length threshold have secondary adjacent hexagonal grids belonging to the first road grid set, add the secondary adjacent hexagonal grids belonging to the first road grid set to the second road grid set and delete them from the first road grid set; Figure 5 As shown in the figure, the road lengths in grids A and B are both less than the threshold, which will lead to discontinuous road modeling. The adjacent grid of grid B is grid A. Although the length of the road in grid A is also less than the threshold, grid A is still in the first road grid set, so grid A is retained and grid B is deleted, thereby solving the problem of discontinuous road connection.

[0065] Furthermore, for any hexagonal grid belonging to the first road grid set, if the lengths of the roads in two adjacent hexagonal grids of the hexagonal grid are equal to the preset length threshold, and the two adjacent hexagonal grids both belong to the first road grid set, then any one of the two adjacent hexagonal grids is added to the second road grid set and deleted from the first road grid set, that is, one of the two is discarded and only one is retained.

[0066] Specifically, the preset length threshold is

[0067] Wherein, L is the side length of the hexagonal grid.

[0068] like Figure 6 As shown in Figure 2-3 The jagged road shown; Figure 7 As shown in the figure, if the threshold value is too large, multiple grids will be directly deleted after modeling, and the continuity of the road cannot be guaranteed;

[0069] Specifically, in one embodiment, the steps of implementing the present invention are as follows:

[0070] (1) Based on the existing war game map, the regular hexagonal grids that a certain road passes through are obtained and stored as a list S0, i.e., the first road grid set;

[0071] (2) Calculate the length of roads contained in all grids that intersect with the roads;

[0072] (3) establishing a new list S1, namely the second road grid set;

[0073] Take the first regular hexagonal grid C1 from list S0 and store it in list S1, delete C1 from S0, and then traverse the 6 adjacent grids of grid C1 respectively;

[0074] (4) Determine the number n of the six adjacent grids that belong to list S0. If n=1, store the adjacent grid in S1 and delete it from S0. If n>1, determine whether the length of the roads contained in the adjacent grids belonging to S0 is not less than the preset length threshold y.

[0075] If the length of the road contained in at least one adjacent grid is not less than y, the grids that meet the requirements are stored in S1 according to the order in table S0 and deleted from S0.

[0076] If the lengths of the roads contained in the adjacent grids are all less than y, in order to ensure the continuity of the roads, it is necessary to further determine whether the secondary adjacent grids of the above adjacent grids are in the list S0. If so, store them in S1; if not, delete them directly from S0.

[0077] (5) Traverse the next grid and repeat (4) until all grids in S0 are processed. The final grid list S1 is the grid that the road passes through;

[0078] The grid list S1 obtained at the end is the grid that the road passes through, and then the modeling of the road elements is completed, such as Figure 8 The figure shows the comparison of modeling effects before and after the improvement of the road modeling algorithm. It can be found that Figure 8 After the right side is improved by the algorithm provided by the present invention, the grid chain composed of the regular hexagonal grids through which the road passes has a single grid width without branches, and the grid chain is continuous, which reduces the jagged broken line quantization results and effectively improves the rationality and accuracy of road element modeling.

[0079] The present invention also provides a schematic diagram of the physical structure of an electronic device, which may include: a processor, a communications interface, a memory, and a communication bus, wherein the processor, the communications interface, and the memory communicate with each other via the communication bus. The processor may call the logic instructions in the memory to execute the above-mentioned method for modeling the road elements of a war chess map, including the steps of:

[0080] Get any road and chess piece Figure 6 The intersection of the hexagonal grid network is arranged in the order of the path of the road;

[0081] Obtain the length of the road in each hexagonal grid in order of the path, and compare it with a preset length threshold, retain the hexagonal grids whose length is greater than or equal to the preset length threshold, and delete the hexagonal grids whose length is less than the preset length threshold;

[0082] Arrange the retained hexagonal grids in path order to obtain the grid path of the road in the war game map.

[0083] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0084] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the road element modeling method of the war chess map provided by the above methods, including the steps of:

[0085] Get any road and chess piece Figure 6 The intersection of the hexagonal grid network is arranged in the order of the path of the road;

[0086] Obtain the length of the road in each hexagonal grid in order of the path, and compare it with a preset length threshold, retain the hexagonal grids whose length is greater than or equal to the preset length threshold, and delete the hexagonal grids whose length is less than the preset length threshold;

[0087] Arrange the retained hexagonal grids in path order to obtain the grid path of the road in the war game map.

[0088] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for modeling road elements of a wargame map provided by the above method is implemented, comprising the steps of:

[0089] Get any road and chess piece Figure 6 The intersection of the hexagonal grid network is arranged in the order of the path of the road;

[0090] Obtain the length of the road in each hexagonal grid in order of the path, and compare it with a preset length threshold, retain the hexagonal grids whose length is greater than or equal to the preset length threshold, and delete the hexagonal grids whose length is less than the preset length threshold;

[0091] Arrange the retained hexagonal grids in path order to obtain the grid path of the road in the war game map.

[0092] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for modeling road elements of a war game map, characterized in that: include: Obtain the intersection of any road and the hexagonal grid network of the war game map, and arrange the hexagonal grids in the intersection according to the path order of the road; Obtain the length of the road in each hexagonal grid in order of the path, and compare it with a preset length threshold, retain the hexagonal grids whose length is greater than or equal to the preset length threshold, and delete the hexagonal grids whose length is less than the preset length threshold; Arrange the reserved hexagonal grids in path order to obtain the grid path of the road in the war game map; Obtain the length of the road in each hexagonal grid in order of the path and compare it with the preset length threshold, including: Arranging the hexagonal grids in the intersection according to the path order of the road to generate a first road grid set; Select the hexagonal grids in the first road grid set in order, add the current hexagonal grid to the second road grid set and delete it from the first road grid set; traverse the six adjacent hexagonal grids of the current hexagonal grid to obtain the number of grids belonging to the first road grid set; If the number of grids is 1, the corresponding adjacent hexagonal grids are added to the second road grid set and deleted from the first road grid set; If the number of grids is greater than 1, further comparing the length of the road in the adjacent hexagonal grid with the preset length threshold, if it is greater than or equal to the preset length threshold, adding the corresponding adjacent hexagonal grid to the second road grid set and deleting it from the first road grid set; otherwise, deleting the corresponding adjacent hexagonal grid from the first road grid set; The hexagonal grids in the second road grid set are arranged in path order to obtain the grid path of the road in the war game map.

2. The method for modeling road elements of a war game map according to claim 1, characterized in that: include: Traverse each hexagonal grid in the first road grid set until the first road grid set is an empty set, output a second road grid set, arrange the hexagonal grids in the second road grid set in order, and obtain a grid path of the road in the war chess map.

3. The method for modeling road elements of a war game map according to claim 1, characterized in that: If the number of grids is greater than 1, further determining whether the length of the road in the corresponding adjacent hexagonal grid is greater than or equal to the preset length threshold includes: If the length of a road in at least one adjacent hexagonal grid is greater than or equal to the preset length threshold, then, according to the path order of the roads, the adjacent hexagonal grids greater than or equal to the preset length threshold are added to the second road grid set and deleted from the first road grid set; If both are smaller than the preset length threshold, it is further determined whether the adjacent hexagonal grids smaller than the preset length threshold have secondary adjacent hexagonal grids belonging to the first road grid set, and the secondary adjacent hexagonal grids belonging to the first road grid set are added to the second road grid set and deleted from the first road grid set.

4. The method for modeling road elements of a war game map according to claim 3, characterized in that: For any hexagonal grid belonging to the first road grid set, if the lengths of roads in two adjacent hexagonal grids of the hexagonal grid are equal to the preset length threshold, and the two adjacent hexagonal grids both belong to the first road grid set, then any one of the two adjacent hexagonal grids is added to the second road grid set and deleted from the first road grid set.

5. A method for modeling road elements of a war game map according to any one of claims 1 to 4, characterized in that: include: The preset length threshold is ; Wherein, L is the side length of the hexagonal grid.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for modeling road elements of a war game map as described in any one of claims 1 to 5 are implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for modeling road elements of a war game map as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method for modeling terrain property of Wargame map by grid matrix

    CN105045976A

  • A-star-algorithm-based war game hexagonal-grid map path planning method

    CN107506513A