driver_factory module¶
Abstract factory to create drivers¶
-
class
gemseo.algos.driver_factory.
DriverFactory
(driver_lib_class, driver_package)[source]¶ Bases:
object
Base class for definition of optimization and/or DOE factory.
Automates the creation of library interfaces given a name of the algorithm.
Initializes the factory: scans the directories to search for subclasses of DriverLib. Searches in “GEMSEO_PATH” and gemseo.mda
-
property
algorithms
¶ Lists the available algorithms names in the present configuration
- Returns
the list of algorithms as a string list
-
create
(name)[source]¶ Factory method to create a DriverLib subclass from algo identifier or a library identifier
- Parameters
name (string) – library or algorithm name
- Returns
library according to context (optimization or DOE)
-
execute
(problem, algo_name, **options)[source]¶ Finds the appropriate library and executes the driver on the problem
- Parameters
problem – the problem on which to run the execution
algo_name – the algorithm name
options – the options dict for the DOE, see associated JSON file
-
is_available
(name)[source]¶ Checks the availability of a library name or algorithm name
- Parameters
name – the name of the library name or algorithm name
- Returns
True if the library is installed
-
property
libraries
¶ Lists the available library names in the present configuration
- Returns
the list of libraries as a string list
-
property