# Solve a 2D MBB topology optimization problem¶

from __future__ import annotations

from gemseo import configure_logger
from gemseo import create_scenario
from gemseo.problems.topology_optimization.topopt_initialize import (
initialize_design_space_and_discipline_to,
)

configure_logger()

<RootLogger root (INFO)>


## Setup the topology optimization problem¶

Define the target volume fraction:

volume_fraction = 0.3


Define the problem type:

problem_name = "MBB"


Define the number of elements in x- and y- directions:

n_x = 50
n_y = 25


Define the full material Young’s modulus and the Poisson’s ratio:

e0 = 1
nu = 0.3


Define the penalty of the SIMP approach:

penalty = 3


Define the minimum member size in the solution:

min_member_size = 1.5


Instantiate the DesignSpace and the disciplines:

design_space, disciplines = initialize_design_space_and_discipline_to(
problem=problem_name,
n_x=n_x,
n_y=n_y,
e0=e0,
nu=nu,
penalty=penalty,
min_member_size=min_member_size,
vf0=volume_fraction,
)


## Solve the topology optimization problem¶

Generate an MDOScenario

scenario = create_scenario(
disciplines,
"DisciplinaryOpt",
"compliance",
design_space,
)


Add the volume fraction constraint to the scenario:

scenario.add_constraint(
"volume fraction", constraint_type="ineq", value=volume_fraction
)


Generate the XDSM

scenario.xdsmize()


Execute the scenario

scenario.execute({"max_iter": 200, "algo": "NLOPT_MMA"})

    INFO - 08:58:36:
