.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/scalable/plot_problem.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_scalable_plot_problem.py: Scalable problem ================ We want to solve the Aerostructure MDO problem by means of the :class:`.MDF` formulation with a higher dimension for the sweep parameter. For that, we use the :class:`.ScalableProblem` class. .. GENERATED FROM PYTHON SOURCE LINES 32-43 .. code-block:: default from __future__ import division, unicode_literals from gemseo.api import configure_logger, create_discipline, create_scenario from gemseo.problems.aerostructure.aerostructure_design_space import ( AerostructureDesignSpace, ) from gemseo.problems.scalable.data_driven.problem import ScalableProblem configure_logger() .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 44-50 Define the design problem ------------------------- In a first step, we define the design problem in terms of objective function (to maximize or minimize), design variables (local and global) and constraints (equality and inequality). .. GENERATED FROM PYTHON SOURCE LINES 50-56 .. code-block:: default design_variables = ["thick_airfoils", "thick_panels", "sweep"] objective_function = "range" eq_constraints = ["c_rf"] ineq_constraints = ["c_lift"] maximize_objective = True .. GENERATED FROM PYTHON SOURCE LINES 57-61 Create the disciplinary datasets -------------------------------- Then, we create the disciplinary :class:`.AbstractFullCache` datasets based on a :class:`.DiagonalDOE`. .. GENERATED FROM PYTHON SOURCE LINES 61-72 .. code-block:: default disciplines = create_discipline(["Aerodynamics", "Structure", "Mission"]) for discipline in disciplines: discipline.set_cache_policy(discipline.MEMORY_FULL_CACHE) design_space = AerostructureDesignSpace() design_space.filter(discipline.get_input_data_names()) output = next(iter(discipline.get_output_data_names())) scenario = create_scenario( discipline, "DisciplinaryOpt", output, design_space, scenario_type="DOE" ) scenario.execute({"algo": "DiagonalDOE", "n_samples": 10}) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none INFO - 09:23:45: INFO - 09:23:45: *** Start DOE Scenario execution *** INFO - 09:23:45: DOEScenario INFO - 09:23:45: Disciplines: Aerodynamics INFO - 09:23:45: MDOFormulation: DisciplinaryOpt INFO - 09:23:45: Algorithm: DiagonalDOE INFO - 09:23:45: Optimization problem: INFO - 09:23:45: Minimize: drag(thick_airfoils, sweep, displ) INFO - 09:23:45: With respect to: thick_airfoils, sweep, displ INFO - 09:23:45: DOE sampling: 0%| | 0/10 [00:00 .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.261 seconds) .. _sphx_glr_download_examples_scalable_plot_problem.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_problem.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_problem.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_