Modelica-based FMU integration method, system, equipment and medium

Through the FMU integration method based on the Modelica language, the original FMU files are configured and integrated to generate the target Modelica model text, solving the problem that existing tools are difficult to support updating the FMI specifications, and achieving efficient and flexible model integration and maintenance.

CN120029654AActive Publication Date: 2025-05-23武汉鼎元同立科技有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510506531.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-05-23
Estimated Expiration
2045-04-22

AI Technical Summary

Technical Problem

Existing modeling and simulation tools are difficult to efficiently support the constantly updated FMI specifications, increasing the difficulty and complexity of the tool's maintenance.

Method used

The FMU integration method based on the Modelica language is adopted, and the original FMU file is configured in response to user configuration instructions, the FMU configuration file is generated, and the Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file are integrated to generate the target Modelica model text. This method allows for the adjustment of the import template to be based on updated FMI specifications or user requirements without modifying the tool itself.

Benefits of technology

It realizes efficient and flexible support for constantly updated FMI specifications and specific needs, reduces the difficulty and complexity of the tool maintenance, and the generated Modelica model text can be seamlessly integrated with other Modelica models, supporting the construction of multi-domain cross-platform complex system models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029654A_ABST
    Figure CN120029654A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial internet system modeling simulation, and discloses a Modelica-based FMU integration method, system, device and medium, and the method comprises the steps: responding to a user configuration instruction, configuring an original FMU file, and generating an FMU configuration file; the Modelica model text framework content defined in the import template, the model description file in the original FMU file and the FMU configuration file are integrated, and a Modelica model text is obtained. According to the method and the device, the Modelica model text meeting the updated FMI specification or the specific requirement can be generated only by newly adding or adjusting the import template under the condition that the version of the FMI specification is updated or the specific requirement is met, and efficient and flexible support on the continuously updated FMI specification and the specific requirement is realized. The method can be seamlessly integrated with other Modelica models, and is convenient to construct a multi-field cross-platform system model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of industrial Internet system modeling and simulation, and in particular to a Modelica-based FMU integration method, system, equipment and medium. Background Art

[0002] With the advancement of modeling and simulation technology, changes in industry needs, and the continuous advancement of standardization work, FMI specifications have been constantly updated, so modeling and simulation tools need to constantly adapt to new specifications to support the latest specifications, which increases the difficulty and complexity of tool maintenance. Therefore, how to efficiently support the constantly updated FMI specifications has become an important challenge facing current modeling and simulation tools. Summary of the invention

[0003] The main purpose of this application is to provide a Modelica-based FMU integration method, system, device and medium, aiming to solve the technical problem of how to flexibly and efficiently integrate FMUs to support continuously updated FMI specifications or user needs.

[0004] The first aspect of the present application provides a FMU integration method based on the Modelica language, and the FMU integration method based on the Modelica language includes: In response to user configuration instructions, configure the original FMU file and generate an FMU configuration file; The Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file are integrated to obtain the target Modelica model text, wherein the target import template can be adjusted according to the updated FMI specification or user requirements.

[0005] The present application also provides a Modelica language-based FMU integration system, the Modelica language-based FMU integration system comprising: an FMU integration configuration module and a conversion module; FMU integrated configuration module, used to respond to user configuration instructions, configure the original FMU file, and generate an FMU configuration file; The conversion module is used to integrate the Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file to obtain the target Modelica model text, wherein the target import template can be adjusted according to the updated FMI specification or user requirements.

[0006] The third aspect of the present application provides a computer device, comprising: a memory and at least one processor, wherein instructions are stored in the memory; and at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned FMU integration method based on the Modelica language.

[0007] A fourth aspect of the present application provides a computer-readable storage medium, in which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned FMU integration method based on the Modelica language.

[0008] The FMU integration solution based on Modelica language provided by this application is suitable for the FMU integration system of complex system models. When the FMI specification version is updated or under specific requirements, only the import template can be added or adjusted without modifying the tool itself, so as to generate Modelica model text that meets the updated FMI specification or specific requirements, thereby achieving efficient and flexible support for the constantly updated FMI specification and specific requirements, and reducing the difficulty and complexity of tool maintenance. This embodiment is based on Modelica language and can be seamlessly integrated with other Modelica models, making it easy to build complex system models across multiple fields and platforms. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a flow chart of the first embodiment of the FMU integration method based on the Modelica language in the embodiment of the present application; Figure 2 This is a flow chart of a second embodiment of the FMU integration method based on the Modelica language in the embodiment of the present application; Figure 3 This is a schematic diagram of a visual configuration interface in an embodiment of the present application; Figure 4 This is a functional module diagram of an embodiment of the FMU integration system based on the Modelica language in the embodiment of the present application; Figure 5 It is an integrated schematic diagram of the FMU integrated system based on the Modelica language in the embodiment of the present application; Figure 6 It is a schematic diagram of an embodiment of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0010] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0011] With the widespread application of system modeling and simulation technology in aviation, aerospace, automobile, shipbuilding and other industrial fields, the industry has an increasingly urgent need for high-precision and high-efficiency system modeling and simulation tools. However, the model compatibility between different modeling and simulation tools has become a bottleneck restricting the development of technology. Modelica, as an equation-based modeling language, has gradually become a standard language in the field of system modeling and simulation due to its powerful cross-domain modeling capabilities and openness. In order to solve the model compatibility problem between different modeling and simulation tools, the Modelica Association proposed the FMI (Functional Mock-up Interface) specification, which defines standardized interfaces and file formats (FMU, Functional Mock-Up Unit), and clarifies the meaning of all interfaces and how to call these interfaces for simulation. FMU is a file format based on the FMI standard, which contains a model description file (modelDescription.xml) and a standardized interface implementation file (source code or binary library). Modeling and simulation tools can realize model exchange and joint simulation between different modeling and simulation tools by integrating FMU files generated by other tools.

