You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am putting together a surrogate‑assisted optimization setup that combines Dakota's Gaussian‑process (GP) model with its SOGA iterator. This framework will be different from what Dakota already offers out of the box and is currently still in the proof-of-concept stage. Because I need to update some extra state variables (inactive) between iterations, I run Dakota in library mode and plug in my own top‑level iterator that mimics JEGAOptimizer. During each evaluation, the iterator changes those state variables, and the new values must reach my analysis driver.
Everything works as expected when scaling is turned off in the input file: the driver sees the updated values and uses them in the analysis. The trouble starts when I add scaling under the method keyword. With scaling enabled, the state variables never reach the analysis driver; it falls back to the default values even though the rest of the optimization keeps running fine.
While stepping through the code, I noticed that the RecastModel (or ScalingModel in this context) tries to map its variables to its sub-model (SimulationModel in this context) variables. However, I saw that the Variables::map_variables_by_view function maps only variables marked as active in my case. When scaling is on, my extra state variables are labelled inactive at that point, so the mapping step silently skips them and they never get passed forward.
So, my question is: Is there a straightforward way using input settings or public APIs to let inactive state variables pass through the scaling step without modifying Dakota’s source code (on my side)? Any suggestion, whether an input keyword, a code pointer, or a workaround, would be greatly appreciated. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am putting together a surrogate‑assisted optimization setup that combines Dakota's Gaussian‑process (GP) model with its SOGA iterator. This framework will be different from what Dakota already offers out of the box and is currently still in the proof-of-concept stage. Because I need to update some extra state variables (inactive) between iterations, I run Dakota in library mode and plug in my own top‑level iterator that mimics
JEGAOptimizer. During each evaluation, the iterator changes those state variables, and the new values must reach my analysis driver.Everything works as expected when scaling is turned off in the input file: the driver sees the updated values and uses them in the analysis. The trouble starts when I add
scalingunder themethodkeyword. With scaling enabled, the state variables never reach the analysis driver; it falls back to the default values even though the rest of the optimization keeps running fine.While stepping through the code, I noticed that the
RecastModel(orScalingModelin this context) tries to map its variables to its sub-model (SimulationModelin this context) variables. However, I saw that theVariables::map_variables_by_viewfunction maps only variables marked as active in my case. When scaling is on, my extra state variables are labelled inactive at that point, so the mapping step silently skips them and they never get passed forward.So, my question is: Is there a straightforward way using input settings or public APIs to let inactive state variables pass through the scaling step without modifying Dakota’s source code (on my side)? Any suggestion, whether an input keyword, a code pointer, or a workaround, would be greatly appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions