CN101546348A - Model base icon display method based on physical modeling language - Google Patents

Model base icon display method based on physical modeling language Download PDF

Info

Publication number
CN101546348A
CN101546348A CN200910029414A CN200910029414A CN101546348A CN 101546348 A CN101546348 A CN 101546348A CN 200910029414 A CN200910029414 A CN 200910029414A CN 200910029414 A CN200910029414 A CN 200910029414A CN 101546348 A CN101546348 A CN 101546348A
Authority
CN
China
Prior art keywords
model
icon
file
icon display
model base
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.)
Pending
Application number
CN200910029414A
Other languages
Chinese (zh)
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.)
SUZHOU TOPRANK INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SUZHOU TOPRANK INFORMATION TECHNOLOGY Co Ltd
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 SUZHOU TOPRANK INFORMATION TECHNOLOGY Co Ltd filed Critical SUZHOU TOPRANK INFORMATION TECHNOLOGY Co Ltd
Priority to CN200910029414A priority Critical patent/CN101546348A/en
Publication of CN101546348A publication Critical patent/CN101546348A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a model base icon display method based on a physical modeling language, which is characterized by comprising a preprocessing course and an icon display course; the preprocessing course is as follows: resolving a model base and sequentially generating the icon of each model according to files and the model ergodic sequence during loading and displaying the model base and writing the icon of each model into an icon file; the icon display course is as follows: reading the corresponding model icon from the icon file according to an ergodic sequence in the process of loading and displaying the model base and displaying the model icon into the window of the model base. The invention only needs to directly read icons from the icon file to display without constructing the model icon in real time during loading and displaying the model base, thereby greatly quickening the loading and displaying courses of the model base.

Description

