Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Example Jupyter Notebooks #644

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e5c400b
Add files via upload
szoppelt Jan 14, 2025
bf0331e
Merge pull request #1 from szoppelt/szoppelt-examples-typos
szoppelt Jan 14, 2025
f5403a2
Merge branch 'main' into main
jkirk5 Jan 16, 2025
1b09ca1
Merge branch 'main' into main
jkirk5 Jan 16, 2025
3a07d3d
Merge branch 'szoppelt-examples-typos' into examples-typos
Jan 16, 2025
6874eb8
removed jupyter output cells
Jan 16, 2025
bc14ba6
Merge pull request #2 from jkirk5/examples-typos
szoppelt Jan 16, 2025
28386bd
Add files via upload
szoppelt Jan 21, 2025
ed26f0c
Add files via upload
szoppelt Jan 21, 2025
a8cb4a4
Add files via upload
szoppelt Jan 21, 2025
03ee664
Add files via upload
szoppelt Jan 21, 2025
afa6928
Merge pull request #3 from szoppelt/fixing-files
szoppelt Jan 21, 2025
98ce55a
Rename additional_flight_phases.ipynb to aviary/docs/examples/additio…
szoppelt Jan 21, 2025
f255033
Create .gitattributes
szoppelt Jan 21, 2025
ad19bb0
Delete aviary/docs/examples/additional_flight_phases.ipynb
szoppelt Jan 21, 2025
d8f6667
Delete aviary/docs/examples/additional_flight_phases_2.ipynb
szoppelt Jan 21, 2025
74049aa
Add files via upload
szoppelt Jan 21, 2025
b579a38
Delete coupled_aircraft_mission_optimization.ipynb
szoppelt Jan 21, 2025
544306b
Delete aviary/docs/examples/coupled_aircraft_mission_optimization.ipynb
szoppelt Jan 21, 2025
1a586cd
Add files via upload
szoppelt Jan 21, 2025
92700d7
Delete aviary/docs/examples/additional_flight_phases.ipynb
szoppelt Jan 21, 2025
e342df6
Add files via upload
szoppelt Jan 21, 2025
6e0e6b8
Add files via upload
szoppelt Jan 22, 2025
ec9ee45
Delete aviary/docs/examples/additional_flight_phases.ipynb
szoppelt Jan 22, 2025
0304988
Rename additional_flight_phases-2.ipynb to additional_flight_phases.i…
szoppelt Jan 22, 2025
f6ac6d2
Add files via upload
szoppelt Jan 22, 2025
b8185c1
Delete aviary/docs/examples/coupled_aircraft_mission_optimization.ipynb
szoppelt Jan 22, 2025
19332cc
Rename coupled_aircraft_mission_optimization-3.ipynb to coupled_aircr…
szoppelt Jan 22, 2025
8ef6163
removed local-only filters
Jan 22, 2025
6d7468a
Merge branch 'main' into main
jkirk5 Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 141 additions & 16 deletions aviary/docs/examples/additional_flight_phases.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'aviary.utils.doctape'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Testing Cell\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01maviary\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdoctape\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m glue_variable\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01maviary\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01minterface\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcmd_entry_points\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m _command_map\n\u001b[1;32m 5\u001b[0m draw_mission \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdraw_mission\u001b[39m\u001b[38;5;124m'\u001b[39m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'aviary.utils.doctape'"
]
}
],
"source": [
"# Testing Cell\n",
"from aviary.utils.doctape import glue_variable\n",
Expand Down Expand Up @@ -43,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -71,7 +83,7 @@
" \"initial_bounds\": ((0.0, 0.0), \"min\"),\n",
" \"duration_bounds\": ((25.5, 76.5), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([0, 51], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([0, 51], \"min\")},\n",
" },\n",
" \"cruise_1\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -95,7 +107,7 @@
" \"initial_bounds\": ((25.5, 76.5), \"min\"),\n",
" \"duration_bounds\": ((23.5, 70.5), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([51, 47], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([51, 47], \"min\")},\n",
" },\n",
" \"climb_2\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -119,7 +131,7 @@
" \"initial_bounds\": ((49.0, 147.0), \"min\"),\n",
" \"duration_bounds\": ((5.0, 15.0), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([98, 10], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([98, 10], \"min\")},\n",
" },\n",
" \"cruise_2\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -143,7 +155,7 @@
" \"initial_bounds\": ((54.0, 162.0), \"min\"),\n",
" \"duration_bounds\": ((24.0, 72.0), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([108, 48], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([108, 48], \"min\")},\n",
" },\n",
" \"climb_3\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -167,7 +179,7 @@
" \"initial_bounds\": ((78.0, 234.0), \"min\"),\n",
" \"duration_bounds\": ((7.0, 21.0), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([156, 14], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([156, 14], \"min\")},\n",
" },\n",
" \"climb_4\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -191,7 +203,7 @@
" \"initial_bounds\": ((85.0, 255.0), \"min\"),\n",
" \"duration_bounds\": ((43.0, 129.0), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([170, 86], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([170, 86], \"min\")},\n",
" },\n",
" \"descent_1\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -215,7 +227,7 @@
" \"initial_bounds\": ((128.0, 384.0), \"min\"),\n",
" \"duration_bounds\": ((41.0, 123.0), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([256, 82], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([256, 82], \"min\")},\n",
" },\n",
" \"post_mission\": {\n",
" \"include_landing\": False,\n",
Expand All @@ -227,13 +239,25 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'aviary.utils.doctape'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[3], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Testing Cell\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01maviary\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdoctape\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m glue_keys\n\u001b[1;32m 3\u001b[0m glue_keys(phase_info, display\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m)\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'aviary.utils.doctape'"
]
}
],
"source": [
"# Testing Cell\n",
"from aviary.utils.doctape import glue_keys\n",
Expand All @@ -251,9 +275,110 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/sazoppelt/opt/anaconda3/lib/python3.8/site-packages/aviary/subsystems/propulsion/engine_model.py:131: UserWarning: The value of aircraft:engine:wing_locations passed to EngineModel <engine_deck> is type <class 'numpy.ndarray'>. Only the first entry in this iterable will be used.\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"The following variables have been overridden:\n",
" 'aircraft:design:touchdown_mass\n",
" 'aircraft:engine:mass\n",
" 'aircraft:fins:mass\n",
" 'aircraft:fuel:auxiliary_fuel_capacity\n",
" 'aircraft:fuel:fuselage_fuel_capacity\n",
" 'aircraft:fuel:total_capacity\n",
" 'aircraft:fuselage:planform_area\n",
" 'aircraft:fuselage:wetted_area\n",
" 'aircraft:horizontal_tail:wetted_area\n",
" 'aircraft:landing_gear:main_gear_oleo_length\n",
" 'aircraft:landing_gear:nose_gear_oleo_length\n",
" 'aircraft:vertical_tail:wetted_area\n",
" 'aircraft:wing:aspect_ratio\n",
" 'aircraft:wing:control_surface_area\n",
" 'aircraft:wing:wetted_area\n",
"\n",
"--- Constraint Report [traj] ---\n",
" --- climb_1 ---\n",
" [path] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" --- cruise_1 ---\n",
" [initial] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" [final] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" --- climb_2 ---\n",
" [initial] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" [final] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" --- cruise_2 ---\n",
" [initial] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" [final] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" --- climb_3 ---\n",
" [initial] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" [final] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" --- climb_4 ---\n",
" [initial] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" [final] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
" --- descent_1 ---\n",
" [path] 0.0000e+00 <= throttle <= 1.0000e+00 [unitless]\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/sazoppelt/opt/anaconda3/lib/python3.8/site-packages/openmdao/recorders/sqlite_recorder.py:227: UserWarning:The existing case recorder file, dymos_solution.db, is being overwritten.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Model viewer data has already been recorded for Driver.\n",
"Full total jacobian was computed 3 times, taking 1.195775 seconds.\n",
"Total jacobian shape: (163, 135) \n",
"\n",
"\n",
"Jacobian shape: (163, 135) (7.26% nonzero)\n",
"FWD solves: 15 REV solves: 0\n",
"Total colors vs. total size: 15 vs 135 (88.89% improvement)\n",
"\n",
"Sparsity computed using tolerance: 1e-25\n",
"Time to compute sparsity: 1.1958 sec\n",
"Time to compute coloring: 0.1298 sec\n",
"Memory to compute coloring: -0.2969 MB\n",
"Coloring created on: 2025-01-14 13:44:26\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/sazoppelt/opt/anaconda3/lib/python3.8/site-packages/openmdao/core/total_jac.py:1788: DerivativesWarning:Design variables [('traj.climb_1.t_initial', inds=[0])] have no impact on the constraints or objective.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Optimization terminated successfully (Exit mode 0)\n",
" Current function value: [2.8050298]\n",
" Iterations: 16\n",
" Function evaluations: 16\n",
" Gradient evaluations: 16\n",
"Optimization Complete\n",
"-----------------------------------\n"
]
}
],
"source": [
"import aviary.api as av\n",
"\n",
Expand Down Expand Up @@ -296,7 +421,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "base",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -310,7 +435,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.8.19"
}
},
"nbformat": 4,
Expand Down
47 changes: 37 additions & 10 deletions aviary/docs/examples/coupled_aircraft_mission_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -68,7 +68,7 @@
" \"initial_bounds\": ((0.0, 0.0), \"min\"),\n",
" \"duration_bounds\": ((35.0, 105.0), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([0, 70], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([0, 70], \"min\")},\n",
" },\n",
" \"cruise\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -92,7 +92,7 @@
" \"initial_bounds\": ((35.0, 105.0), \"min\"),\n",
" \"duration_bounds\": ((91.5, 274.5), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([70, 183], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([70, 183], \"min\")},\n",
" },\n",
" \"descent_1\": {\n",
" \"subsystem_options\": {\"core_aerodynamics\": {\"method\": \"computed\"}},\n",
Expand All @@ -116,7 +116,7 @@
" \"initial_bounds\": ((126.5, 379.5), \"min\"),\n",
" \"duration_bounds\": ((25.0, 75.0), \"min\"),\n",
" },\n",
" \"initial_guesses\": {\"time\": ([253, 50], \"min\")},\n",
" \"initial_guesses\": {\"times\": ([253, 50], \"min\")},\n",
" },\n",
" \"post_mission\": {\n",
" \"include_landing\": False,\n",
Expand All @@ -128,13 +128,25 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'aviary.utils.doctape'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[7], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Testing Cell\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01maviary\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdoctape\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m check_value, glue_variable\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01maviary\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01minterface\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcheck_phase_info\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m check_phase_info, HEIGHT_ENERGY\n\u001b[1;32m 5\u001b[0m \u001b[38;5;66;03m# checking that the phase info example is valid\u001b[39;00m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'aviary.utils.doctape'"
]
}
],
"source": [
"# Testing Cell\n",
"from aviary.utils.doctape import check_value, glue_variable\n",
Expand Down Expand Up @@ -172,7 +184,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {
"tags": [
"remove-cell"
Expand All @@ -188,9 +200,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "RuntimeError",
"evalue": "pyOptSparseDriver is not available, pyOptsparse is not installed.",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[9], line 8\u001b[0m\n\u001b[1;32m 5\u001b[0m make_plots \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m 6\u001b[0m max_iter \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m100\u001b[39m\n\u001b[0;32m----> 8\u001b[0m prob \u001b[38;5;241m=\u001b[39m \u001b[43mav\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_aviary\u001b[49m\u001b[43m(\u001b[49m\u001b[43maircraft_filename\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mphase_info\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moptimizer\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moptimizer\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 9\u001b[0m \u001b[43m \u001b[49m\u001b[43mmake_plots\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmake_plots\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_iter\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmax_iter\u001b[49m\u001b[43m)\u001b[49m\n",
"File \u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/aviary/interface/methods_for_level1.py:81\u001b[0m, in \u001b[0;36mrun_aviary\u001b[0;34m(aircraft_filename, phase_info, optimizer, analysis_scheme, objective_type, record_filename, restart_filename, max_iter, run_driver, make_plots, phase_info_parameterization, optimization_history_filename)\u001b[0m\n\u001b[1;32m 78\u001b[0m \u001b[38;5;66;03m# Link phases and variables\u001b[39;00m\n\u001b[1;32m 79\u001b[0m prob\u001b[38;5;241m.\u001b[39mlink_phases()\n\u001b[0;32m---> 81\u001b[0m \u001b[43mprob\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43madd_driver\u001b[49m\u001b[43m(\u001b[49m\u001b[43moptimizer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_iter\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmax_iter\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 83\u001b[0m prob\u001b[38;5;241m.\u001b[39madd_design_variables()\n\u001b[1;32m 85\u001b[0m \u001b[38;5;66;03m# Load optimization problem formulation\u001b[39;00m\n\u001b[1;32m 86\u001b[0m \u001b[38;5;66;03m# Detail which variables the optimizer can control\u001b[39;00m\n",
"File \u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/aviary/interface/methods_for_level2.py:1502\u001b[0m, in \u001b[0;36mAviaryProblem.add_driver\u001b[0;34m(self, optimizer, use_coloring, max_iter, debug_print)\u001b[0m\n\u001b[1;32m 1500\u001b[0m driver \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdriver \u001b[38;5;241m=\u001b[39m om\u001b[38;5;241m.\u001b[39mScipyOptimizeDriver()\n\u001b[1;32m 1501\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1502\u001b[0m driver \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdriver \u001b[38;5;241m=\u001b[39m \u001b[43mom\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mpyOptSparseDriver\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1504\u001b[0m driver\u001b[38;5;241m.\u001b[39moptions[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moptimizer\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m optimizer\n\u001b[1;32m 1505\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m use_coloring:\n",
"File \u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/openmdao/drivers/pyoptsparse_driver.py:193\u001b[0m, in \u001b[0;36mpyOptSparseDriver.__init__\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 188\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 189\u001b[0m \u001b[38;5;124;03mInitialize pyopt.\u001b[39;00m\n\u001b[1;32m 190\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 191\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m pyoptsparse \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 192\u001b[0m \u001b[38;5;66;03m# pyoptsparse is not installed\u001b[39;00m\n\u001b[0;32m--> 193\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mpyOptSparseDriver is not available, pyOptsparse is not installed.\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 195\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(pyoptsparse, \u001b[38;5;167;01mException\u001b[39;00m):\n\u001b[1;32m 196\u001b[0m \u001b[38;5;66;03m# there is some other issue with the pyoptsparse installation\u001b[39;00m\n\u001b[1;32m 197\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m pyoptsparse\n",
"\u001b[0;31mRuntimeError\u001b[0m: pyOptSparseDriver is not available, pyOptsparse is not installed."
]
}
],
"source": [
"import aviary.api as av\n",
"\n",
Expand Down Expand Up @@ -562,7 +589,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.8.19"
}
},
"nbformat": 4,
Expand Down
Loading