[0012] With the advancement of modeling and simulation technology, changes in industry needs, and the continuous advancement of standardization work, FMI specifications have been constantly updated, so modeling and simulation tools need to constantly adapt to new specifications to support the latest specifications, which increases the difficulty and complexity of tool maintenance. Therefore, how to efficiently support the constantly updated FMI specifications has become an important challenge facing current modeling and simulation tools.

[0013] Based on this, the present application provides an FMU integration solution based on the Modelica language.

[0014] refer to Figure 1The present application provides a FMU integration method based on Modelica language, and the FMU integration method based on Modelica language includes: S100: Responding to the user configuration instruction, configuring the original FMU file, and generating an FMU configuration file.

[0015] Specifically, the original FMU file is the FMU file to be configured. The FMU file, namely the FMU model (FunctionalMock-up Unit), is a model format based on the FMI (FunctionalMock-upInterface) standard, which is mainly used for cross-platform simulation, debugging and integration. The FMU model can encapsulate the functional model, making the model exchange and joint simulation between different platforms more efficient and standardized.

[0016] The original FMU file includes the model description file. Decompress the original FMU file to extract and parse the model description file (modelDescription.xml) to obtain FMU related information. FMU related information includes: the platform on which the FMU file is generated, the version of the FMU, the model integration method, the implementation form, the simulation configuration and variable information, etc.

[0017] For example, the original FMU file contains all the selectable field values ​​for each field or variable. For example, the original FMU file contains all the field values ​​of the FMU version: 1.0, 2.0, 3.0; the model integration method corresponds to the field values ​​of ModelExchange (model exchange), Co-Simulation (co-simulation); the implementation form corresponds to the field values ​​of binary, source code, etc.; the platform for generating the FMU file corresponds to the field values ​​of win32, win64, etc.

[0018] Before applying the FMU file to the model simulation, the original FMU file needs to be configured first. Different users have different requirements for FMU files. Therefore, this embodiment provides a configurable function for users to configure the original FMU file according to actual needs.

[0019] More specifically, the user configuration instruction can be issued to the computer device in the form of a command, for example, the user configuration instruction includes a configuration file, and the configuration file includes the user's designation or definition of field values ​​or other attributes (such as variable type, variable name, etc., but not limited to these) for each field. Of course, the user configuration operation can also be received through a visual configuration interface to generate the user configuration instruction.

[0020] The computer device parses and responds to the user configuration instructions, configures the original FMU file, and generates a customized FMU configuration file, which is the FMU integration configuration file.

[0021] The FMU configuration file records the user's configuration or specification of the field values ​​or other properties of each configurable field in the original FMU file.

[0022] S200: Integrate the Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file to obtain the target Modelica model text, wherein the target import template can be adjusted according to the updated FMI specification or user requirements.

[0023] Specifically, the template execution engine can integrate the contents of the imported template and the model description file based on the FMU configuration file to translate and convert them into Modelica model text. More specifically, the template execution engine reads and filters out the target content to be written in the target imported template based on the FMU configuration file (integrated configuration) and the parsed model description file (modelDescription.xml), and integrates the FMU configuration file (integrated configuration) and the parsed model description file with the target content, or adjusts the target content based on the FMU configuration file (integrated configuration) and the parsed model description file and writes it into the Modelica model file, thereby generating the target Modelica model text.

[0024] More specifically, the target import template includes the Modelica model text framework content written in the Modelica language. Different import templates can be set according to the FMU version, model integration mode and other attributes, and the target import template can be determined from multiple import templates according to user configuration data. Of course, a universal import template can also be set, and this application does not limit this.

[0025] The target import template defines the framework content of the Modelica model text, but the framework content in the target import template does not necessarily need to be converted into Modelica model text. Instead, the matched framework content (target content) needs to be selectively written into the Modelica model file according to the FMU configuration file and the model description file. In addition, some of the framework content of the Modelica model text (such as the matched framework content) needs to be adjusted according to the model data in the FMU configuration file and the model description file, such as filling, completion, replacement, etc. Based on this, the target Modelica model text is obtained by integrating the Modelica model text framework content defined in the target import template, the FMU configuration file, and the model data in the model description file.

[0026] In addition, the target import template is adjustable or modifiable. If the FMI specification version is updated, the import template can be added or adjusted without modifying the tool itself, and the Modelica model text can be regenerated according to the modified or adjusted import template through the steps of this embodiment. The regenerated Modelica model text complies with the updated FMI specification, thereby achieving efficient and flexible support for the FMI specification and reducing the complexity of tool maintenance.

[0027] In addition, when debugging the integrated function, it is only necessary to modify the corresponding import template without modifying the software code and recompiling the software, making it more debuggable.

[0028] The Modelica model text generated after integration in this embodiment can be seamlessly integrated with other Modelica models, making it easy to build a multi-domain and cross-platform complex system model.

[0029] The FMU integration method based on the Modelica language in this embodiment is an FMU integration method that supports an extensible template of the Modelica language. Users can efficiently and flexibly integrate FMU files of different versions to build complex multi-domain and cross-platform system models.

[0030] The FMU integration method based on the Modelica language in this embodiment can only add or adjust the template when the FMI specification version is updated, without modifying the tool itself, thereby achieving efficient and flexible support for the FMI specification and reducing the complexity of tool maintenance. When debugging the integrated function and other specific needs, only the template file needs to be modified, without modifying the software code and recompiling the software, which has better debuggability.

[0031] This embodiment is applicable to the FMU integration system of complex system models. When the FMI specification version is updated or under specific requirements, only the template is added or adjusted without modifying the tool itself, and the Modelica model text that meets the updated FMI specification or specific requirements can be generated, thereby achieving efficient and flexible support for the constantly updated FMI specification and specific requirements, and reducing the difficulty and complexity of tool maintenance. This embodiment is based on the Modelica language and can be seamlessly integrated with other Modelica models, making it easy to build complex system models across multiple fields and platforms.

[0032] In one embodiment, in step S200, the Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file are integrated to obtain the target Modelica model text, including: Parse target import template; Write the immutable content in the identified target import template into the Modelica model file to be written; If variable content in the target import template is identified, a determination is made as to whether the variable content should be written based on the FMU configuration file and the model description file; If it is determined that there is target content to be written in the variable content, the model text to be written is generated according to the FMU configuration file, the model data in the model description file and the target content, and the model text to be written is written into the Modelica model file to be written.