Model base icon display method based on physical modeling language
Technical field
The present invention relates to a kind of Multi-disciplinary Modeling and simulation software based on physical modeling language, be specifically related to a kind of in modeling and simulation software the method for display model storehouse icon.
Background technology
The Simulation X of Dymola that Sweden Dynasim AB company is arranged based on Multi-disciplinary Modeling and the emulation tool of physical modeling language Modelica and German ITI GmbH company.In these two sections of commercial products and other disclosed instruments of increasing income, load and the efficiency that all exists above the demonstration in various degree in model bank.For the ease of the model in user's identification and the preference pattern storehouse, in the model loading procedure, these softwares can be according to the real-time generation model icon of the icon depicting code in the model bank, it is presented at before the model name, speed was slow when this disposal route caused each loaded and displayed model bank again.
Summary of the invention
The object of the invention provides a kind of model base icon display method based on physical modeling language, to accelerate the loaded and displayed speed of model bank.
For achieving the above object, the technical solution used in the present invention is: a kind of model base icon display method based on physical modeling language comprises preprocessing process and icon display process;
Described preprocessing process is that the analytic model storehouse to the model traversal order in file and the file, generates the icon of each model during according to the loaded and displayed model bank successively, writes in the icon file;
Described icon display process is in loaded and displayed model bank process, to read in corresponding model icon according to the model traversal order from described icon file, and be shown in the model bank window.
In the technique scheme, in the described preprocessing process, each illustraton of model target generative process is, determine the title of this model correspondence and describe code according to ergodic process, from describe code, determine the model inheritance, collect how much lines and the positional information and the display properties of icon according to the description code of this model and the description code of inheriting model thereof, according to the size requirements of icon how much lines are carried out convergent-divergent then, generate icon object by the mode of drawing lines at last.
In actual use, can adopt as required depth-first search (Depth First Search, DFS) or BFS (Breadth First Search) (Board First Search, traversal mode BFS) are carried out to orderization the read operation and the write operation of icon; Also can in icon file, increase with the related information of model so that carry out the icon retrieval.After carrying out model bank change (comprise increase, deletion, revise) at every turn, need to carry out once described preprocessing process, its implementation can be, carrying out model bank after changing at every turn, the deletion icon file is set when starting in software and is searched icon file automatically, if do not find icon file, then carry out above-mentioned preprocessing process, generate icon file.
Because the technique scheme utilization, the present invention compared with prior art has following advantage:
The present invention passes through preprocessing process, in advance model bank is traveled through, generate icon file, thereby when loading and display model storehouse, only needing directly read from icon file icon shows and gets final product, avoid carrying out the explanation of model icon depicting code, the collection of how much lines and the drafting generating run of icon at every turn, accelerated the loading and the procedure for displaying of model bank greatly.
Description of drawings
Fig. 1 is a model bank file structure synoptic diagram among the embodiment one;
Fig. 2 loads among the embodiment one and the icon display synoptic diagram during the display model storehouse.
Embodiment
Below in conjunction with drawings and Examples the present invention is further described:
Embodiment one: a kind of model base icon display method based on physical modeling language comprises preprocessing process and icon display process;
Described preprocessing process is that the analytic model storehouse to the model traversal order in file and the file, generates the icon of each model during according to the loaded and displayed model bank successively, writes in the icon file;
Described icon display process is in loaded and displayed model bank process, to read in corresponding model icon according to the model traversal order from described icon file, and be shown in the model bank window.
Illustrate as follows with an illustraton of model target generative process:
The analytic model storehouse is adopted serializing " to write " mode model icon sequential write is gone into icon file in advance.
In the loaded and displayed model bank process, adopt serializing " to read " mode the model icon is read in, and be shown in the model bank window.
Illustraton of model is demarcated adopted fragment (is example with resistance R esistor):
model?Resistor"Ideal?linear?electrical?resistor"
extends?OnePort;
... // annotate, the description code irrelevant with the model icon replaces with suspension points, down together
annotation(......,
Coordsys(
extent=[-100,-100;100,100]),......
),
Icon(
Rectangle(extent=[-70,30;70,-30],style(
color=3,
fillColor=7,
fillPattern=1)),
Line(points=[-90,0;-70,0]),
Line(points=[70,0;90,0]),
Text(
extent=[-144,-60;144,-100],
string="R=%R",
style(color=0)),
Text(extent=[-144,40;144,100],string="%name")),
......
);
......
end?Resistor;
With above-mentioned code is example, and it is as follows to form illustraton of model target step:
1. read in the extent numerical value of Coordsys among the annotation,, constitute a plane coordinate system as lower-left point (100 ,-100), upper right point (100,100).
2. read in the positional information and the display properties of how much lines of Icon among the annotation, as rectangle Rectangle, the positional information of this rectangle comprises the lower-left point (70,30) with respect to plane coordinate system, upper right point (70 ,-30); The display properties of this rectangle comprises color code color=3 (" 3 " expression is blue), fill color fillColor=7 (" 7 " expression white), filling mode fillPattern=1 (" 1 " represents solid filling).Other how much lines such as line segment (Line) are also done similar processing.Do not contain literal in the attention model icon, so the relevant description code of literal (Text) is left in the basket.
3. read in extends OnePort, determine that model Resistor inherits from model OnePort, recursively reads in the icon depicting code from the OnePort model.Recurrence processing procedure and step 1., 2. identical.Notice that the icon information of a model is derived from the icon depicting code of this model self, and the description code of the succession model of this model.
4. according to the actual size of icon to step 1., 2., 3. in how much collected lines carry out convergent-divergent, be 16 * 16 as typical icon sizes, then need position with above-mentioned lines from coordinate system (100,-100) * (100,100) transform to interval, (8 ,-8) * (8,8).
5. construct an icon object, draw out lines how much according to the positional information of how much lines and the demonstration api interface of display properties call operation system.
6. call file serializing interface the binary data of icon is write icon file.
The Modelica model bank shows as file or file, shown in accompanying drawing 1, Modelica 1.6 model banies comprise piece figure (Blocks), electric (Electrical), mathematics (Math), machinery (Mechanics), calorifics word banks such as (Thermal), and electric (Electrical) nested simulation electric (analog) and heterogeneous word banks such as (MultiPhase), concrete model information is stored in the corresponding mo file.
Lead to and go over pre-service, file and mo file in the traversal model bank catalogue find the icon information of all models in the model bank, are specially mo file annotation text, generate icon according to said process, according to the model traversal order icon paradeization " is write " and gone into icon file.
Traversal order to file and file during the loaded and displayed model bank is identical with the traversal order of above-mentioned preprocessing process, when reading in a model, the binary data of icon file " is read " in serializing, be converted into the needed form of interface display, be shown among the model tree, as shown in Figure 2.
In the ergodic process of loaded and displayed model, do not have real-time tectonic model icon, therefore accelerated the loaded and displayed speed of model bank widely.

Claims (2)

