Note: this page is a stub
This modeling language handles problems of this form:
where \(x\) = differential states, \(z\) = algebraic states, \(u\) = piecewise-constant control inputs, \(d\) = non-time-varying scalar variables, and \(\theta\) = constant parameters.
At the core of the modeling system is a software program that parses a description of a problem (in the MLDO language) and automatically produces code in various computer languages. This component of the modeling system we refer to as the “MLDO code generator”. Depending on the target language selected, the output code can be variously used for simulation, optimization, visualization, analysis or documentation. Support for various target languages is an important feature, because for non-trivial nonlinear modeling/optimization problems, a single software tool is rarely sufficient for performing all the tasks necessary to obtain a satisfactory solution. Frequently, an entire ecosystem of software programs and libraries are required.
The MLDO code generator is built on the concept of “metaprogramming”, a technique in which code in one programming language is used to generate code in another. (In languages with strong metaprogramming traditions such as Lisp, metaprogramming is done by extending the language through meta-linguistic abstractions—this results in what is known as an Internal DSL (domain specific language). In our metaprogramming approach, we do not extend the syntax of an existing language, but instead construct a new one, resulting in an External DSL.).
Metaprogramming is particularly suited to situations where large amounts of complicated—but repeated—computer code is required to solve a problem, and where such code is susceptible to human error if written manually. The metaprogramming technique proposes to transfer the task of writing the code to the computer. The user is only required to specify the particular problem in a specially defined language (a “domain-specific language” or DSL in software parlance). A code generator then analyzes the structure of the specified problem and generates the requisite programming code for finding a solution.
In contrast to conventional programming languages like FORTRAN or C, modeling languages like MLDO are usually declarative rather than imperative; that is, they contain a problem definition rather than the explicit computer instructions required to solve the problem. This is an important attribute that enables MLDO to output code that is clean, concise and readable. %This owes to the fact that the MLDO code generator does not translate a set of instructions from one language to another; instead, it translates a problem definition into a set of instructions (or another problem definition, depending on the particular target language).
By adopting a one-to-many (as in one model definition, many target languages) approach, MLDO represents a single entry point to process modeling. From a business perspective, this approach allows organizations to protect their investments in modeling effort and time—and to some extent, prevent vendor lock-in—by enabling them to switch to newer modeling platforms as they emerge. With the code processing and generation infrastructure already present in MLDO, new target languages can be added to the MLDO code generator’s repertoire with relatively low effort. This flexibility leads to easier migrations, without entailing the manual re-development of an entire model on the new platform of choice (which, in the context of very large models, may require significant effort and is prone to human errors). Any transformations done at the mathematical level (e.g. manual variable/equation scaling, algebraic transformations, etc.) are preserved, which is also an advantage from a maintenance and sustainability point of view.
In short, MLDO can serve as a platform that allows for experimentation with various numerical software configurations and formulation ideas. It enables the user to focus on modeling aspects without having to repeatedly deal with the lower-level boilerplate code. MLDO also has a extensible add-on architecture for applying custom mathematical transformations on MLDO models. It can be used as a reformulation engine to alter model formulations.