INFO - 08:58:36: *** Start MDOScenario execution ***
INFO - 08:58:36: MDOScenario
INFO - 08:58:36:    Disciplines: DensityFilter FininiteElementAnalysis MaterialModelInterpolation VolumeFraction
INFO - 08:58:36:    MDO formulation: DisciplinaryOpt
INFO - 08:58:37: Optimization problem:
INFO - 08:58:37:    minimize compliance(x)
INFO - 08:58:37:    with respect to x
INFO - 08:58:37:    subject to constraints:
INFO - 08:58:37:       volume fraction(x) <= 0.3
INFO - 08:58:37: Solving optimization problem with algorithm NLOPT_MMA:
INFO - 08:58:37:      1%|          | 2/200 [00:00<00:11, 16.73 it/sec, obj=1.79e+3]
INFO - 08:58:37:      2%|▏         | 3/200 [00:00<00:10, 19.12 it/sec, obj=1.78e+3]
INFO - 08:58:37:      2%|▏         | 4/200 [00:00<00:09, 20.66 it/sec, obj=1.77e+3]
INFO - 08:58:37:      2%|▎         | 5/200 [00:00<00:09, 21.58 it/sec, obj=1.75e+3]
INFO - 08:58:37:      3%|▎         | 6/200 [00:00<00:08, 22.18 it/sec, obj=1.71e+3]
INFO - 08:58:37:      4%|▎         | 7/200 [00:00<00:08, 22.78 it/sec, obj=1.65e+3]
INFO - 08:58:37:      4%|▍         | 8/200 [00:00<00:08, 23.18 it/sec, obj=1.41e+3]
INFO - 08:58:37:      4%|▍         | 9/200 [00:00<00:08, 23.58 it/sec, obj=1.19e+3]
INFO - 08:58:37:      5%|▌         | 10/200 [00:00<00:07, 23.87 it/sec, obj=903]
INFO - 08:58:37:      6%|▌         | 11/200 [00:00<00:07, 24.08 it/sec, obj=724]
INFO - 08:58:37:      6%|▌         | 12/200 [00:00<00:07, 24.29 it/sec, obj=612]
INFO - 08:58:37:      6%|▋         | 13/200 [00:00<00:07, 24.46 it/sec, obj=534]
INFO - 08:58:37:      7%|▋         | 14/200 [00:00<00:07, 24.59 it/sec, obj=474]
INFO - 08:58:37:      8%|▊         | 15/200 [00:00<00:07, 24.74 it/sec, obj=444]
INFO - 08:58:37:      8%|▊         | 16/200 [00:00<00:07, 24.89 it/sec, obj=419]
INFO - 08:58:37:      8%|▊         | 17/200 [00:00<00:07, 25.08 it/sec, obj=405]
INFO - 08:58:37:      9%|▉         | 18/200 [00:00<00:07, 25.24 it/sec, obj=387]
INFO - 08:58:37:     10%|▉         | 19/200 [00:00<00:07, 25.34 it/sec, obj=364]
INFO - 08:58:37:     10%|█         | 20/200 [00:00<00:07, 25.44 it/sec, obj=338]
INFO - 08:58:37:     10%|█         | 21/200 [00:00<00:07, 25.53 it/sec, obj=306]
INFO - 08:58:37:     11%|█         | 22/200 [00:00<00:06, 25.62 it/sec, obj=272]
INFO - 08:58:37:     12%|█▏        | 23/200 [00:00<00:06, 25.74 it/sec, obj=253]
INFO - 08:58:37:     12%|█▏        | 24/200 [00:00<00:06, 25.81 it/sec, obj=244]
INFO - 08:58:37:     12%|█▎        | 25/200 [00:00<00:06, 25.91 it/sec, obj=234]
INFO - 08:58:38:     13%|█▎        | 26/200 [00:01<00:06, 25.96 it/sec, obj=224]
INFO - 08:58:38:     14%|█▎        | 27/200 [00:01<00:06, 26.01 it/sec, obj=213]
INFO - 08:58:38:     14%|█▍        | 28/200 [00:01<00:06, 26.12 it/sec, obj=207]
INFO - 08:58:38:     14%|█▍        | 29/200 [00:01<00:06, 26.20 it/sec, obj=202]
INFO - 08:58:38:     15%|█▌        | 30/200 [00:01<00:06, 26.30 it/sec, obj=197]
INFO - 08:58:38:     16%|█▌        | 31/200 [00:01<00:06, 26.38 it/sec, obj=193]
INFO - 08:58:38:     16%|█▌        | 32/200 [00:01<00:06, 26.46 it/sec, obj=190]
INFO - 08:58:38:     16%|█▋        | 33/200 [00:01<00:06, 26.56 it/sec, obj=188]
INFO - 08:58:38:     17%|█▋        | 34/200 [00:01<00:06, 26.62 it/sec, obj=186]
INFO - 08:58:38:     18%|█▊        | 35/200 [00:01<00:06, 26.68 it/sec, obj=185]
INFO - 08:58:38:     18%|█▊        | 36/200 [00:01<00:06, 26.74 it/sec, obj=184]
INFO - 08:58:38:     18%|█▊        | 37/200 [00:01<00:06, 26.80 it/sec, obj=183]
INFO - 08:58:38:     19%|█▉        | 38/200 [00:01<00:06, 26.88 it/sec, obj=182]
INFO - 08:58:38:     20%|█▉        | 39/200 [00:01<00:05, 26.95 it/sec, obj=181]
INFO - 08:58:38:     20%|██        | 40/200 [00:01<00:05, 26.98 it/sec, obj=179]
INFO - 08:58:38:     20%|██        | 41/200 [00:01<00:05, 27.02 it/sec, obj=177]
INFO - 08:58:38:     21%|██        | 42/200 [00:01<00:05, 27.05 it/sec, obj=175]
INFO - 08:58:38:     22%|██▏       | 43/200 [00:01<00:05, 27.09 it/sec, obj=174]
INFO - 08:58:38:     22%|██▏       | 44/200 [00:01<00:05, 27.13 it/sec, obj=173]
INFO - 08:58:38:     22%|██▎       | 45/200 [00:01<00:05, 27.17 it/sec, obj=172]
INFO - 08:58:38:     23%|██▎       | 46/200 [00:01<00:05, 27.23 it/sec, obj=172]
INFO - 08:58:38:     24%|██▎       | 47/200 [00:01<00:05, 27.27 it/sec, obj=172]
INFO - 08:58:38:     24%|██▍       | 48/200 [00:01<00:05, 27.33 it/sec, obj=172]
INFO - 08:58:38:     24%|██▍       | 49/200 [00:01<00:05, 27.38 it/sec, obj=172]
INFO - 08:58:38:     25%|██▌       | 50/200 [00:01<00:05, 27.42 it/sec, obj=172]
INFO - 08:58:38:     26%|██▌       | 51/200 [00:01<00:05, 27.46 it/sec, obj=172]
INFO - 08:58:38:     26%|██▌       | 52/200 [00:01<00:05, 27.49 it/sec, obj=172]
INFO - 08:58:38:     26%|██▋       | 53/200 [00:01<00:05, 27.52 it/sec, obj=172]
INFO - 08:58:38:     27%|██▋       | 54/200 [00:01<00:05, 27.55 it/sec, obj=172]
INFO - 08:58:38:     28%|██▊       | 55/200 [00:01<00:05, 27.58 it/sec, obj=172]
INFO - 08:58:39:     28%|██▊       | 56/200 [00:02<00:05, 27.60 it/sec, obj=172]
INFO - 08:58:39:     28%|██▊       | 57/200 [00:02<00:05, 27.64 it/sec, obj=172]
INFO - 08:58:39:     29%|██▉       | 58/200 [00:02<00:05, 27.66 it/sec, obj=171]
INFO - 08:58:39:     30%|██▉       | 59/200 [00:02<00:05, 27.69 it/sec, obj=171]
INFO - 08:58:39:     30%|███       | 60/200 [00:02<00:05, 27.73 it/sec, obj=171]
INFO - 08:58:39:     30%|███       | 61/200 [00:02<00:05, 27.77 it/sec, obj=171]
INFO - 08:58:39:     31%|███       | 62/200 [00:02<00:04, 27.80 it/sec, obj=171]
INFO - 08:58:39:     32%|███▏      | 63/200 [00:02<00:04, 27.82 it/sec, obj=171]
INFO - 08:58:39:     32%|███▏      | 64/200 [00:02<00:04, 27.84 it/sec, obj=171]
INFO - 08:58:39:     32%|███▎      | 65/200 [00:02<00:04, 27.86 it/sec, obj=171]
INFO - 08:58:39:     33%|███▎      | 66/200 [00:02<00:04, 27.87 it/sec, obj=171]
INFO - 08:58:39:     34%|███▎      | 67/200 [00:02<00:04, 27.90 it/sec, obj=171]
INFO - 08:58:39:     34%|███▍      | 68/200 [00:02<00:04, 27.91 it/sec, obj=171]
INFO - 08:58:39:     34%|███▍      | 69/200 [00:02<00:04, 27.92 it/sec, obj=171]
INFO - 08:58:39:     35%|███▌      | 70/200 [00:02<00:04, 27.94 it/sec, obj=171]
INFO - 08:58:39:     36%|███▌      | 71/200 [00:02<00:04, 27.96 it/sec, obj=171]
INFO - 08:58:39:     36%|███▌      | 72/200 [00:02<00:04, 27.97 it/sec, obj=171]
INFO - 08:58:39:     36%|███▋      | 73/200 [00:02<00:04, 27.98 it/sec, obj=171]
INFO - 08:58:39:     37%|███▋      | 74/200 [00:02<00:04, 28.00 it/sec, obj=171]
INFO - 08:58:39:     38%|███▊      | 75/200 [00:02<00:04, 28.01 it/sec, obj=171]
INFO - 08:58:39:     38%|███▊      | 76/200 [00:02<00:04, 28.02 it/sec, obj=171]
INFO - 08:58:39:     38%|███▊      | 77/200 [00:02<00:04, 28.02 it/sec, obj=171]
INFO - 08:58:39:     39%|███▉      | 78/200 [00:02<00:04, 28.03 it/sec, obj=171]
INFO - 08:58:39:     40%|███▉      | 79/200 [00:02<00:04, 28.06 it/sec, obj=171]
INFO - 08:58:39:     40%|████      | 80/200 [00:02<00:04, 28.07 it/sec, obj=171]
INFO - 08:58:39:     40%|████      | 81/200 [00:02<00:04, 28.09 it/sec, obj=171]
INFO - 08:58:39:     41%|████      | 82/200 [00:02<00:04, 28.10 it/sec, obj=171]
INFO - 08:58:39:     42%|████▏     | 83/200 [00:02<00:04, 28.12 it/sec, obj=171]
INFO - 08:58:39:     42%|████▏     | 84/200 [00:02<00:04, 28.13 it/sec, obj=171]
INFO - 08:58:40:     42%|████▎     | 85/200 [00:03<00:04, 28.14 it/sec, obj=171]
INFO - 08:58:40:     43%|████▎     | 86/200 [00:03<00:04, 28.16 it/sec, obj=171]
INFO - 08:58:40:     44%|████▎     | 87/200 [00:03<00:04, 28.17 it/sec, obj=171]
INFO - 08:58:40:     44%|████▍     | 88/200 [00:03<00:03, 28.17 it/sec, obj=171]
INFO - 08:58:40:     44%|████▍     | 89/200 [00:03<00:03, 28.19 it/sec, obj=171]
INFO - 08:58:40:     45%|████▌     | 90/200 [00:03<00:03, 28.20 it/sec, obj=171]
INFO - 08:58:40:     46%|████▌     | 91/200 [00:03<00:03, 28.21 it/sec, obj=171]
INFO - 08:58:40:     46%|████▌     | 92/200 [00:03<00:03, 28.22 it/sec, obj=171]
INFO - 08:58:40:     46%|████▋     | 93/200 [00:03<00:03, 28.23 it/sec, obj=171]
INFO - 08:58:40:     47%|████▋     | 94/200 [00:03<00:03, 28.25 it/sec, obj=171]
INFO - 08:58:40:     48%|████▊     | 95/200 [00:03<00:03, 28.27 it/sec, obj=171]
INFO - 08:58:40:     48%|████▊     | 96/200 [00:03<00:03, 28.28 it/sec, obj=171]
INFO - 08:58:40:     48%|████▊     | 97/200 [00:03<00:03, 28.30 it/sec, obj=171]
INFO - 08:58:40:     49%|████▉     | 98/200 [00:03<00:03, 28.32 it/sec, obj=171]
INFO - 08:58:40:     50%|████▉     | 99/200 [00:03<00:03, 28.33 it/sec, obj=171]
INFO - 08:58:40:     50%|█████     | 100/200 [00:03<00:03, 28.34 it/sec, obj=171]
INFO - 08:58:40:     50%|█████     | 101/200 [00:03<00:03, 28.35 it/sec, obj=171]
INFO - 08:58:40:     51%|█████     | 102/200 [00:03<00:03, 28.36 it/sec, obj=171]
INFO - 08:58:40:     52%|█████▏    | 103/200 [00:03<00:03, 28.38 it/sec, obj=171]
INFO - 08:58:40:     52%|█████▏    | 104/200 [00:03<00:03, 28.40 it/sec, obj=171]
INFO - 08:58:40:     52%|█████▎    | 105/200 [00:03<00:03, 28.41 it/sec, obj=171]
INFO - 08:58:40:     53%|█████▎    | 106/200 [00:03<00:03, 28.43 it/sec, obj=171]
INFO - 08:58:40:     54%|█████▎    | 107/200 [00:03<00:03, 28.44 it/sec, obj=171]
INFO - 08:58:40:     54%|█████▍    | 108/200 [00:03<00:03, 28.45 it/sec, obj=171]
INFO - 08:58:40:     55%|█████▍    | 109/200 [00:03<00:03, 28.46 it/sec, obj=171]
INFO - 08:58:40:     55%|█████▌    | 110/200 [00:03<00:03, 28.47 it/sec, obj=171]
INFO - 08:58:40:     56%|█████▌    | 111/200 [00:03<00:03, 28.48 it/sec, obj=171]
INFO - 08:58:40:     56%|█████▌    | 112/200 [00:03<00:03, 28.48 it/sec, obj=171]
INFO - 08:58:40:     56%|█████▋    | 113/200 [00:03<00:03, 28.47 it/sec, obj=171]
INFO - 08:58:41:     57%|█████▋    | 114/200 [00:04<00:03, 28.48 it/sec, obj=171]
INFO - 08:58:41:     57%|█████▊    | 115/200 [00:04<00:02, 28.50 it/sec, obj=172]
INFO - 08:58:41:     58%|█████▊    | 116/200 [00:04<00:02, 28.52 it/sec, obj=172]
INFO - 08:58:41:     58%|█████▊    | 117/200 [00:04<00:02, 28.52 it/sec, obj=172]
INFO - 08:58:41:     59%|█████▉    | 118/200 [00:04<00:02, 28.53 it/sec, obj=172]
INFO - 08:58:41:     60%|█████▉    | 119/200 [00:04<00:02, 28.54 it/sec, obj=171]
INFO - 08:58:41:     60%|██████    | 120/200 [00:04<00:02, 28.55 it/sec, obj=171]
INFO - 08:58:41:     60%|██████    | 121/200 [00:04<00:02, 28.55 it/sec, obj=171]
INFO - 08:58:41:     61%|██████    | 122/200 [00:04<00:02, 28.56 it/sec, obj=170]
INFO - 08:58:41:     62%|██████▏   | 123/200 [00:04<00:02, 28.57 it/sec, obj=170]
INFO - 08:58:41:     62%|██████▏   | 124/200 [00:04<00:02, 28.57 it/sec, obj=170]
INFO - 08:58:41:     62%|██████▎   | 125/200 [00:04<00:02, 28.57 it/sec, obj=170]
INFO - 08:58:41:     63%|██████▎   | 126/200 [00:04<00:02, 28.58 it/sec, obj=170]
INFO - 08:58:41:     64%|██████▎   | 127/200 [00:04<00:02, 28.58 it/sec, obj=170]
INFO - 08:58:41:     64%|██████▍   | 128/200 [00:04<00:02, 28.59 it/sec, obj=170]
INFO - 08:58:41:     64%|██████▍   | 129/200 [00:04<00:02, 28.59 it/sec, obj=170]
INFO - 08:58:41:     65%|██████▌   | 130/200 [00:04<00:02, 28.59 it/sec, obj=170]
INFO - 08:58:41:     66%|██████▌   | 131/200 [00:04<00:02, 28.60 it/sec, obj=170]
INFO - 08:58:41:     66%|██████▌   | 132/200 [00:04<00:02, 28.61 it/sec, obj=170]
INFO - 08:58:41:     66%|██████▋   | 133/200 [00:04<00:02, 28.62 it/sec, obj=170]
INFO - 08:58:41:     67%|██████▋   | 134/200 [00:04<00:02, 28.62 it/sec, obj=170]
INFO - 08:58:41:     68%|██████▊   | 135/200 [00:04<00:02, 28.63 it/sec, obj=170]
INFO - 08:58:41:     68%|██████▊   | 136/200 [00:04<00:02, 28.63 it/sec, obj=170]
INFO - 08:58:41:     68%|██████▊   | 137/200 [00:04<00:02, 28.64 it/sec, obj=170]
INFO - 08:58:41:     69%|██████▉   | 138/200 [00:04<00:02, 28.65 it/sec, obj=170]
INFO - 08:58:41:     70%|██████▉   | 139/200 [00:04<00:02, 28.65 it/sec, obj=170]
INFO - 08:58:41:     70%|███████   | 140/200 [00:04<00:02, 28.66 it/sec, obj=170]
INFO - 08:58:41:     70%|███████   | 141/200 [00:04<00:02, 28.67 it/sec, obj=170]
INFO - 08:58:41:     71%|███████   | 142/200 [00:04<00:02, 28.68 it/sec, obj=170]
INFO - 08:58:41:     72%|███████▏  | 143/200 [00:04<00:01, 28.69 it/sec, obj=170]
INFO - 08:58:42:     72%|███████▏  | 144/200 [00:05<00:01, 28.69 it/sec, obj=170]
INFO - 08:58:42:     72%|███████▎  | 145/200 [00:05<00:01, 28.70 it/sec, obj=170]
INFO - 08:58:42:     73%|███████▎  | 146/200 [00:05<00:01, 28.70 it/sec, obj=170]
INFO - 08:58:42:     74%|███████▎  | 147/200 [00:05<00:01, 28.71 it/sec, obj=170]
INFO - 08:58:42:     74%|███████▍  | 148/200 [00:05<00:01, 28.71 it/sec, obj=170]
INFO - 08:58:42:     74%|███████▍  | 149/200 [00:05<00:01, 28.72 it/sec, obj=170]
INFO - 08:58:42:     75%|███████▌  | 150/200 [00:05<00:01, 28.73 it/sec, obj=170]
INFO - 08:58:42:     76%|███████▌  | 151/200 [00:05<00:01, 28.73 it/sec, obj=170]
INFO - 08:58:42:     76%|███████▌  | 152/200 [00:05<00:01, 28.74 it/sec, obj=170]
INFO - 08:58:42:     76%|███████▋  | 153/200 [00:05<00:01, 28.74 it/sec, obj=170]
INFO - 08:58:42:     77%|███████▋  | 154/200 [00:05<00:01, 28.75 it/sec, obj=170]
INFO - 08:58:42:     78%|███████▊  | 155/200 [00:05<00:01, 28.76 it/sec, obj=170]
INFO - 08:58:42:     78%|███████▊  | 156/200 [00:05<00:01, 28.77 it/sec, obj=170]
INFO - 08:58:42:     78%|███████▊  | 157/200 [00:05<00:01, 28.78 it/sec, obj=170]
INFO - 08:58:42:     79%|███████▉  | 158/200 [00:05<00:01, 28.79 it/sec, obj=170]
INFO - 08:58:42:     80%|███████▉  | 159/200 [00:05<00:01, 28.80 it/sec, obj=170]
INFO - 08:58:42:     80%|████████  | 160/200 [00:05<00:01, 28.80 it/sec, obj=170]
INFO - 08:58:42:     80%|████████  | 161/200 [00:05<00:01, 28.81 it/sec, obj=170]
INFO - 08:58:42:     81%|████████  | 162/200 [00:05<00:01, 28.82 it/sec, obj=170]
INFO - 08:58:42:     82%|████████▏ | 163/200 [00:05<00:01, 28.82 it/sec, obj=170]
INFO - 08:58:42:     82%|████████▏ | 164/200 [00:05<00:01, 28.84 it/sec, obj=170]
INFO - 08:58:42:     82%|████████▎ | 165/200 [00:05<00:01, 28.85 it/sec, obj=170]
INFO - 08:58:42:     83%|████████▎ | 166/200 [00:05<00:01, 28.86 it/sec, obj=170]
INFO - 08:58:42:     84%|████████▎ | 167/200 [00:05<00:01, 28.87 it/sec, obj=170]
INFO - 08:58:42:     84%|████████▍ | 168/200 [00:05<00:01, 28.89 it/sec, obj=170]
INFO - 08:58:42:     84%|████████▍ | 169/200 [00:05<00:01, 28.89 it/sec, obj=170]
INFO - 08:58:42:     85%|████████▌ | 170/200 [00:05<00:01, 28.89 it/sec, obj=170]
INFO - 08:58:42:     86%|████████▌ | 171/200 [00:05<00:01, 28.90 it/sec, obj=170]
INFO - 08:58:42:     86%|████████▌ | 172/200 [00:05<00:00, 28.91 it/sec, obj=170]
INFO - 08:58:42:     86%|████████▋ | 173/200 [00:05<00:00, 28.91 it/sec, obj=170]
INFO - 08:58:43:     87%|████████▋ | 174/200 [00:06<00:00, 28.92 it/sec, obj=170]
INFO - 08:58:43:     88%|████████▊ | 175/200 [00:06<00:00, 28.93 it/sec, obj=170]
INFO - 08:58:43:     88%|████████▊ | 176/200 [00:06<00:00, 28.93 it/sec, obj=170]
INFO - 08:58:43:     88%|████████▊ | 177/200 [00:06<00:00, 28.93 it/sec, obj=170]
INFO - 08:58:43:     89%|████████▉ | 178/200 [00:06<00:00, 28.93 it/sec, obj=170]
INFO - 08:58:43:     90%|████████▉ | 179/200 [00:06<00:00, 28.94 it/sec, obj=170]
INFO - 08:58:43:     90%|█████████ | 180/200 [00:06<00:00, 28.94 it/sec, obj=170]
INFO - 08:58:43:     90%|█████████ | 181/200 [00:06<00:00, 28.94 it/sec, obj=170]
INFO - 08:58:43:     91%|█████████ | 182/200 [00:06<00:00, 28.95 it/sec, obj=170]
INFO - 08:58:43:     92%|█████████▏| 183/200 [00:06<00:00, 28.95 it/sec, obj=170]
INFO - 08:58:43:     92%|█████████▏| 184/200 [00:06<00:00, 28.96 it/sec, obj=170]
INFO - 08:58:43:     92%|█████████▎| 185/200 [00:06<00:00, 28.96 it/sec, obj=170]
INFO - 08:58:43:     93%|█████████▎| 186/200 [00:06<00:00, 28.98 it/sec, obj=170]
INFO - 08:58:43:     94%|█████████▎| 187/200 [00:06<00:00, 28.98 it/sec, obj=170]
INFO - 08:58:43:     94%|█████████▍| 188/200 [00:06<00:00, 28.98 it/sec, obj=170]
INFO - 08:58:43:     94%|█████████▍| 189/200 [00:06<00:00, 28.98 it/sec, obj=170]
INFO - 08:58:43:     95%|█████████▌| 190/200 [00:06<00:00, 28.98 it/sec, obj=170]
INFO - 08:58:43:     96%|█████████▌| 191/200 [00:06<00:00, 28.99 it/sec, obj=170]
INFO - 08:58:43:     96%|█████████▌| 192/200 [00:06<00:00, 28.99 it/sec, obj=170]
INFO - 08:58:43:     96%|█████████▋| 193/200 [00:06<00:00, 29.00 it/sec, obj=170]
INFO - 08:58:43:     97%|█████████▋| 194/200 [00:06<00:00, 29.00 it/sec, obj=170]
INFO - 08:58:43:     98%|█████████▊| 195/200 [00:06<00:00, 29.00 it/sec, obj=170]
INFO - 08:58:43:     98%|█████████▊| 196/200 [00:06<00:00, 29.00 it/sec, obj=170]
INFO - 08:58:43:     98%|█████████▊| 197/200 [00:06<00:00, 29.00 it/sec, obj=170]
INFO - 08:58:43:     99%|█████████▉| 198/200 [00:06<00:00, 29.01 it/sec, obj=170]
INFO - 08:58:43:    100%|█████████▉| 199/200 [00:06<00:00, 29.01 it/sec, obj=170]
INFO - 08:58:43:    100%|██████████| 200/200 [00:06<00:00, 29.12 it/sec, obj=170]
INFO - 08:58:43: Optimization result:
INFO - 08:58:43:    Optimizer info:
INFO - 08:58:43:       Status: None
INFO - 08:58:43:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
INFO - 08:58:43:       Number of calls to the objective function by the optimizer: 201
INFO - 08:58:43:    Solution:
INFO - 08:58:43:       The solution is feasible.
INFO - 08:58:43:       Objective: 169.89161468983534
INFO - 08:58:43:       Standardized constraints:
INFO - 08:58:43:          [volume fraction-0.3] = -4.312432086428508e-07
INFO - 08:58:43: *** End MDOScenario execution (time: 0:00:06.884067) ***

{'max_iter': 200, 'algo': 'NLOPT_MMA'}


## Results¶

Post-process the optimization history:

scenario.post_process(
"BasicHistory", variable_names=["compliance"], show=True, save=False
)

<gemseo.post.basic_history.BasicHistory object at 0x7f1dad8c86d0>


Plot the solution

scenario.post_process("TopologyView", n_x=n_x, n_y=n_y, show=True, save=False)

<gemseo.post.topology_view.TopologyView object at 0x7f1da71f3a60>


Total running time of the script: (0 minutes 7.203 seconds)

Gallery generated by Sphinx-Gallery