CN111027015A - Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus - Google Patents

Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus Download PDF

Info

Publication number
CN111027015A
CN111027015A CN201911299111.6A CN201911299111A CN111027015A CN 111027015 A CN111027015 A CN 111027015A CN 201911299111 A CN201911299111 A CN 201911299111A CN 111027015 A CN111027015 A CN 111027015A
Authority
CN
China
Prior art keywords
function
conditional
computer
condition
extremum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911299111.6A
Other languages
Chinese (zh)
Inventor
王防修
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Polytechnic University
Original Assignee
Wuhan Polytechnic University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Polytechnic University filed Critical Wuhan Polytechnic University
Priority to CN201911299111.6A priority Critical patent/CN111027015A/en
Publication of CN111027015A publication Critical patent/CN111027015A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a condition extreme value calculation method, a device, a storage medium and a device, wherein the method comprises the following steps: the method comprises the steps that a computer obtains a function to be solved and a condition function input by a user side, the computer extracts a function variable contained in the function to be solved and searches a condition extreme value calculation model corresponding to the function to be solved according to the function variable and the condition function, and the computer calculates a condition extreme value of the function to be solved according to the condition extreme value calculation model; the invention searches the function to be solved and the condition function input by the user terminal through the computer to obtain the condition extreme value calculation model, and then calculates the condition extreme value according to the condition extreme value calculation model, thereby quickly and accurately calculating the condition extreme value through the condition extreme value calculator.

Description

Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus
Technical Field
The present invention relates to the field of mathematical computation technologies, and in particular, to a method, an apparatus, a storage medium, and a device for calculating a conditional extremum.
Background
At present, with the rapid development of social information technology, engineering tasks become more and more complex, for example, in the design of a mold, a right triangle mold with a hypotenuse of a fixed side length needs to be designed, and the right triangle mold is required to have a maximum perimeter. Therefore, it is necessary to design a general conditional extremum calculator for solving the technical problem of how to calculate the conditional extremum rapidly and accurately.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, equipment, a storage medium and a device for calculating a condition extreme value, and aims to solve the technical problem of how to quickly and accurately calculate the condition extreme value in the prior art.
In order to achieve the above object, the present invention provides a conditional extremum calculating method, including the steps of:
the computer acquires a function to be solved and a condition function input by a user side;
the computer extracts function variables contained in the function to be solved, and searches a condition extreme value calculation model corresponding to the function to be solved according to the function variables and the condition function;
and the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model.
Preferably, the computer extracts a function variable included in the function to be solved, and searches a conditional extremum calculation model corresponding to the function to be solved according to the function variable and the conditional function, including:
the computer extracts function variables contained in the function to be solved;
the computer determines the variable quantity of the function to be solved according to the function variable;
and the computer determines a condition extreme value calculation model corresponding to the function to be solved according to the variable quantity and the condition function.
Preferably, the computer determines a conditional extremum calculation model corresponding to the function to be solved according to the variable quantity and the conditional function, and includes:
the computer traverses a pre-constructed mapping relation according to the variable quantity to obtain a traversal result, wherein the mapping relation comprises the corresponding relation between the variable quantity and a condition extreme value calculation model;
and the computer determines a condition extreme value calculation model corresponding to the function to be solved according to the traversal result.
Preferably, the mapping relationship is a key-value pair;
the computer traverses the mapping relation which is constructed in advance according to the variable quantity to obtain a traversal result, and the method comprises the following steps:
and the computer takes the variable quantity as a target key object, searches a condition extreme value calculation model corresponding to the target key object in the key value pair, and takes a corresponding search result as a traversal result.
Preferably, before the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model, the conditional extremum calculation method further includes:
the computer acquires a function expression form corresponding to the function to be solved;
the computer detects whether the function expression form accords with a preset expression form;
and when the function expression form accords with the preset expression form, the computer executes the step that the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model.
Preferably, after the computer detects whether the function expression form conforms to a preset expression form, the conditional extremum calculating method further includes:
when the function expression form does not accord with the preset expression form, the computer performs form conversion on the function to be solved to obtain a target function to be solved;
the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model, and the method comprises the following steps:
and the computer calculates the conditional extremum of the target function to be solved according to the conditional extremum calculation model.
Preferably, after the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model, the conditional extremum calculation method further includes:
the computer acquires a variable condition corresponding to a function to be solved;
the computer judges whether the variable corresponding to the condition extreme value meets the variable condition;
and when the computer meets the variable condition, taking the condition extreme value as a target condition extreme value.
Furthermore, to achieve the above object, the present invention also proposes a conditional extremum calculating apparatus comprising a memory, a processor and a conditional extremum calculating program stored on the memory and operable on the processor, the conditional extremum calculating program being configured to implement the steps of the conditional extremum calculating method as described above.
Furthermore, to achieve the above object, the present invention further provides a storage medium having a conditional extremum calculating program stored thereon, wherein the conditional extremum calculating program, when executed by a processor, implements the steps of the conditional extremum calculating method as described above.
In addition, to achieve the above object, the present invention further provides a conditional extremum calculating apparatus, including: the system comprises an information acquisition module, a searching module and a condition extreme value calculation module;
the information acquisition module is used for acquiring a function to be solved and a condition function input by a user side;
the searching module is used for extracting function variables contained in the function to be solved and searching a condition extreme value calculation model corresponding to the function to be solved according to the function variables and the condition function;
and the conditional extreme value calculation module is used for calculating the conditional extreme value of the function to be solved according to the conditional extreme value calculation model.
In the invention, a computer acquires a function to be solved and a conditional function which are input by a user terminal, the computer extracts a function variable contained in the function to be solved and searches a conditional extreme value calculation model corresponding to the function to be solved according to the function variable and the conditional function, and the computer calculates a conditional extreme value of the function to be solved according to the conditional extreme value calculation model; because the function to be solved and the conditional function are linked by the conditional extreme value calculation model, the conditional extreme value can be quickly and accurately calculated by the conditional extreme value calculator according to the function to be solved and the conditional function input by the user.
Drawings
FIG. 1 is a schematic diagram of a condition extremum calculating apparatus for a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for calculating a conditional extremum according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a conditional extremum calculating method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a conditional extremum calculating method according to the present invention;
fig. 5 is a block diagram of a conditional extremum calculating apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a condition extremum calculating device of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the conditional extremum calculating apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), and the optional user interface 1003 may further include a standard wired interface and a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory or a Non-volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the conditional extremum calculating apparatus and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, memory 1005, identified as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a conditional extremum calculating program.
In the conditional extreme computing apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the conditional extremum calculating apparatus calls the conditional extremum calculating program stored in the memory 1005 through the processor 1001, and executes the conditional extremum calculating method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the conditional extreme value calculation method is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method for calculating a conditional extremum according to the present invention.
In a first embodiment, the conditional extremum calculating method includes the steps of:
step S10: the computer obtains a function to be solved and a condition function input by a user side.
It should be understood that the executing body of the method of the present embodiment may be a computing service device with specific data processing, network communication and program running functions, such as a smart phone, a tablet computer, a notebook computer, etc. (hereinafter referred to as a computing device). The function to be solved can be a binary function, a ternary function, a quaternary function and the like input by a user. For example, the user inputs to be solvedFunction f (x, y) x + y +1, conditional function x2+y2=1。
In a specific implementation, the conditional extremum calculating device may obtain a function to be solved input by a user through a human-computer interaction interface and a conditional function corresponding to the function to be solved.
In a specific implementation, for example, during the mold design process, the customer requirements are: a right-angle triangular mold is designed, the length of the hypotenuse of the mold is fixed to be 1m, and the perimeter of the designed triangular mold is required to be longest. At this time, the function to be solved may be obtained as: f (x, y) ═ x + y +1, and the conditional function corresponding to the function to be solved is as follows: x is the number of2+y2=1。
Step S20: and the computer extracts function variables contained in the function to be solved and searches a condition extreme value calculation model corresponding to the function to be solved according to the function variables and the condition function.
It can be understood that, in the present embodiment, different function variables and condition functions correspond to different condition extremum calculation models, and the condition extremum calculation models at least include the following categories, for example:
(1) if the function to be solved is f (x, y), the conditional function is f1(x,y)=f2(x, y), then the function variables are: x and y, determining a condition function calculation model according to the function variable and the condition function at the moment as follows:
F(x,y,t)=f(x,y)+t[f1(x,y)-f2(x,y)]
Figure BDA0002317157450000061
Figure BDA0002317157450000062
Ft=f1(x,y)-f2(x,y)=0
(2) if the function to be solved is f (x, y, z), the conditional function is f1(x,y,z)=f2(x, y, z), the function variables are x, y and z respectively, and the function variables and the condition function are determined according to the function variablesThe conditional function calculation model is:
F(x,y,z,t)=f(x,y,z)+t[f1(x,y,z)-f2(x,y,z)]
Figure BDA0002317157450000063
Figure BDA0002317157450000064
Figure BDA0002317157450000065
Ft=f1(x,y,z)-f2(x,y,z)=0
(3) if the function to be solved is f (x, y, u, v), the conditional function is f1(x,y,u,v)=f2(x,y,u,v),g1(x,y,u,v)=g2(x, y, u, v), the function variables are x, y, u and v respectively, and then the condition function calculation model is determined according to the function variables and the condition function:
F(x,y,u,v,s,t)=f(x,y,u,v)+s[f1(x,y,u,v)-f2(x,y,u,v)]+t[g1(x,y,u,v)-g2(x,y,u,v)]
Figure BDA0002317157450000066
Figure BDA0002317157450000067
Figure BDA0002317157450000068
Figure BDA0002317157450000069
Fs=f1(x,y,u,v)-f2(x,y,u,v)=0
Ft=g1(x,y,u,v)-g2(x,y,u,v)=0
step S30: and the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model.
In a specific implementation, for example, during the mold design process, the customer requirements are: a right-angle triangular mould is designed, the length of the hypotenuse of the mould is fixed to be 1m, and the longest perimeter of the designed right-angle triangular mould is required. At this time, the function to be solved may be obtained as: f (x, y) ═ x + y +1, and the conditional function corresponding to the function to be solved is as follows: x is the number of2+y2The calculation result can be determined according to the conditional extremum calculation model as shown in table 1, and it can be known from table 1 that when two right-angle sides are
Figure BDA0002317157450000071
The longest perimeter of the right-angle triangular mold is
Figure BDA0002317157450000072
TABLE 1 triangular die perimeter table
Figure BDA0002317157450000073
In a first embodiment, a computer obtains a function to be solved and a conditional function input by a user side, the computer extracts a function variable included in the function to be solved, searches a conditional extremum calculation model corresponding to the function to be solved according to the function variable and the conditional function, and the computer calculates a conditional extremum of the function to be solved according to the conditional extremum calculation model; because the function to be solved and the conditional function are linked by the conditional extreme value calculation model, the conditional extreme value can be quickly and accurately calculated by the conditional extreme value calculator according to the function to be solved and the conditional function input by the user.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the method for calculating a conditional extremum according to the present invention, and the second embodiment of the method for calculating a conditional extremum according to the present invention is proposed based on the first embodiment illustrated in fig. 2.
In the second embodiment, the step S20 includes:
step S201: the computer extracts function variables contained in the function to be solved.
In a specific implementation, for example, in the mold design, a rectangular parallelepiped mold inscribed with a spherical mold having an inner diameter of 1m needs to be designed, and the volume of the rectangular parallelepiped mold is required to be the largest, so that a user can input a function to be solved as follows according to the design requirement: f (x, y, z) ═ 8xyz, the conditional function is: x is the number of2+y2+z2Extracting function variables included in the band solution function as 1: x, y and z.
Step S202: and the computer determines the variable quantity of the function to be solved according to the function variable.
It should be noted that the variable quantity may be any value, but when the variable quantity is 0, a reminding message may be sent to the display end to remind the user to input the variable.
In a specific implementation, for example, when the function variables are x, y, and z, the number of variables is 3.
Step S203: and the computer determines a condition extreme value calculation model corresponding to the function to be solved according to the variable quantity and the condition function.
In a specific implementation, for example, when the number of functions is 3, the conditional function is: x is the number of2+y2+z2When the value is 1, the conditional extremum calculation model is as follows:
F(x,y,z,t)=f(x,y,z)+t[f1(x,y,z)-f2(x,y,z)]
Figure BDA0002317157450000081
Figure BDA0002317157450000082
Figure BDA0002317157450000083
Ft=f1(x,y,z)-f2(x,y,z)=0
in the second embodiment, before the step S30, the method further includes:
step S301: and the computer acquires a function expression form corresponding to the function to be solved.
It should be noted that, in order to ensure that the integral calculation is performed smoothly, the computing device may extract a function representation corresponding to the function to be solved.
Step S302: the computer detects whether the function representation form conforms to a preset representation form.
Step S303: and when the function expression form accords with the preset expression form, the computer executes the step that the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model.
In the second embodiment, after the step S30, the method further includes:
step S40: and the computer acquires the variable condition corresponding to the function to be solved.
In a specific implementation, for example, in the mold design, a rectangular parallelepiped mold inscribed with a spherical mold having an inner diameter of 1m needs to be designed, and the volume of the rectangular parallelepiped mold is required to be the largest, so that a user can input a function to be solved as follows according to the design requirement: f (x, y, z) ═ 8xyz, the conditional function is: x is the number of2+y2+z2As 1, the calculation result can be determined according to the conditional extremum calculation model as shown in table 2, and the function to be solved is: and f (x, y, z) is 8xyz, wherein x, y and z respectively represent the length, width and height of the rectangular parallelepiped mold, and f represents the volume of the rectangular parallelepiped mold, so that the variable conditions corresponding to the function to be solved are that x, y, z and f are all greater than 0.
TABLE 2 cuboids mould volume table
Figure BDA0002317157450000084
Step S50: and the computer judges whether the variable corresponding to the condition extreme value meets the variable condition.
In a particular implementation, for example, as described in Table 2
Figure BDA0002317157450000091
When x, y, z and f are all greater than 0, the variable condition is satisfied.
Step S60: and when the computer meets the variable condition, taking the condition extreme value as a target condition extreme value.
In a particular implementation, for example, as described in Table 2
Figure BDA0002317157450000092
When the condition extreme is
Figure BDA0002317157450000093
Then will be
Figure BDA0002317157450000094
As the target condition extremum.
Further, after the step S302, the method further includes:
when the function expression form does not accord with the preset expression form, the computer performs form conversion on the function to be solved to obtain a target function to be solved;
it should be noted that, when the function expression form does not conform to the preset expression form, the function to be solved is subjected to function form conversion according to the preset expression form; and substituting the function to be solved after the function form conversion into the conditional extreme value calculation model, and acquiring a model output result, so that data information input by a user is normalized, and the calculation equipment can conveniently perform subsequent integral operation.
Correspondingly, the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model, and the method comprises the following steps:
and the computer calculates the conditional extremum of the target function to be solved according to the conditional extremum calculation model.
In a second embodiment, a function to be solved and a conditional function input by a user side are obtained by a computer, the computer extracts a function variable included in the function to be solved and searches a conditional extremum calculation model corresponding to the function to be solved according to the function variable and the conditional function, the computer obtains a function expression form corresponding to the function to be solved, the computer detects whether the function expression form conforms to a preset expression form, when the function expression form conforms to the preset expression form, the computer performs a step of calculating a conditional extremum of the function to be solved according to the conditional extremum calculation model, the computer calculates a conditional extremum of the function to be solved according to the conditional extremum calculation model, and the computer obtains a variable condition corresponding to the function to be solved, and the computer judges whether the variable corresponding to the condition extreme value meets the variable condition, and when the variable condition is met, the computer takes the condition extreme value as a target condition extreme value, so that an irregular function to be solved can be identified, and the condition extreme value can be quickly and accurately calculated through a condition extreme value calculator according to the function to be solved and the condition function input by a user.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of the method for calculating a conditional extremum according to the present invention, and the third embodiment of the method for calculating a conditional extremum according to the present invention is proposed based on the second embodiment illustrated in fig. 3.
In a third embodiment, the step S203 includes:
step S2031: and traversing the pre-constructed mapping relation by the computer according to the variable quantity to obtain a traversal result, wherein the mapping relation comprises the corresponding relation between the variable quantity and the condition extreme value calculation model.
It should be noted that, in consideration of the fact that different condition extremum calculation models corresponding to different variable quantities are different, a mapping relationship may be established in advance in the calculation device for improving the integral operation efficiency, and the mapping relationship stores the corresponding relationship between the variable quantity and the condition extremum calculation model, so that when the calculation device determines the condition extremum calculation model according to the variable quantity, the condition extremum calculation model can be rapidly acquired by querying the mapping relationship in a traversal manner.
Step S2032: and the computer determines a condition extreme value calculation model corresponding to the function to be solved according to the traversal result.
Further, the step S2031 includes:
and the computer takes the variable quantity as a target key object, searches a condition extreme value calculation model corresponding to the target key object in the key value pair, and takes a corresponding search result as a traversal result.
It should be noted that, in this embodiment, the mapping relationship is a key value pair (key, value); in the key value pair, the key object "key" is the variable number, and the value object "value" is the conditional extremum calculation model.
In a third embodiment, the computer traverses a mapping relationship constructed in advance according to the variable quantity to obtain a traversal result, the mapping relationship includes a corresponding relationship between the variable quantity and a conditional extremum calculation model, and the computer determines the conditional extremum calculation model corresponding to the function to be solved according to the traversal result, so that the conditional extremum calculation model can be quickly acquired by querying the mapping relationship in a traversal manner.
Furthermore, an embodiment of the present invention further provides a storage medium, where a conditional extremum calculating program is stored, and the conditional extremum calculating program, when executed by a processor, implements the steps of the conditional extremum calculating method described above.
In addition, referring to fig. 5, an embodiment of the present invention further provides a conditional extremum calculating apparatus, where the conditional extremum calculating apparatus includes: the system comprises an information acquisition module 10, a search module 20 and a conditional extremum calculation module 30;
the information obtaining module 10 is configured to obtain a function to be solved and a conditional function input by a user side.
It should be understood that the executing body of the method of the present embodiment may be a computing service device with specific data processing, network communication and program running functions, such as a smart phone, a tablet computer, a notebook computer, etc. (hereinafter referred to as a computing device). What is needed isThe function to be solved can be a binary function, a ternary function, a quaternary function and the like input by a user. For example, the user inputs the function to be solved f (x, y) ═ x + y +1, and the conditional function x2+y2=1。
In a specific implementation, the conditional extremum calculating device may obtain a function to be solved input by a user through a human-computer interaction interface and a conditional function corresponding to the function to be solved.
In a specific implementation, for example, during the mold design process, the customer requirements are: a right-angle triangular mold is designed, the length of the hypotenuse of the mold is fixed to be 1m, and the perimeter of the designed triangular mold is required to be longest. At this time, the function to be solved may be obtained as: f (x, y) ═ x + y +1, and the conditional function corresponding to the function to be solved is as follows: x is the number of2+y2=1。
The searching module 20 is configured to extract function variables included in the function to be solved, and search a conditional extremum calculation model corresponding to the function to be solved according to the function variables and the conditional function.
It can be understood that, in the present embodiment, different function variables and condition functions correspond to different condition extremum calculation models, and the condition extremum calculation models at least include the following categories, for example:
(1) if the function to be solved is f (x, y), the conditional function is f1(x,y)=f2(x, y), then the function variables are: x and y, determining a condition function calculation model according to the function variable and the condition function at the moment as follows:
F(x,y,t)=f(x,y)+t[f1(x,y)-f2(x,y)]
Figure BDA0002317157450000111
Figure BDA0002317157450000112
Ft=f1(x,y)-f2(x,y)=0
(2) if the function to be solved is f (x, y, z), the conditional function isf1(x,y,z)=f2(x, y, z), the function variables are x, y and z respectively, and then the condition function calculation model is determined according to the function variables and the condition function:
F(x,y,z,t)=f(x,y,z)+t[f1(x,y,z)-f2(x,y,z)]
Figure BDA0002317157450000121
Figure BDA0002317157450000122
Figure BDA0002317157450000123
Ft=f1(x,y,z)-f2(x,y,z)=0
(3) if the function to be solved is f (x, y, u, v), the conditional function is f1(x,y,u,v)=f2(x,y,u,v),g1(x,y,u,v)=g2(x, y, u, v), the function variables are x, y, u and v respectively, and then the condition function calculation model is determined according to the function variables and the condition function:
F(x,y,u,v,s,t)=f(x,y,u,v)+s[f1(x,y,u,v)-f2(x,y,u,v)]+t[g1(x,y,u,v)-g2(x,y,u,v)]
Figure BDA0002317157450000124
Figure BDA0002317157450000125
Figure BDA0002317157450000126
Figure BDA0002317157450000127
Fs=f1(x,y,u,v)-f2(x,y,u,v)=0
Ft=g1(x,y,u,v)-g2(x,y,u,v)=0
the conditional extremum calculating module 30 is configured to calculate a conditional extremum of the function to be solved according to the conditional extremum calculating model.
In a specific implementation, for example, during the mold design process, the customer requirements are: a right-angle triangular mould is designed, the length of the hypotenuse of the mould is fixed to be 1m, and the longest perimeter of the designed right-angle triangular mould is required. At this time, the function to be solved may be obtained as: f (x, y) ═ x + y +1, and the conditional function corresponding to the function to be solved is as follows: x is the number of2+y2The calculation result can be determined according to the conditional extremum calculation model as shown in table 1, and it can be known from table 1 that when two right-angle sides are
Figure BDA0002317157450000128
The longest perimeter of the right-angle triangular mold is
Figure BDA0002317157450000129
In this embodiment, a computer obtains a function to be solved and a conditional function input by a user, the computer extracts a function variable included in the function to be solved, and searches a conditional extremum calculation model corresponding to the function to be solved according to the function variable and the conditional function, and the computer calculates a conditional extremum of the function to be solved according to the conditional extremum calculation model, so that the conditional extremum can be quickly and accurately calculated by a conditional extremum calculator according to the function to be solved and the conditional function input by the user.
In an embodiment, the searching module is further configured to extract function variables included in the function to be solved, determine the variable number of the function to be solved according to the function variables, and determine a conditional extremum calculation model corresponding to the function to be solved according to the variable number and the conditional function;
in an embodiment, the search module is further configured to traverse a mapping relationship that is constructed in advance according to the variable quantity to obtain a traversal result, where the mapping relationship includes a correspondence between the variable quantity and a conditional extremum calculation model, and determine, according to the traversal result, the conditional extremum calculation model corresponding to the function to be solved;
in an embodiment, the search module is further configured to search a conditional extremum calculation model corresponding to the target key object in the key value pair using the variable quantity as the target key object, and use a corresponding search result as a traversal result;
in one embodiment, the conditional extremum calculating apparatus further comprises: a function representation form detection module;
the function expression form detection module is further configured to obtain a function expression form corresponding to the function to be solved, and the computer detects whether the function expression form conforms to a preset expression form, and when the function expression form conforms to the preset expression form, performs a step of calculating a conditional extremum of the function to be solved according to the conditional extremum calculation model;
in one embodiment, the conditional extremum calculating apparatus further comprises: a form conversion module;
the form conversion module is further used for performing form conversion on the function to be solved when the function expression form does not conform to the preset expression form, so as to obtain a target function to be solved;
in one embodiment, the conditional extremum calculating apparatus further comprises: a variable condition judgment module;
the variable condition judgment module is further configured to obtain a variable condition corresponding to the function to be solved, judge whether a variable corresponding to the condition extremum satisfies the variable condition, and when the variable condition is satisfied, take the condition extremum as a target condition extremum.
Other embodiments or specific implementation manners of the conditional extremum calculating apparatus according to the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order, but rather the words first, second, third, etc. are to be interpreted as names.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be substantially implemented or a part contributing to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., a Read Only Memory (ROM)/Random Access Memory (RAM), a magnetic disk, an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for calculating a conditional extremum, the method comprising:
the computer acquires a function to be solved and a condition function input by a user side;
the computer extracts function variables contained in the function to be solved, and searches a condition extreme value calculation model corresponding to the function to be solved according to the function variables and the condition function;
and the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model.
2. The method for calculating a conditional extremum according to claim 1, wherein the step of extracting, by the computer, the function variable included in the function to be solved and searching for the conditional extremum calculation model corresponding to the function to be solved according to the function variable and the conditional function includes:
the computer extracts function variables contained in the function to be solved;
the computer determines the variable quantity of the function to be solved according to the function variable;
and the computer determines a condition extreme value calculation model corresponding to the function to be solved according to the variable quantity and the condition function.
3. The method for calculating a conditional extremum according to claim 2, wherein the step of determining, by the computer, the conditional extremum calculation model corresponding to the function to be solved according to the variable number and the conditional function specifically includes:
the computer traverses a pre-constructed mapping relation according to the variable quantity to obtain a traversal result, wherein the mapping relation comprises the corresponding relation between the variable quantity and a condition extreme value calculation model;
and the computer determines a condition extreme value calculation model corresponding to the function to be solved according to the traversal result.
4. The conditional extremum calculating method of claim 3, wherein the mapping relationship is a key-value pair;
the computer traverses the pre-constructed mapping relation according to the variable quantity to obtain a traversal result, and the method specifically comprises the following steps:
and the computer takes the variable quantity as a target key object, searches a condition extreme value calculation model corresponding to the target key object in the key value pair, and takes a corresponding search result as a traversal result.
5. The method of claim 1, wherein before the step of calculating the conditional extremum of the function to be solved according to the conditional extremum calculation model by the computer, the method further comprises:
the computer acquires a function expression form corresponding to the function to be solved;
the computer detects whether the function expression form accords with a preset expression form;
and when the function expression form accords with the preset expression form, the computer executes the step that the computer calculates the conditional extremum of the function to be solved according to the conditional extremum calculation model.
6. The conditional extremum calculating method of claim 5, wherein after the step of detecting whether the expression form of the function conforms to a preset expression form by the computer, the method specifically comprises:
when the function expression form does not accord with the preset expression form, the computer performs form conversion on the function to be solved to obtain a target function to be solved;
correspondingly, the step of calculating the conditional extremum of the function to be solved by the computer according to the conditional extremum calculation model specifically includes:
and the computer calculates the conditional extremum of the target function to be solved according to the conditional extremum calculation model.
7. The conditional extremum calculating method of any one of claims 1 to 6, wherein after the step of calculating the conditional extremum of the function to be solved by the computer according to the conditional extremum calculating model, the conditional extremum calculating method further comprises:
the computer acquires a variable condition corresponding to a function to be solved;
the computer judges whether the variable corresponding to the condition extreme value meets the variable condition;
and when the computer meets the variable condition, taking the condition extreme value as a target condition extreme value.
8. A conditional extremum calculating apparatus, comprising: memory, a processor and a conditional extremum calculating program stored on the memory and executable on the processor, the conditional extremum calculating program when executed by the processor implementing the steps of the conditional extremum calculating method according to any one of claims 1 to 7.
9. A storage medium having stored thereon a conditional extremum calculating program, which when executed by a processor implements the steps of the conditional extremum calculating method according to any one of claims 1 to 7.
10. A conditional extremum calculating apparatus, comprising: the system comprises an information acquisition module, a searching module and a condition extreme value calculation module;
the information acquisition module is used for acquiring a function to be solved and a condition function input by a user side;
the searching module is used for extracting function variables contained in the function to be solved and searching a condition extreme value calculation model corresponding to the function to be solved according to the function variables and the condition function;
and the conditional extreme value calculation module is used for calculating the conditional extreme value of the function to be solved according to the conditional extreme value calculation model.
CN201911299111.6A 2019-12-13 2019-12-13 Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus Pending CN111027015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911299111.6A CN111027015A (en) 2019-12-13 2019-12-13 Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911299111.6A CN111027015A (en) 2019-12-13 2019-12-13 Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus

Publications (1)

Publication Number Publication Date
CN111027015A true CN111027015A (en) 2020-04-17

Family

ID=70209802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911299111.6A Pending CN111027015A (en) 2019-12-13 2019-12-13 Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus

Country Status (1)

Country Link
CN (1) CN111027015A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080109754A1 (en) * 2006-11-06 2008-05-08 Weinberg Paul N Conditional text publication system and method
US20110093431A1 (en) * 2009-10-15 2011-04-21 International Business Machines Corporation Sat-based synthesis of a clock gating function
CN106873370A (en) * 2017-03-07 2017-06-20 云南电网有限责任公司电力科学研究院 A kind of circulating fluidized bed unit cooperative control method
CN107423513A (en) * 2017-07-28 2017-12-01 中国地质大学(武汉) A kind of method, equipment and its storage device of four-dimensional interpolation data processing
CN109255097A (en) * 2018-07-11 2019-01-22 济南大学 3.3471 power power function shape open channel water delivery sections of one kind and optimal section method for solving
CN109299807A (en) * 2017-12-29 2019-02-01 广东数鼎科技有限公司 A kind of used car price optimization method and system
CN109586280A (en) * 2018-11-21 2019-04-05 国网冀北电力有限公司 A kind of unit trading limits electricity determines method and system
CN109948114A (en) * 2019-03-20 2019-06-28 武汉轻工大学 Arc length curve integrates automatic calculating method, equipment, storage medium and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080109754A1 (en) * 2006-11-06 2008-05-08 Weinberg Paul N Conditional text publication system and method
US20110093431A1 (en) * 2009-10-15 2011-04-21 International Business Machines Corporation Sat-based synthesis of a clock gating function
CN106873370A (en) * 2017-03-07 2017-06-20 云南电网有限责任公司电力科学研究院 A kind of circulating fluidized bed unit cooperative control method
CN107423513A (en) * 2017-07-28 2017-12-01 中国地质大学(武汉) A kind of method, equipment and its storage device of four-dimensional interpolation data processing
CN109299807A (en) * 2017-12-29 2019-02-01 广东数鼎科技有限公司 A kind of used car price optimization method and system
CN109255097A (en) * 2018-07-11 2019-01-22 济南大学 3.3471 power power function shape open channel water delivery sections of one kind and optimal section method for solving
CN109586280A (en) * 2018-11-21 2019-04-05 国网冀北电力有限公司 A kind of unit trading limits electricity determines method and system
CN109948114A (en) * 2019-03-20 2019-06-28 武汉轻工大学 Arc length curve integrates automatic calculating method, equipment, storage medium and device

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
刘美玲: "拉格朗日乘数法在多元函数求极值中的应用研究", pages 121 - 122 *
李开友: "基于MATLAB的工程运算可视化系统的设计与实现", 中国优秀硕士论文电子期刊网, pages 18 - 19 *
李强;: "浅谈拉格朗日乘数法在条件极值的应用", no. 19, pages 116 - 117 *
陈仲: "高等数学竞赛题解析教程(2019)", 东南大学出版社, pages: 168 - 169 *
黄文华: "二元函数条件极值的一个判定方法", 江南大学学报(自然科学版), no. 03, pages 91 - 93 *

Similar Documents

Publication Publication Date Title
CN108959247B (en) Data processing method, server and computer readable medium
CN111290684B (en) Image display method, image display device and terminal equipment
CN109684005B (en) Method and device for determining similarity of components in graphical interface
CN111814828B (en) Intelligent space planning method, device, equipment and storage medium
CN109948107B (en) Area curved surface integral calculation method, device, equipment and storage medium
CN107291238B (en) Data processing method and device
CN114328878A (en) Information reply method, device and medium
CN114091688B (en) Computing resource obtaining method and device, electronic equipment and storage medium
CN112347201B (en) Information processing method, information processing device and terminal equipment
CN112966719A (en) Method and device for recognizing meter panel reading and terminal equipment
EP3611629A1 (en) Photo processing method and apparatus, and computer device
CN111027015A (en) Conditional extremum calculation method, conditional extremum calculation device, storage medium, and storage apparatus
CN116168403A (en) Medical data classification model training method, classification method, device and related medium
CN111858865A (en) Semantic recognition method and device, electronic equipment and computer-readable storage medium
CN113305837B (en) Method and device for determining deviation information of robot, processing equipment and medium
CN113569834A (en) Business license identification method and device, electronic equipment and storage medium
CN109150993B (en) Method for obtaining network request tangent plane, terminal device and storage medium
CN113220648A (en) Audio function detection method and device
CN112950167A (en) Design service matching method, device, equipment and storage medium
CN112036173A (en) Method and system for processing telemarketing text
CN111258628A (en) Rule file comparison method and device, readable storage medium and terminal equipment
CN111353867A (en) Learning rate adjusting method, device, equipment and readable storage medium
CN111178072A (en) Legal provision determining method and device and storage medium
CN112288585B (en) Insurance business refined data processing method and device and electronic equipment
CN115378842B (en) Resource monitoring method, device, storage medium and equipment

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