Open ScottDelbecq opened 2 years ago
Another need would be to modify the driver options/attributes after instantiation:
prob.driver = om.pyOptSparseDriver(optimizer='SLSQP')
prob.driver.opt_settings['MAXIT'] = 3
A possible solution would be to keep the driver
parameter for standard uses cases, but to allow the usage of a driver_script
that could be used instead for advanced use cases.
This new parameter would allow providing a snippet that would have to set the driver and do whatever needed around it (imports, setting options, ...). For that, a convention would be used, that problem
would be the instance name to use.
For importing additional packages or drivers we could provide the possibility to specify what to import:
title: Sample OAD Process
# List of folder paths where user added custom registered OpenMDAO components
module_folders:
# Input and output files
input_file: ./problem_inputs.xml
output_file: ./problem_outputs.xml
# Imports
imports:
- my_driver_1: MyDriver1
- my_driver_2: MyDriver2
# Definition of problem driver
driver: MyDriver1(tol=1e-2, optimizer='COBYLA', maxiter=maxiter)
These imports would be equivalent to:
from my_driver_1 import MyDriver1
from my_driver_2 import MyDriver2
Is your feature request related to a problem? Please describe. It would be nice to specify some imports or piece of code in the configuration file to be executed before the FAST-OAD process.
Describe the solution you'd like We could imagine something like for example:
Describe alternatives you've considered Of course other key names instead of
script
, likecode
.