### Rumored product from Maplesoft: Blockbuilder for Simulink

Rumor has it that Maplesoft are working on a product to that will allow Maple use with Mathworks' Simulink.

Details are not clear: "This product will combine the power and ease-of-use of Maple with specialized dynamic analysis tools and an S-Function Generator that will allow you to automatically convert Maple-derived mathematical models into a Simulink block (in C or MATLAB) that can be used as part of your simulation, ultimately for real-time execution in hardware-in-the-loop applications. "

In practice this sounds like the Maple Code Generation package, which is used to generate C, FORTRAN and Visual Basic code, is being extended to support the S-Function syntax and sold as a separate add-on.

If this is true, the problem will be that the the existing Code Generation package just isn't that good. First there is a conceptual issue, that a computer algebra system contains lots of operations that can have no equivalent in a numerical language. e.g. Symbolic integration or simplification of an expression. So you have to limit your programing in Maple to have parts of the system that are numeric operations.

But even when you adjust to this, parts that could be translated, simply don't. The documentation for Code Generation contains phrases like "Support for modules is limited", "Translation of repetition statements is not fully supported."

By the time you limit yourself to a subset of the system learned the limitations of what can be translated, you have little benefit left compared to just writing directly in the target language. The Code Generation tools are good for little more than converting a formula into appropriate syntax - 2**3 for FORTRAN 2^3 for Visual Basic etc.

If you want symbolic computation converted to other languages, you should consider MathCode C++ or MathCode F90 from MathCore http://www.mathcore.com. This still has the conceptual barrier, but what it does cover, it covers well.

A less likely possibility is that this will provide for Maple to be a component within a Simulink system. But a Maple link is likely far too slow to make this viable for all but the simplest systems.

## No comments:

Post a Comment