CN113934626A - Model process debugging method, device and storage medium - Google Patents
Model process debugging method, device and storage medium Download PDFInfo
- Publication number
- CN113934626A CN113934626A CN202111126406.0A CN202111126406A CN113934626A CN 113934626 A CN113934626 A CN 113934626A CN 202111126406 A CN202111126406 A CN 202111126406A CN 113934626 A CN113934626 A CN 113934626A
- Authority
- CN
- China
- Prior art keywords
- target variable
- variable
- line
- target
- code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 230000008569 process Effects 0.000 title claims abstract description 36
- 230000008859 change Effects 0.000 claims description 19
- 238000004422 calculation algorithm Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 238000006073 displacement reaction Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002980 postoperative effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/366—Software debugging using diagnostics
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a method, equipment and a medium for debugging a model process, and relates to the technical field of model debugging. The method comprises the following steps: obtaining a tentative error code line in a target model; determining a target variable in the tentative error code line, and adding target variable information output codes to the upper line and the lower line of the code line where the target variable appears; debugging the target model after the adding operation, and outputting the information of the target variable; determining a related variable of the target variable; and taking the associated variable as a new target variable, and returning to the operation of adding target variable information output codes in the previous line and the next line of the code line where the target variable appears. The embodiment can quickly realize code problem discovery and output, and reduce the work intensity of code debugging of engineering technicians.
Description
Technical Field
The embodiment of the invention relates to a model debugging technology, in particular to a model process debugging method, equipment and a storage medium.
Background
Modelica is an open, object-oriented and equation-based computer language, can span different fields, and can conveniently realize the modeling of a complex physical system.
Because the Modelica language is mainly object-oriented modeling and equation solving, debugging breakpoints cannot be formed in the program running process, and codes are debugged line by line, so that the debugging of the calculation process is inconvenient, error reasons cannot be accurately provided in the calculation process, the model code debugging process is slow and difficult, and various links such as software learning, model building, model verification and the like are influenced.
Disclosure of Invention
The embodiment of the invention provides a model process debugging method, model process debugging equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a model process debugging method, including:
obtaining a tentative error code line in a target model;
determining a target variable in the tentative error code line, and adding target variable information output codes to the upper line and the lower line of the code line where the target variable appears;
debugging the target model after the adding operation, and outputting the information of the target variable;
if the information of the target variable is wrong and the code line of the target variable is correct, determining the associated variable of the target variable;
and taking the associated variable as a new target variable, and returning to the operation of adding target variable information output codes in the previous line and the next line of the code line where the target variable appears until the code line error where the new target variable appears is determined.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the model process debugging method of any of the embodiments.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the model process debugging method according to any embodiment.
In a fourth aspect, an embodiment of the present invention further provides a method for debugging a model process, including:
obtaining a tentative error code line in the target model;
determining a target variable in the tentative error code line and an associated variable of the target variable;
adding target variable information output codes to the upper line and the lower line of the code line where the target variable appears, and adding associated variable information output codes to the upper line and the lower line of the code line where the associated variable appears;
and debugging the target model after the adding operation, and outputting the information of the target variable and the associated variable.
The embodiment of the invention provides an efficient problem debugging scheme based on Modelica language characteristics, which is characterized in that target variables which are possible to make mistakes are determined and target variable information output codes are added, so that information of the target variables is automatically output in the process of debugging a target model; determining the associated variables of the target variables by judging that the information of the target variables is wrong and the code lines of the target variables are correct, and further acquiring the information of the associated variables by adding codes, so as to trace back each variable which possibly makes errors step by step until the code lines of the new target variables are determined to be wrong. The embodiment can quickly realize code problem discovery and output, and reduce the work intensity of code debugging of engineering technicians.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a model process debugging method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another model process debugging method provided by the embodiment of the invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
For convenience of describing the method provided by the present invention, an example is introduced first, and a conventional process debugging method is described. The model to be debugged and written based on the Modelica language is as follows:
TABLE 1 model written based on Modelica language
1 | model Model17 |
2 | Real x(start=1); |
3 | Real timeX; |
4 | Real y; |
5 | Real z; |
6 | algorithm |
7 | timeX:=x+time; |
8 | z:=sqrt(timeX); |
9 | equation |
10 | z-der(y)=1; |
11 | x=sqrt(z-10*time); |
12 | end Model17; |
The model is started to debug using the currently available Modelica commercial software. The software cannot locate a specific position for a calculation type error, only a rough equation form is given, and a few specific locating lines are given. The error reporting content of the model is as follows:
Error:sqrt(z+(-2)*time)=sqrt(-0.135081857131789)
Error:sqrt(z+(-2)*time)=sqrt(-0.135081848943282)
analysis shows that the data in brackets of sqrt should be positive, and that an error occurs in line 11. Research personnel can only search for error reasons in the model building process by themselves, so that the reasons for problems cannot be found quickly. The embodiment of the invention provides a model process debugging method, the flow chart of which is shown in figure 1, and the method can be applied to the process debugging of a model written based on Modelica language. The embodiment is executed by an electronic device and is used as an auxiliary tool of Modelica business software and operated in a model process debugging process. With reference to fig. 1, the method provided in this embodiment specifically includes:
and S110, acquiring a tentative error code line in the target model.
The target model is a model written based on Modelica language and is a model to be debugged. The tentative error code line may be a code that includes an algorithm or equation that is likely to be erroneous. Preferably, the existing Modelica business software is used, the model is debugged, and the Modelica business software outputs a code line with an error report in a window as a tentative error code line; alternatively, if the Modelica business software outputs only compute-class errors, the tentative error code line is determined by the user, e.g., selected, line 11 of Table 1.
And S111, determining a target variable in the tentative error code line.
And S120, adding target variable information output codes in the upper line and the lower line of the code line where the target variable appears.
And determining a non-time variable in the tentative error code line as a target variable if any variable in the tentative error code line can be in error, but the time variable is only related to system operation and generally has no error. Or, the user can select the variable according to own analysis, respond to the variable selection operation of the user, and take the variable selected by the user as the target variable.
When the number of the target variables in the step is more than two, one of the target variables is selected to be added with the target variable information output code. Optionally, in response to a setting triggering operation of a user, generating a target variable information output code according to a target variable, and automatically adding the target variable information output code to a previous line and a next line of a code line where the target variable appears; wherein the setting triggering operation comprises: triggering a keyboard shortcut key, triggering a mouse code debugging key or triggering a gesture of a touch panel; the variable information includes a value and a running time of the variable.
In one embodiment, when the target variable is a common single variable, the target variable information output code format is as follows:
simulate. properties. streams. print (String (time) + "error position before" + "variable name" + "+ strang (variable name));
modelica, properties, streams, print (String (time) + after reporting a bit "+" "+" variable name "+" = "+ strang (variable name));
when the target variable is a variable of an array type, the target variable information output code format is as follows:
modelica. properties. streams. print (String (time) + "before error position" + "variable name" + "[" + "variable name position" + "]" + "-" + String (variable name [ variable name position ]));
modelica. properties. streams. print (String (time) + "after reporting a bit" + "variable name" + "[" + "variable name position" + "]" + "-" + String (variable name [ variable name position ]));
the output form of String (time) + "reporting position" + "" "+" variable name "+" [ "+" variable name position "+" ] "+" ═ String (variable name [ variable name position ]) can change the output code template according to the specific variable property.
Therefore, after the target variable is determined, the target variable only needs to be added into the template, and the target variable information output code can be generated by combining the output code of the running time (time).
The code line with the target variable preferentially selects a temporary error code line, so that the error position can be directly hit, and the error reason can be found as soon as possible; if the user needs to know the historical data, the line of code in the target model where the target variable first appears can be selected. The target model after the addition operation is shown in table 2:
TABLE 2 Add post-operative object model
S130, debugging the added target model, and outputting the information of the target variable.
The target model shown in table 2 was debugged using currently available modeica business software. The value and running time of the target variable are output in a window of Modelica business software, and the position (code line) of the target variable can also be output. In table 2, variables of the four statements 11, 12, 14 and 15 are output, and the output form is as follows:
time after 0.002 displacement is 0.002
0.002 time before error position report is 0.002
0.002 error position reported z-0.994593
After 0.002 reported displacement, z is 0.994593
Time after 0.004 error reporting is 0.004
0.004 time before error reporting position is 0.004
0.004 error position-reporting z-0.989031
After 0.004 reported displacement, z is 0.989031
0.006 time after error reporting is 0.006
0.006 error position reporting time is 0.006
0.006 error position-reporting front z-0.983304
After 0.006 reported displacement, z is 0.983304
The data in the window is the result of the code running, and the readability is poor. Optionally, the script is called, and the values of the target variables are sorted according to the sequence of the running time, for example, a curve or a table is drawn, so as to find the change rule of the target variables. For example, collated as table 3.
TABLE 3 data List of target variables z
And S140, judging whether the information of the target variable and the code line of the target variable are correct or not. If the information of the target variable is wrong and the code line of the target variable appears is correct, executing S150; if the information of the target variable is correct and the code line where the target variable appears is correct, S160 is performed. If the target variable has a code line error, S170 is performed.
The code line in which the target variable appears includes an equation or algorithm that a user determines if it is correct, and if a set operation can be performed correctly, such as tapping ALT + P on a keyboard, then the code line in which the target variable appears is determined to be correct; if false, then ALT + L on the keyboard is tapped.
Whether the information of the target variable is correct or not can be automatically completed. Specifically, according to the value of the target variable and the operating time, a change rule of the value of the target variable with time, such as a first-order change rate or a second-order change rate, is calculated. If the change rule is inconsistent with the physical change rule of the equation or algorithm in the code line where the target variable appears, the information of the target variable is wrong; and if the change rule is consistent with the physical change rule of the equation or algorithm in the code line where the target variable appears, the information of the target variable is correct.
The physical change rule of the equation or the algorithm is as follows: the physical change law of the target variable embodied in the equation or algorithm. The change rule is embodied by the mathematical conditions of the equation or algorithm itself, for example, in x ═ sqrt (z-10 × time), z-10 × time cannot be 0, that is, the physical change rule of z is always greater than 10 × time. However, according to the data in table 3, when z and time are plotted, it is found that z is a decreasing function, time is an increasing function, and z is less than 10 × time after a certain time, which causes sqrt to have a calculation error of a negative number open root, and because time is not variable, the information error of z variable is explained. Conversely, if z is always greater than 10 × time according to the data in table 3, then the information for the z variable is correct.
And S150, determining the related variable of the target variable.
The associated variable is a variable having an operational relationship with the target variable, and for an algorithm or an equation, the target variable is located at one end to which a value is assigned, and the associated variable is located at one end to which a value is assigned. Thus, above the line of code where the target variable appears, the algorithm or equation for which the target variable appears is determined; taking variables in the algorithm or equation except the target variable as related variables; the number of associated variables is at least one.
Following the example above, if the z variable is in error, then the equation associated with z is found and analyzed to find z:sqrt (timeX) and the associated variable is timeX.
And S151, taking the associated variable as a new target variable, and returning to S120.
The code line where the new target variable appears is preferably the code line where the algorithm or equation where the historical target variable appears is determined above the code line where the historical target variable appears, and the probability that the code line has a problem is relatively high. Referring to the description at S120, the timeX variable information output code is added to the upper line and the lower line of z: ═ sqrt (timeX), and the description thereof is omitted.
Optionally, before S151, the target variable information output code added in history may be deleted to keep the output information non-redundant; of course, all the target variable information output codes added can be deleted at one time after finally determining that the code line error of the new target variable occurs.
And S160, determining another variable in the tentative error code line, and updating the another variable to the target variable. Returning to the operation of adding the target variable information output code at the upper line and the lower line of the code line where the target variable appears, S120.
And if the information of the target variable is correct and the code line of the target variable is correct, which indicates that the currently selected target variable has no error, selecting another variable in the tentative error code line.
And S170, ending the operation.
And (3) finding that the code line with the target variable possibly has equation writing errors, condition judgment errors, equation condition missing errors and the like, and the user judges and modifies the error reason by himself.
The embodiment of the invention provides an efficient problem debugging scheme based on Modelica language characteristics, which is characterized in that target variables which are possible to make mistakes are determined and target variable information output codes are added, so that information of the target variables is automatically output in the process of debugging a target model; determining the associated variables of the target variables by judging that the information of the target variables is wrong and the code lines of the target variables are correct, and further acquiring the information of the associated variables by adding codes, so as to trace back each variable which possibly makes errors step by step until the code lines of the new target variables are determined to be wrong. The embodiment can quickly realize code problem discovery and output, and reduce the work intensity of code debugging of engineering technicians.
Fig. 2 is a flowchart of another model process debugging method according to an embodiment of the present invention, which is applicable to a case where a model written in a Modelica language is subjected to process debugging. The embodiment is executed by an electronic device and is used as an auxiliary tool of Modelica business software and operated in a model process debugging process. With reference to fig. 1, the method provided in this embodiment specifically includes:
and S210, acquiring a target code line in the target model.
The target code line may be a tentative error code line which may have an error in the above embodiment, or may be any code line, that is, the embodiment is applicable to both the variable analysis of the model which normally operates without an error and the variable analysis of the model which has an error.
S220, determining a target variable in the target code line and an associated variable of the target variable.
For a description of the target variables and associated variables see the above examples.
And S230, adding target variable information output codes in the upper line and the lower line of the code line where the target variable appears, and adding associated variable information output codes in the upper line and the lower line of the code line where the associated variable appears.
S240, debugging the target model after the adding operation, and outputting the information of the target variable and the associated variable.
The main difference between this embodiment and the embodiment shown in fig. 1 is that the target variable output code and the associated variable (and the associated variable of the associated variable, and so on) output code are added at one time, and are not added in the multiple debugging processes as in fig. 1, so that after the target model after the adding operation is debugged, the information of the target variable and the associated variable can be obtained at one time.
In an actual application scenario, operations of front and back supplementary codes can be performed on the associated variables of the target variable in the class (not including the external code introduced by the exten and the connect) where the target variable is located in the same equation or algorithm, the code line number corresponding to the output value is labeled, a data list is formed for data analysis, and the change forms and the relations of all the associated variables can be observed uniformly at one time.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 3, the electronic device includes a processor 40, a memory 41, an input device 42, and an output device 43; the number of processors 40 in the device may be one or more, and one processor 40 is taken as an example in fig. 3; the processor 40, the memory 41, the input means 42 and the output means 43 in the device may be connected by a bus or other means, as exemplified by the bus connection in fig. 3.
The memory 41 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the model process debugging method in the embodiment of the present invention. The processor 40 executes various functional applications of the device and data processing by executing software programs, instructions, and modules stored in the memory 41, that is, implements the above-described model process debugging method.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 43 may include a display device such as a display screen.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the computer readable storage medium realizes the model process debugging method of any embodiment.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention.
Claims (10)
1. A model process debugging method is characterized by comprising the following steps:
obtaining a tentative error code line in a target model;
determining a target variable in the tentative error code line, and adding target variable information output codes to the upper line and the lower line of the code line where the target variable appears;
debugging the target model after the adding operation, and outputting the information of the target variable;
if the information of the target variable is wrong and the code line of the target variable is correct, determining the associated variable of the target variable;
and taking the associated variable as a new target variable, and returning to the operation of adding target variable information output codes in the previous line and the next line of the code line where the target variable appears until the code line error where the new target variable appears is determined.
2. The method of claim 1, wherein the determining the target variable in the tentative error code line comprises:
determining a non-time variable in the tentative error code line as a target variable; or,
and responding to the variable selection operation of the user, and taking the variable selected by the user as the target variable.
3. The method of claim 1, wherein adding target variable information output codes to the line above and below the line of code where the target variable appears comprises:
responding to the setting triggering operation of a user, generating a target variable information output code according to a target variable, and automatically adding the target variable information output code to the previous line and the next line of a code line with the target variable;
wherein the setting triggering operation comprises: triggering a keyboard shortcut key, triggering a mouse code debugging key or triggering a gesture of a touch panel;
the variable information includes a value and a running time of the variable.
4. The method of claim 1, wherein the variable information includes a value and a runtime of the variable;
before the code line which is generated if the information of the target variable is wrong and the target variable is correct, the method further comprises the following steps:
responding to the setting operation of a user, and determining that a code line of the target variable is correct;
calculating the change rule of the value of the target variable along with the time according to the value of the target variable and the running time;
if the change rule is inconsistent with the physical change rule of an equation or an algorithm in a code line where the target variable appears, the information of the target variable is wrong;
and if the change rule is consistent with the physical change rule of the equation or algorithm in the code line where the target variable appears, the information of the target variable is correct.
5. The method of claim 1, wherein determining the associated variable of the target variable comprises:
determining an algorithm or equation of the target variable above a code line of the target variable;
taking variables in the algorithm or equation except the target variable as related variables;
the operation of returning to add target variable information output codes on the upper line and the lower line of the code line where the target variable appears comprises the following steps:
and returning to the operation of adding the target variable information output code on the upper line and the lower line of the code line where the algorithm or the equation is positioned.
6. The method of claim 1, further comprising, after said outputting information of the target variable:
if the information of the target variable is correct and the code line of the target variable appears is correct, determining another variable in the tentative error code line, and updating the another variable into the target variable;
and returning to the operation of adding the target variable information output code in the upper line and the lower line of the code line where the target variable appears.
7. The method according to any one of claims 1-6, further comprising, after said determining that a code line error occurs for the new target variable:
and deleting all the added target variable information output codes.
8. A model process debugging method is characterized by comprising the following steps:
obtaining a tentative error code line in the target model;
determining a target variable in the tentative error code line and an associated variable of the target variable;
adding target variable information output codes to the upper line and the lower line of the code line where the target variable appears, and adding associated variable information output codes to the upper line and the lower line of the code line where the associated variable appears;
and debugging the target model after the adding operation, and outputting the information of the target variable and the associated variable.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the model process debugging method of any of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the model process debugging method according to one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111126406.0A CN113934626A (en) | 2021-09-26 | 2021-09-26 | Model process debugging method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111126406.0A CN113934626A (en) | 2021-09-26 | 2021-09-26 | Model process debugging method, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113934626A true CN113934626A (en) | 2022-01-14 |
Family
ID=79276749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111126406.0A Pending CN113934626A (en) | 2021-09-26 | 2021-09-26 | Model process debugging method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113934626A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114818394A (en) * | 2022-06-29 | 2022-07-29 | 中国汽车技术研究中心有限公司 | Debugging method and system for Modelica model process equation |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102789413A (en) * | 2011-05-23 | 2012-11-21 | 同济大学 | System and method for debugging parallel program |
CN103473431A (en) * | 2013-09-25 | 2013-12-25 | 北京大学 | Lightweight method for debugging hypertext preprocessor (PHP) program on line |
CN105701006A (en) * | 2014-11-28 | 2016-06-22 | 国际商业机器公司 | Method and system for variable tracking in program debugging |
US20180232297A1 (en) * | 2017-02-16 | 2018-08-16 | International Business Machines Corporation | Selecting breakpoints for cross-layer debugging |
CN109726109A (en) * | 2018-06-04 | 2019-05-07 | 平安普惠企业管理有限公司 | Code debugging method, apparatus, equipment and computer storage medium |
CN109783342A (en) * | 2017-11-10 | 2019-05-21 | 华为技术有限公司 | Script debugging method, equipment and computer storage medium |
CN111209198A (en) * | 2019-12-31 | 2020-05-29 | 五八有限公司 | Debugging method and device based on JPDA, electronic equipment and storage medium |
CN112000026A (en) * | 2020-08-17 | 2020-11-27 | 北京控制工程研究所 | Mars GNC system physical model construction method based on information physical fusion |
CN112306501A (en) * | 2020-11-30 | 2021-02-02 | 杭州网易云音乐科技有限公司 | Business data acquisition method and device, storage medium and computing equipment |
-
2021
- 2021-09-26 CN CN202111126406.0A patent/CN113934626A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102789413A (en) * | 2011-05-23 | 2012-11-21 | 同济大学 | System and method for debugging parallel program |
CN103473431A (en) * | 2013-09-25 | 2013-12-25 | 北京大学 | Lightweight method for debugging hypertext preprocessor (PHP) program on line |
CN105701006A (en) * | 2014-11-28 | 2016-06-22 | 国际商业机器公司 | Method and system for variable tracking in program debugging |
US20180232297A1 (en) * | 2017-02-16 | 2018-08-16 | International Business Machines Corporation | Selecting breakpoints for cross-layer debugging |
CN109783342A (en) * | 2017-11-10 | 2019-05-21 | 华为技术有限公司 | Script debugging method, equipment and computer storage medium |
CN109726109A (en) * | 2018-06-04 | 2019-05-07 | 平安普惠企业管理有限公司 | Code debugging method, apparatus, equipment and computer storage medium |
CN111209198A (en) * | 2019-12-31 | 2020-05-29 | 五八有限公司 | Debugging method and device based on JPDA, electronic equipment and storage medium |
CN112000026A (en) * | 2020-08-17 | 2020-11-27 | 北京控制工程研究所 | Mars GNC system physical model construction method based on information physical fusion |
CN112306501A (en) * | 2020-11-30 | 2021-02-02 | 杭州网易云音乐科技有限公司 | Business data acquisition method and device, storage medium and computing equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114818394A (en) * | 2022-06-29 | 2022-07-29 | 中国汽车技术研究中心有限公司 | Debugging method and system for Modelica model process equation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113360144B (en) | Auxiliary processing method, device, storage medium and program product for software development | |
CN110069279B (en) | Method, device and storage medium for checking direct current control protection program | |
CN110688305B (en) | Test environment synchronization method, device, medium and electronic equipment | |
CN103065067B (en) | The filter method of sequence fragment and system in short sequence assembling | |
CN112540924A (en) | Interface automation test method, device, equipment and storage medium | |
CN113934626A (en) | Model process debugging method, device and storage medium | |
CN117806981B (en) | CFD software automatic testing method and system | |
JP2024096950A (en) | AUTOMATED CONTROL OF DISTRIBUTED COMPUTING DEVICES - Patent application | |
CN111367754A (en) | Data monitoring method and device, computer equipment and storage medium | |
CN114185791A (en) | Method, device and equipment for testing data mapping file and storage medium | |
CN117591368A (en) | Automatic monitoring plug-in for server performance and working method thereof | |
US20210286706A1 (en) | Graph-based method for inductive bug localization | |
CN113792138A (en) | Report generation method and device, electronic equipment and storage medium | |
Rizzo et al. | Generalized likelihood ratio control charts for high‐purity (high‐quality) processes | |
US20230306343A1 (en) | Business process management system and method thereof | |
CN115758389A (en) | Vulnerability processing result checking method and device, electronic equipment and storage medium | |
CN115080416A (en) | Test method based on service code and related equipment thereof | |
KR101665962B1 (en) | Method of verifying modeling code, apparatus performing the same and storage media storing the same | |
CN114253642A (en) | System information processing method, device, electronic equipment and medium | |
CN111522752A (en) | Program test method, program test device, storage medium, and electronic apparatus | |
CN112232031A (en) | Method and device for verifying edge data model of power internet of things and storage medium | |
CN110716858A (en) | Industrial control software testing system and software testing method | |
CN116757647B (en) | Intelligent verification method and device for exploration data | |
CN118132451B (en) | Automatic test and error diagnosis system and method for computer operating system | |
CN113987058B (en) | Method and device for determining emission list |
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 |