Method for realizing random motion of entity in fixed area and storage medium

A technology of random motion and fixed area, applied in the field of simulation, to reduce the number of generation and improve the efficiency of program execution

Active Publication Date: 2019-09-20
BEIJING HUARU TECH
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the method in the prior art, the number of random point generation and the number of times of judging whether the random point falls in the area are relatively large. Therefore, how to improve the calculation efficiency of the algorithm, in a given area, realize the randomness of the combat entity in the area. Movement reduces the number of random point generation and the number of judgments whether the random point is located in the area, improves the efficiency of program execution, and becomes a technical problem that needs to be solved urgently in the existing technology

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for realizing random motion of entity in fixed area and storage medium
  • Method for realizing random motion of entity in fixed area and storage medium
  • Method for realizing random motion of entity in fixed area and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings but not all structures.

[0023] see figure 1 , shows a flow chart of a method for an entity to realize random motion in a fixed area according to a specific embodiment of the present invention, and the method includes the following steps:

[0024] Zone setting step S110: given the zone Zone, the entity is required to move randomly within the zone;

[0025] Wherein, the area may be an area of ​​any shape, which is determined according to the requirements of the simulation.

[0026] In the present invention, an entity is a computer's mapp...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for realizing random motion of an entity in a fixed area and a storage medium. The method comprises the following steps: randomly selecting a path starting point in a limited area; sequentially and randomly generating a time period ti of each stage, accumulating the sum of the current random time periods until the total patrol time is reached, starting from a first time period, randomly moving at a constant speed, wherein the speed is random, calculating whether an end point of the current time period is in an area in advance, if the end point of the current time period exceeds the area, taking an intersection point as a transfer point in the time period, and starting from the intersection point to continue new random movement until the time period runs out; circularly executing the above steps in sequence until all random time periods are completely maneuverable. Therefore, in a given area, random motion of the combat entity in the area can be achieved according to the method, compared with a conventional random path generation algorithm, the number of times of generation of the random points and the number of times of judgment of whether the random points are located in the area are reduced, and the execution efficiency is improved.

Description

technical field [0001] The invention relates to the field of simulation, in particular to a method for performing random movement in a fixed area of ​​an entity in combat simulation and a storage medium thereof. Background technique [0002] In a real combat situation, in order to perform a patrol mission without dead ends in an irregular area, an algorithm for implementing a physical patrol route is needed. When patrolling in irregular areas, the entity's maneuvering process and maneuvering routes exhibit a certain degree of irregularity. [0003] In the prior art, to simulate the random motion of an entity in an irregular area, the conventional method is to randomly select a point, judge whether the point is inside the area, if it is inside the area, maneuver towards the point at a random speed, if not, Loop until a point within the region is selected. After arriving at this point, randomly pick a point, and then execute the cycle of judging whether the point is inside t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/50
CPCG06F30/20
Inventor 张柯闫飞黄燕马文娟
Owner BEIJING HUARU TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products