# cmudrc/sae architecture

> Architecture diagram of the GitHub repository cmudrc/sae, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cmudrc/sae
- Repository: https://github.com/cmudrc/sae

## Overview

SAE is a Python library for modelling Formula SAE car design as a constrained, multi-objective minimization problem. The principal workflow is to create a car (or request a feasible design), inspect or modify its parameter vector, then evaluate objectives and constraint penalties. COTS car designs and partworth objectives are additional documented capabilities. The sampled source is partial, so the graph shows only supported connections and groups several internal calculations into domain stages.

Main entry points: [`sae/__init__.py`](https://github.com/cmudrc/sae/blob/master/sae/__init__.py) (Car model), [`sae/resources`](https://github.com/cmudrc/sae/tree/master/sae/resources) (Vehicle data tables)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Library API"]
  node_feasible["Feasible generator<br/>[__init__.py]"]
  node_parameters["Parameter access<br/>[__init__.py]"]
end

subgraph group_design["Vehicle Design"]
  node_car["Car model<br/>[__init__.py]"]
  node_cots["COTS design<br/>[__init__.py]"]
  node_vector["Design vector<br/>[__init__.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_objective_eval["Objective evaluation<br/>[__init__.py]"]
  node_subobjectives["11 sub-objectives<br/>[__init__.py]"]
  node_cost["Design cost<br/>[__init__.py]"]
  node_bounds["Bound penalties<br/>[__init__.py]"]
  node_linear["Linear penalties<br/>[__init__.py]"]
  node_nonlinear["Nonlinear penalties<br/>[__init__.py]"]
  node_partworth["Partworth objectives<br/>[__init__.py]"]
end

subgraph group_data["Design Data"]
  node_resources["Vehicle data tables"]
end

node_user(("Library user"))

node_user -->|"constructs"| node_car
node_user -->|"constructs"| node_cots
node_user -->|"requests"| node_feasible
node_user -->|"reads or sets"| node_parameters
node_user -->|"evaluates"| node_objective_eval
node_user -->|"evaluates"| node_cost
node_user -->|"checks"| node_bounds
node_user -->|"checks"| node_linear
node_user -->|"checks"| node_nonlinear
node_user -->|"evaluates"| node_partworth
node_car -->|"maintains"| node_vector
node_parameters -->|"reads or updates"| node_vector
node_cots -->|"configures"| node_car
node_feasible -->|"generates"| node_car
node_objective_eval -->|"evaluates"| node_subobjectives
node_car -->|"evaluates"| node_objective_eval
node_car -->|"calculates"| node_cost
node_car -->|"checks"| node_bounds
node_car -->|"checks"| node_linear
node_car -->|"checks"| node_nonlinear
node_car -->|"evaluates"| node_partworth
node_car -->|"reads"| node_resources
node_cots -->|"reads"| node_resources

click node_car "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_cots "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_feasible "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_vector "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_parameters "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_objective_eval "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_subobjectives "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_cost "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_bounds "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_linear "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_nonlinear "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"
click node_resources "https://github.com/cmudrc/sae/tree/master/sae/resources"
click node_partworth "https://github.com/cmudrc/sae/blob/master/sae/__init__.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_feasible,node_parameters,node_user toneBlue
class node_car,node_cots,node_vector toneAmber
class node_objective_eval,node_subobjectives,node_cost,node_bounds,node_linear,node_nonlinear,node_partworth toneMint
class node_resources toneRose
```

## Components

### Library API

- [Feasible generator](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [Parameter access](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`

### Vehicle Design

- [Car model](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [COTS design](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [Design vector](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`

### Evaluation

- [Objective evaluation](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [11 sub-objectives](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [Design cost](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [Bound penalties](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [Linear penalties](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [Nonlinear penalties](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`
- [Partworth objectives](https://github.com/cmudrc/sae/blob/master/sae/__init__.py): `sae/__init__.py`

### Design Data

- [Vehicle data tables](https://github.com/cmudrc/sae/tree/master/sae/resources): `sae/resources`

### Other components

- **Library user**

## Connections

- Library user → Car model: constructs
- Library user → COTS design: constructs
- Library user → Feasible generator: requests
- Library user → Parameter access: reads or sets
- Library user → Objective evaluation: evaluates
- Library user → Design cost: evaluates
- Library user → Bound penalties: checks
- Library user → Linear penalties: checks
- Library user → Nonlinear penalties: checks
- Library user → Partworth objectives: evaluates
- Car model → Design vector: maintains
- Parameter access → Design vector: reads or updates
- COTS design → Car model: configures
- Feasible generator → Car model: generates
- Objective evaluation → 11 sub-objectives: evaluates
- Car model → Objective evaluation: evaluates
- Car model → Design cost: calculates
- Car model → Bound penalties: checks
- Car model → Linear penalties: checks
- Car model → Nonlinear penalties: checks
- Car model → Partworth objectives: evaluates
- Car model → Vehicle data tables: reads
- COTS design → Vehicle data tables: reads
