Background technology
The development of Along with computer technology and digital photogrammetry technology, they play an increasingly important role in the Electric Power Survey design process, for setting up the three-dimensional visualization design platform possibility are provided.Make the power circuit route selection from traditional figure or open-air route selection change three-dimensional, dynamic route selection pattern into.Two-dimentional route selection platform based on orthography is arranged at present, and based on the three-dimensional line-selection platform of solid coupling chip technology, and based on the flat section ranking platform of line section, they carry out power circuit path optimization from different angles respectively.
Three-dimensional line-selection platform based on solid coupling chip technology is to be the basis with orthography and three-dimensional coupling sheet, sets up three-dimensional stereo model.The generation of three-dimensional coupling sheet is through digital terrain model (DEM) being converted into parallax value, introduction orthography, thereby generation stereoeffect.The three-dimensional stereo model that generates so not only has the characteristics and the function of stereo display of just penetrating, and can also carry out the zone and splice, and sets up the stereoscopic model in whole zone, the more important thing is to have orientation and measuring function.
Flat section ranking platform based on line section then is to be the basis with the digital terrain model, and the section of road along the line center line generates the sectional drawing of each sampled point elevation of center line, and carries out the shaft tower ranking based on section.
Usually, optimize the efficient and the quality of route selection in order to improve power circuit, the power circuit route selection no longer only is confined on the angle.The designer need look squarely angle from the depression angle of circuit, and the section angle is carried out multi-angle, multi-level path optimization.Route selection window relatively more commonly used comprises: orthography route selection window (depression angle), three-dimensional route selection window (three-dimensional depression angle), flat section ranking window (line section angle) and true three-dimensional range window (looking squarely angle).In the route selection process, the designer need be switched above-mentioned four windows continually, so that obtain the circuit relevant information from a plurality of angles, accomplishes the optimization of whole circuit.The power circuit route selection of present stage needs each optimization route selection window to cooperate more closely, accomplishes path optimization's work jointly.
And the route selection of multiwindow cooperate optimization has three important constraints: at first be that synchronization of data property is wanted height; Promptly require in each window same line information highly consistent; Except the power circuit corner coordinate unanimity of necessity, also need the dependent vector information such as atural object in the line range to be consistent.Next is that the integrality of data wants high, because each window demand separately is different, the information content that each window is preserved is also different, when deriving achievement through a window, may cause certain loss of data.Be that Data Update is wanted efficiently promptly to require the Data Update speed of each window fast, when line information changes at last; Each window needs to upgrade synchronously; If renewal speed is slow,, reduce the efficient of the collaborative route selection of multiwindow greatly with having a large amount of resources and time waste on Data Update.
Usually, in the optimization route selection process of power circuit, the designer need utilize Different software to open each route selection window, accomplishes the power circuit route selection, and mutual between each software then is that the mode through file realizes.
Concrete know-why is as shown in Figure 1:
The designer carries out the preliminary route selection of power circuit through route selection modular program A, gathers the terrestrial object information of circuit through the zone simultaneously, generates plane cross section (being file 1) derivation according to route selection result and terrestrial object information;
And then open said file 1 through flat section ranking modular program B, and check the flat section information of circuit, and analyze through on said plane cross section, carrying out the shaft tower ranking, confirm above-mentioned preliminary route selection result's feasibility.If the primary election result is infeasible, then according to the flat section ranking information of correspondence, the circuit angle position among the update routine A carries out the shaft tower ranking through program A export 1 to program B once more and analyzes, and until in program B, said primary election result's ranking is passed through.
After said primary election result's ranking is passed through; Program B exports to file 2 and file 3 with the ranking result; And import respectively among route selection program A and the three-dimensional range program C; Wherein, said file 2 all is the ranking result that program B produces with file 3 records, and the two is directed against the file format requirements of program A and program C and exports to the corresponding file form respectively.Verify the ranking result's of record in said file 2 and the file 3 feasibility respectively through program A and program C.If the ranking result is infeasible, then need corresponding said ranking result of modification or primary election result, again the ranking result is imported to program A and program C respectively.
Optimizing the route selection process from above-mentioned power circuit can draw; Prior art is through between each program, constantly importing and exporting the processing file; Accomplish of the interactive operation of each program to same circuit; And when Consideration that needs in the above-mentioned optimization route selection process and angle increase, the complexity of optimizing process will become the rising of geometry multiples.
The power circuit of prior art is optimized selection method and is had following shortcoming:
1) reaction velocity is slow: since each route selection program between be to accomplish alternately through the mode of file; So when the information in some route selection programs changes; Just need export to the formatted file of other route selection programs respectively, and in other route selection program, open again and accomplish file interaction.When a variant projects of location was frequently revised, importing and exporting of file will be wasted great amount of time and manpower like this.
2) complicated operation: when the file layout between each route selection program was not exclusively compatible, the designer need carry out format conversion to file in importing and exporting the corresponding file process.Constantly import and export, program is switched and the operation of format conversion, will cause designer's complex operation and complicacy in the whole optimization route selection process.
3) data integrity is low: because each route selection program has the file layout of oneself supporting respectively; So when a route selection program export and when converting the file that another route selection program supports into; More or less have certain information loss, and the conversion of file layout repeatedly will cause data degradation to increase.
Summary of the invention
The technical matters that the present invention will solve is to provide a kind of power circuit that can carry out the multiwindow interactive operation easily to optimize selection method.
A kind of power circuit is optimized selection method, may further comprise the steps: set up the shared drive zone; In said shared drive zone, preserve the vector file of power circuit route selection, wherein, said vector file is preserved the integrated data of a plurality of route selection windows according to predefined common protocol (disclosed data layout); Create one or more route selection windows; The window handle of the route selection window of creating is registered in said shared drive zone respectively; Resolve said vector file according to said common protocol, data read corresponding in the said vector file is got in each said route selection window of having created shown respectively; When said route selection window receives operational order, convert said operational order into operation information according to said common protocol to said vector file; According to said operation information said vector file is carried out corresponding modification.
Wherein, said route selection window includes but not limited to: orthography route selection window, three-dimensional route selection window, flat section ranking window, and true three-dimensional range window.
The technical matters that the present invention will solve also is to provide a kind of power circuit that can carry out the multiwindow interactive operation easily to optimize wire selection system.
A kind of power circuit is optimized wire selection system, and comprising: memory management module is used to set up the shared drive zone; Data management module is used for preserving in said shared drive zone the vector file of power circuit route selection, and wherein, said vector file is preserved the integrated data of a plurality of route selection windows according to predefined common protocol; The window management module is used to create one or more route selection windows, and the window handle of the route selection window of creating is registered in said shared drive zone respectively; Display module is used for resolving said vector file according to said common protocol, data read corresponding in the said vector file is got in each said route selection window of having created to show respectively; Said window management module is further used for receiving operational order through each said route selection window, and converts said operational order into to said vector file operation information according to said common protocol; Said data management module is carried out corresponding modification according to said operation information to said vector file.
Wherein, said route selection window includes but not limited to: orthography route selection window, three-dimensional route selection window, flat section ranking window, and true three-dimensional range window.
Compared with prior art; Power circuit of the present invention is optimized in selection method and the system thereof; Set up the shared drive zone, preserve the vector file of a plurality of route selection window integrated datas of record, and create several route selection windows simultaneously; Each route selection window reads said vector file respectively and accomplishes route selection data presentation separately, therefore can carry out power circuit from a plurality of angles synchronously and optimize route selection.When the user revised data in route selection window therein, the data in the said vector file were revised by correspondence, and the display synchronization of other each route selection windows is changed, and can carry out the electric power of multiwindow simultaneously easily and optimize route selection.
Accomplish the synchronous demonstration of orthography route selection, three-dimensional route selection, flat section ranking and four route selection windows of true three-dimensional range based on the mode in shared drive zone.Reaction velocity is slow when having eliminated power circuit and optimizing orthography route selection window in the route selection process, three-dimensional route selection window, flat section ranking window and true three-dimensional range window and switch, and complicated operation, the shortcoming of data degradation is arranged.
Have the following advantages:
1) in the shared drive zone, deposits vector file; Need not import and export file between each route selection window; When the Vector Message in some route selection windows wherein changes; Vector file in will direct modification shared drive zone, and send message and make the vector file after other route selection windows read renewal, update displayed content.Accomplish the real-time update of data presentation in a plurality of route selection windows with this, renewal speed imports and exports the speed of file greatly faster than designer in the prior art.
2) a plurality of route selection window co-operate read same vector file update displayed content respectively with the vector file in a slice shared drive zone, and no longer constantly changeover program has been simplified operation of designer greatly to show corresponding route selection window.
3) because each route selection window uses is same vector file, each route selection window directly reads information required separately in the said vector file, when any route selection window modification vector, can not cause the information dropout in other route selection windows.Solved in the prior art power circuit and optimized in the route selection process, file imports and exports the problem that causes data degradation between each program.
Embodiment
See also Fig. 2, Fig. 2 is the process flow diagram that power circuit of the present invention is optimized selection method.
Said power circuit is optimized selection method and may further comprise the steps:
Step S201 sets up the shared drive zone;
In calculator memory, open up a shared region.
Step S202 preserves the vector file of power circuit route selection in said shared drive zone, wherein, said vector file is preserved the integrated data of a plurality of route selection windows according to predefined common protocol (being disclosed data layout);
The integrated data of each said route selection window comprises: each point three-dimensional coordinate, the coordinate of vector atural object, attribute on the image, the coding (system is self-defined) of vector and point, annotation (pattern, size, coordinate); Adeditive attribute: the attribute of tower, rotation angle, exhale height, more open, sag etc.; Relevant informations such as circuit corner coordinate and center line, sideline, the left and right sides, section line.
The mode that adopts 2 system files in said shared drive zone according to predefined common protocol preserve power circuit and vector atural object three-dimensional coordinate and turriform, follow open, information such as sag, constitute said vector file.As preferred embodiment a kind of; The information of putting down in writing in the said vector file comprises the integrated data of four route selection windows; Said four route selection windows comprise: orthography route selection window, three-dimensional route selection window, flat section ranking window, and true three-dimensional range window.Because the required information basically identical of each said route selection window, but the manifestation mode in each route selection window is different, therefore, needs to set the data storing form of a common protocol definition vector file and read the position.Make each said route selection window from said vector file, read required separately information according to said common protocol.The content of said common protocol comprises that the data of said vector file form form, the position of the coded message of the coordinate of vector, attribute, vector and point etc. for example, also comprise each said route selection window to the parsing of said vector file, read mode.
Step S203 creates one or more route selection windows;
The optimization route selection angle that each said route selection window is corresponding different respectively.For example a plurality of route selection windows are respectively orthography route selection window, three-dimensional route selection window, flat section ranking window, and true three-dimensional range window.
Step S204 registers the window handle of the route selection window of creating respectively in said shared drive zone;
Window handle is equivalent to the sign ID of window, and the window handle of each said route selection window is registered in said shared drive zone, and then said shared drive zone passage window handle finds corresponding route selection window to accomplish the transmission of message.
Step S205 resolves said vector file according to said common protocol, data read corresponding in the said vector file is got in each said route selection window of having created to show respectively.
Since said shared protocol definition each said route selection window read the mode of said vector file; Also defined the reference position that reads said shared drive zone; Therefore can read said vector file according to said shared agreement, in each said route selection window, show route selection operation and result then.
The information basically identical that each said route selection window is required, but the manifestation mode that in each said route selection window, shows is different.In orthography route selection window, be expressed as the rectangle that has defined tower position coordinate, adjacent column foot length and rotation angle such as tower; In flat section ranking window, be expressed as two Vitas (line segment) that defined tower height, coordinate, in the three-dimensional range window, be expressed as the tower of three-dimensional model.
Optimize in the selection method at power circuit of the present invention, when each said route selection window receives operational order, convert said operational order into operation information according to said common protocol said vector file; And then said vector file is carried out corresponding modification according to said operation information.Share because said vector file is a plurality of route selection windows, therefore, as a preferred implementation, after the operation information of the said route selection window according to one of them was revised said vector file, each said route selection window sent display update message to all the other; After each said route selection window receives said display update message, refresh displaying contents separately according to amended vector file.The real-time update that keeps the common data source of each said route selection window makes the operation of each said route selection window synchronous.
Further, when receiving the instruction of said route selection close, nullify the window handle that said route selection window is registered in said shared drive zone; Close corresponding said route selection window.Because only nullify the window handle that it is registered therein during a route selection close in said shared drive zone; And be not to close said shared drive zone; Therefore; Closing of some route selection windows do not change said vector file, and perhaps said shared drive zone can not impact the demonstration of other route selection windows.
And when receiving the instruction of route selection end (or closing the instruction of route selection master routine); Then discharge the shared drive zone: at first nullify the window handle that all route selection windows are registered in said shared drive zone, and close all route selection windows according to following process step; Preserve said vector file then; Discharge said shared drive zone at last.Finish in route selection; When closing the route selection master routine; At first nullify all serial ports, preserve vector file, and then discharge the shared drive zone; Make each said route selection window all obtain preserving, preserve the up-to-date modification of user the route selection data in the said vector file to the final operation and the modification of said vector file.
Compared with prior art; Power circuit of the present invention is optimized selection method and is set up the shared drive zone; Preserve the vector file of the integrated data of a plurality of route selection windows of record; And create several route selection windows simultaneously, each route selection window reads said vector file respectively and accomplishes route selection data presentation separately, therefore can carry out power circuit from a plurality of angles synchronously and optimize route selection.When the user revised data in route selection window therein, the data in the said vector file were revised by correspondence, and the display synchronization of other each route selection windows is changed, and can carry out the electric power of multiwindow simultaneously easily and optimize route selection.
In a preferred implementation, use MVC (Model-View-Controller, model-view-controller) framework to make up power circuit of the present invention and optimize route selection software.
Separate according to model, view the input of an application, processing, output flow process with the mode of controller in the MVC framework, such application is divided into three layers---model layer, view layer, key-course.Event (incident) causes controller to change model or view, perhaps changes both simultaneously.As long as controller has changed the data or the attribute of model, the view of all dependences all can upgrade automatically.Similarly, as long as controller has changed view, view can obtain data and refresh oneself from potential model.Because model, view separate with controller, make a model can have a plurality of demonstration views.If the user has changed the data of model through the controller of certain view, all other views that depend on these data all should be reflected to these variations.Therefore, no matter when which kind of data variation has taken place, the view that controller all can be all with change notification causes the renewal that shows.This is actually a kind of variation-mechanism of transmission of model.
In the present invention, view is the route selection window, and model is the data relationship of the vector file in the internal memory, various computings etc., and control is the transmission of message, the change of notification data, the renewal of demonstration etc.Said shared protocol definition each said route selection window read the reference position in said shared drive zone, what guaranteed that each said route selection window reads is with a slice internal memory, such mutual relationship has been guaranteed the corresponding of internal memory and view.
See also Fig. 3, Fig. 3 is the structural representation that power circuit of the present invention is optimized wire selection system.
Said power circuit is optimized wire selection system and is comprised: memory management module 31, data management module 32, window management module 33 and display module 34.Said memory management module 31 is used to set up the shared drive zone; Said data management module 32 is used for preserving in said shared drive zone the vector file of power circuit route selection, and wherein, said vector file is preserved the integrated data of a plurality of route selection windows according to predefined common protocol; Said window management module 33 is used to create one or more route selection windows, and the window handle of the route selection window of creating is registered in said shared drive zone respectively; Said display module 34 is used for resolving said vector file according to said common protocol, data read corresponding in the said vector file is got in each said route selection window of having created to show respectively.
The mode that said data management module 32 adopts 2 system files in said shared drive zone according to predefined common protocol preserve power circuit and vector atural object three-dimensional coordinate and turriform, follow open, information such as sag, constitute said vector file.As preferred embodiment a kind of; The information of putting down in writing in said a plurality of vector file comprise four route selection windows integrated data; Said four route selection windows comprise: orthography route selection window, three-dimensional route selection window, flat section ranking window, and true three-dimensional range window.The integrated data of each said route selection window comprises: each point three-dimensional coordinate, the coordinate of vector atural object, attribute on the image, the coding (system is self-defined) of vector and point, annotation (pattern, size, coordinate); Adeditive attribute: the attribute of tower, rotation angle, exhale height, more open, sag etc.; Relevant informations such as circuit corner coordinate and center line, sideline, the left and right sides, section line.
Owing to the required information basically identical of each said route selection window, but the manifestation mode in each said route selection window is different, therefore, needs to set the data storing form of a common protocol definition vector file and read the position.Make each said route selection window from said vector file, read required separately information according to said common protocol.The content of said common protocol comprises the data composition form of said vector file; Position of the coded message of the coordinate of vector, attribute, vector and point etc. for example; Also comprise each said route selection window to the parsing of said vector file, read mode, specifically set by the user.Said data management module 32 stores the integrated data of each said route selection window according to said common protocol.
The optimization route selection angle that each said route selection window that said window management module 33 is created is corresponding different respectively according to user's needs.For example a plurality of route selection windows are respectively orthography route selection window, three-dimensional route selection window, flat section ranking window; And true three-dimensional range window, corresponding respectively depression angle, three-dimensional depression angle, line section angle and the three-dimensional route selection result who looks squarely angle show.
Said window management module 33 is registered the window handle of each said route selection window in said shared drive zone, then said shared drive zone passage window handle finds corresponding route selection window to accomplish the transmission of message.
Said display module 34 is resolved said vector file according to said common protocol, data read corresponding in the said vector file is got in each said route selection window of having created to show respectively.
Since said shared protocol definition each said route selection window read the mode of said vector file; Also defined the reference position that reads said shared drive zone; Therefore said display module 34 can read said vector file according to said shared agreement, in each said route selection window, shows route selection operation and result then.
Though the information basically identical that each said route selection window is required, the manifestation mode that in each said route selection window, shows is different.In orthography route selection window, be expressed as the rectangle that has defined tower position coordinate, adjacent column foot length and rotation angle such as tower; In flat section ranking window, be expressed as two Vitas (line segment) that defined tower height, coordinate, in the three-dimensional range window, be expressed as the tower of three-dimensional model.
Optimize in the wire selection system at power circuit of the present invention, when said window management module 33 receives operational order through each said route selection window, convert said operational order into operation information according to said common protocol said vector file; According to said operation information said vector file is carried out corresponding modification by said data management module 32 then.Because being a plurality of route selection windows, shares said vector file; Therefore; As a preferred implementation, after the operation information of said data management module 32 said route selection window according to one of them is revised said vector file, the display update message of sending all the other each said route selection windows; Said window management module 33 refreshes displaying contents separately according to said display update message according to amended vector file.The real-time update that keeps the common data source of each said route selection window makes the operation of each said route selection window more synchronous.
Further, when said window management module 33 receives the instruction of said route selection close, nullify the window handle that said route selection window is registered in said shared drive zone, and close corresponding said route selection window.Because said window management module 33 is only nullified the window handle that it is registered therein during a route selection close in said shared drive zone; And be not to close said shared drive zone; Therefore; Closing of some route selection windows do not change said vector file, and perhaps said shared drive zone can not impact the demonstration of other route selection windows.
And when said window management module 33 receives the instruction of route selection end (or closing the instruction of route selection master routine); Then said window management module 33 is at first nullified the window handle that all route selection windows are registered in said shared drive zone, and closes all route selection windows; Notify said data management module 32 to preserve said vector file then; Last said memory management module 31 discharges said shared drive zone.Finish in route selection; When closing the route selection master routine; At first nullify all serial ports, preserve vector file, and then discharge the shared drive zone; Make each said route selection window all obtain preserving, preserve the up-to-date modification of user the route selection data in the said vector file to the final operation and the modification of said vector file.
Compared with prior art; Power circuit of the present invention is optimized in the wire selection system; Said memory management module is set up the shared drive zone, and said data management module is preserved the vector file of the integrated data of a plurality of route selection windows of record, and said window management module is created several route selection windows simultaneously; Said display module reads said vector file respectively at each route selection window and accomplishes route selection data presentation separately, therefore can carry out power circuit from a plurality of angles synchronously and optimize route selection.When the user revised data in route selection window therein, the data in the said vector file were revised by correspondence, and the display synchronization of other each route selection windows is changed, and can carry out the electric power of multiwindow simultaneously easily and optimize route selection.
Power circuit optimization selection method of the present invention and system thereof compared with prior art have the following advantages:
1) in the shared drive zone, deposits vector file; Need not import and export file between each route selection window; When the Vector Message in some route selection windows wherein changes; Vector file in will direct modification shared drive zone, and send message and make the vector file after other route selection windows read renewal, update displayed content.Accomplish the real-time update of data presentation in a plurality of route selection windows with this, renewal speed imports and exports the speed of file greatly faster than designer in the prior art.
2) a plurality of route selection window co-operate read same vector file update displayed content respectively with the vector file in a slice shared drive zone, and no longer constantly changeover program has been simplified operation of designer greatly to show corresponding route selection window.
3) because each route selection window uses is same vector file, each route selection window directly reads information required separately in the said vector file, when any route selection window modification vector, can not cause the information dropout in other route selection windows.Solved in the prior art power circuit and optimized in the route selection process, file imports and exports the problem that causes data degradation between each program.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of within spirit of the present invention and principle, being done, be equal to replacement and improvement etc., all should be included within the claim protection domain of the present invention.