[0033] Specifically, the template execution engine parses the target import template byte by byte to identify the variable content and the immutable content (fixed content) in the target import template.

[0034] The fixed part (immutable content) of the target import template includes: FMU interface function definition, simulation auxiliary variable declaration, FMU object declaration, initialization process and other data. It is the target content written in Modelica language that needs to be written into the Modelica model file to be written.

[0035] The immutable content of the target import template can be written directly to the Modelica model file to be written.

[0036] If the parsed content is the immutable content in the target import template, the identified immutable content in the target import template is written to the newly created or specified Modelica model file to be written.

[0037] The variable part (variable content) of the target import template includes: input, output, parameters, internal variable declaration, model single-step simulation process, input variable value setting algorithm (code), output variable value acquisition algorithm (code) and other data.

[0038] According to user needs, when configuring the FMU file, the user can configure and select some fields in the model description file of the original FMU file, and some parameters or fields that are not needed can be unselected and not configured.

[0039] Accordingly, the target import template contains sub-framework contents corresponding to most parameters or fields or variables in the model description file.

[0040] Therefore, it is necessary to determine which framework contents in the target import template need to be written into the Modelica model file to be written and which framework contents do not need to be written into the Modelica model file to be written according to the model parameters in the FMU configuration file and the model description file. That is, it is necessary to determine whether to write the variable contents and, if so, which target contents in the variable contents need to be written.

[0041] Based on this, generating the model text to be written according to the model data and target content in the FMU configuration file and the model description file specifically includes: if the parsed content is the variable content in the target import template, the target content determined to be definitely written and not requiring adjustment in the variable content is written as the model text to be written into the Modelica model file to be written.

[0042] Alternatively, the target content that needs to be adjusted is adjusted (such as filling, complementing, or replacing, etc.) according to the model data in the FMU configuration file and the model description file to generate the model text to be written, and the model text to be written is written into the Modelica model file to be written.

[0043] Among them, the target content that needs to be adjusted, for example, variable information such as the type and name of variables that need to be complemented, or variable-related variable content such as the definition and reading / writing of model variables that need to be replaced, and some may also require variable assignment, etc. And this variable information can be user-configured, so the corresponding variable information can be found in the model description file according to the FMU configuration file.

[0044] When parsing the import template byte by byte, a template keyword list will be established, and keyword matching will be performed cyclically during the parsing process. The corresponding model text will be processed and generated according to the matched keywords until the parsing of the import template file ends.

[0045] Specifically, if the recognized content is used to indicate the end of parsing, stop parsing the target import template, and obtain the target Modelica model text according to the finally obtained Modelica model file.

[0046] More specifically, if the matched keyword is the end character, the parsing is completed, and the content in the finally obtained Modelica model file is the target Modelica model text.

[0047] In this embodiment, according to the integration configuration information in the FMU configuration file and the actual model variable information (model data) in the model description file, the variable content and immutable content in the target import template can be quickly identified. The immutable content is written into the Modelica model file, and a writing judgment is made on the variable content. When it is determined that there is target content, the model text to be written is generated according to the integration configuration information in the FMU configuration file, the actual model variable information (model data) in the model description file, and the target content, and the integration of the FMU configuration file, the model description file, and the import template can be completed quickly, accurately, and fully automatically to obtain the Modelica model text.

[0048] In one embodiment, judging whether to write variable content based on the FMU configuration file and the model description file includes: If the variable content includes conditional judgment logic, conditional judgment is performed on the conditional judgment logic based on the model data in the FMU configuration file and the model description file to obtain a conditional judgment result; If the target branch execution logic text corresponding to the conditional judgment result is obtained from the conditional logic judgment, the target content to be written is obtained according to the target branch execution logic text.

[0049] Specifically, the variable content in the target import template may include conditional judgment logic, and the conditional judgment logic includes conditional judgment statements (or conditional expressions) and corresponding code blocks.

[0050] For example, the if statement is the simplest conditional judgment statement, which consists of three parts: the if keyword, the conditional expression, and the code block. The if statement chooses whether to execute the corresponding code block based on the judgment result of the conditional expression.

[0051] In this embodiment, if it is determined that a conditional branch logic or a conditional judgment logic is matched according to the matched keywords, the model information obtained from the model description file modelDescription.xml according to the FMU configuration file is used to determine whether each branch condition in the conditional logic judgment is met. If it is determined that a certain target branch condition is met according to the obtained conditional judgment result, the target content to be written is obtained according to the code block (branch execution logic text) corresponding to the target branch condition.

[0052] For example, if conditional expression 1: Code Block 1 elif conditional expression 2: Code Block 2 else: Code Block 3 The judgment of the above conditional expressions 1 and 2 needs to be combined with the actual model data in the FMU configuration file and the model description file. Code block 1, code block 2 and code 3 are respectively used as branch execution logic texts.

[0053] If it is determined based on the FMU configuration file and the model description file that the variable in the conditional expression exists, the conditional expression is executed to perform conditional judgment.

[0054] If it is determined according to the conditional judgment result that conditional expression 1 is satisfied, the target content to be written is determined according to code block 1.

[0055] If it is determined according to the conditional judgment result that conditional expression 2 is satisfied, the target content to be written is determined according to code block 2.

[0056] If it is determined according to the conditional judgment result that neither conditional expression 1 nor conditional expression 2 is satisfied, the target content to be written is determined according to code block 3 .

[0057] If it is determined according to the FMU configuration file and the model description file that the conditional judgment result does not satisfy any condition or conditional expression in the conditional judgment logic, it is determined that there is no target content to be written in the conditional judgment logic.

[0058] If it is determined according to the FMU configuration file and the model description file that the variable in the conditional expression does not exist, there is no need to perform conditional judgment on the conditional judgment logic, and it is directly determined that the target content to be written does not exist in the conditional judgment logic.

