You are logged in WhatsOpt with wop
. See WhatsOpt Tutorial - Part 2
As we saw in previous parts, we are able to generate OpenMDAO source code from an analysis defined in WhatsOpt. We are going to see that we can do the other way around.
With certain limitations explained below, we can create an analysis in WhatsOpt from an OpenMDAO source code, especially when the later one is originated from WhatsOpt.
The wop command allowing to so is wop push <file.py>
, where <file.py> is an Python file containing an OpenMDAO Problem setup. To experiment you can use the sellar code in examples directory.
cd examples/sellar
wop push sellar.py
Then you can observe that a new analysis is available in WhatsOpt Analyses page list. This new analysis is a duplicate of the Sellar analysis we built manually in the Part 1 of this tutorial.
Following a top-down approach where the ideal analysis is designed not depending on existing implementations, WhatsOpt main assumption is that variable names are visible globally (i.e. all needed variables are promoted). And indeed, the analysis building process within WhatsOpt ensures that variable names are unique.
So OpenMDAO code that does not follow that principle will not work. In other words, presence of connections defined with connect
will not work.
To be completed...
To be completed...