CN114967505B - Method, device and equipment for converting industrial model and simulation model - Google Patents

Method, device and equipment for converting industrial model and simulation model Download PDF

Info

Publication number
CN114967505B
CN114967505B CN202210925884.6A CN202210925884A CN114967505B CN 114967505 B CN114967505 B CN 114967505B CN 202210925884 A CN202210925884 A CN 202210925884A CN 114967505 B CN114967505 B CN 114967505B
Authority
CN
China
Prior art keywords
model
language
industrial
expression
description
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.)
Active
Application number
CN202210925884.6A
Other languages
Chinese (zh)
Other versions
CN114967505A (en
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.)
Kunlun Intellectual Exchange Data Technology Beijing Co ltd
Original Assignee
Kunlun Intellectual Exchange Data Technology Beijing 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 Kunlun Intellectual Exchange Data Technology Beijing Co ltd filed Critical Kunlun Intellectual Exchange Data Technology Beijing Co ltd
Priority to CN202210925884.6A priority Critical patent/CN114967505B/en
Publication of CN114967505A publication Critical patent/CN114967505A/en
Application granted granted Critical
Publication of CN114967505B publication Critical patent/CN114967505B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a method, a device and equipment for converting an industrial model and a simulation model, wherein the method comprises the following steps: acquiring an industrial model to be converted, wherein the industrial model is used for describing business drive of a physical model; converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language; and analyzing the service description expression to obtain a simulation model of the target description language. The embodiment of the invention realizes the conversion between the industrial model and the simulation model, can carry out abnormity evaluation and prediction on the industrial model, and is convenient and quick.

Description

