CN105447224A - Modelica model simulation analysis report automatic generation method - Google Patents

Modelica model simulation analysis report automatic generation method Download PDF

Info

Publication number
CN105447224A
CN105447224A CN201510752551.8A CN201510752551A CN105447224A CN 105447224 A CN105447224 A CN 105447224A CN 201510752551 A CN201510752551 A CN 201510752551A CN 105447224 A CN105447224 A CN 105447224A
Authority
CN
China
Prior art keywords
model
excel
file
simulation
modelica
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
CN201510752551.8A
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 CN201510752551.8A priority Critical patent/CN105447224A/en
Publication of CN105447224A publication Critical patent/CN105447224A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/36Circuit design at the analogue level
    • G06F30/367Design verification, e.g. using simulation, simulation program with integrated circuit emphasis [SPICE], direct methods or relaxation methods

Abstract

The present invention discloses a Modelica model simulation analysis report automatic generation method. The method comprises the following steps: opening a model in Excel, acquiring a model file path by the Excel, finding a model file according to the model file path; calling an MWorks software automation interface in a COM (Component Object Model) mode, and loading the model file; performing lexical and grammatical analysis on the model to determine whether the model has errors, if yes, prompting the errors, and ending the procedure; if the model has no error, proceeding to the next step; generating a model component view in the Excel, and translating the model to generate a simulator; extracting a parameter in the model, and displaying the parameter in a dialog box for modification performed by a user; and after finishing simulation, reading in simulation result file data. According to the method disclosed by the present invention, modeling personnel can conveniently and quickly generate a simulation analysis report of a Modelica model and automatically update the report during model altering; moreover, data analysis can be performed by using a variable data table.

Description

Modelica model emulation analysis report automatic generation method
Technical field
The present invention relates to a kind of simulation analysis report automatic generation method, particularly relate to the automatic generation method that a kind of Modelica model realizes simulation analysis report in Excel.
Background technology
Modelica model modeling software such as MWorks, Dymola do not provide the function generating simulation analysis report.
Based on the modeling of Modelica language, simulation report is generated by hand by user usually, the most general mode still in modeling software sectional drawing be inserted in document.This Method compare trouble, particularly model or model data many time waste time and energy.
When model has change, manually created simulation report can not upgrade automatically, still needs by the manual repetitive operation of the step of report generation one time.
Summary of the invention
The object of the invention is to the above problem overcoming prior art existence, provide a kind of Modelica model emulation analysis report automatic generation method, it can allow modeling personnel write simulation analysis report quickly and easily.
For realizing above-mentioned technical purpose, reach above-mentioned technique effect, the present invention is achieved through the following technical solutions:
A kind of Modelica model emulation analysis report automatic generation method, comprises the following steps:
Step one, opens model in Excel, and Excel obtains model file path, finds model file accordingly;
Step 2, calls MWorks software automation interface by COM mode, stress model file;
Step 3, carries out morphology grammatical analysis to model, and whether judgment models is wrong, wrong, points out mistake, terminates program; Model does not have mistake, enters next step;
Step 4, generation model component view in Excel, and translation model generates emulator;
Step 5, the parameter display in extraction model is revised by user in dialog box, and Dynamic simulation device after amendment confirms, carries out model emulation calculating, Output simulation destination file;
Step 6, after emulation terminates, reads in simulation result file data, variable in dialog box in display model, by user select need in report the variable of formation curve, after selecting to confirm, in Excel, generate the form of these variate-values and the curve of variable change;
Step 7, if again open Excel file, whether detection model has change, if change, enters next step, otherwise terminates program;
Step 8, carries out morphology grammatical analysis to model, and whether judgment models is wrong, if do not have mistake, regenerates model component view replace old view according to new model; Otherwise end program;
Step 9, again translation model carry out simulation calculation, according to the new result more curve of new variables and list data.
Further, described automation function is the com automation Interface realization being called MWorks software in Excel by VBA.
The invention has the beneficial effects as follows:
The present invention can allow modeling personnel generate the simulation analysis report of Modelica model quickly and easily, and the automatic updating record when model changes, in addition, can utilize the data form of variable to carry out data analysis.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand technological means of the present invention, and can be implemented according to the content of instructions, coordinates accompanying drawing to be described in detail as follows below with preferred embodiment of the present invention.The specific embodiment of the present invention is provided in detail by following examples and accompanying drawing thereof.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is Modelica model emulation analysis report automatic generation method process flow diagram 1;
Fig. 2 is Modelica model emulation analysis report automatic generation method process flow diagram 2;
Fig. 3 is that Modelica model emulation analysis report automatic generation method runs schematic diagram 1;
Fig. 4 is that Modelica model emulation analysis report automatic generation method runs schematic diagram 2.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.
With reference to shown in Fig. 1, Fig. 2, a kind of Modelica model emulation analysis report automatic generation method, comprises the following steps:
Step one, opens model in Excel, and Excel obtains model file path, finds model file accordingly;
Step 2, calls MWorks software automation interface by COM mode, stress model file;
Step 3, carries out morphology grammatical analysis to model, and whether judgment models is wrong, wrong, points out mistake, terminates program; Model does not have mistake, enters next step;
Step 4, generation model component view in Excel, and translation model generates emulator;
Step 5, the parameter display in extraction model is revised by user in dialog box, and Dynamic simulation device after amendment confirms, carries out model emulation calculating, Output simulation destination file;
Step 6, after emulation terminates, reads in simulation result file data, variable in dialog box in display model, by user select need in report the variable of formation curve, after selecting to confirm, in Excel, generate the form of these variate-values and the curve of variable change;
Step 7, if again open Excel file, whether detection model has change, if change, enters next step, otherwise terminates program;
Step 8, carries out morphology grammatical analysis to model, and whether judgment models is wrong, if do not have mistake, regenerates model component view replace old view according to new model; Otherwise end program;
Step 9, again translation model carry out simulation calculation, according to the new result more curve of new variables and list data.
Further, described automation function is the com automation Interface realization being called MWorks software in Excel by VBA.
With reference to shown in Fig. 3, Fig. 4, the first page in Excel is the component view of model, comprising model structure figure, specification of a model, parameter form, can understand model essential information easily.Second page is model parameter form, and the 3rd page is model emulation summary info, the information such as comprise algorithm that simulation calculation adopts and each stage is consuming time.Thereafter the page is value and its curve map of each variable, can understand the situation of change of variable easily in detail.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (2)

1. a Modelica model emulation analysis report automatic generation method, is characterized in that, comprise the following steps:
Step one, opens model in Excel, and Excel obtains model file path, finds model file accordingly;
Step 2, calls MWorks software automation interface by COM mode, stress model file;
Step 3, carries out morphology grammatical analysis to model, and whether judgment models is wrong, wrong, points out mistake, terminates program; Model does not have mistake, enters next step;
Step 4, generation model component view in Excel, and translation model generates emulator;
Step 5, the parameter display in extraction model is revised by user in dialog box, and Dynamic simulation device after amendment confirms, carries out model emulation calculating, Output simulation destination file;
Step 6, after emulation terminates, reads in simulation result file data, variable in dialog box in display model, by user select need in report the variable of formation curve, after selecting to confirm, in Excel, generate the form of these variate-values and the curve of variable change;
Step 7, if again open Excel file, whether detection model has change, if change, enters next step, otherwise terminates program;
Step 8, carries out morphology grammatical analysis to model, and whether judgment models is wrong, if do not have mistake, regenerates model component view replace old view according to new model; Otherwise end program;
Step 9, again translation model carry out simulation calculation, according to the new result more curve of new variables and list data.
2. Modelica model emulation analysis report automatic generation method according to claim 1, is characterized in that: described automation function is the com automation Interface realization being called MWorks software in Excel by VBA.
CN201510752551.8A 2015-11-09 2015-11-09 Modelica model simulation analysis report automatic generation method Pending CN105447224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510752551.8A CN105447224A (en) 2015-11-09 2015-11-09 Modelica model simulation analysis report automatic generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510752551.8A CN105447224A (en) 2015-11-09 2015-11-09 Modelica model simulation analysis report automatic generation method

Publications (1)

Publication Number Publication Date
CN105447224A true CN105447224A (en) 2016-03-30

Family

ID=55557395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510752551.8A Pending CN105447224A (en) 2015-11-09 2015-11-09 Modelica model simulation analysis report automatic generation method

Country Status (1)

Country Link
CN (1) CN105447224A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106842982A (en) * 2016-12-23 2017-06-13 广东技术师范学院 One kind is based on many software collaboration analogue systems of VBA
CN109002661A (en) * 2018-09-11 2018-12-14 北京航空航天大学 The artificial intelligence modification method of digital aircraft simulation model
CN109255110A (en) * 2018-08-27 2019-01-22 苏州浪潮智能软件有限公司 A method of the batch based on J-Link deletes Creo model parameter
CN111580898A (en) * 2020-05-15 2020-08-25 北京世冠金洋科技发展有限公司 Method and device for automatically executing simulation software
CN111709118A (en) * 2020-05-13 2020-09-25 中核武汉核电运行技术股份有限公司 Nuclear power simulation data cooperation method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103021190A (en) * 2012-12-20 2013-04-03 长沙理工大学 Method optimizing signalized intersection queuing length
US20140232573A1 (en) * 2003-09-16 2014-08-21 Microsoft Corporation Method for processing data quantifying force applied to one or more keys of a computer keyboard

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140232573A1 (en) * 2003-09-16 2014-08-21 Microsoft Corporation Method for processing data quantifying force applied to one or more keys of a computer keyboard
CN103021190A (en) * 2012-12-20 2013-04-03 长沙理工大学 Method optimizing signalized intersection queuing length

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张元祥: "基于Workbench-Excel平台开发的微电子封装自动化热-结构耦合分析系统", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
曹丹青: "基于Modelica语言的飞机液压装置半物理实时仿真系统", 《系统仿真技术及其应用》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106842982A (en) * 2016-12-23 2017-06-13 广东技术师范学院 One kind is based on many software collaboration analogue systems of VBA
CN109255110A (en) * 2018-08-27 2019-01-22 苏州浪潮智能软件有限公司 A method of the batch based on J-Link deletes Creo model parameter
CN109002661A (en) * 2018-09-11 2018-12-14 北京航空航天大学 The artificial intelligence modification method of digital aircraft simulation model
CN111709118A (en) * 2020-05-13 2020-09-25 中核武汉核电运行技术股份有限公司 Nuclear power simulation data cooperation method and device
CN111709118B (en) * 2020-05-13 2024-02-13 中核武汉核电运行技术股份有限公司 Nuclear power simulation data cooperation method and device
CN111580898A (en) * 2020-05-15 2020-08-25 北京世冠金洋科技发展有限公司 Method and device for automatically executing simulation software

Similar Documents

Publication Publication Date Title
CN105447224A (en) Modelica model simulation analysis report automatic generation method
CN104317589B (en) A kind of code automatic generation method and device for being used to load dynamic link library
US9141521B2 (en) Method and apparatus for automatically generating a test script for a graphical user interface
US9063672B2 (en) Systems and methods for verifying model equivalence
CN109934227A (en) System for recognizing characters from image and method
JP2017138978A (en) System and method for coverage-based automated test case augmentation for design models
JP2007012003A (en) System for providing development environment of feature-oriented software product line
CN109933765A (en) A method of Excel table content is extracted to CAD table
Lee et al. Requirements modeling and automated requirements-based test generation
CN105824794A (en) Annotation adding method and device
US20140115547A1 (en) Method of Generating Parameterized Units
CN103176894A (en) Test data automatic derivative method and automatic derivative device facing database
CN106919374B (en) Script generation method and device
CN109086985B (en) Professional test information management system for spacecraft assembly
CN107886309A (en) Document examines instrument automatically
CN106776275A (en) A kind of testing process automatic generation method based on Packet Multiplexing
CN109299005B (en) Test script generation method and device
CN111767035A (en) Application interface docking method and device based on OpenAPI
CN103744757B (en) DF file verification method based on ARINC661
CN108132799B (en) Inter-process static program analysis information extraction method, device and equipment
CN110647457A (en) Data mining method, data processing method and system
Silvestre et al. A Usable MDE-based Tool for Software Process Tailoring.
CN108958726B (en) Data development method and device
US9298871B1 (en) Method and system for implementing translations of parameterized cells
US7580962B1 (en) Automatic code generation for co-simulation interfaces

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Tian Xianzhao

Inventor after: Guo Junfeng

Inventor after: Ding Jianwan

Inventor after: Gong Xiong

Inventor after: Yang Hao

Inventor after: You Fei

Inventor after: Wei Wenqiong

Inventor before: Tian Xianzhao

Inventor before: Guo Junfeng

Inventor before: Ding Jianwan

Inventor before: Gong Xiong

Inventor before: Yang Hao

Inventor before: You Fei

COR Change of bibliographic data
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160330