[0059] Generate the model text to be written according to the FMU configuration file, the model description file and the branch execution logic text.

[0060] In addition, if the branch execution logic text that meets the condition is empty, the target content is empty.

[0061] It should be noted that the branch execution logic text or execution statement here can be a section of code that writes the target content to a specified location. The target content may be input, output, parameter, internal variable declaration, model single-step simulation process, etc., or it may be a section of code or algorithm such as a conditional judgment statement or loop statement that needs to be written into the Modelica model file, etc. This application does not limit this. For example, the target content is an input variable value setting algorithm, an output variable value acquisition algorithm, etc.

[0062] In addition, the branch execution logic text may also be a string of codes including the target content to be written into the Modelica model file and how to adjust the target content. In this way, if the branch execution logic text is executed, the target content may be adjusted according to the FMU configuration file and the model description file to generate the model text to be written.

[0063] This embodiment can accurately identify the conditional judgment logic in the imported template based on the FMU configuration file and the model description file, and determine whether there is target content to be written in the conditional judgment logic. If the target content exists, the model text to be written is generated and written according to the conditional judgment result, which is efficient and fast.

[0064] In one embodiment, judging whether to write variable content based on the FMU configuration file and the model description file includes: If the variable content includes loop logic, and the target variable in the loop logic exists in the configured model data according to the FMU configuration file and the model description file, the target content to be written is determined according to the loop logic text that is cyclically executed in the loop logic; Generate the model text to be written according to the model data and target content in the FMU configuration file and the model description file, and write the model text to be written into the Modelica model file to be written, including: Get the number of loop iterations of the loop logic according to the model data in the FMU configuration file and the model description file; The loop logic is executed according to the number of loop iterations, and the target content in the loop logic text is repeatedly written as the model text to be written into the Modelica model file to be written until the total number of loops reaches the number of loop iterations, or, according to the model data in the FMU configuration file and the model description file, the target content in the loop logic text of each round is adjusted and written into the Modelica model file to be written as the model text to be written until the total number of loops reaches the number of loop iterations.

[0065] Specifically, the variable content in the target import template may contain loop logic, such as for loop, while loop, etc. Loop logic, i.e., loop statement, includes loop body and loop termination condition. The loop body is a set of statements contained in the loop logic that are repeated or executed cyclically. Whether it can be repeated continuously depends on the loop termination condition.

[0066] The loop logic text of this embodiment is the loop body, and the loop logic text includes the target content to be written, or the loop logic text includes the target content to be written and the code of how to adjust the target content (such as filling, completing or replacing, etc.). If the loop logic text is executed, the target content can be adjusted according to the FMU configuration file and the model description file to generate the model text to be written.

[0067] If the loop logic is matched according to the matched keywords, and the target variable in the loop logic exists in the model data (selected parameters or variables, etc.) configured by the user according to the FMU configuration file and the model description file, it means that the loop logic can be executed, and the target content to be written is determined according to the loop logic text that is executed cyclically in the loop logic. The number of loop iterations is determined according to the number of model variables obtained from the model description file, i.e., modelDescription.xml. According to the number of loop iterations, the model text to be written is repeatedly generated and written to the import template until the remaining number of iterations is 0 or the accumulated total number of loops reaches the number of loop iterations.

[0068] The number of model variables is obtained by identifying and counting the specified model variables in the model description file according to the model variable matching statistical rules.

[0069] A model text to be written is generated every cycle. The model text to be written is generated by adjusting the target content in the loop logic text according to the FMU configuration file and the model description file.

[0070] In addition, if it is determined based on the matched keyword that neither the conditional branch logic nor the loop logic is matched, and the matched keyword does not belong to the last character, the matched content is the fixed content or immutable content of the target import template, and the immutable content is written into the Modelica model file to be written.

[0071] In addition, variable information such as the type or name of the model variables corresponding to each round may be different.

[0072] In addition, if it is determined according to the FMU configuration file and the model description file that the target variable in the loop logic does not exist, that is, the variable in the loop logic is an unconfigured variable, then there is no need to execute the loop logic, and it is directly determined that there is no target content to be written in the loop logic.

[0073] This embodiment can accurately identify the loop logic in the imported template based on the FMU configuration file and the model description file, and determine whether there is target content to be written in the loop logic. If there is target content, the model text to be written is repeatedly generated and written according to the number of loop iterations, which is efficient and fast.

[0074] Figure 2 FIG. 1 is a flow chart of a second embodiment of the FMU integration method based on the Modelica language in the embodiment of the present application; Figure 2 Template file loading means loading the target import template, modelDescription.xml file parsing means parsing the model description file according to the FMU configuration file, template file byte-by-byte parsing means parsing the target import template byte-by-byte to identify characters; template keyword matching means keyword matching of the identified characters to determine whether the identified characters belong to branch logic or loop logic or are the end characters or are fixed content.

[0075] If the recognized characters are determined to be branch logic, the recognized variable content is determined to include conditional judgment logic, and the conditional branches in the conditional judgment logic are judged according to the model data in the FMU configuration file and the model description file. Whether one of the conditional branches is satisfied is determined according to the conditional judgment result. If one of the target conditional branches is satisfied, the model text to be written is generated according to the branch execution logic text, FMU configuration file and model description file corresponding to the target conditional branch. The model text to be written is the template branch logic content text, and the template branch logic content text is written into the Modelica model file to be written.

[0076] If it is determined that the identified variable content does not include conditional judgment logic but includes loop logic, the number of loop iterations is obtained according to the model data in the FMU configuration file and the model description file. For example, the number of model variables is used as the number of loop iterations, and the loop logic is looped according to the number of loop iterations. The model text to be written is generated according to the FMU configuration file, the model description file and the target content in the loop body of each loop. The model text to be written is the template loop logic text. The template loop logic text is written into the Modelica model file to be written until the remaining number of loops is 0.

[0077] If it is determined that the recognized variable content does not include conditional judgment logic or loop logic but is a terminal character, parsing is terminated to obtain the final Modelica model file.