Method, device and equipment for converting industrial model and simulation model
Technical Field
The present invention relates to the technical field of industrial models, and in particular, to a method, an apparatus, and a device for converting an industrial model and a simulation model.
Background
In an industrial model-driven process, some specific models usually describe a physical system by using related tools such as sysML, and in order to realize an efficient verification model, the industrial model needs to be converted into a simulation model.
Disclosure of Invention
The invention provides a method, a device and equipment for converting an industrial model and a simulation model. The conversion between the industrial model and the simulation model is realized, the abnormity evaluation and prediction can be carried out on the industrial model, and the method is convenient and quick.
To solve the above technical problem, the embodiments of the present invention provide the following solutions:
a conversion method of an industrial model and a simulation model comprises the following steps:
acquiring an industrial model to be converted, wherein the industrial model is used for describing business drive of a physical model;
converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language;
and analyzing the service description expression to obtain a simulation model of the target description language.
Optionally, obtaining the industrial model to be converted includes:
acquiring a physical model of the industrial equipment, wherein the physical model is used for describing an operation rule of a physical system;
determining at least one model plate according to the physical model;
and adding a constraint condition relation for each model plate, and determining the internal connection structure relation of each model plate to obtain the industrial model.
Optionally, the converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression includes:
determining a business experience expression of the physical model according to the physical model of the industrial equipment;
and converting each model plate in the industrial model and the business experience expression of the physical model according to a preset conversion rule to obtain a business description expression.
Optionally, the service description expression includes at least one service description area:
a packet area; a lead-in area; a context area; an attribute region; an operating area; wherein the operating region comprises a constraint relationship;
each service description area includes an internal identifier.
Optionally, analyzing the service description expression to obtain a simulation model of the target description language, where the simulation model includes:
acquiring a language specification of a target description language;
and under the language environment of the business description expression, analyzing the business description expression by combining the language specification of the target description language to generate a simulation model of the target description language.
Optionally, analyzing the service description expression in combination with the language specification of the target description language to generate a simulation model of the target description language, including:
traversing the service description expression, and determining the corresponding relation between each service description area and the simulation model according to the internal identifier of each service description area in the service description expression;
and analyzing each service description area according to the corresponding relation and the language specification of the target description language to obtain a simulation model of the target description language.
Optionally, the conversion device between the industrial model and the simulation model further includes:
analyzing the service description expression according to the language specification of the target description language to generate a source code model of the target description language; the source code model is used for local debugging of the industrial model.
The invention also provides a conversion device of the industrial model and the simulation model, which comprises:
the system comprises an acquisition module, a conversion module and a conversion module, wherein the acquisition module is used for acquiring an industrial model to be converted, and the industrial model is used for describing the business drive of a physical model;
the processing module is used for converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language; and analyzing the service description expression to obtain a simulation model of the target description language.
The invention also provides an electronic device, which comprises a processor, a memory and a program or an instruction stored on the memory and capable of running on the processor, wherein the program or the instruction realizes the steps of the conversion method of the industrial model and the simulation model when being executed by the processor.
The invention also provides a readable storage medium on which a program or instructions are stored, which when executed by a processor implement the steps of the method for converting an industrial model into a simulation model as described above.
The scheme of the invention at least comprises the following beneficial effects:
according to the scheme, the industrial model to be converted is obtained, and the industrial model is used for describing the business drive of the physical model; converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language; and analyzing the service description expression to obtain a simulation model of the target description language. The conversion between the industrial model and the simulation model is realized, the abnormity evaluation and prediction can be carried out on the industrial model, and the method is convenient and quick.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for converting an industrial model into a simulation model according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for converting an industrial model to a simulation model according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a physical model in an embodiment of the present invention;
FIG. 4 is a schematic illustration of an industrial model in an exemplary embodiment of the present invention;
FIG. 5 is a diagram illustrating constraint relationships after encapsulation in an exemplary embodiment provided by the present invention;
FIG. 6 is a schematic diagram of an internal connection structure relationship module of a packaged power model tile in an exemplary embodiment of the invention;
FIG. 7 is a schematic diagram of a language translator in accordance with an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a conversion apparatus for industrial models and simulation models according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 1, the present invention provides a method for converting an industrial model and a simulation model, comprising:
step 11, acquiring an industrial model to be converted, wherein the industrial model is used for describing business drive of a physical model;
step 12, converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language;
and step 13, analyzing the service description expression to obtain a simulation model of the target description language.
In the embodiment, the business description of the industrial model is converted according to a preset conversion rule, and the industrial model is converted into a business description expression obtained based on a business description language; analyzing the service description expression to obtain a simulation model of the target description language; the industrial model is generally used for describing business drive of the physical model and can be constructed based on tools such as sysML and the like; the conversion between the industrial model and the simulation model is realized, the abnormity evaluation and prediction can be carried out on the industrial model, and the method is convenient and quick.
It should be noted that the service description language is a formal language for describing UML (unified modeling language) model expressions, and based on this, some additional descriptions (e.g., object constraints, type extensions, expressions for describing state changes and service experiences, etc.) are provided at the same time; the business description language is a business experience constraint language, and the calling process and the activating operation of the model cannot be executed.
In addition, the analysis of the service description expression is preferably carried out through a language translator, the language translator can translate a target description language with service semantics according to languages of different platforms, and an executable simulation model is generated by combining with a target grammar specification.
As shown in fig. 2, in a specific embodiment, an industrial model to be converted is obtained, a service description of the industrial model is converted according to a preset conversion rule to obtain a service description expression (industrial description model), the service description expression is parsed into a simulation model with a target description language of Modelica by a language translator of the target description language, and further, an executable simulation model is generated by combining a grammar rule of the Modelica, where the target description language of the simulation model is the Modelica language.
In an alternative embodiment of the present invention, step 11 includes:
step 111, acquiring a physical model of the industrial equipment, wherein the physical model is used for describing an operation rule of a physical system;
step 112, determining at least one model plate according to the physical model;
and 113, adding a constraint condition relation for each model plate, and determining an internal connection structure relation of each model plate to obtain the industrial model.
In this embodiment, the physical model is obtained based on the operation rule of the physical system; obtaining a physical model of industrial equipment, determining at least one model plate (block) according to the physical model, wherein the model plate is divided based on an internal driving structure of the physical model, adding a constraint condition relation to each model plate, and determining an internal connection structure relation of each model plate according to a physical system to obtain the industrial model; the internal connection structure relationship is preferably a logical connection relationship inside each model plate, and it should be noted that the internal connection structure relationship is bound to a constraint condition relationship of each model plate;
wherein, the industry model includes: behavior driven development (bdd);
each bdd having at least one pattern plate (block) enclosed therein;
each model plate includes Values (Values), Ports (Ports), and constraints (Constraint relationships).
In another embodiment, as shown in fig. 3-6, the physical system of an entity includes a power source, a resistor and a ground terminal, which are electrically connected in sequence through a wire, and the motion rule of the physical system of the entity is analyzed, it can be known that in the physical system, the wire functions as an electrical connection, the power source functions as a power supply, the resistor is used for consuming the electric quantity of the loop in the form of heat energy, and the ground terminal functions to establish a zero potential point for the loop; the operation rule of the physical system is that a power supply supplies electricity to a resistor through a lead, a grounding end supplies a zero potential point to a loop, and the resistor receives the electricity supplied by the power supply through the lead and consumes the electricity in the form of heat energy;
therefore, the physical model of the physical system of the entity is the model shown in fig. 3, the physical model is based on the operation rule of the physical system, the wire is simplified through the line segment, the power supply, the resistor and the grounding terminal are respectively simplified through the electronic component symbol, and the operation rule of the physical system can be well described through the physical model shown in fig. 3;
according to the physical model, the physical model can be divided into 4 core blocks according to the internal driving structure of the physical model, and the blocks are respectively a Circuit module, a Source power module, a Resistor module and a Ground grounding module, wherein the Circuit module is used for describing the whole Circuit block of the physical system, the Source power module is used for describing the internal structure of the power supply of the physical system, the Resistor module is used for describing the internal structure of the Resistor of the physical system, and the Ground grounding module is used for describing the internal structure of the Ground terminal of the physical system; based on the Resistor module and the Source power module, a twoPinComponent double-pin assembly module can be obtained, and is used for describing port structures of the Resistor module and the Source power module and pins corresponding to the port structures, wherein the ports are a p-end conduction port and an n-end conduction port respectively, and the corresponding pins are the p-pin and the n-pin respectively;
as shown in fig. 4, the Circuit module, the Source power module, the Resistor module, the Ground module, and the TwoPinComponent module are packaged to obtain a packaged industrial model bdd [ package ] electric Circuit [ electric Circuit ], which describes an Electrical Circuit structure of the Circuit, and each block is described below:
the inside of the Circuit module describes performance (properties) of the Circuit module, and the Circuit module includes a Ground (Ground), a Resistor (Resistor), and a power supply (Source);
the inside of the Ground grounding module describes a constraint condition relation of a grounding end, the constraint condition relation of the grounding end is gc, and the Ground grounding module is provided with a port which is a p-end conduction port;
the Resistor resistance module is internally described with current, a resistance value (the resistance value is 10) and voltage, the type of the Resistor resistance module is a value type, the inside of the Resistor resistance module is also described with a constraint condition relation of resistance, the constraint condition relation of the resistance is rc, and meanwhile, the Resistor resistance module is provided with two ports which are an n-end conduction port and a p-end conduction port respectively;
the inside of the Source power supply module describes current and voltage, the type of the current and voltage is a value type, the inside of the Source power supply module also describes a constraint condition relation of a power supply, the constraint condition relation of the power supply is sc, and meanwhile, the Source power supply module is provided with two ports which are respectively an n-end conduction port and a p-end conduction port;
the TwoPinComponent double-pin component module is a block corresponding to ports of a Resistor module and a Source power module, current and voltage are described inside the TwoPinComponent double-pin component module, the type of the current and the voltage is a value type, and two ports are an n-end conduction port and a p-end conduction port respectively;
as shown in fig. 5, the constraint condition relationships of the group Ground module, the Resistor module, the Source power module, and the TwoPinComponent module are encapsulated, and the obtained encapsulated constraint condition relationship module is bdd [ package ] Electrical Circuit [ constraints ], which describes the constraint condition relationships, and each constraint condition relationship is described as follows:
the TwoPinComponent two-pin component module defines constraints (TwoPinComponentconstraints) whose parameters are component current value i, current value ni of n port, voltage value nv of n port, current value pi of p port, voltage value pv of p port, and component voltage value v, and the constraint equation is:
the method comprises the following steps: pi + ni =0, representing a total of zero after the current flowing through the two pins;
the second formula: i = pi, indicating that the current on the component is equal to the current flowing through the p-pole pin;
and (3) formula III: v = pv-nv, representing a component voltage value v equal to the voltage of the p pin minus the voltage of the n pin;
the constraint condition relation of the resistor defines constraints (constraints), parameters of which are a resistor current value i, a current value ni of an n port, a voltage value nv of the n port, a current value pi of a p port, a voltage value pv of the p port, a resistor voltage value v and a resistor value r, and a constraint equation is as follows: v = r × i, representing that the resistance voltage value is equal to a product value of the resistance value r and the resistance current value i;
the constraint condition relationship of the power supply defines a constraint (SourceConstraint), and the parameters are a power supply current value i, a current value ni of an n port, a voltage value nv of the n port, a current value pi of a p port, a voltage value pv of the p port and a power supply voltage value v, and the constraint equation is as follows: the voltage on the component is defined as a sine wave v = sin (time) with the current simulation time as a parameter, and the voltage value of the power supply is represented as the sine wave with the current simulation time as a parameter;
the constraint condition relationship of the ground terminal defines a constraint (group constraint), the parameter of the constraint is a p terminal voltage value pv, and the constraint equation is as follows: pv =0, indicating that the p-terminal voltage value pv is 0;
as shown in fig. 6, the internal connection structure relationship between each model board can be determined according to the physical system of the circuit, fig. 6 shows the internal connection structure relationship module par of the power model board after packaging, it can be seen that the constraint condition relationship sc of the power is v = sin (time), and the binding structure on the connector of the constraint condition relationship of the power is:
the p pole current of the power supply (pi of sc) is bound to the current i of the p port (i.e. sourceconstraint. pi- > charge port. i); the p-pole voltage of the power supply (pv of sc) is bound to the voltage v of the p-port (namely, sourceconstraint. pv- > chargeport. v); the n pole current (ni of sc) of the power supply is bound to the current i of the n port (i.e. sourceconstraint. ni- > chargeport. i); the n-pole voltage (nv of sc) of the power supply is bound to the voltage v of the n port (namely, sourceconstraint. nv- > chargeport. v); the current of the power supply (i of sc) is tied to the current of the power supply i (i.e. sourceconstraint. i- > i); the voltage of the power supply (v of sc) is tied to the voltage v of the power supply (i.e. sourceconstraint. v- > v);
and obtaining the industrial model through the encapsulated model plate, the constraint condition relationship and the internal connection structure relationship bound to each constraint condition relationship.
In an alternative embodiment of the present invention, step 12 includes:
step 121, determining a business experience expression of the physical model according to the physical model of the industrial equipment;
and step 122, converting each model plate in the industrial model and the service experience expression of the physical model according to a preset conversion rule to obtain a service description expression.
In the embodiment, a business experience expression of a physical model is determined according to the physical model of the industrial equipment, the business experience expression is obtained according to a constraint condition relationship of each model plate in the physical model of the industrial equipment, the constraint condition relationship comprises a constraint expression, and the business experience expression is the constraint expression which can reflect a business experience problem most in the constraint condition relationship corresponding to the industrial model;
converting the industrial model according to a preset conversion rule to obtain a service description expression, wherein the preset conversion rule comprises at least one of the following items:
behavior-driven development of the industrial model is converted into a package region;
converting the model plate into a context area;
converting the median and the port of the model plate into attribute areas;
converting the constraint condition relation in the model plate into a preposed constraint in the operation area;
converting the constraint expression in the constraint conditional relationship into a pre-constraint expression;
the business description expression is converted into a post-constrained expression.
As shown in fig. 4, in a specific embodiment, the industrial model shown in fig. 4 is converted according to a preset conversion rule, where the conversion process is as follows:
converting behavior-driven development bdd of an industrial model into a packet region packet, converting block of the model into context of a context region, converting Values and port Ports in the block into attributes of attribute regions, converting Constraint condition relation Constraint in the block into pre-operation of pre-Constraint in operation regions, and converting Constraint expressions in the Constraint into expressions of the pre-Constraint pre-operation;
the constraint expression of the constraint condition relation which can reflect the business experience problem most in the industrial model is a constraint expression in a TwoPinComponent double-pin component module: pi + ni = 0; i = pi; v = pv-nv;
thus, the industrial model shown in fig. 4 can be converted into the following business description expression (the letters following the symbol "#" below are the annotation contents):
package::com.model.electricalCircuit
# Package converted from bdd driven by the behavior of an Industrial model
import::
com.model.valueType.Voltage
com.model.valueType.Current
com.model.cp.ChargePort
...
Port corresponding to industrial model
endImport
context::Source extends TwoPinComponent
# context converted from Source Power Module
properties::
v Voltage
# Voltage v is Properties Property of a Voltage converted from the value Values in the Source Power Module
i Current
# Current, the Current i being the Properties property of the Current converted from the value Values in the Source Power Module
n ChargePort
# n-pole electric energy, the n-pole electric energy being property of the n-pole electric energy converted from a value in a Component two-pin assembly module corresponding to the Source Power Module
p ChargePort
# p-pole electric energy, which is property attribute of p-pole electric energy converted from value Values in Component two-pin assembly module corresponding to Source power module
endProperties
operations::
# Pre-constraint which is a pre-operation that is converted to a pre-constraint based on a constraint condition relationship sc in the Source Power Module
def: pre = (
ni:Integer, nv:Integer,
pi:Integer, pv:Integer
# Port information that is properties attribute of Port information converted from Port ports in Source Power Module
):Boolean -> return
pi+ni=0 && self.i=pi && self.v=pv-nv && self.v=sin(time)
# postconstraint, which is an expression converted to a postconstraint according to the traffic description expressions pi + ni =0, i = pi, and v = pv-nv
def: post = () -> {}
...
endOperations
endContext
endPackage。
In an optional embodiment of the present invention, the service description expression includes at least one of the following service description areas:
a packet area; a lead-in area; a context area; an attribute region; an operating area; wherein the operating region comprises a constraint relationship;
each service description area includes an internal identifier.
In this embodiment, the packet area is used to describe the current model plate definition (block definition); the lead-in area is used for describing and quoting a model plate block; the context area is used for carrying out abstract description on the model plate block; the attribute area is used for describing the attributes of the template block; the operation area is used for describing constraint condition relations of the model plate block, each service description area comprises an internal identifier, and the internal identifiers are used for determining the corresponding relations between the service description areas and the simulation models.
In another specific embodiment, in the service description expression obtained by conversion according to the industrial model shown in fig. 4, endImport is an internal identifier corresponding to the import area, endProperties is an internal identifier corresponding to the attribute area, endOperations is an internal identifier corresponding to the operation area, endContext is an internal identifier corresponding to the context area, and endPackage is an internal identifier corresponding to the package area.
In an alternative embodiment of the present invention, step 13 includes:
step 131, acquiring a language specification of a target description language;
and 132, under the language environment of the service description expression, analyzing the service description expression by combining the language specification of the target description language, and generating a simulation model of the target description language.
In this embodiment, the service description expression is analyzed, where the analyzing refers to converting the service description expression into a simulation model of a target description language, and according to a language specification of the target description language, the service description expression is analyzed in a language environment of the service description expression to obtain the simulation model of the target description language;
the language environment of the service description expression can be different environments, such as computer programming language Java, computer programming language Python, and the like;
the target description language is preferably a Modelica language (an open, object-oriented, equation-based computer language);
the simulation model of the target description language is an executable target model.
As shown in fig. 7, in a specific embodiment, fig. 7 shows a language translator for a business description expression, which translates the business description expression into a simulation model or a source code model of an executable target description language according to a target language specification, where the simulation model is an analog simulation of an industrial model, and the source code model is used for performing local debugging on the industrial model.
In an alternative embodiment of the present invention, step 132 comprises:
step 1321, traversing the service description expression, and determining a corresponding relationship between each service description area and the simulation model according to an internal identifier of each service description area in the service description expression;
step 1322, according to the corresponding relation and the language specification of the target description language, analyzing each service description area to obtain a simulation model of the target description language.
In this embodiment, the service description expression is traversed, and a correspondence between each service description area and the simulation model is determined according to an internal identifier of each service description area in the service description expression, where the correspondence includes:
the lead-in area corresponds to a conduction port module of the simulation model;
the context region corresponds to a model (model) module of the simulation model;
the attribute region corresponds to a declaration type (type) and a definition variable;
the constraint condition relation in the operation area corresponds to a parameter module of the simulation model;
the constraint expression of the constraint condition relation corresponds to an equation (evaluation) module of the simulation model.
According to the corresponding relation and the language specification of the target description language, the service description area can be analyzed into a simulation model of the target description language.
In a specific embodiment, the service description expression obtained by converting the industrial model shown in fig. 4 is converted into a simulation model in a Modelica language, where the simulation model in the Modelica language is specifically (note content after the following symbol "//"):
record ChargePort "description of the charge port record"
// record variable declarations corresponding to the attribute areas of the service description expressions
Real i " var current";
Real v " var voltage";
end ChargePort
model Source extends "this is source of circuit model"
// model modules here correspond to context regions of the service description expressions
TwoPinComponent;
type Voltage=Real;
type Current=Real;
type ChargePort=ChargePort;
Voltage v;
Current i;
ChargePort n;
ChargePort p;
The conducting port module corresponds to the lead-in area of the service description expression
parameter Current ni;
parameter Current pi;
parameter Voltage nv;
parameter Voltage pv;
Parameter module here corresponds to constraint relation (pre-constraint) in the operation area of the service description expression
initial equation
i=pi
...
equation
0 = pi+ni;
i = pi;
v = pv-nv;
v = sin(time)
The equation module corresponds to the constraint expression (post constraint) of the constraint condition relation of the business description expression
...
end Source。
In an optional embodiment of the present invention, step 13 further includes:
step 133, according to the language specification of the target description language, parsing the service description expression to generate a source code model of the target description language; the source code model is used for local debugging of the industrial model.
In this embodiment, a source code model of a target description language may also be generated based on parsing a service description expression; the source code model is used for carrying out local debugging on the industrial model;
specifically, step 133 includes:
step 1331, traversing the service description expression, and determining a first corresponding relationship between each service description area and the source code model according to the internal identifier of each service description area in the service description expression;
step 1322, according to the first corresponding relationship and the language specification of the target description language, analyzing each service description area to obtain a source code model of the target description language.
In this embodiment, the service description expression is traversed, and a first corresponding relationship between each service description area and the source code model is determined according to the internal identifier of each service description area in the service description expression, where the first corresponding relationship includes:
the context area corresponds to a class (class) module of the source code model;
the attribute region corresponds to a feature (attributes) module of the source code model;
the operation region corresponds to a method (method) module of the source code model;
the constraint relationship corresponds to an execution body of a method module of the source code model.
According to the first corresponding relation and the language specification of the target description language, the service description area can be analyzed into a source code model of the target description language.
In another specific embodiment, the service description expression obtained by converting the industrial model shown in fig. 4 is converted into a source code model of Java language, where the source code model of Java language is (note content after the following symbol "/"):
package com.model.electricalCircuit
import com.model.valueType.Voltage
import com.model.valueType.Current
import com.model.cp.ChargePort
import com.model.component.TwoPinComponent
public class Source extends TwoPinComponent {
// class modules here correspond to context areas of the service description expressions
public Voltage v;
public Current i;
public ChargePort n;
public ChargePort p;
public Source() {super();}
public Source(ChargePort p, Charge n) {
The attributes feature module corresponds to the attribute area of the service description expression
this.p = p;
this.n = n;}
public Boolean pre(
Integer ni, Integer pi
Integer pv, Integer nv) {
// the method module herein corresponds to the operation area of the service description expression
return pi+ni==0 && this.i == pi && this.v == pv-nv && this.v = sin(time)
Where the executors correspond to constraint relationships of the business description expressions
}}。
In an optional embodiment of the present invention, step 133 further includes:
and step 14, analyzing the source code model into an industrial model through an analyzer.
In this embodiment, when the source code model is similar to the UML type, the source code model may be converted into a service description expression, and the service description expression is further parsed into an industrial model by a parser; among them, the parser is preferably a sysML (Systems Modeling Language) tool parser.
The embodiment of the invention obtains an industrial model to be converted, wherein the industrial model is used for describing the business drive of a physical model; converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language; and analyzing the service description expression to obtain a simulation model of the target description language. The conversion between the industrial model and the simulation model is realized, the abnormity evaluation and prediction can be carried out on the industrial model, and the method is convenient and quick.
As shown in fig. 8, the present invention further provides a device 80 for converting an industrial model into a simulation model, comprising:
an obtaining module 81, configured to obtain an industrial model to be converted, where the industrial model is used to describe a business driver of a physical model;
the processing module 82 is configured to perform conversion processing on the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language; and analyzing the service description expression to obtain a simulation model of the target description language.
Optionally, the obtaining module 81 includes:
the first obtaining submodule is used for obtaining a physical model of the industrial equipment, and the physical model is used for describing an operation rule of a physical system;
the second acquisition submodule is used for determining at least one model plate according to the physical model;
and the third obtaining submodule is used for adding a constraint condition relation for each model plate and determining the internal connection structure relation of each model plate to obtain the industrial model.
Optionally, the converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression includes:
determining a business experience expression of the physical model according to the physical model of the industrial equipment;
and converting each model plate in the industrial model and the business experience expression of the physical model according to a preset conversion rule to obtain a business description expression.
Optionally, the service description expression includes at least one of the following service description areas:
a packet area; a lead-in area; a context area; an attribute region; an operating area; wherein the operating region comprises a constraint relation;
each service description area includes an internal identifier.
Optionally, analyzing the service description expression to obtain a simulation model of the target description language, where the simulation model includes:
acquiring a language specification of a target description language;
and under the language environment of the business description expression, analyzing the business description expression by combining the language specification of the target description language to generate a simulation model of the target description language.
Optionally, analyzing the service description expression in combination with the language specification of the target description language to generate a simulation model of the target description language, including:
traversing the service description expression, and determining the corresponding relation between each service description area and the simulation model according to the internal identifier of each service description area in the service description expression;
and analyzing each service description area according to the corresponding relation and the language specification of the target description language to obtain a simulation model of the target description language.
Optionally, the processing module 82 is further configured to:
analyzing the service description expression according to the language specification of the target description language to generate a source code model of the target description language; the source code model is used for local debugging of the industrial model.
It should be noted that the apparatus is an apparatus corresponding to the above method, and all the implementations in the above method embodiment are applicable to the embodiment of the apparatus, and the same technical effects can be achieved.
Embodiments of the present invention provide an electronic device, comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method for storing industrial device data as described above.
It should be noted that the electronic device is an electronic device corresponding to the method, and all implementation manners in the embodiment of the method are applicable to the embodiment of the electronic device, and the same technical effects can be achieved.
Embodiments of the present invention also provide a readable storage medium storing instructions, which when executed on a computer, cause the computer to execute the steps of the cooperative management method of the industrial data model and the data version as described above.
It should be noted that the readable storage medium is a readable storage medium corresponding to the method, and all implementation manners in the method embodiments are applicable to the embodiment of the readable storage medium, and the same technical effect can be achieved.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
Furthermore, it is to be noted that in the device and method of the invention, it is obvious that the individual components or steps can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of performing the series of processes described above may naturally be performed chronologically in the order described, but need not necessarily be performed chronologically, and some steps may be performed in parallel or independently of each other. It will be understood by those skilled in the art that all or any of the steps or elements of the method and apparatus of the present invention may be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or any combination thereof, which can be implemented by those skilled in the art using their basic programming skills after reading the description of the present invention.
Thus, the objects of the invention may also be achieved by running a program or a set of programs on any computing device. The computing device may be a general purpose device as is well known. The object of the invention is thus also achieved solely by providing a program product comprising program code for implementing the method or the apparatus. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. It is to be understood that the storage medium may be any known storage medium or any storage medium developed in the future. It is further noted that in the apparatus and method of the present invention, it is apparent that each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of executing the series of processes described above may naturally be executed chronologically in the order described, but need not necessarily be executed chronologically. Some steps may be performed in parallel or independently of each other.
While the foregoing is directed to the preferred embodiment of the present invention, it will be appreciated by those skilled in the art that various changes and modifications may be made therein without departing from the principles of the invention as set forth in the appended claims.

