CN102346795B - Automatic quick wiring method for electric and electronic virtual experiments - Google Patents

Automatic quick wiring method for electric and electronic virtual experiments Download PDF

Info

Publication number
CN102346795B
CN102346795B CN2011102765979A CN201110276597A CN102346795B CN 102346795 B CN102346795 B CN 102346795B CN 2011102765979 A CN2011102765979 A CN 2011102765979A CN 201110276597 A CN201110276597 A CN 201110276597A CN 102346795 B CN102346795 B CN 102346795B
Authority
CN
China
Prior art keywords
point
path
wiring
starting point
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2011102765979A
Other languages
Chinese (zh)
Other versions
CN102346795A (en
Inventor
于俊清
欧阳星明
刘宇环
唐九飞
冉啟皓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN2011102765979A priority Critical patent/CN102346795B/en
Publication of CN102346795A publication Critical patent/CN102346795A/en
Application granted granted Critical
Publication of CN102346795B publication Critical patent/CN102346795B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an automatic quick wiring method applied to electric and electronic virtual experiment platforms. The automatic quick wiring method comprises the following steps of: firstly, initializing experimental platform information; secondly, finding a wiring path from any starting point to any binding post by using the experimental platform information established in the first step and generating a source path of a lead starting point; thirdly, generating a path result by using the start point and an end point; and fourthly, acquiring the lead shape and finishing the wiring operation. According to the method, the defects of troublesomeness in operation and messy wiring result in a manual wiring mode can be overcome; meanwhile, certain user interaction experience is ensured; the real-time property of the operation requirement for the virtual experiment can be ensured; the time consumption and space consumption in the wiring process are lower than those of other traditional methods; in addition, the operation mode has the characteristic of convenience and visuality. The invention has stronger generality and portability of the platform and can be used for operating on various platforms.

Description

The fast automatic wiring method of electrotechnical, electronic class virtual experimental
Technical field
The invention belongs to the virtual experimental technical field, specifically is the fast automatic wiring method in a kind of electrotechnical, electronic class virtual experimental platform.
Background technology
Virtual experimental is to be guidance with the modern education theory, serves as to rely on a kind of novel experiment teaching system of setting up with computer simulation technique, multimedia technology and network technology.It utilizes the real experimental situation of computer simulation, shares distributed experimental facilities through information network, for experimental teaching provides a kind of brand-new teaching pattern.Electrotechnical, electronic class virtual experimental (digital circuit and logic, Analog Electronics Technique, Principles of Microcomputers, Fundamentals of Mono-Chip Computers & Applications, PLD) is to replace real experimental facilities platform with virtual experiment porch, is the software simulation of hardware experiments environment in essence.In the experimentation, connecting each independent devices with lead, finally make each device become the wiring operations of an integral experiment circuit, is important, the indispensable ingredient of computer virtual experimental system.Existing systems adopts the method for hand wired mostly at present, and the route of promptly progressively specifying current wiring to pass through according to the position of mouse by the experimenter from the wiring starting point repeats this process and arrives the wiring terminal point up to impact point, has just accomplished wiring operations one time.The advantage of hand wired is to realize simply, and wiring process is fully by user's control, and is more directly perceived concerning the user, but there is the deficiency of following many aspects in it:
(1) the cloth linear velocity is slow, consuming time many.Need be in wiring starting point and terminal point point-to-point transmission by the manual path of drawing piecemeal of operator; Need before the wiring to observe earlier and confirm a routing path that gets around all device obstacles roughly, also will observe constantly in the process of wiring with the route segment of confirming current wiring and guarantee to get around all obstacles and conflict.More at the experiment components and parts like this, experiment porch comparatively need expend many unnecessary time and efforts under the complicated situation.
(2) routing path is longer.Hand wired operation can not guarantee that generally the route of institute's cloth is a minimal path, and is more when experiment apparatus, the wiring result was more mixed and disorderly mostly when the experiment table layout was complicated, occupied the most position of experiment table.
(3) the not enough neat appearance of wiring result.It is thorough that hand wired is difficult to all wiring situation are considered; Irregular phenomenon attractive in appearance (maybe be not of uniform size like the spacing between lines) appears through regular meeting; Can influence observation on the whole to design result; Destroyed the design of the space of a whole page on the whole, more serious is to cause interfering with each other of electric signal.
(4) wiring operations is comparatively complicated.The hand wired operation is too loaded down with trivial details, makes the experimenter can not be primarily focused in the design of experimental program and experimental arrangement, influences the expection teaching efficiency of virtual experimental platform.
Because there is the above variety of problems in hand wired, in order to adapt to the needs of computer-aided design (CAD) development, the self routing correlation technique is arisen at the historic moment.Through years of researches and development, computing machine self routing theory problem, technology and method have all had great advance, and in the electronics Aided Design, are playing the part of more and more important effect.In the method for actual self routing, the user only need specify wiring starting point and terminal point, can generate a routing path that connects this point-to-point transmission automatically by system.The effect of self routing depends on the wiring algorithm that is adopted; Unfixing solution pattern; Its search that can be summed up as the platform that needs are connected up is to seek an only path problems; It belongs to np complete problem in essence, and general solution not at present generally selects suitable wiring algorithm to satisfy the needs of self system according to system requirements in the reality.
There are many similarities in wiring problem and shortest route problem.At first, wiring operations is on fixing experiment porch zone, to carry out, and finding the solution of shortest path also is in a fixing zone, to carry out; Secondly, need the experimenter to specify an end points earlier during wiring, specify another end points again as the wiring end caps as wiring beginning end points.Initial end points can be regarded in the shortest route problem one in two summits as, and end caps then can be regarded in the shortest route problem another one in two summits accordingly as; At last, the target of wiring is to find out the paths that connecting wiring begins end points and end caps, and components and parts all on the table top must be walked around in this path, and can only move sideways in the path or vertical line and can not moving diagonally.And shortest route problem is will seek a paths since a summit to walk around the very large points of all weights (being similar to barrier), reaches another summit at last.About finding the solution of shortest route problem, existing method can reduce two types: labyrinth (Maze-running) algorithm and line search (Line-searching) algorithm.
(1) labyrinth algorithm.
Labyrinth (maze) is a rectangular area, and it only has an inlet and an outlet, and the labyrinth inner packet contains a plurality of barriers that can not pass through.Maze problem is meant seeks a paths, and inlet gets into from the labyrinth in this path, along the passage walking, requires to get around all impassable obstacles simultaneously.The route of walking can only be a level or vertical, can not advance and can not jump along oblique line, promptly can only move along four adjacent grids up and down of current location grid, till going to outlet.
Nineteen fifty-nine Moore proposes the labyrinth shortest path first, and Lee successfully was used to solve the self routing problem with the labyrinth shortest path first that Moore proposes first in 1961.The LeeShi basic idea can be described as the simulation of wave propagation process.On a lake surface that has an obstacle, if need to seek the minimal path that connects 2 of A, B, can cast one piece of stone at the A point, observe caused ripples propagation condition then.Supposing when " ripples " are propagated does not have energy loss, and when running into barrier, " ripples " can produce reflection, the impact point ripple that arrives at first the path of process must be a bee-line.And as long as point-to-point transmission has path to exist, the ripple one that then spreads out from the A point propagates into surely and reaches the B point, and this process can be described on computers.
(2) line search algorithm.
Than poor efficiency, so people propose the line search algorithm to labyrinth algorithm on time and space, and its basic thought is figure who represents obstacle and site position of structure earlier, seeks shortest path then in the drawings and obtains the shortest path in the former net point.The line exploratory method need not be stored each site information, need only store physical dimension and the connecting line width and the end points coordinate of barrier.In exploring based on the line of grid, the step-length when exploring endpoints and recalling processing all is that unit calculates with the grid; In no mesh lines exploration scheme; Coordinate is a unit with the minimal design precision; Exploring endpoints then calculates according to the physical dimension of obstacle and the permission minimum clearance of exploring between line and the obstacle; Recalling processing is step-length with minor increment between line, and combines the physical dimension of obstacle to adjust exploration starting point and probing direction flexibly.
Usually the line exploratory method is used forward-backward search method; Higtower algorithm for example; Its arthmetic statement is following: generate two empty table Slist and Dlist, and be used to deposit the escape line that source point and impact point produce, if this line can not penetrate district Slist the crossing then end with the Dlist middle conductor.Otherwise " the effusion point " that be used alternatingly on Slist and the Dlist middle conductor produces new straight line, and new Slist (Dlist) will intersect with former Slist (Dlist).Finish then can find a paths if explore through date back to source point from impact point.For the efficient that improves search can combine to the more given rules of the order of search or with grid, more representational is Mikami algorithm and JSoukup algorithm.
Said method can reach the purpose of self routing within the specific limits, yet, realize that in the appointed area 2 connection is not difficult, but, add that perhaps the difficulty of wiring problem also rises after the multiple line constraint thereupon when problem scale expansion.In real system; Often exist the network that a plurality of points are formed; Restriction such as signal wire that signal transmission distance in this network between the point of vicinity need satisfy some condition can not intersect; Perhaps some regional device obstacle causes this zone not connect up, wiring simultaneously also the current wiring of considered maybe to after the influence that causes of gauze layout etc.How from numerous feasible cabling scenarios, finding out a kind of the most reasonably solution this moment makes problem become complicated more.The optimal route of general wiring problem is minimal path, so finding the solution of most wiring problem can ascribe the solving the shortest path problem to.Shortest route problem is one of important topic of graph theory; Be summed up as and ask weighted graph G=<V, E, W>in shortest path between the two given summits; Promptly between starting point and impact point, find out the minimum path of total cost, its key point is to search out suitable optimum path search algorithm.The optimum path search algorithm will be accomplished the path of exploring lowest costs on the one hand, will accomplish fast as far as possible, the least possible committed memory on the other hand, promptly reduces the time complexity and the space complexity of algorithm as far as possible.Usually asking shortest path is in a connected graph, to carry out; Each node is connected by oriented or undirected line; And shortest path refers among the figure at 2 and links to each other through a broken line or curve among the barrier crowd; Do not bump with arbitrary barrier, and the path of this broken line or curve or cost minimum.
Classical shortest route problem only relates to single goal optimization, normal spended time or the distance of considering that acquisition is the shortest.But single objective function often is difficult to the accurate description practical problems, because complicated realistic problem generally has a plurality of objective functions to need to optimize, has drawn the multiple goal shortest route problem like this.Multiobject introducing make problem find the solution with the single goal condition under different; Owing to all exist conflict usually between each target; Having separating for another target of advantage to certain target possibly not be what optimize; Cause the multiple goal shortest route problem generally not have single optimization solution like this, but an optimization disaggregation (being also referred to as the Pareto disaggregation), the corresponding problem difficulty also increases thereupon greatly.
(3) Dijkstra (Di Jiesitela) algorithm
Dijkstra (Di Jiesitela) algorithm is typical single source shortest path first, is used to calculate the shortest path of a node to other all nodes.Principal feature is to be outwards expansion layer by layer of center with the starting point, till expanding to terminal point.Dijkstra's algorithm is very representational shortest path first, in a lot of specialized courses, all as substance detailed introduction is arranged, like data structure, graph theory, operational research or the like.The statement that Dijkstra is general has dual mode usually, the permanent and interim label mode of a kind of usefulness, and a kind of is to use OPEN, the mode of CLOSE table.
Summary of the invention
The present invention provides the fast automatic wiring method in a kind of electrotechnical, electronic class virtual experimental platform, adopts interactive wiring method, takes all factors into consideration and reduces line path and line number of corners as far as possible; Utilize the line space as far as possible; Not influencing the existing path of utilization of trying one's best under the readable prerequisite, can guarantee that line is clear, density is reasonable; It is best that the one-piece construction of circuit diagram is tending towards, thereby improve the user experience of virtual experimental system.
For realizing the object of the invention, the technical scheme of employing is following:
Step (1) initialization experiment porch information is specially:
(1.1) read in the experiment table layout, obtain information such as the device that has been furnished with on the platform and existing line, obtain experiment porch width and height attributes, to set up the wiring data structure.
(1.2) the experiment table area dividing is become the grid of m*n equal sizes, for these grids are set up the Diikstra table of a m*n, in each grid correspondence table one of same position.
Each grid is abstract to be the object of a DijkstraNode type; It comprises needed all information of dijkstra's algorithm, comprises whether the weight w eight at path distance, this grid place, this grid are calculated beConsidered, net point coordinate coordinate and the direction track of this point on the path.
Step (2) generates the source path of lead starting point.The platform information that utilizes step (1) to set up finds the routing path of certain starting point (generally being the binding post on the experiment porch) to another binding post, is specially:
(2.1) Dijkstra that sets up the wiring starting point shows.
Set up a fifo queue UncalcList and handle the point that all are not initialised; Begin to join its right side, a left side, upper and lower four points the formation successively from the wiring starting point; Consider first point in the formation with same procedure again, it is adjacent and point that be not considered adds the formation afterbody.The DijkstraNode information of first point of formation is accomplished assignment according to the actual conditions of this point, just himself is removed from the UncalcList formation after this dot information disposes.Go down so repeatedly up to from the lead starting point, all net points all dispose according to the method described above on the platform.
Step (2.2) is sought the corresponding single source path of wiring starting point.
Current terminal point is added array and temporary terminal point coordinate, deduct the track value of this some DijkstraNode of place again with this coordinate, return back to the coordinate of previous point on the path.The track of two points relatively if variation has taken place one of their horizontal ordinate or ordinate direction of motion of lead of then explaining inequality, joins the coordinate of change point in the array of path, finds a flex point.Repeat top process like this, equate with the track value of starting point, just backtracked starting point, thereby accomplish the generation in path from terminal point up to the track of rollback point value.
Current wiring terminal point is the net point of confirming current mouse position after the wiring starting point in this step, and not necessarily requiring is binding post, and purpose is to generate a preview path to make things convenient for the user to observe the wiring situation at any time.
Step (3) is utilized starting point and terminal point generation pass result.
What only utilize that the Dijkstra table of lead starting point obtains is not two the shortest paths between binding post; Accomplishing a wiring operations also need be that initial point is set up a new Dijkstra table again with the terminal point binding post of lead, and the structure of this table is identical with the structure of discussing before with constructive process.Analyzing two tables can know, two tables exist a unique common point to make that this point has bee-line simultaneously to starting point and terminal point, so need travel through two tables simultaneously up to finding this point.With the public terminal point of this common point as lead starting point binding post and terminal point binding post, utilize the algorithm in the step (2) to find two paths respectively, this two paths is combined to deposit in has in order just obtained final thread guide path in the array of path.
For the position that can follow user's mouse at any time obtains current preview path; Single source path by dot generation generally is initialized by the information of whole flat; At this moment obtained a large amount of routing informations, but these information can not guarantee it is that two paths between binding post are optimum (the shortest).The process of setting up the Dijkstra table from terminal point causes calculated amount excessive as if also carrying out the computing meeting by the information of full platform, influences the execution speed of algorithm; Simultaneously, obtain to mean that the general areas of self routing can obtain behind starting point and the terminal point when algorithm is initial, even should be used up in the zone, also need by certain strategy progressively extended area make self routing have the path to walk.Therefore, in order to reduce operand, to improve the cloth linear velocity, can obtain the wiring zone according to starting point and final position; In this zone, carry out auto-routing algorithm; If in the zone, can't find suitable path, then progressively enlarge the region of search, till finding the path; Extended area is the full wiring zone of experiment porch to the maximum.
Step (4) is set the lead information of experiment porch.
Behind every thread guide path of abovementioned steps acquisition, also need note the shape of every lead, so that correctly set the global wires information of experiment porch through the path.Each shape can represent that these shapes all are defined as global constant with an integer constant.Can obtain wire shape by step (5) according to these information.
Step (5) is obtained wire shape.In the wiring process direct of travel in path have only from left to right, from right to left, from top to bottom, four kinds from top to bottom, can obtain the shape of multiple lead thus, complicated shape all by simple shape in order stack obtain.
(5.1) obtain the wire shape that current wiring produces through this point.Main method is to do logic determines according to the path direction of next point on current path direction and the path, from all possible combination, chooses the shape value of coupling.This step need be set up the mapping relations of two path direction values and shape value and support, specifically should be from the path starting point, once obtain the wire shape value of each point on the path successively according to these mapping relations.The shape value of starting point and terminal point is handled as particular value, need not pass through mapping, directly obtains to get final product.
(5.2) original wire shape and new wire shape are combined into new shape state.This step promptly is original combination of shapes in the relevant grid position on new shape and the experiment porch of the current generating step obtained of step (5.1), obtains the net shape on this routing path, and rule of combination also is mapping relations.Each wiring of accomplishing a lead just replaces old shape state with the shape state that all net points on this thread guide path newly obtain.This step fundamental purpose is the updated at any time platform information, guarantees the consistance of status information.
The data structure and the information of step (6) storage lead object.After successfully adding a lead on the experiment table, the figure of the lead that not only will draw also will be stored necessary relevant information and be provided with offering other functional modules uses.Preserve end of message (EOM), promptly accomplished a self routing operation.
Electrotechnical, electronic class virtual experimental system allows the user in the virtual experimental environment, to realize design, builds the active experiential function with lecture experiment result etc.; In the process that experimental program is built; Lead between device connects the important step that is absolutely necessary, and the wiring algorithm that adopts when lead connects is a deciding factor weighing experimental program figure quality.Wiring process is the process that the experimenter initiatively tests; On the one hand they hope in wiring process at any time the path of preview lead and after every lead connects, see the wiring result at once; Wiring path is wanted and can fast automaticly be generated on the other hand, also will satisfy correct, readability, attractive in appearance and effectively utilize requirement such as experiment porch space.Method of the present invention had both guaranteed in the time that the user allows, to accomplish wiring operations; Can in user interactions, accomplish associative operations such as seeking path, set information, storage lead information again automatically; The user only need utilize click to specify the wiring starting point and drag mouse and promptly can be observed the path and change along with mouse position change, and is convenient directly perceived.Promptly generate the final routing path after clicking the wiring terminal point, the result is attractive in appearance.This method is used OO thought design and is realized having stronger platform versatility, can run on the kinds of platform.
The present invention improves the shortest path acquiring method of classics; Be the basis with classical dijkstra's algorithm; To each logical nets point on the wiring experiment table being carried out initialization to confirm their weights size; Net point is the information that adjacency matrix of fundamental construction is deposited these net points then, finds all intermediate points on the path between starting point and terminal point according to above-mentioned basis at last, and starting point, all intermediate points and terminal point are connected in turn has just constituted a routing path.Because These characteristics; The present invention has good result in the practical application of virtual experimental platform; Can accomplish self routing according to user's experiment demand, and can in user's acceptable time, search path preferably, satisfy the requirement of virtual experimental platform real-time.
Description of drawings
Fig. 1 is a process flow diagram of setting up lead starting point Dijkstra table;
Fig. 2 utilizes single Dijkstra table to generate the process flow diagram of thread guide path;
Fig. 3 is the process flow diagram of automatic wiring method;
Fig. 4 is the interconnect module functional structure chart.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the present invention is done further explain.
The mode of operation of Digital Logic virtual experimental platform switches through changing its mode of operation to be realized; After selecting colour of insulated conductor under the cloth ray mode; Just can in the experiment table zone, connect up operation, interconnect module functional structure chart such as Fig. 4 such as comprise the interpolation, deletion of lead and move.
(1) confirm that mode of operation is the cloth line states, choose colour of insulated conductor, promptly begin to get into wiring operations, and the initialization platform information.
(1.1) read in the experiment table layout.Experimental program according on the experiment porch is built situation, obtains the device that has been furnished with on the platform and information such as line are arranged, and Digital Logic virtual experimental land regions default size is set at the 1500*1500 pixel.
(1.2) setting each sizing grid is the 12*12 pixel, like this experiment table is divided into the grid of 125*125 equal sizes.Set up the Dijkstra table of a 125*125, this table is a two-dimensional array, and each element all is a DijkstraNode categorical data; For explaining conveniently, coordinate hereinafter all refers to the coordinate of relative grid, like picture element (12; 12) coordinate is (1,1).Distance puts 0 with its attribute, and weight w eight puts 0, all not calculating of having a few initially, and beConsidered is changed to false, and net point coordinate coordinate is the relative coordinate of all grids, and the direction track of point on the path is changed to (0,0).Thought according to the Diikstra algorithm; The weights of point that obstacle is arranged on the experimental implementation panel and the point that can not connect up (generally being that meeting produces the point that does not meet the wiring rule shape after connecting up) are made as infinity, and infinity can be represented with the maximum int type variate-value 0x1FFFFFFF that computing machine can be represented.In addition,, give the certain amount of the extra increase of weights of corner, promptly on the basis of original weights, add a fixing increment in order to reduce the turning as far as possible.Following table 1 has provided the design of five kinds of weights and their meaning.
Table 1 weights design table
Figure GDA0000111550830000081
Can set each weights according to the rule of table 1 with respect to current starting point.In addition, in order to obtain the position of flex point, also need use member track.It is the variable of a Point (point) type, the storage current point be by the last point on the path through the path of which kind of direction to this point.Directional information can be used simple overall static array representation a: EXDIR:Array={ (1,0), (1,0), (0,1), (0 ,-1), (0,0) }; Each element of this array representes to the right successively, left, upwards, move downward and keep original position motionless.Each point confirms that earlier current weight is remove CRANKEL_WEIGHT any; Relatively whether current point direction of motion is identical with last spot moving direction again; Identically then do not do any operation, if different will before set on the basis of weights and add a CRANKEL_WEIGHT.
(2) single source path of generation lead starting point.Click the mouse and confirm certain wiring starting point,, then disregard if the point of clicking is not a binding post; If binding post, the platform information that then utilizes step (1) to set up generates single source path of lead starting point.
(2.1) Dijkstra that sets up the wiring starting point shows.Suppose that the wiring starting point coordinate is (5,5).Successively with point (5,5), (6,5), (5,5), (5,4), (5,6) add among the UncalcList.The DijkstraNode information of first point (5,5) of formation is accomplished assignment according to the actual conditions of this point, just himself is removed from the UncalcList formation after this dot information disposes.Use with quadrat method and consider second point (6,5) in the formation, just unduplicated point (7,5), (6,4), (6,6) add formation, accomplish the assignment that point (6,5) is located DijkstraNode.Go down so repeatedly up to from the lead starting point, all net points all dispose according to the method described above on the platform.Fig. 1 is the process flow diagram of this processing procedure.
Assignment processing mode to each point is following:
Step1: write down current coordinate figure.Coordinate and EXDIR [i] (i=0,1,2,3) addition are obtained new coordinate, and i increases by 1.
Step2: if new coordinate points exceeds flat roof area, weights are INFINITE_WEIGHT or had been considered, change Step1; Otherwise change Step3.
Step3: the wire shape at newer coordinate place and i value judge whether wiring meets rule.If conform with rule, the coordinate member of the new coordinate DijkstraNode of place is changed to current coordinate; Variable beConsidered value is made as true; If the Track value that EXDIR [i] and last goes on foot is different, the weight value just adds a CRANKEL_WEIGHT; Track is changed to the value of current EXDIR [i]; Distance was the distance in a last step and the weight w eight sum of current point; This DijktraNode is joined in the UncalcList formation of starting point.If do not conform with rule, then put aside this point, give over to other extensions paths and handle, change Step1.
Step4: repeat Step1-Step3 up to i=3, make the consecutive point of upper and lower, left and right four direction of a point all be expanded.
(2.2) seek the corresponding single source path of wiring starting point.The wiring terminal point of supposing this step is certain point on the platform, utilizes an array Pier to store final path point.Current terminal point is added array Pier and temporary terminal point coordinate, suppose that coordinate is (7,7).This coordinate of usefulness deducts the track value (0,1) of this some DijkstraNode of place, return back to the coordinate (7,6) of previous point on the path, and the track of these two points is identical, then continues rollback up to point (7,5).Because the track value of point (7,5) has become (1,0), explains that variation has taken place the direction of motion of lead, so change point coordinate (7,5) is joined in the array of path, finds a flex point.Repeat top process like this, equate that with the track value of starting point the path point that finally finds is (5,5), (7,5) and (7,7) up to the track of rollback point value.Certainly above-mentioned is fairly simple situation for example; Possibly there are a large amount of barriers between starting point and terminal point in the real process; The path is also complicated than this situation, but owing to all initialization completion in method that has adopted automatic pathfinding and the various information step (2.1), does not hinder and search out the path apace.
Fig. 2 utilizes single Dijkstra table to generate the process flow diagram in path.
(3) utilize starting point and terminal point generation pass result.Same hypothesis wiring terminal point coordinate be (7,7), and this terminal point is binding post, clicks terminal point at this moment and just is equivalent to confirm wiring operations one time.Set out with wiring terminal point (7,7), according to the identical mode of step (2.1)
Set up a new Dijkstra table, this table representative is set out by terminal point and is sought the foundation of shortest path.Travel through two Dijkstra table simultaneously up to finding one all to have the common point of shortest path to starting point and terminal point simultaneously.With the common point of this common point as lead starting point binding post and terminal point binding post, utilize the method in the step (2.2) to repeat to find two paths respectively, analyze and know that this two paths is respectively (5; 5); (7,5) and (7,7); (7,5) combine this two paths to deposit in order and have just obtained the routing path that finally searches out among the array Pier of path.
For reducing operand, improve pathfinding speed, confirm that the wiring terminal point need obtain the relative wiring zone between wiring starting point and terminal point simultaneously.This zone is a rectangular area, it angle point is wiring starting point and terminal point, the Dijkstra table of wiring terminal point only needs foundation in this zone.Because the wiring starting point has been obtained all information of platform, wiring all can search out the path in this zone mostly.Under the few cases, can't find the path in this zone, then 10 lattice all expanded toward upper and lower, left and right four direction in this zone, set up the Dijkstra table of wiring terminal point in new zone.Because the point in original zone all calculates, only need to calculate the point in the zone of expansion this moment, utilize the zone after the expansion to seek the path once more.Repeat above process; Knowing that full platform is all expanded finishes; If all can't find the path at last; The obstacle that point-to-point transmission then is described causes to connect with lead at 2, and this kind situation generally belongs to artificial device and places unreasonable causing, and all can search out the shortest path of connection source and terminal point mostly under the situation.
(4) every lead of record is through the shape in path, and all coordinate points on the thread guide path all need be provided with shape information.Each shape can be represented with an integer constant, can directly obtain the weights information at this coordinate place according to shape.Wire shape information is as shown in table 2.
Table 2 wire shape table
Figure GDA0000111550830000101
If there has been identical lead initial or the end binding post to pass through before the net point, the initial weight of this wire shape is made as LOW_WEIGHT so.If this point is a flex point, just on the basis of its initial value, add a CRANKEL_WEIGHT.In addition, be the weights that the two-dimensional array CellLineStyle of 125*125 writes down each net point shape through the definition element number.Simultaneously; In order to judge whether an existing thread guide path in coordinate points place can reuse fast; Define overall three-dimensional array CellLines and write down the lead information on each net point; First and second dimension element representation mesh coordinate value of this array, all lead information of third dimension element storage through this point.
(5) obtain wire shape.In this experiment porch in the wiring process direct of travel in path have only from left to right, from right to left, from top to bottom, four kinds from top to bottom; The target direction that is called pathfinding; Be that target direction can only be a level or vertical, each direction is all represented with a shaping variable, and is as shown in table 3.
Table 3 path direction definition complete list
Path direction Variable name Value
From left to right LeftToRight 0
From right to left RightToLeft 1
From top to bottom UpToDown 2
From top to bottom DownToUp 3
Unknown direction UnknownDirection 4
Behind path generating algorithm acquisition routing path, just can determine the direct of travel in path very soon according to the coordinate position relation of each point in the path.
(5.1) obtain the wire shape that current wiring produces through this point, this shape belongs to sequence number 0-3 in the table 2, and is a certain among the 8-11.This step need be enumerated the situation of the current direction of all leads and next direction, sets up the mapping relations of two path direction values and wire shape value, and these mapping relations are as shown in table 4.
The mapping relations table of table 4 path direction and wire shape
Figure GDA0000111550830000121
(5.2) original wire shape and new wire shape are combined into new shape state, are about to obtain the combination of shapes of this coordinate position of writing down in shape and the CellLineStyle array, obtain net shape.Rule of combination also is mapping relations, and is as shown in table 5, and this step need be utilized the information in the table 2.
The mapping relations table of the original wire shape of table 5, new wire shape and net shape state
Figure GDA0000111550830000131
Figure GDA0000111550830000141
After (6) wiring operations, institute's cloth lead is accomplished in the self routing process the modification of platform information automatically.Need store lead object Line in addition and be written into the foundation of all leads as other module invokes leads or experiment table.Specifically need to preserve thread guide path point and information such as colour of insulated conductor, lead starting point and terminal point.

Claims (2)

1. the fast automatic wiring method in the electrotechnical, electronic class virtual experimental platform comprises the steps:
(1) initialization experiment porch information is specially:
(1.1) read in the experiment table layout, obtain the device and the existing link information that have been furnished with on the platform, obtain experiment porch width and height, to set up the wiring data structure;
(1.2) according to width that obtains and height; The experiment table area dividing is become the grid of m*n equal sizes; For these grids are set up the Dijkstra table of a m*n, in each grid correspondence table one of same position, each grid is abstract to be the object of a DijkstraNode type; M wherein, n is positive integer; Wherein, The object of each DijkstraNode type comprises needed all information of dijkstra's algorithm, comprises whether the weight w eight at path distance, this grid place, this grid are calculated beConsidered, net point coordinate coordinate and the direction track of this point on the path;
(2) the experiment porch information of utilizing step (1) to set up finds the routing path of arbitrary starting point to any binding post, generates the source path of lead starting point;
(3) utilize starting point and terminal point generation pass result, be specially:
Set up a new Dijkstra table, travel through two Dijkstra tables simultaneously, in two tables, find to make to obtain the common point that starting point and terminal point have bee-line simultaneously;
With the public terminal point of this common point as lead starting point binding post and terminal point binding post, utilize step (2) to find two paths respectively, this two paths is combined to deposit in has in order just obtained final thread guide path in the array of path;
(4) obtain wire shape, accomplish wiring operations
Obtain every thread guide path according to above-mentioned steps, and note the shape of every lead, thereby obtain wire shape, accomplish wiring operations through the path;
Wherein, the detailed process of the source path of generation lead starting point is in the described step (2):
(2.1) Dijkstra that sets up the wiring starting point shows
Set up a fifo queue and handle the point that all are not initialised; Begin its right side, a left side, upper and lower four points are joined this formation successively from the wiring starting point; Consider first point in the formation with same procedure again; To put point adjacent and that be not considered with this first and add the formation afterbody; To the information assignment of the object of the DijkstraNode type of first point of this formation, this first dot information back that disposes just removes himself from said fifo queue, and so circulating repeatedly, all net points all dispose on platform;
(2.2) seek the corresponding single source path of wiring starting point
Add in the array current terminal point on the path and temporary terminal point coordinate, deduct the track value of this some DijkstraNode of place type again with this terminal point coordinate, return back to the coordinate of previous point on the path; The track that compares two points; If variation has taken place in one of their horizontal ordinate or the ordinate direction of motion of lead of then explaining inequality, the coordinate of change point is joined in the array of path, find a flex point; Process above repeating; Equate with the track value of starting point up to the track of rollback point value, just backtracked starting point, thereby accomplish the generation of source path from terminal point.
2. method according to claim 1 is characterized in that, said step (4) detailed process is:
(4.1) at first, set up the mapping relations of two path direction values and shape value; Then, the starting point from the path obtains the wire shape value of each point on the path successively according to mapping relations; At last,, from all possible combination, choose the shape value of coupling, obtain the wire shape that current wiring produces through this point according to the path direction of next point on current path direction and the path:
(4.2) original wire shape is combined into new shape state with new wire shape: original combination of shapes in the relevant grid position on the new shape of current generating step and the experiment porch obtains the net shape on this routing path.
CN2011102765979A 2011-09-16 2011-09-16 Automatic quick wiring method for electric and electronic virtual experiments Active CN102346795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102765979A CN102346795B (en) 2011-09-16 2011-09-16 Automatic quick wiring method for electric and electronic virtual experiments

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102765979A CN102346795B (en) 2011-09-16 2011-09-16 Automatic quick wiring method for electric and electronic virtual experiments

Publications (2)

Publication Number Publication Date
CN102346795A CN102346795A (en) 2012-02-08
CN102346795B true CN102346795B (en) 2012-11-21

Family

ID=45545468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102765979A Active CN102346795B (en) 2011-09-16 2011-09-16 Automatic quick wiring method for electric and electronic virtual experiments

Country Status (1)

Country Link
CN (1) CN102346795B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI503683B (en) * 2013-09-25 2015-10-11 Delta Electronics Inc Connecting method for drawing
CN104699868B (en) * 2013-12-04 2017-10-24 上海华虹宏力半导体制造有限公司 A kind of method of domain increment type wiring
CN103778277B (en) * 2013-12-31 2017-01-11 浙江浙大中控信息技术有限公司 Connecting line drawing optimizing method of sewage treatment simulation software
CN105911450B (en) * 2016-03-22 2018-03-23 重庆大学 Flying probe tester open test method for optimizing route
CN107220448B (en) * 2017-06-06 2020-05-12 北京华大九天软件有限公司 Method and engine for calculating and checking wire path in real time
CN107944106A (en) * 2017-11-14 2018-04-20 天津百利越象模具制造有限责任公司 A kind of pipeline layout optimization method based on PDMS softwares
CN107808061B (en) * 2017-11-20 2021-01-19 北京华大九天软件有限公司 Bidirectional obstacle-crossing wiring method supporting orthogonal and oblique wiring
CN108062446A (en) * 2017-12-19 2018-05-22 杭州力控科技有限公司 Electrical practice training experimental bench analog simulation method and system
CN109165781B (en) * 2018-08-15 2020-11-27 山东鲁能软件技术有限公司 Method and device for calculating single line diagram connection line path of electric power system and terminal equipment
CN110569578B (en) * 2019-08-26 2021-03-30 奇瑞汽车股份有限公司 Quick calculation method for wire path of wire harness diagram
CN110943373B (en) * 2019-11-25 2020-12-04 珠海格力电器股份有限公司 Wiring arrangement method and device for electric cabinet and computer readable storage medium
CN110941940B (en) * 2019-12-04 2023-06-13 杭州广立微电子股份有限公司 3D winding method, storage device and system based on collision detection
CN111582274B (en) * 2020-05-11 2021-05-18 南京航空航天大学 Wire wiring virtual guiding method based on marker
CN112766574B (en) * 2021-01-20 2023-06-09 西安微电子技术研究所 Method for optimizing wiring path in whole machine
CN113435123A (en) * 2021-07-05 2021-09-24 江苏核电有限公司 Three-dimensional simulation training method for secondary circuit of transformer substation cabinet based on 3D technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1963827A (en) * 2006-12-08 2007-05-16 清华大学 Automatic wiring method of analog integrated circuit based on multiple step length labyrinth algorithm
CN101174278A (en) * 2006-11-03 2008-05-07 北京中电华大电子设计有限责任公司 The shortest path real-time searching algorithm of interactive domain instrument
US7577958B1 (en) * 1999-12-09 2009-08-18 Nortel Networks Limited Expediting an operation in a computer system
CN101989310A (en) * 2009-08-07 2011-03-23 鸿富锦精密工业(深圳)有限公司 Automatic system and method of wiring design of circuit board

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7577958B1 (en) * 1999-12-09 2009-08-18 Nortel Networks Limited Expediting an operation in a computer system
CN101174278A (en) * 2006-11-03 2008-05-07 北京中电华大电子设计有限责任公司 The shortest path real-time searching algorithm of interactive domain instrument
CN1963827A (en) * 2006-12-08 2007-05-16 清华大学 Automatic wiring method of analog integrated circuit based on multiple step length labyrinth algorithm
CN101989310A (en) * 2009-08-07 2011-03-23 鸿富锦精密工业(深圳)有限公司 Automatic system and method of wiring design of circuit board

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周文广.基于Dijkstra的自动布线算法的优化及其应用研究.《中国优秀硕士论文电子期刊网》.2009,全文.
基于Dijkstra的自动布线算法的优化及其应用研究;周文广;《中国优秀硕士论文电子期刊网》;20090531;全文 *

Also Published As

Publication number Publication date
CN102346795A (en) 2012-02-08

Similar Documents

Publication Publication Date Title
CN102346795B (en) Automatic quick wiring method for electric and electronic virtual experiments
US8196080B2 (en) Method and system for routing
US6446239B1 (en) Method and apparatus for optimizing electronic design
CN108665117B (en) Calculation method and device for shortest indoor space path, terminal equipment and storage medium
CN101916317B (en) Grid-free model based wiring method of integrated circuit from module to module
CN101702655A (en) Layout method and system of network topological diagram
CN101840202B (en) Functional block intelligent wiring method in modeling of control system
Tang et al. A survey on Steiner tree construction and global routing for VLSI design
CN111080786A (en) BIM-based indoor map model construction method and device
CN110909961B (en) BIM-based indoor path query method and device
CN110555266B (en) Simulation road network data random generation method and system for simulation test
Barnett et al. Coordinated crowd simulation with topological scene analysis
CN103236088A (en) Three-dimensional geological structure modeling method and system based on composite grid
CN116050689B (en) Intelligent searching method, system, terminal and medium for wide-area space railway line
CN112332306A (en) Automatic cable laying method and storage medium
CN111047682A (en) Three-dimensional lane model generation method and system
Grasl et al. GRAPE: using graph grammars to implement shape grammars.
JP2000259682A (en) System and method for automatically arranging parts and recording medium storing automatically arranging parts program
CN115859899A (en) Method for integrated circuit standard unit layout migration with multiple driving capacities
CN113706715B (en) Random controllable city generation method
CN105138711A (en) Primitive indexing method, primitive detecting method, primitive indexing device and a primitive detecting device
Panwar et al. Brief survey of soft computing techniques used for optimization of TSP
Tian et al. An approach to generate spatial Voronoi Treemaps for points, lines, and polygons
CN112149287A (en) Traffic simulation road network graphical segmentation method and system oriented to load balancing
CN108921950A (en) The method and relevant apparatus of three-dimensional cracking simulation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant