Method for converting Python model to Modelica model

A model conversion and model technology, which is applied in the field of Python model conversion to Modelica model and cross-language environment model encapsulation, can solve the problems of system simulation difficulty, difficulty in discovery, and inability to use Python model co-simulation, so as to improve modeling efficiency and improve Encapsulation efficiency, effects of extended modeling methods

Active Publication Date: 2017-05-17
苏州同元软控信息技术有限公司
View PDF3 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In the process of engineering modeling, if the system is built with Modelica language and a certain model is developed with Python language, under the existing technology, it is impossible to embed the Python model into the system for joint simulation, which will cause certain difficulties for system simulation
If it is necessary to convert the Python model to the Modelica model, the user not only needs to learn the official Python API by himself to reali...

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
  • Method for converting Python model to Modelica model
  • Method for converting Python model to Modelica model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.

[0029] see figure 1 As shown, a method for converting a Python model to a Modelica model includes the following steps:

[0030] Step 1, in the xml writing module, use the unified xml description file template to generate the xml file;

[0031] The function of the xml file is to sort out the input and output parameters of the Python model, the Python language functions required for the simulation of the Python model, and whether the Python model depends on other library files; Skeleton support for functions and Modelica models; through a unified xml description file template, it can be applied to a variety of Python models as much as possible, such as Python models that call Dlls, pure Python language models, etc.

[0032] Step 2, see figure 2 As shown, in the xml writing module, according to the composition content of the Python ...

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 method for converting a Python model to a Modelica model. A user only needs to sort out the Python model and fills in an xml file according to an xml data format, and a C language function model and a Modelica language model can be generated by automatic encapsulation through the support of a C language generation module and a Modelica language generation module. The method not only can greatly shorten coding time and testing time in the model encapsulation and improve the model encapsulation efficiency, but also completely meet the requirement for the successful encapsulation of different Python models. The method solves the integration problem of the Python model and the Modelica language, fills the market blank that the current market lacks tools which meet the requirement, helps the two languages complement with each other, and assists engineers in performing more effective simulation tests; at the same time, the engineering system modeling efficiency is improved, and the modeling mode is expanded.

Description

technical field [0001] The invention belongs to the field of computer software and relates to a cross-language environment model encapsulation technology, in particular to a method for converting a Python model into a Modelica model. Background technique [0002] With the development of science and technology and the expansion of computer simulation technology, the problems to be solved in system simulation are becoming more and more complex. Modeling technology is no longer limited to the behavior of a single organization or individual, but emphasizes the joint development of simulation systems and models, thus forming A simulation system that can reflect the principles of different disciplines, different simulation environments and different simulation processes. In the process of system simulation development, models developed in different programming languages ​​are often encountered. How to unify them for joint simulation is one of the important problems that must be so...

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
IPC IPC(8): G06F9/44
CPCG06F8/315G06F8/35
Inventor 邵进涛张晨曦江雷周凡利谢刚刘奇
Owner 苏州同元软控信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products