Claims (8)

1. A method for converting an industrial model and a simulation model is characterized by comprising the following steps:
acquiring an industrial model to be converted, wherein the industrial model is used for describing business drive of a physical model;
converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language;
analyzing the service description expression to obtain a simulation model of the target description language;
analyzing the service description expression to obtain a simulation model of the target description language, wherein the analyzing the service description expression comprises the following steps:
acquiring a language specification of a target description language;
under the language environment of the business description expression, analyzing the business description expression by combining the language specification of the target description language to generate a simulation model of the target description language;
analyzing the service description expression in combination with the language specification of the target description language to generate a simulation model of the target description language, wherein the simulation model comprises:
traversing the service description expression, and determining the corresponding relation between each service description area and the simulation model according to the internal identifier of each service description area in the service description expression;
and analyzing each service description area according to the corresponding relation and the language specification of the target description language to obtain a simulation model of the target description language.
2. The method for converting an industrial model into a simulation model according to claim 1, wherein the obtaining of the industrial model to be converted comprises:
acquiring a physical model of the industrial equipment, wherein the physical model is used for describing an operation rule of a physical system;
determining at least one model plate according to the physical model;
and adding a constraint condition relation for each model plate, and determining the internal connection structure relation of each model plate to obtain the industrial model.
3. The method for converting an industrial model into a simulation model according to claim 2, wherein converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression comprises:
determining a business experience expression of the physical model according to the physical model of the industrial equipment;
and converting the business experience expressions of each model plate and the physical model in the industrial model according to a preset conversion rule to obtain a business description expression.
4. The method for converting an industrial model into a simulation model according to claim 1, wherein the business description expression comprises at least one of the following business description areas:
a packet area; a lead-in area; a context area; an attribute region; an operating area; wherein the operating region comprises a constraint relation;
each service description area includes an internal identifier.
5. The method for converting an industrial model into a simulation model according to claim 1, further comprising:
analyzing the service description expression according to the language specification of the target description language to generate a source code model of the target description language; the source code model is used for local debugging of the industrial model.
6. An apparatus for converting an industrial model into a simulation model, comprising:
the system comprises an acquisition module, a conversion module and a conversion module, wherein the acquisition module is used for acquiring an industrial model to be converted, and the industrial model is used for describing the business drive of a physical model;
the processing module is used for converting the service description of the industrial model according to a preset conversion rule to obtain a service description expression; the business description expression describes the industrial model through a business description language; analyzing the service description expression to obtain a simulation model of the target description language;
analyzing the service description expression to obtain a simulation model of the target description language, wherein the analyzing the service description expression comprises the following steps:
acquiring a language specification of a target description language;
under the language environment of the business description expression, in combination with the language specification of the target description language, analyzing the business description expression to generate a simulation model of the target description language;
analyzing the service description expression in combination with the language specification of the target description language to generate a simulation model of the target description language, wherein the simulation model comprises:
traversing the service description expression, and determining the corresponding relation between each service description area and the simulation model according to the internal identifier of each service description area in the service description expression;
and analyzing each service description area according to the corresponding relation and the language specification of the target description language to obtain a simulation model of the target description language.
7. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method for converting an industrial model into a simulation model according to any one of claims 1 to 5.
8. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the method of conversion of an industrial model to a simulation model according to any one of claims 1 to 5.
CN202210925884.6A 2022-08-03 2022-08-03 Method, device and equipment for converting industrial model and simulation model Active CN114967505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210925884.6A CN114967505B (en) 2022-08-03 2022-08-03 Method, device and equipment for converting industrial model and simulation model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210925884.6A CN114967505B (en) 2022-08-03 2022-08-03 Method, device and equipment for converting industrial model and simulation model

