Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

File serialization method of model library of physical modeling language Modelica

A technology of modeling language and model library, applied in the direction of program control device, program loading/starting, etc., to achieve the effect of speeding up the loading speed

Inactive Publication Date: 2011-05-04
苏州同元软控信息技术有限公司
View PDF2 Cites 30 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, it can be considered to shorten the loading time of the model library by serializing and deserializing the data of the model library file. Since the existing technology needs to perform lexical / grammatical analysis on the model library text, there is no model library for Modelica at present. Methods for serializing and deserializing files are reported

Method used

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File serialization method of model library of physical modeling language Modelica
  • File serialization method of model library of physical modeling language Modelica
  • File serialization method of model library of physical modeling language Modelica

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0026] Embodiment: Serialize the Modelica model library, including:

[0027] 1) Formulate Dom serialization rules

[0028] Rule 1 Mark the data to be processed with identifiers and distinguish data types

[0029] Such as figure 1 , there are many types of Dom classes, and the serialized content includes the type name of the Dom object, the data of the Dom object, and the file name of the file where the object is located. The present invention designs a set of identification mechanism, and records data through a series of identifiers to distinguish them.

[0030] Rule 1.1 mark the class

[0031] Each class in the Dom type system must be marked in strict accordance with the Modelica language specification. The Dom class structure is designed with reference to the Modelica2.1 specification, saving all the grammatical information of Modelica, but at the same time, for the convenience of operation and understanding, these basic contents are subdivided and expanded, and a...

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

PUM

No PUM Login to View More

Abstract

The invention discloses a file serialization method of a model library of physical modeling language Modelica. The method is characterized by comprising the following steps: while loading the model library for the first time, lexical / syntactic analysis is carried out on source files of the Modelica model library; a document object model (DOM) abstract syntax tree is established; and the data of the DOM abstract syntax tree is saved in serialization destination files by a serialization technology. Meanwhile the invention further discloses a corresponding deserialization method. The method disclosed by the invention has the advantages that by means of the preprocessing course, while loading the model library for the first time, the serialization destination files are generated so as to facilitate loading the model library next time only by directly reading the destination files, thus avoiding lexical / syntactic analysis of the model library every time and greatly accelerating the loading speed of the model library. A Modelica2.1 standard library is taken as an example: while not using the method, the loading time is 300 seconds; and while using the method, the loading time is only 600 milliseconds.

Description

technical field [0001] The invention relates to a method for serializing and deserializing data, in particular to a method for serializing and deserializing a Modelica model library file of a multi-field physical unified modeling language. Background technique [0002] Modelica is an object-oriented, equation-based physical modeling language that adopts a hierarchical component model and has model reusability. Modelica model library technology is one of the basic features of Modelica, and it is a direct means to realize model reuse. Therefore, after the Modelica simulation platform is started, the Modelica model library must be loaded first for user modeling. For the Modelica compiler, the traditional library loading process is divided into three stages: reading the .mo file (that is, the Modelica source file), performing lexical / grammatical analysis on the .mo file, and creating the Dom (Document Object Model) abstract syntax tree. . Lexical / grammatical analysis of .mo f...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/445
Inventor 周凡利唐俊杰郭俊峰田显钊张和华陈立平
Owner 苏州同元软控信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products