10.1
Engineering optimization formulation
Why this lesson matters
An optimizer solves the mathematical problem it is given, including its mistakes. Formulation determines engineering meaning before algorithm choice matters.
Learning objectives
- Define and distinguish Design variable and Objective.
- Apply the lesson method to the worked engineering optimization formulation case.
- Evaluate evidence, uncertainty, and AI-assisted output before making a claim.
Readiness check
Before continuing, explain what decision this topic supports and name one upstream source that must be controlled.
Check your response
A sound answer names a specific engineering decision, its configuration, and a controlled requirement, model, dataset, interface, or standard that constrains the work.
Core idea
Define design variables, parameters, objective, constraints, models, bounds, scaling, and feasibility in physical terms. Preserve the distinction between a model optimum and an approved design.
Key concepts
| Design variable | A quantity the optimization is permitted to change. |
|---|
| Objective | A scalar quantity the mathematical problem minimizes or maximizes. |
|---|
| Constraint | A condition that defines feasibility. |
|---|
| Design parameter | A fixed or uncertain input not controlled by the optimizer in the current problem. |
|---|
Step-by-step explanation
- State the engineering decision and controllable choices.
- Define objective and constraints with sign, units, reference, and aggregation rules.
- Set bounds from physical, manufacturing, and validity limits.
- Scale variables and responses for numerical conditioning.
- Write verification tests for the formulation before solving.
Worked example
Minimize aluminum beam mass by choosing width b and height h. Constraints: deflection <= 1.5 mm, bending stress <= 120 MPa, b in [10, 60] mm, h in [10, 80] mm. P = 1000 N, L = 0.5 m, E = 69 GPa.
- 1
Objective mass = rho b h L with rho = 2700 kg/m³.
- 2
Stress for a rectangular section under center load: sigma = 6 P L/(b h²).
- 3
Deflection: delta = 4 P L³/(E b h³).
- 4
Use SI units internally, enforce bounds, and check formulas against beam assumptions.
Result. The formulation exposes strong h leverage: stress scales with h^-2 and deflection with h^-3, while mass scales linearly with h.
Independent check. Every variable is controllable, every constraint has a source and unit, and formulas remain valid throughout bounds.
Common misconceptions
| Misconception | Correction |
|---|
| The objective is the design goal | Engineering decisions usually involve multiple criteria; a scalar objective is one formalization with chosen tradeoffs. |
|---|
| A tool output closes the question | A result remains a candidate until its inputs, method, configuration, uncertainty, and relevance have been checked. |
|---|
Diagnostic questions
What makes a bound dangerous?
If it extends beyond model validity, manufacturing capability, or physical regime, the optimizer can exploit invalid predictions.
What would make this work reproducible?
Controlled inputs, method or code, versions, assumptions, outputs, and a stated interpretation tied to the decision.
Practice ladder
BasicClassify b, h, P, E, mass, stress, and deflection by optimization role.
IntermediateNondimensionalize the two variables and constraints.
AdvancedAdd a manufacturing aspect-ratio constraint and justify its source.
AI-assisted engineering task
Ask AI to review a formulation for missing units, reversed inequalities, uncontrolled variables, and absent validity bounds.
How to prove the AI output yourself
- Evaluate hand-picked feasible and infeasible points.
- Check units and signs.
- Compare with analytical limiting cases.
- Review every source requirement.
Retrieval and spaced review
Answer closed-notes today, then again after 1, 3, 7, and 30 days.
Define Design variable.
A quantity the optimization is permitted to change.
What role does Objective play here?
A scalar quantity the mathematical problem minimizes or maximizes.
What must a reviewer be able to reconstruct?
Every variable is controllable, every constraint has a source and unit, and formulas remain valid throughout bounds.
End-of-lesson summary
Define design variables, parameters, objective, constraints, models, bounds, scaling, and feasibility in physical terms. Preserve the distinction between a model optimum and an approved design.
Student notes
Keep a one-page optimization charter: decision, variables, objective, constraints, models, bounds, scaling, assumptions, and confirmation plan.
Recommended readings
Instructor notes
Require a formulation table before code. Most serious optimization defects begin before the solver call.
10.2
Constraints, active sets, sensitivity, and a constrained optimum
Why this lesson matters
The optimum is often controlled by one bound or constraint. Understanding that mechanism is more valuable than reporting solver success.
Learning objectives
- Define and distinguish Active constraint and Sensitivity.
- Apply the lesson method to the worked constraints, active sets, sensitivity, and a constrained optimum case.
- Evaluate evidence, uncertainty, and AI-assisted output before making a claim.
Readiness check
Before continuing, explain what decision this topic supports and name one upstream source that must be controlled.
Check your response
A sound answer names a specific engineering decision, its configuration, and a controlled requirement, model, dataset, interface, or standard that constrains the work.
Core idea
At a constrained optimum, active constraints shape the solution. Sensitivities explain local response to variables and assumptions, but they do not prove global robustness or physical validity.
Key concepts
| Active constraint | A feasibility condition met at equality, within tolerance, at the solution. |
|---|
| Sensitivity | Local change of a response with respect to an input or variable. |
|---|
| KKT conditions | First-order necessary conditions for many constrained optima under regularity assumptions. |
|---|
| Constraint margin | Distance between the response and its allowable limit under a declared sign convention. |
|---|
Step-by-step explanation
- Solve from multiple starting points where nonconvexity is possible.
- Recalculate objective and constraints outside the optimizer interface.
- Identify active bounds and constraints with tolerances.
- Inspect gradients or finite-difference checks.
- Perturb limits and parameters to understand decision sensitivity.
Worked example
For the beam formulation, deflection requires b h³ >= 4PL³/(E*0.0015) = 4.8309e-6 m⁴. Mass decreases by increasing h and reducing b, so b reaches 0.010 m and h is set by deflection.
- 1
Compute h = (4.8309e-6/0.010)^(1/3) = 0.07848 m.
- 2
Area = 0.010*0.07848 = 7.848e-4 m² and mass = 2700*area*0.5 = 1.059 kg.
- 3
Stress = 6(1000)(0.5)/(0.010*0.07848²) = 48.7 MPa, below 120 MPa.
- 4
Deflection is active at 1.5 mm; width lower bound is active; stress is inactive.
Result. Approximate optimum: b = 10.0 mm, h = 78.5 mm, mass = 1.06 kg. It is governed by deflection and the minimum-width bound.
Independent check. Substitute the design into every constraint, examine units, verify bound activity, and confirm with an independent optimizer run.
Common misconceptions
| Misconception | Correction |
|---|
| Solver success means engineering success | The solution may be infeasible under independent checks, model-invalid, overly sensitive, or governed by an accidental bound. |
|---|
| A tool output closes the question | A result remains a candidate until its inputs, method, configuration, uncertainty, and relevance have been checked. |
|---|
Diagnostic questions
Why inspect active constraints?
They reveal what limits the design and where requirement or model changes affect the optimum.
What would make this work reproducible?
Controlled inputs, method or code, versions, assumptions, outputs, and a stated interpretation tied to the decision.
Practice ladder
BasicRecompute h, mass, stress, and deflection.
IntermediateExplain how the optimum changes if h max is reduced to 60 mm.
AdvancedPerform a sensitivity study on E and the 1.5 mm limit and decide which requirement clarification has highest value.
AI-assisted engineering task
Ask AI to narrate an optimization report from verified values, but require exact constraints and no invented causal explanation.
How to prove the AI output yourself
- Recompute with independent functions.
- Check gradients or finite differences.
- Restart and perturb.
- Confirm final design using the source model and controlled requirements.
Retrieval and spaced review
Answer closed-notes today, then again after 1, 3, 7, and 30 days.
Define Active constraint.
A feasibility condition met at equality, within tolerance, at the solution.
What role does Sensitivity play here?
Local change of a response with respect to an input or variable.
What must a reviewer be able to reconstruct?
Substitute the design into every constraint, examine units, verify bound activity, and confirm with an independent optimizer run.
End-of-lesson summary
At a constrained optimum, active constraints shape the solution. Sensitivities explain local response to variables and assumptions, but they do not prove global robustness or physical validity.
Student notes
At every optimum, list active constraints, inactive margins, bound activity, sensitivity, confirmation result, and model limitations.
Recommended readings
Instructor notes
Arithmetic-check the beam result. The pedagogical target is active-constraint interpretation, not just scipy syntax.
10.3
Multi-objective trade studies and Pareto fronts
Why this lesson matters
Combining cost, mass, performance, risk, and sustainability into one weighted score can hide value judgments and scaling choices.
Learning objectives
- Define and distinguish Pareto dominance and Pareto front.
- Apply the lesson method to the worked multi-objective trade studies and pareto fronts case.
- Evaluate evidence, uncertainty, and AI-assisted output before making a claim.
Readiness check
Before continuing, explain what decision this topic supports and name one upstream source that must be controlled.
Check your response
A sound answer names a specific engineering decision, its configuration, and a controlled requirement, model, dataset, interface, or standard that constrains the work.
Core idea
A Pareto-optimal design cannot improve one objective without worsening another. A Pareto front exposes trade structure; stakeholders still choose using preferences, uncertainty, feasibility, and context.
Key concepts
| Pareto dominance | One design is no worse in all objectives and strictly better in at least one. |
|---|
| Pareto front | The nondominated objective combinations in the considered design set. |
|---|
| Trade knee | A region where small improvement in one objective causes a large loss in another. |
|---|
| Preference | Stakeholder valuation used after or during analysis to select among tradeoffs. |
|---|
Step-by-step explanation
- Keep objectives in physical units and state direction.
- Generate feasible alternatives with verified constraints.
- Remove dominated designs using transparent rules.
- Plot tradeoffs with uncertainty and identify sensitivity to model error.
- Record stakeholder selection rationale separately from optimization output.
Worked example
Four feasible heat-sink designs have (mass kg, peak temperature °C): A (1.2, 78), B (0.9, 81), C (0.8, 86), D (1.1, 83). Requirement T <= 85 °C.
- 1
C is infeasible despite low mass.
- 2
D is dominated by B because B is lighter and cooler.
- 3
A and B are nondominated: A is cooler, B is lighter.
- 4
The decision is between 0.3 kg mass reduction and 3 °C temperature increase, subject to uncertainty and margin.
Result. Feasible Pareto set is {A, B}. Optimization does not choose between them without stakeholder preference and uncertainty-aware rationale.
Independent check. Feasibility is evaluated before dominance, objectives use correct directions, and uncertainty can change dominance or margin.
Common misconceptions
| Misconception | Correction |
|---|
| The knee point is objectively best | Knee definition and stakeholder value are context-dependent; it is a useful candidate, not an automatic answer. |
|---|
| A tool output closes the question | A result remains a candidate until its inputs, method, configuration, uncertainty, and relevance have been checked. |
|---|
Diagnostic questions
Should infeasible designs appear on a Pareto front?
Not on the feasible decision front unless constraints are explicitly treated as objectives or violation dimensions.
What would make this work reproducible?
Controlled inputs, method or code, versions, assumptions, outputs, and a stated interpretation tied to the decision.
Practice ladder
BasicIdentify feasible and dominated designs.
IntermediateAdd cost as a third objective and explain why a 2D plot can mislead.
AdvancedRepresent uncertain temperature and decide when dominance should be treated as indeterminate.
AI-assisted engineering task
Ask AI to describe tradeoffs in plain language from a verified Pareto table, without choosing a design.
How to prove the AI output yourself
- Recompute dominance.
- Check constraint feasibility and units.
- Inspect uncertainty and missing objectives.
- Have stakeholders document preference and decision.
Retrieval and spaced review
Answer closed-notes today, then again after 1, 3, 7, and 30 days.
Define Pareto dominance.
One design is no worse in all objectives and strictly better in at least one.
What role does Pareto front play here?
The nondominated objective combinations in the considered design set.
What must a reviewer be able to reconstruct?
Feasibility is evaluated before dominance, objectives use correct directions, and uncertainty can change dominance or margin.
End-of-lesson summary
A Pareto-optimal design cannot improve one objective without worsening another. A Pareto front exposes trade structure; stakeholders still choose using preferences, uncertainty, feasibility, and context.
Student notes
Separate the mathematical Pareto set from the governance record that selects one design.
Recommended readings
Instructor notes
Use a dominated design that looks attractive on one metric. Students should apply all-objective comparison and feasibility first.
10.4
Robust, reliability-aware, surrogate-based, and multidisciplinary optimization
Why this lesson matters
A nominal optimum can be fragile, and coupled disciplines can invalidate sequential local improvements.
Learning objectives
- Define and distinguish Robust design and Reliability constraint.
- Apply the lesson method to the worked robust, reliability-aware, surrogate-based, and multidisciplinary optimization case.
- Evaluate evidence, uncertainty, and AI-assisted output before making a claim.
Readiness check
Before continuing, explain what decision this topic supports and name one upstream source that must be controlled.
Check your response
A sound answer names a specific engineering decision, its configuration, and a controlled requirement, model, dataset, interface, or standard that constrains the work.
Core idea
Robust design controls performance variability or worst-case behavior. Reliability-based design constrains failure probability under probabilistic assumptions. MDO coordinates coupled disciplinary models. Surrogate-based optimization adds approximation risk that must be confirmed.
Key concepts
| Robust design | Optimization that considers variability, worst cases, or sensitivity rather than nominal performance alone. |
|---|
| Reliability constraint | A probabilistic condition on limit-state failure under a declared uncertainty model. |
|---|
| MDO | Optimization of systems with interacting disciplinary analyses and shared variables. |
|---|
| Confirmation run | A source-model evaluation of a candidate found using an approximation or reduced workflow. |
|---|
Step-by-step explanation
- Define uncertain variables and distinguish variability from lack of knowledge.
- Choose mean-variance, worst-case, chance-constraint, or reliability formulations consistent with evidence.
- Represent coupling variables and solve consistency before trusting system objectives.
- Validate any surrogate in active design regions.
- Confirm selected candidates with higher-fidelity models, uncertainty analysis, and traceable decision review.
Worked example
An optimized cooling design meets T <= 85 °C nominally at 84.8 °C. Flow uncertainty has standard deviation 3%, and the local sensitivity is dT/dv = -12 °C per normalized flow unit.
- 1
The 0.2 °C nominal margin is small relative to plausible flow-driven temperature variation.
- 2
A first-order estimate needs the actual normalized-flow standard deviation and other uncertainties; do not invent a reliability value.
- 3
Reformulate with a justified safety or chance constraint, or increase margin.
- 4
Confirm coupled thermal-hydraulic behavior because changing flow affects pressure loss, pump power, and heat transfer.
Result. The nominal optimum is not decision-ready. Robustness and coupled-system consequences must be quantified before selection.
Independent check. Uncertainty distributions, correlations, sensitivities, solver consistency, surrogate validity, and confirmation runs are documented.
Common misconceptions
| Misconception | Correction |
|---|
| A larger safety factor makes a design robust | It may add margin but does not reveal uncertainty sources, sensitivities, correlations, or failure probability. |
|---|
| A tool output closes the question | A result remains a candidate until its inputs, method, configuration, uncertainty, and relevance have been checked. |
|---|
Diagnostic questions
Why record optimization history?
It supports reproducibility, active-constraint diagnosis, surrogate monitoring, and decision audit.
What would make this work reproducible?
Controlled inputs, method or code, versions, assumptions, outputs, and a stated interpretation tied to the decision.
Practice ladder
BasicDistinguish robust and reliability-based formulations.
IntermediateDraw coupling between pump power, flow, pressure drop, and temperature.
AdvancedDesign an MDO evidence record using OpenMDAO-style components, connections, derivatives, recorder data, and confirmation cases.
AI-assisted engineering task
Ask AI to summarize optimizer logs and flag convergence warnings, bound activity, and inconsistent constraints. It may not repair the model automatically.
How to prove the AI output yourself
- Inspect solver and model residuals.
- Check derivatives.
- Repeat with independent starting points.
- Run high-fidelity confirmation and uncertainty analysis.
Retrieval and spaced review
Answer closed-notes today, then again after 1, 3, 7, and 30 days.
Define Robust design.
Optimization that considers variability, worst cases, or sensitivity rather than nominal performance alone.
What role does Reliability constraint play here?
A probabilistic condition on limit-state failure under a declared uncertainty model.
What must a reviewer be able to reconstruct?
Uncertainty distributions, correlations, sensitivities, solver consistency, surrogate validity, and confirmation runs are documented.
End-of-lesson summary
Robust design controls performance variability or worst-case behavior. Reliability-based design constrains failure probability under probabilistic assumptions. MDO coordinates coupled disciplinary models. Surrogate-based optimization adds approximation risk that must be confirmed.
Student notes
Document formulation, coupling, derivatives, solver tolerances, uncertainty model, surrogate version, optimization history, and confirmation result.
Recommended readings
Instructor notes
OpenMDAO is presented as a practical framework example, not a required commercial workflow or proof of correctness.
LAB 10
Lab 10: Run and independently check a constrained optimization
Lab objective
Solve the rectangular beam problem with scipy, then independently recalculate constraints and active-set behavior.
Engineering context
The numerical solver should reproduce the analytical reasoning in Lesson 10.2 rather than replace it.
Input data
- Beam load, span, modulus, density
- Width and height bounds
- Stress and deflection limits
Step-by-step task
- Implement objective and constraints
- Scale variables in mm
- Run SLSQP from several starts
- Recalculate mass, stress, and deflection independently
Python code
import numpy as np
from scipy.optimize import minimize
P, L, E, rho = 1000.0, 0.5, 69e9, 2700.0
def responses(x_mm):
b, h = np.asarray(x_mm) / 1000.0
mass = rho*b*h*L
stress = 6*P*L/(b*h**2)
deflection = 4*P*L**3/(E*b*h**3)
return mass, stress, deflection
def objective(x): return responses(x)[0]
constraints = [
{"type": "ineq", "fun": lambda x: 120e6 - responses(x)[1]},
{"type": "ineq", "fun": lambda x: 0.0015 - responses(x)[2]},
]
for start in ([20, 50], [50, 30], [12, 75]):
result = minimize(objective, start, method="SLSQP", bounds=[(10, 60), (10, 80)],
constraints=constraints, options={"ftol": 1e-12, "maxiter": 1000})
mass, stress, delta = responses(result.x)
print(result.success, result.x, f"mass={mass:.4f} kg",
f"stress={stress/1e6:.2f} MPa", f"delta={delta*1000:.4f} mm")
Explanation of code
Step 1 implement objective and constraints Step 2 scale variables in mm Step 3 run SLSQP from several starts Step 4 recalculate mass, stress, and deflection independently
Expected output
Converged solutions near b = 10.0 mm, h = 78.5 mm, mass = 1.06 kg, stress = 48.7 MPa, and deflection = 1.50 mm.
Interpretation
Agreement across starts and with analytical reasoning supports this simple result. A production design still needs buckling, local stress, manufacturing, fatigue, tolerances, and model credibility.
Common errors
- Reversed inequality signs
- Using mm inside SI formulas
- Reporting optimizer success without independent substitution
Extension tasks
- Add aspect ratio and buckling constraints
- Use uncertain E and dimensions
- Record iteration history
- Compare derivative-free search
Reflection questions
- Which constraints are active?
- Why did width hit its lower bound?
- What omitted failure mode could overturn the design?