Publications (2)

Publication Number Publication Date
CN114967505A CN114967505A (en) 2022-08-30
CN114967505B true CN114967505B (en) 2022-09-27

Family

ID=82968661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210925884.6A Active CN114967505B (en) 2022-08-03 2022-08-03 Method, device and equipment for converting industrial model and simulation model

Country Status (1)

Country Link
CN (1) CN114967505B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115169164B (en) * 2022-09-09 2022-11-18 昆仑智汇数据科技(北京)有限公司 Information processing method, device and equipment of industrial model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006015006A2 (en) * 2004-07-30 2006-02-09 Unisys Corporation Generating software components from business rules expressed in a natural language
CN107341294A (en) * 2017-06-15 2017-11-10 苏州同元软控信息技术有限公司 Spacecraft Information System Modeling emulation mode based on Modelica language
CN111444727A (en) * 2020-04-01 2020-07-24 神州数码融信软件有限公司 Business rule analysis method
CN112559643A (en) * 2020-12-21 2021-03-26 北京仿真中心 Simulation entity model description method
CN113987781A (en) * 2021-10-17 2022-01-28 浙大宁波理工学院 Equipment symbolization modeling facing transient simulation of power system and application method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090083110A1 (en) * 2007-09-21 2009-03-26 Ivan Markovic Formal model for business processes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006015006A2 (en) * 2004-07-30 2006-02-09 Unisys Corporation Generating software components from business rules expressed in a natural language
CN107341294A (en) * 2017-06-15 2017-11-10 苏州同元软控信息技术有限公司 Spacecraft Information System Modeling emulation mode based on Modelica language
CN111444727A (en) * 2020-04-01 2020-07-24 神州数码融信软件有限公司 Business rule analysis method
CN112559643A (en) * 2020-12-21 2021-03-26 北京仿真中心 Simulation entity model description method
CN113987781A (en) * 2021-10-17 2022-01-28 浙大宁波理工学院 Equipment symbolization modeling facing transient simulation of power system and application method thereof