[0078] If it is determined that the recognized variable content does not include conditional judgment logic, loop logic, or the last character, it is determined to be fixed content (immutable content) of the imported template, and the template fixed content is written into the Modelica model file to be written.

[0079] pass Figure 2 The process template execution engine parses the template file byte by byte, identifies the fixed and variable content in the template, and replaces the variable part in the template according to the integrated configuration information and the actual model variable information. The template import and template execution engine supports conditional branch logic and loop logic. When parsing and replacing the definition, reading and writing of model variables and other related variable content, it can automatically generate correct and legal Modelica model text according to whether the same type of variables exist and the number of variables.

[0080] certainly, Figure 2 This is merely an exemplary description. The conditional judgment logic, loop logic, end characters, identification and judgment order of immutable content, and how to generate the model text to be written can all be set according to actual needs, and this application does not impose any restrictions on this.

[0081] In one embodiment, in step S100, in response to a user configuration instruction, the original FMU file is configured to generate an FMU configuration file, including: Extract the model description file from the original FMU file, parse the model description file, and obtain FMU related information; Display FMU related information to users through a visual configuration interface; The system receives and responds to the user's configuration operations on various configurable fields in FMU related information through a visual configuration interface, and generates an FMU configuration file through integrated configuration.

[0082] Specifically, the original FMU file is the FMU file selected by the user. The original FMU file contains files such as the model description file and the standardized interface implementation file. The model description file is the modelDescription.xml file. The FMU related information includes the platform for generating the FMU file, the FMU version, the model integration method, the implementation form, the simulation configuration and the variable information.

[0083] The integrated configuration module implements user-defined FMU integrated configuration and provides a visual interface and parameter configuration options.

[0084] According to the FMU detailed information or FMU related information obtained from the FMU file, the above FMU detailed information is presented to the user through an integrated configuration panel or a visual configuration interface. Some fields in the model description file are editable or configurable, and some fields are not editable or configurable. Therefore, the configurable fields and the corresponding optional field values ​​can be displayed on the visual configuration interface, or the configurable fields and the corresponding optional field values ​​can be displayed on the visual configuration interface, and the non-configurable fields and the corresponding fixed field values ​​or default field values ​​are also displayed.

[0085] It should be noted that the configurable fields in this embodiment include optional fields and required fields, and the optional fields are fields that the user may or may not select according to needs.

[0086] Required fields are fields that must be selected and are automatically selected by default.

[0087] Both optional fields and required fields can have one or more field values ​​to choose from. If there is only one field value to choose from, its field value is automatically determined after the optional field is selected and cannot be modified or edited. If there are multiple field values ​​to choose from, the user can specify the field value by entering it in the input box, or select a field value from a variety of field values ​​by selecting an option in a drop-down box or clicking, etc., which is not limited to this. The specific determination is based on the presentation effect of the visual configuration interface, and this application does not impose any restrictions on this.

[0088] In a specific embodiment, the configurable fields include, for example, FMU version, model integration mode, implementation form, integration mode, and editable variables or fields or parameters included in the integration mode specified by the user.

[0089] For example, the user selects the FMU version to be integrated (1.0, 2.0, 3.0 optional), model integration method (ModelExchange, Co-Simulation optional), implementation form (binary, source code optional), etc. to implement the configuration integration of the FMU.

[0090] Since there are many fields, parameters or variables in the model description file, it may be necessary to configure different fields in multiple visual configuration interfaces.

[0091] Figure 3 This is a schematic diagram of a visual configuration interface in an embodiment of the present application, refer to Figure 3 In the FMU file field, you can specify and select a local original FMU file. In the Model name field, you can customize the model name to be written into the Modelica model file or the final generated Modelica model file. The FMU version field selects version 2.0. The FMU type field is the model integration method field. There are two fields, Model-Exchange and Co-Simulation, for selection. Users can select any one by clicking the circle. Figure 3 Model-Exchange is selected in the . The platform field selects win32, and the number of variables, the number of state variables, and the number of event indicators are 2000, 8, and 2 respectively. These fields can be obtained by counting the configured variables, state variables, and event indicators. The generation tool selected is MWORKS.Sysplorer, and the generation date is 2024-08-26T11:33:31Z. The variable import mode includes 6 optional methods of variable integration, including black box import, partial import, complete import, import of adjustable parameters, source code import, and variable name structuring. Insert into is an optional option or optional field, Figure 3 There are multiple options available through the drop-down list. Figure 3 The selected<Top Model> The model file storage location can be specified by the user. Whether to use the full model name when generating the FMU resource path is optional and can be selected by checking the box.

[0092] certainly, Figure 3 This is just a schematic diagram of a visual configuration interface. Other visual configuration interfaces can be used to configure other fields, parameters or variables, and this application does not impose any restrictions on this.

[0093] This embodiment can facilitate users to intuitively configure FMU files according to their needs through a visual configuration interface, which is efficient and convenient.

[0094] In one embodiment, the configurable fields include integration modes, and the integration modes include mandatory parameter integration mode, complete parameter integration mode, and custom integration mode; Receive and respond to user configuration operations on various configurable fields in FMU related information through the visual configuration interface, including: If it is determined that the integration mode specified by the user is a mandatory parameter integration mode according to the user's configuration operation on the integration mode, the fields corresponding to the mandatory parameters contained in the mandatory parameter integration mode are displayed to the user, and the user's configuration operation on the fields corresponding to the mandatory parameters is received, wherein the mandatory parameters include the top-level input variables, output variables and other top-level parameters of the model; If it is determined that the integration mode specified by the user is a complete parameter integration mode according to the user's configuration operation on the integration mode, the fields corresponding to all parameters in the integration model included in the complete parameter integration mode are displayed to the user, and the user's configuration operation on the fields corresponding to the parameters is received, wherein all parameters include the top-level input variables, output variables, other top-level parameters and model internal variables of the model; If it is determined that the integration method specified by the user is a custom parameter integration method based on the user's configuration operation on the integration method, the fields corresponding to the mandatory parameters and the fields corresponding to the optional parameters included in the custom parameter integration method are displayed to the user, the user's configuration operation on the fields corresponding to the mandatory parameters is received, and the user's selection and editing operation on the fields corresponding to the optional parameters is received, where the mandatory parameters include the top-level input variables, output variables and other top-level parameters of the model, and the optional parameters include the model's internal variables.

[0095] Specifically, for various application scenarios, users have significantly different requirements for the integration of model variables when using FMU. Specifically, when integrating FMU for real-time simulation, there are extremely high requirements for the simulation efficiency of FMU, and the FMU corresponding to large-scale complex system models often contains a large number of model variables, which leads to a long time for reading the model variable results during the single-step simulation of FMU. In order to improve the simulation efficiency, in the process of FMU integration, it is necessary to adopt a strategy to retain only the top-level input, output and parameter variables required for simulation interaction, and filter out unnecessary internal variables. However, when integrating FMU for model debugging, it becomes crucial to fully obtain the information of all variables inside FMU, so that when problems occur, they can be accurately located and solved by deeply analyzing the status of internal variables. This requires that all model variables must be integrated when integrating FMU. Therefore, the traditional single FMU variable integration strategy is difficult to adapt to such diversified needs. How to ensure the comprehensiveness of model information while taking into account simulation efficiency and flexibly meeting the integration requirements in different application scenarios has become a major challenge faced by modeling and simulation tools when integrating FMU.

[0096] Based on the technical problem that the above-mentioned traditional variable integration strategy cannot adapt to diversified needs, this embodiment provides a variety of variable integration methods for model variables, including: mandatory parameter integration method (black box integration method), complete parameter integration method (complete integration method) and custom integration method (partial integration method). During the configuration process, users can select any variable integration method according to their needs.

[0097] Among them, the black box integration method integrates the mandatory parameters, including the input, output and parameters of the top level of the model; the complete integration method integrates all variables in the model, that is, it includes mandatory parameters and optional parameters, specifically including the fields corresponding to all variables or parameters such as the input, output and parameters of the top level of the model and the internal variables of the model; the partial integration method includes mandatory parameters, that is, mandatory parameters such as the top level input and output variables of the model are selected by default, and the remaining parameters can support users to freely select the variables to be integrated.

[0098] Some parameter corresponding fields can automatically select or fill in default values ​​when initially displayed. If the user does not re-edit, the field will be the default value. Some fields require users to enter and fill in the values ​​themselves, while some fields allow users to select from selectable values, such as from a drop-down box or tile options.

[0099] More specifically, for the mandatory parameter integration method (black box integration method), the fields corresponding to the mandatory parameters or mandatory variables and the optional field values ​​or input boxes of the fields are displayed to the user in the visual configuration interface, and the fields corresponding to the mandatory parameters are selected by default, prohibiting the user from canceling the selection or prompting the user that it must be selected when the user cancels the selection. If the field value of the field corresponding to the mandatory parameter is editable, the user can enter the field value, select the field value from the drop-down box, or select the field value by clicking, etc. This application does not impose any restrictions on this.

[0100] For the complete parameter integration mode (complete integration mode), the fields corresponding to all parameters or all variables and the optional field values ​​or input boxes of the fields are displayed to the user in the visual configuration interface. These fields are all selected. For fields with editable field values, users can enter field values ​​or select field values ​​from drop-down boxes or select field values ​​by clicking, etc. This application does not impose any restrictions on this. For fields with non-editable field values, the field value of the field is the default value.

[0101] For custom integration (partial integration), the fields corresponding to the required parameters or required variables and the fields corresponding to the optional parameters or optional variables are displayed to the user in the visual configuration interface. Among them, the fields corresponding to the required parameters must be selected, so they are selected by default. If the field value of the field corresponding to the required parameter is editable, the user can also edit the field value. The fields corresponding to the optional parameters are selected or unselected by the user according to the needs. For the selected optional fields, the user can also configure or edit their field values. Of course, for fields with default values ​​or non-editable fields, the user does not need to edit the field value.

[0102] The FMU integration configuration module designed in this application supports multiple variable integration methods. The mandatory parameter integration method meets the requirements of efficient and concise FMU integration and improves simulation efficiency; the complete parameter integration method meets the full variable FMU integration requirements in application scenarios such as model debugging; the custom integration method supports users to freely select the variables or parameters to be integrated. By selecting different variable integration methods, different diversified integration requirements and application scenarios can be met while taking into account integration efficiency and functionality.

[0103] In one embodiment, the FMU configuration file includes an FMU version and a model integration mode; Before integrating the Modelica model text framework content defined in the target import template, the model description file in the original FMU file, and the FMU configuration file, the FMU integration method based on the Modelica language also includes: According to the FMU version and model integration method specified in the FMU configuration file, a matching target import template is determined from the available import templates.

[0104] Specifically, for example, the FMU version includes three versions: 1.0, 2.0 and 3.0, and the model integration method includes two model reuse methods or model integration methods included in the FMI standard: Model Exchange and Co-Simulation. FMI supports two main types of FMI units: Model Exchange and Co-Simulation. These two modes are suitable for model integration and execution in different scenarios. The full name of the FMI standard is Functional Mock-up Interface. It is a tool-independent standard that supports model exchange (ModelExchange) and co-simulation (Co-Simulation) of dynamic models through a combination of XML files and compiled C code.

[0105] Therefore, if different FMU versions and different model integration methods correspond to different import templates, there are a total of 6 import templates.

[0106] Of course, some FMU versions or some model integration methods can also share the same import template, which can be configured according to the actual application scenario, and a mapping relationship between the FMU version and model integration method and the import template can be established. In this way, the target import template can be matched according to the FMU version and model integration method specified in the user-configured FMU configuration file. This application does not impose any restrictions on this.

[0107] Different FMU versions and different model integration methods may result in large differences in one or more of the configured parameters, variables, inputs, outputs, algorithms, etc. This embodiment sets different types of import templates in detail according to the FMU version and model integration method, which can ensure that the import template is more in line with the actual specific application scenario, is smaller in size than the general import version, reduces the setting of invalid framework content in the import template, and speeds up the efficiency and accuracy of import template parsing and conversion into Modelica model text.

[0108] refer to Figure 4 , the present application also provides a FMU integration system based on Modelica language, the FMU integration system based on Modelica language includes: an FMU integration configuration module 100 and a conversion module 200; The FMU integrated configuration module 100 is used to respond to user configuration instructions, configure the original FMU file, and generate an FMU configuration file; The conversion module 200 is used to integrate the Modelica model text framework content defined in the target import template, the model description file and the FMU configuration file in the original FMU file to obtain the target Modelica model text, wherein the target import template can be adjusted according to the updated FMI specification or user requirements.

[0109] Specifically, the FMU integrated configuration module 100 transmits the integrated configuration selected by the user, namely the FMU configuration file and the model description file, to the template execution engine. The conversion module 200 is specifically used to translate the FMU configuration file and the model description file into Modelica model text based on the imported template through the template execution engine.

[0110] In one embodiment, the conversion module 200 includes: Template parsing module, used to parse the target imported template; The first writing module is used to write the immutable content in the identified target import template into the Modelica model file to be written; A write judgment module is used to judge whether to write the variable content based on the FMU configuration file and the model description file if the variable content in the target import template is identified; The second writing module is used to generate the model text to be written according to the FMU configuration file, the model data in the model description file and the target content if it is determined that there is target content to be written in the variable content, and write the model text to be written into the Modelica model file to be written.

[0111] Figure 5 This is an integrated schematic diagram of the FMU integrated system based on the Modelica language in the embodiment of the present application; Figure 5 The FMU file, i.e. the original FMU file, is configured for FMU integration through the integrated configuration module to obtain the FMU configuration file. The template execution engine reads the FMU configuration file, parses the model description file, and determines which framework contents in the imported template need to be written into the Modelica model file to be written and which framework contents do not need to be written into the Modelica model file to be written based on the parsing results. The Modelica model text is obtained based on the final Modelica model file.

[0112] In one embodiment, the write judgment module includes: A conditional judgment module, for performing conditional judgment on the conditional judgment logic based on the model data in the FMU configuration file and the model description file if the variable content includes the conditional judgment logic, and obtaining a conditional judgment result; The target content determination module is used to obtain the target content to be written according to the target branch execution logic text if the target branch execution logic text corresponding to the conditional judgment result is obtained from the conditional logic judgment.

[0113] In one embodiment, the write judgment module includes: A loop judgment module is used to determine the target content to be written according to the loop logic text that is cyclically executed in the loop logic if the variable content includes loop logic and the target variable in the loop logic exists in the configured model data according to the FMU configuration file and the model description file; The second writing module includes: A loop iteration number acquisition module is used to acquire the loop iteration number of the loop logic according to the model data in the FMU configuration file and the model description file; The loop writing module is used to execute the loop logic according to the number of loop iterations, and repeatedly write the target content in the loop logic text as the model text to be written into the Modelica model file to be written until the total number of loops reaches the number of loop iterations, or, according to the model data in the FMU configuration file and the model description file, adjust the target content in the loop logic text of each round and write it into the Modelica model file to be written as the model text to be written until the total number of loops reaches the number of loop iterations.

[0114] In one embodiment, the FMU integrated configuration module 100 includes: The file parsing module is used to extract the model description file from the original FMU file, parse the model description file, and obtain FMU related information; Display module, used to display FMU related information to users through a visual configuration interface; The configuration module is used to receive and respond to the user's configuration operations on various configurable fields in the FMU related information through a visual configuration interface, and generate an FMU configuration file through integrated configuration.

[0115] In one embodiment, the configurable fields include integration modes, and the integration modes include mandatory parameter integration mode, complete parameter integration mode, and custom integration mode; Configuration module, specifically used for: If it is determined that the integration mode specified by the user is a mandatory parameter integration mode according to the user's configuration operation on the integration mode, the fields corresponding to the mandatory parameters contained in the mandatory parameter integration mode are displayed to the user, and the user's configuration operation on the fields corresponding to the mandatory parameters is received, wherein the mandatory parameters include the top-level input variables, output variables and other top-level parameters of the model; If it is determined that the integration mode specified by the user is a complete parameter integration mode according to the user's configuration operation on the integration mode, the fields corresponding to all parameters in the integration model included in the complete parameter integration mode are displayed to the user, and the user's configuration operation on the fields corresponding to the parameters is received, wherein all parameters include the top-level input variables, output variables, other top-level parameters and model internal variables of the model; If it is determined that the integration method specified by the user is a custom parameter integration method based on the user's configuration operation on the integration method, the fields corresponding to the mandatory parameters and the fields corresponding to the optional parameters included in the custom parameter integration method are displayed to the user, the user's configuration operation on the fields corresponding to the mandatory parameters is received, and the user's selection and editing operation on the fields corresponding to the optional parameters is received, where the mandatory parameters include the top-level input variables, output variables and other top-level parameters of the model, and the optional parameters include the model's internal variables.

[0116] In one embodiment, the FMU configuration file includes an FMU version and a model integration mode; The Modelica-based FMU integration system also includes: The template matching module is used to determine a matching target import template from available import templates according to the FMU version and model integration method specified in the FMU configuration file.

[0117] The FMU integration system based on Modelica language of this application is specifically described in the above-mentioned FMU integration method based on Modelica language, which will not be repeated here.

[0118] Figure 6 7 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 710 (for example, one or more processors) and a memory 720, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 733 or data 732. Among them, the memory 720 and the storage medium 730 can be short-term storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device 700. Furthermore, the processor 710 may be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the computer device 700.

[0119] The computer device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and / or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 6 The illustrated computer device structure does not constitute a limitation on the computer device, and may include more or fewer components than illustrated, or combine certain components, or arrange the components differently.

[0120] The present application also provides a computer device, the computer device includes a memory and a processor, the memory stores computer-readable instructions, when the computer-readable instructions are executed by the processor, the processor executes the steps of the FMU integration method based on the Modelica language in the above-mentioned embodiments. The present application also provides a computer-readable storage medium, the computer-readable storage medium can be a non-volatile computer-readable storage medium, the computer-readable storage medium can also be a volatile computer-readable storage medium, the computer-readable storage medium stores instructions, when the instructions are executed on the computer, the computer executes the steps of the FMU integration method based on the Modelica language.

[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0123] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A FMU integration method based on Modelica language, characterized in that: The FMU integration method based on Modelica language includes: In response to user configuration instructions, configure the original FMU file and generate an FMU configuration file; The Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file are integrated to obtain the target Modelica model text, wherein the target import template can be adjusted according to the updated FMI specification or user requirements.

2. The FMU integration method based on Modelica language according to claim 1, characterized in that: The Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file are integrated to obtain the target Modelica model text, including: Parsing the target import template; Writing the identified immutable content in the target import template into the Modelica model file to be written; If variable content in the target import template is identified, whether to write the variable content is determined based on the FMU configuration file and the model description file; If it is determined that there is target content to be written in the variable content, the model text to be written is generated according to the FMU configuration file, the model data in the model description file and the target content, and the model text to be written is written into the Modelica model file to be written.

3. The FMU integration method based on Modelica language according to claim 2, characterized in that: The step of judging whether to write the variable content based on the FMU configuration file and the model description file includes: If the variable content includes conditional judgment logic, conditional judgment is performed on the conditional judgment logic based on the model data in the FMU configuration file and the model description file to obtain a conditional judgment result; If the target branch execution logic text corresponding to the conditional judgment result is obtained from the conditional logic judgment, the target content to be written is obtained according to the target branch execution logic text.

4. The FMU integration method based on Modelica language according to claim 2, characterized in that: The step of judging whether to write the variable content based on the FMU configuration file and the model description file includes: If the variable content includes loop logic, and the target variable in the loop logic exists in the configured model data according to the FMU configuration file and the model description file, the target content to be written is determined according to the loop logic text that is cyclically executed in the loop logic; The step of generating the model text to be written according to the FMU configuration file, the model data in the model description file and the target content, and writing the model text to be written into the Modelica model file to be written comprises: Acquire the number of loop iterations of the loop logic according to the model data in the FMU configuration file and the model description file; The loop logic is executed according to the number of loop iterations, and the target content in the loop logic text is repeatedly written into the Modelica model file to be written as the model text to be written until the total number of loop iterations reaches the number of loop iterations, or, according to the model data in the FMU configuration file and the model description file, the target content in the loop logic text of each round is adjusted and written into the Modelica model file to be written as the model text to be written until the total number of loop iterations reaches the number of loop iterations.

5. The FMU integration method based on Modelica language according to claim 1, characterized in that: The responding user configuration instruction configures the original FMU file to generate an FMU configuration file, including: Extracting a model description file from the original FMU file, parsing the model description file, and obtaining FMU related information; Displaying the FMU related information to the user through a visual configuration interface; The visual configuration interface receives and responds to the user's configuration operations on each configurable field in the FMU related information, and generates an FMU configuration file through integrated configuration.

6. The FMU integration method based on Modelica language according to claim 5, characterized in that: The configurable fields include integration modes, which include mandatory parameter integration mode, complete parameter integration mode and custom integration mode; The receiving and responding to the configuration operation of the user on each configurable field in the FMU related information through the visual configuration interface includes: If it is determined that the integration mode specified by the user is a mandatory parameter integration mode according to the configuration operation of the user on the integration mode, fields corresponding to the mandatory parameters contained in the mandatory parameter integration mode are displayed to the user, and the configuration operation of the user on the fields corresponding to the mandatory parameters is received, wherein the mandatory parameters include input variables, output variables and other top-level parameters of the top level of the model; If it is determined that the integration mode specified by the user is a complete parameter integration mode according to the configuration operation of the user on the integration mode, then displaying to the user the fields corresponding to all parameters in the integration model included in the complete parameter integration mode, and receiving the configuration operation of the user on the fields corresponding to the parameters, wherein all parameters include the top-level input variables, output variables, other top-level parameters and model internal variables of the model; If it is determined that the integration method specified by the user is a custom parameter integration method based on the user's configuration operation on the integration method, the fields corresponding to the mandatory parameters and the fields corresponding to the optional parameters contained in the custom parameter integration method are displayed to the user, the user's configuration operation on the fields corresponding to the mandatory parameters is received, and the user's selection and editing operation on the fields corresponding to the optional parameters is received, wherein the mandatory parameters include the input variables, output variables and other top-level parameters of the top level of the model, and the optional parameters include model internal variables.

7. The FMU integration method based on Modelica language according to claim 1, characterized in that: The FMU configuration file includes the FMU version and the model integration method; Before integrating the Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file, the Modelica language-based FMU integration method further includes: According to the FMU version and model integration mode specified in the FMU configuration file, a matching target import template is determined from available import templates.

8. A FMU integration system based on Modelica language, characterized in that: The FMU integration system based on Modelica language includes: an FMU integration configuration module and a conversion module; FMU integrated configuration module, used to respond to user configuration instructions, configure the original FMU file, and generate an FMU configuration file; The conversion module is used to integrate the Modelica model text framework content defined in the target import template, the model description file in the original FMU file and the FMU configuration file to obtain the target Modelica model text, wherein the target import template can be adjusted according to the updated FMI specification or user requirements.

9. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to execute the FMU integration method based on the Modelica language according to any one of claims 1 to 7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the FMU integration method based on the Modelica language as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Joint simulation method and system for Modelica model and Simulink model and electronic equipment

    CN112115604A

  • Joint simulation method for converting FMU model into Modelica model

    CN114860388A

  • File analysis-based FMU file importing method and device

    CN117632114A

  • Data interaction association mapping transmission method for SKTC task model

    CN119475796A

  • Transforming a model in a first language to a surrogate in a second language for simulation

    US20240086598A1