Solving Math Models On-the-fly

agent on 2005-04-16T07:12:42

=from 2005.4.13.11:35.AM =to ...4.13.12:05.PM

I noticed that reactions from the model-solver back to the model builder can bring huge profit to us. Model builder can decide what to do next with respect to the solutions of previously-built models, or even use the solutions directly to speed up or guide the ensuing model building process. This strategy of problem-solving can be extremely powerful! However, a CIR-to-Maple compiler can't do the tricks elegantly. What we want is a true interpreter that outputs nothing but the ultimate solutions and that has the ability to invoke Maple solver directly, so as to get model-solving results on the fly! Oh, that's very cool, I must say!

The most sophisticated part of such design is how to handle potential parallel solutions to a single model, which will lead to very complicated case-by-case considerations and backtracking behaviors. Luckily, parallel solutions are rarely seen in the problem-domain of linear circuit analysis. So it is reasonable to just ignore parallel solutions at this early stage of development.

The easiest way of realizing runtime model solving is invoking cmaple.exe via pipes, receiving its output, and then using the grepsol.pl tool to pick up the name-value pairs the model builder is concerned about. That's really simple, though not robust enough and not efficient either. After all, it will work in most common cases.