Also Published As

Publication number Publication date
CN114967505A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN114967505B (en) Method, device and equipment for converting industrial model and simulation model
Kuncak et al. Modular pluggable analyses for data structure consistency
Roy et al. SimCheck: An expressive type system for Simulink
Razik et al. Automated deserializer generation from CIM ontologies: CIM++—an easy-to-use and automated adaptable open-source library for object deserialization in C++ from documents based on user-specified UML models following the Common Information Model (CIM) standards for the energy sector
Cristiá et al. A language for test case refinement in the Test Template Framework
Winter et al. Formal information modelling for standardisation in the spatial domain
Irwin et al. Object oriented metrics: Precision tools and configurable visualisations
Rivera On the semantics of real-time domain specific modeling languages
Lam et al. Crosscutting techniques in program specification and analysis
Floch et al. Model-driven engineering and optimizing compilers: A bridge too far?
Kohlhase et al. A universal machine for biform theory graphs
Barroca et al. Integrating a neutral action language in a devs modelling environment
Vogelsang et al. Software metrics in static program analysis
Eng Combining static and dynamic data in code visualization
Zeyda et al. Mechanised translation of control law diagrams into Circus
Najumudheen et al. Test coverage analysis based on an object‐oriented program model
Van Reeuwijk Rapid and robust compiler construction using template-based metacompilation
Renggli et al. Why Smalltalk wins the host languages shootout
Karjoth et al. LOEWE: a LOTOS engineering workbench
CN111596906A (en) Android application development method, device, equipment and medium based on MVPVM
Lam The hob system for verifying software design properties
Heckel et al. Model-driven development of reactive information systems: from graph transformation rules to JML contracts
CN113032003B (en) Development file export method, development file export device, electronic equipment and computer storage medium
Pahl Components, contracts, and connectors for the unified modelling language UML
Riviere Automatic generation of proof obligations parameterised by domain theories implementation in Event-B: The EB4EB Framework

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant