CN101814027A - Large-scale nonlinear dynamic optimization algorithm code generating system - Google Patents

Large-scale nonlinear dynamic optimization algorithm code generating system Download PDF

Info

Publication number
CN101814027A
CN101814027A CN201010133132A CN201010133132A CN101814027A CN 101814027 A CN101814027 A CN 101814027A CN 201010133132 A CN201010133132 A CN 201010133132A CN 201010133132 A CN201010133132 A CN 201010133132A CN 101814027 A CN101814027 A CN 101814027A
Authority
CN
China
Prior art keywords
model
dynamic optimization
nonlinear dynamic
ndoml
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
Application number
CN201010133132A
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.)
Shenyang University of Chemical Technology
Original Assignee
Shenyang University of Chemical Technology
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 Shenyang University of Chemical Technology filed Critical Shenyang University of Chemical Technology
Priority to CN201010133132A priority Critical patent/CN101814027A/en
Publication of CN101814027A publication Critical patent/CN101814027A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a large-scale nonlinear dynamic optimization algorithm code generating system and relates to the description of a model for a differential algebra constraint nonlinear dynamic optimization problem and a control algorithm code automatic generating system based on the model and provides an algorithm code automatic generating tool for a large-scale nonlinear dynamic optimization problem controller. The system can be used for carrying out the input, edition and output of a nonlinear dynamic optimization model and finishing the discretization automatic processing of the nonlinear dynamic optimization model and the automatic generation of a control algorithm C language code. The system defines an NDOML language which is used for describing a nonlinear dynamic optimization problem model and is based on an XML(Extensible Markup Language), facilitates the processing of the system for the model and is convenient for the system to expand functions; the discretization processing and the algorithm code design of the system both adopt an automatic generating processing technology, thereby greatly improving the work efficiency of a control algorithm code designer and solving the problem of difficultly manually finished control algorithm program design of larger-scale and large-scale nonlinear dynamic optimization problems.

Description

Large-scale nonlinear dynamic optimization algorithm code generating system
Technical field
The present invention relates to optimal control designing technique, particularly large-scale nonlinear dynamic optimization algorithm code generating system.
Background technology
Along with the continuous development of large-scale nonlinear planning theory, algorithm and software systems, plan that based on large-scale nonlinear the Model Predictive Control of (100,000 more than the decision variable) comes into one's own day by day in recent years.A remarkable advantage of these class methods is directly to use all kinds of planning algorithms that are extensive use of and study in the operational research field, by on high-efficiency computer, implementing these search-reasonings-lax numerical optimization algorithm that waits, finish the calculating of the On-line Estimation and the optimum control sequence of extensive control system state.When solving the optimal control in dynamic problem of specific field, solution can be expressed as finding the solution of a class optimal control in dynamic problem.The variational method is the classical way of finding the solution this class problem, belongs to the first optimization thinking of discretize again.Broad research is directly used in finding the solution of optimal control problem to the nonlinear programming device of solving a problem in recent years, it is first discretize optimization again, implementation method can be whole discrete state variablees and control variable, and uses the multiple spot shooting method to finish the calculating of optimum control series.When adopting this method to finish the large-scale nonlinear dynamic optimization controlling Design, the researchist will run into the thorny problem of following three aspects: the one, and non-linear plant model is varied, how the form of code requirement, standard is described the nonlinear dynamic optimization model, so that the facility of the input of model, controlling Design and researchist or engineering staff's interchange etc.; The 2nd, the large-scale complex process has a large amount of state variables and control variable, when this type of problem being carried out the discretize processing, the scale of the scale of state variable and control variable, constraint condition and objective function will sharply increase along with the increase of discrete granularity, finishing discretize work will become difficult by hand, how the method for code requirement, standard is finished the discretize of problem automatically, so that reduce work difficulty, reduce design time and wrong probability; The 3rd, using nonlinear programming to solve a problem device when finding the solution the nonlinear programming problem that obtains after discretize is finished, the researchist need finish and use the solve a problem programmed of algorithm routine of device of nonlinear programming, generally need provide nonlinear programming and implement to calculate some required matrix code, for example Jacobian matrix, gradient matrix, extra large gloomy matrix etc.Problem scale hour researchist can finish the design of algorithm routine reluctantly, and is more when variable, when problem scale is big slightly, the manual or semi-automatic design that may finish algorithm routine hardly.Therefore, how concrete one by one extensive optimal control in dynamic issue table is reached the extensive mathematical programming problem of standard, further editor, adjustment, emulation and customization become the bottleneck problem that the advanced control technology of this class of restriction is implemented.
Summary of the invention
The object of the present invention is to provide the model description method of a kind of differential algebra constraint nonlinear dynamic optimization problem, and based on the automatic systematic function of the control algolithm code of this model.The present invention is for addressing this problem the automation tools that system is provided.
The objective of the invention is to be achieved through the following technical solutions:
Large-scale nonlinear dynamic optimization algorithm code generating system is made up of model editor, model discretize processor, algorithmic code automatic generator, has defined the method that a kind of large-scale nonlinear dynamic optimization algorithm code generates, and comprises the steps:
(1), the editing machine that uses a model input nonlinear dynamic optimization problem, obtain the NDOML model of this problem;
(2), discretize handles the NDOML model of input, obtains the NDOML model after the new discretize;
(3), generate former optimization problem control algolithm C programmer code according to the NDOML model after the discretize.
Described large-scale nonlinear dynamic optimization algorithm code generating system has defined a kind of language NDOML of the description nonlinear dynamic optimization model based on the XML language.
Described large-scale nonlinear dynamic optimization algorithm code generating system, the NDOML model of nonlinear dynamic optimization problem can use the model editor of graphic user interface to produce.
Described large-scale nonlinear dynamic optimization algorithm code generating system, the discretize of NDOML model is handled and can be finished automatically by model discretize processor.
Described large-scale nonlinear dynamic optimization algorithm code generating system, the control algolithm C programmer code of NDOML model can be generated automatically by the algorithmic code automatic generator.
Description of drawings
Fig. 1 is the structured flowchart of native system;
Fig. 2 is NDOML model structure definition sketch;
Fig. 3 is a NDOML model discretize processing flow chart;
Fig. 4 is that NDOML model algorithm code generates processing flow chart.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described further.
(1), the present invention has defined a kind of language NDOML (Nonlinear Dynamic Optimize Markup Language of the description nonlinear dynamic optimization model based on the XML language, the nonlinear dynamic optimization SGML), can be used to describe DAE constraint nonlinear dynamic optimization problem (DAE-Constrained Nonlinear Dynamic Optimization, be called for short DAE-NDO) and AE constraint nonlinear dynamic optimization problem (AE-Constrained Nonlinear DynamicOptimization is called for short AE-NDO);
(2), the present invention realizes the editing machine of NDOML model being used for the input and output of nonlinear dynamic optimization problem;
(3), the present invention uses simultaneous method and multiple spot shooting method that the NDOML model is carried out automatic discretize and handles, and produces the NDOML model after new discretize is finished;
(4), the present invention realizes NDOML model control algolithm code automatic generator, the matrix program code that generating algorithm requires, function program code, calling interface program code etc.The code that generates adopts the C language.
When concrete use native system design DAE constraint nonlinear dynamic optimization problem or AE constraint nonlinear dynamic optimization problem, carry out as follows:
(1), the rule according to the NDOML language is described as a NDOML model with optimization problem.Can use two kinds of methods to finish this step, a kind of method is imported with text editor for artificial conversion back; Another kind method can obtain the NDOML model for using NDOML model editor input optimization problem;
(2), the automatic discretize processor that calls native system carries out discretize with the NDOML model that obtains in the 1st step and handles, and obtains the NDOML model after the discretize;
(3), use NDOML model after the discretize that obtains in the 2nd step to call the algorithmic code automatic generator of native system, generate optimization problem control algolithm code.
After generating optimization problem control algolithm code according to above-mentioned steps, the user can use this code that optimization problem is carried out emulation and assessment, and the control system that also can be integrated into the user is gone in using.
Native system is by the technical scheme of its use, and the NDOML language of its definition has made things convenient for input, preservation, the output of optimization problem model, is convenient to the native system expanded function, is convenient to coordinate to finish design objective with the other control system design tool; The automatic discretize of nonlinear optimal problem is handled and is replaced manually finishing the nonlinear optimal problem discretize, has solved the great difficulty that the designer faces when discretize large-scale nonlinear optimization problem; The algorithmic code automatic generator replaces manually finishing the programmed of algorithm routine, not only improve designer's work efficiency greatly, and can finish the algorithm routine programmed that manually is difficult to many, the sweeping nonlinear dynamic optimization problems of variable finished.
The structure of native system is the inner structure and the interactively of system in the wherein empty frame as shown in Figure 1, and empty frame outside is input model data, the output result data of system.The nonlinear dynamic optimization model that enters internal system uses specific data structure to represent that system mainly comprises model editor, model discretize processor, three functions of algorithmic code automatic generator.
Model editor is used for nonlinear optimization model input system, and the output of software systems internal model is preserved.The editing machine typing of designer's working model is also edited optimal control problem model (math equation is represented), is converted to the internal system model representation; Model editor also can read in the optimal control problem model that NDOML describes automatically, is converted into internal model and represents, model editor also can be represented internal model to be output as the optimal control problem model that NDOML describes simultaneously.
Model discretize processor is done automatic discretize with the nonlinear dynamic optimization model of internal representation and is handled, and generates the nonlinear dynamic optimization model of the discretize of internal representation.
The algorithmic code automatic generator generates some matrix program codes, function program code scheduling algorithm program code according to the nonlinear dynamic optimization model of discretize.
The NDOML language based on XML of native system definition is used to describe DAE constraint nonlinear dynamic optimization problem and AE constraint nonlinear dynamic optimization problem.Fig. 2 is NDOML model structure definition sketch, Model wherein, IndepentVariable, ListOfParameters, ListOfExpressions, Parameter, ListOfInitialAssignments, ListOfAlgDecisionVariables, ListOfDiffDecisionVariables, Expression, PInitialAssignment, AlgDecisionVariable, DiffDecisionVariable, ListOfCtlDecisionVariables, CtlDecisionVariable, ListOfAlgConstraints, AlgConstraint, ObjFunction is the XML element, and every kind of element has all defined some attributes.NBase among the figure is not the XML element definition, and the attribute of its definition is a public attribute, has the XML element of inheritance all to define these public attributes automatically with NBase among the figure.
Model is the element of a Container Type, can hold the element of IndependentVariable, Parameter, Expression, PInitialAssignment, DiffDecisionVariable, AlgDecisionVariable, CtlDecisionVariable, AlgConstraint, these types of ObjFunction in this Container elements.Wherein, can directly hold zero or IndependentVariable dvielement, at least one and ObjFunction element only in the Model dvielement.Parameter in the Model container, Expression, PInitialAssignment, DiffDecisionVariable, AlgDecisionVariable, CtlDecisionVariable, the AlgConstraint dvielement then places ListOfParameters respectively, ListOfExpressions, ListOfInitialAssignments, ListOfDiffDecisionVariables, ListOfAlgDecisionVariables, ListOfCtlDecisionVariables, in these container class elements of ListOfAlgConstraints.It is as follows that NDOML describes the general type of a complete nonlinear dynamic optimization model:
<?xml?version=″1.0″encoding=″utf-8″?>
<model?id=″XXModel″>
<independentVariable.../> optional
<listOfParameters> optional
one?or?more<parameter>...</parameter>
</listOfParameters>
<listOfExpressions> optional
one?or?more<expression>...</expression>
</listOfExpressions>
<listOfInitialAssignments> optional
one?or?more?PInitialAssignment
</listOfInitialAssignments>
<listOfDiffDecisionVariables> optional
one?or?more<diffDecisionVariable>...</diffDecisionVariable>
</listOfDiffDecisionVariables>
<listOfAlgDecisionVariables> optional
one?or?more<algDecisionVariable>...</algDecisionVariable>
</listOfAlgDecisionVariables>
<listOfCtlDecisionVariables> optional
one?or?more<ctlDecisionVariable>...</ctlDecisionVariable>
</listOfCtlDecisionVariables>
<listOfAlgConstraints> optional
one?or?more<algConstraint>...</algConstraint>
</listOfAlgConstraints>
one?elements?of?subclasses?of?ObjFunction
</model>
Model discretize processor uses simultaneous method and multiple spot shooting method that the NDOML model is carried out automatic discretize and handles, and its discretize process flowchart as shown in Figure 3.After the validity of checking the NDOML model, the variable of discretize NDOML model, equation of constraint, objective function successively, generate new variable, equation of constraint, objective function, and constitute NDOML model after the discretize by variable, equation of constraint, the objective function of these new generations.The wherein input of NDOML model, parsing, output function are called model editor by model discretize processor and are finished.
The algorithmic code automatic generator is according to the NDOML model, the matrix program code that generating algorithm requires, function program code, calling interface program code etc., and the code of generation is the C language codes.Code generates process flowchart as shown in Figure 4, after the validity of checking the NDOML model, require to generate successively variable declarations code, objective function computing function code, equation of constraint computing function code, matrix computations function code, calling interface function code according to model and algorithm, and the code that generates is saved in .c is in the file of suffix.The designer uses this C linguistic source program file, can be used for emulation, the assessment of Optimization Model, perhaps is integrated into to optimize in the application to go.Be the C language code fragment of one section generation below, abridged code in the middle of suspension points is represented.
#include<math.h>
const?double_segment_t=2.0000000000000001e-001;
......
double?Z_t_des,_div_Z_c,_div_Z_t,_civ_v,Z_c_des,v_des;
Number_s_x[170];
......
/*meyer?function?implement*/
Bool?CSTR_Model_objfun(int?n,double*x,Bool?new_x,double*obj_value)
{
double?_c_v_0_1;
......
*objvalue=_segment_t*((pow(_d_Z_t_9_1-Z_t_des,2.0)+……
......
return?TRUE;
}
......

Claims (5)

1. large-scale nonlinear dynamic optimization algorithm code generating system, form by model editor, model discretize processor, algorithmic code automatic generator, its characteristic has been to define the method that a kind of large-scale nonlinear dynamic optimization algorithm code generates, and comprises the steps:
(1), the editing machine that uses a model input nonlinear dynamic optimization problem, obtain the NDOML model of this problem;
(2), discretize handles the NDOML model of input, obtains the NDOML model after the new discretize;
(3), generate former optimization problem control algolithm C programmer code according to the NDOML model after the discretize.
2. require described large-scale nonlinear dynamic optimization algorithm code generating system according to right 1, it is characterized in that defining a kind of language NDOML of the description nonlinear dynamic optimization model based on the XML language.
3. require described large-scale nonlinear dynamic optimization algorithm code generating system according to right 1, it is characterized in that the NDOML model of nonlinear dynamic optimization problem can use the model editor of graphic user interface to produce.
4. require described large-scale nonlinear dynamic optimization algorithm code generating system according to right 1, it is characterized in that the discretize of NDOML model is handled and can be finished automatically by model discretize processor.
5. require described large-scale nonlinear dynamic optimization algorithm code generating system according to right 1, it is characterized in that the control algolithm C programmer code of NDOML model can be generated automatically by the algorithmic code automatic generator.
CN201010133132A 2010-03-26 2010-03-26 Large-scale nonlinear dynamic optimization algorithm code generating system Pending CN101814027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010133132A CN101814027A (en) 2010-03-26 2010-03-26 Large-scale nonlinear dynamic optimization algorithm code generating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010133132A CN101814027A (en) 2010-03-26 2010-03-26 Large-scale nonlinear dynamic optimization algorithm code generating system

Publications (1)

Publication Number Publication Date
CN101814027A true CN101814027A (en) 2010-08-25

Family

ID=42621290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010133132A Pending CN101814027A (en) 2010-03-26 2010-03-26 Large-scale nonlinear dynamic optimization algorithm code generating system

Country Status (1)

Country Link
CN (1) CN101814027A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298497A (en) * 2014-04-04 2015-01-21 沈阳化工大学 Large-scale nonlinear dynamic optimization algorithm code generation system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298497A (en) * 2014-04-04 2015-01-21 沈阳化工大学 Large-scale nonlinear dynamic optimization algorithm code generation system

Similar Documents

Publication Publication Date Title
Rimvall et al. Computer-aided control systems design
JPS63223869A (en) Program producing method
CN107341294A (en) Spacecraft Information System Modeling emulation mode based on Modelica language
Chen et al. Pyomo. GDP: Disjunctive models in python
Kabulov et al. Algorithmization control of complex systems based on functioning tables
CN100365640C (en) Digital model integral design method of complex product based on file
Krenczyk et al. Production planning and scheduling with material handling using modelling and simulation
CN102929853A (en) DCS (Data Communication System) project data generating system and method based on Excel sheet association
CN102540974A (en) Numerical control code converting method
Savolainen et al. Positioning of modelling approaches, methods and tools
Krenczyk et al. Integration of scheduling and discrete event simulation systems to improve production flow planning
CN101814027A (en) Large-scale nonlinear dynamic optimization algorithm code generating system
Bacci et al. Resource Optimisation via Structured Parallel Programming
Zimmer Module-preserving compilation of modelica models
Svancara et al. Optimization of HMLV manufacturing systems using genetic algorithm and simulation.
CN112818433A (en) Rapid modeling method for simulation model of control system of nuclear power plant
CN102799694B (en) A kind of configuration method for fan master control system
Zhang et al. Linear Programming Algorithm for Assembly Line Balancing in Crane Production
CN104678898A (en) Automatic programming system for movement track of ball slice cutting robot based on CAD (computer-aided design)
CN112380684A (en) Matrixing processing method of distributed hydrological model
CN109062556A (en) A kind of function programming system of more return values
Huang et al. Application Development and Research of 3D Parametric Intelligent Design System for Double Sheathed Liner Sumps
US8831927B2 (en) Apparatus and method for reducing energy use in industrial processes
CN113297764A (en) Finite element parametric model modeling method, system and storage medium
Macdonald Automating information engineering

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20100825