1. the model base icon display method based on physical modeling language is characterized in that: comprise preprocessing process and icon display process;
Described preprocessing process is that the analytic model storehouse to the model traversal order in file and the file, generates the icon of each model during according to the loaded and displayed model bank successively, writes in the icon file;
Described icon display process is in loaded and displayed model bank process, to read in corresponding model icon according to the model traversal order from described icon file, and be shown in the model bank window.
2. the model base icon display method based on physical modeling language according to claim 1, it is characterized in that: in the described preprocessing process, each illustraton of model target generative process is, determine the title of this model correspondence and describe code according to ergodic process, from describe code, determine the model inheritance, collect how much lines of icon according to the description code of this model and the description code of succession model thereof, according to the size requirements of icon how much lines are carried out convergent-divergent then, generate icon object by the mode of drawing lines at last.
CN200910029414A 2009-04-13 2009-04-13 Model base icon display method based on physical modeling language Pending CN101546348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910029414A CN101546348A (en) 2009-04-13 2009-04-13 Model base icon display method based on physical modeling language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910029414A CN101546348A (en) 2009-04-13 2009-04-13 Model base icon display method based on physical modeling language

Publications (1)

Publication Number Publication Date
CN101546348A true CN101546348A (en) 2009-09-30

Family

ID=41193481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910029414A Pending CN101546348A (en) 2009-04-13 2009-04-13 Model base icon display method based on physical modeling language

Country Status (1)

Country Link
CN (1) CN101546348A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593113A (en) * 2013-11-21 2014-02-19 乐视致新电子科技(天津)有限公司 Method and device for opening folder
CN104268346A (en) * 2014-09-30 2015-01-07 中国人民解放军国防科学技术大学 Implementation method for simulation application of visual integrated environment on basis of object class interaction diagrams
CN104268002A (en) * 2014-09-30 2015-01-07 中国人民解放军国防科学技术大学 Simulation object visual development environment implementation method based on port encapsulation

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593113A (en) * 2013-11-21 2014-02-19 乐视致新电子科技(天津)有限公司 Method and device for opening folder
CN103593113B (en) * 2013-11-21 2016-08-31 乐视致新电子科技(天津)有限公司 A kind of method and device of opened file folder
CN104268346A (en) * 2014-09-30 2015-01-07 中国人民解放军国防科学技术大学 Implementation method for simulation application of visual integrated environment on basis of object class interaction diagrams
CN104268002A (en) * 2014-09-30 2015-01-07 中国人民解放军国防科学技术大学 Simulation object visual development environment implementation method based on port encapsulation
CN104268346B (en) * 2014-09-30 2018-06-22 中国人民解放军国防科学技术大学 A kind of implementation method of the Simulation Application visualization the integration environment based on object class interaction figure
CN104268002B (en) * 2014-09-30 2019-02-01 中国人民解放军国防科学技术大学 A kind of simulation object visual development environment implementation method based on port encapsulation

Similar Documents

Publication Publication Date Title
CN102541521B (en) Automatic operating instruction generating device based on structured query language and method
CN111400899B (en) Processing method, system and storage medium for cable laying modeling
CN101308488B (en) Document stream type information processing method based on format document and device therefor
CN103034502B (en) A kind of method embedding dynamic realtime monitoring chart in SVG interface
CN104503957B (en) A kind of formula graphic automatic generation method and device
CN105550247A (en) SVG standard customizable graphic symbol based power system graphic display method
CN106776633A (en) The apparatus and method that what user can configure automatically generate a2l files
CN113326314B (en) Data visualization method, device, electronic equipment and readable storage medium
CN105528418A (en) Design document generation method and apparatus
CN108089858B (en) Method and device for creating visual interface
CN114969586A (en) BIM (building information modeling) graphic engine loading method and device based on WEB side
CN113158321A (en) BIM-based pile foundation engineering digital-analog visualization method
CN111506686B (en) Real estate CAD graph and data association-based processing method and device
CN103164228B (en) A kind of generation method of field programmable gate array program and device
CN106709985A (en) Generation method and device for virtual three-dimensional sacrifice scene
CN104375814A (en) Generation method and device of an interface document
CN109086515B (en) Modeling method for primary equipment drawing information in SSD (solid State drive) of intelligent substation based on SVG (scalable vector graphics)
CN101546348A (en) Model base icon display method based on physical modeling language
CN110516333A (en) Device layout methods, device, equipment and readable storage medium storing program for executing in a kind of PCB
CN117234939A (en) Program positioning method, device, electronic equipment and storage medium
CN102722621A (en) Method for visualizing computed result of finite element method
KR101473530B1 (en) Program creation supporting device and program creation supporting method
CN110502735B (en) Method and system for quickly manufacturing universal process file of electronic equipment
CN106599502A (en) Mine ventilation network visual and real-time calculating system
CN103455548A (en) Method for realizing DWG graphic attribute and database synchronization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20090930