# anthimevalin/multi-trajectory-pinns-zero-terminal-hjb architecture

> Architecture diagram of the GitHub repository anthimevalin/multi-trajectory-pinns-zero-terminal-hjb, 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/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb
- Repository: https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb

## Overview

This repository is a research implementation for solving and evaluating zero-terminal HJB control problems with PINN and MT-PINN models. The principal workflow is to train or select a benchmark model, restore its configuration and checkpoint, generate learned and analytic control/value trajectories, then compare and plot results. Order Execution also supports market-data window construction and real-market policy diagnostics. The README documents these capabilities; some notebook internals and the market-data call wiring were not sampled, so those links are not inferred.

Main entry points: [`High-Dimensional-LQR/evaluation.ipynb`](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/evaluation.ipynb) (LQR Evaluation), [`Order-Execution/general_evaluation.ipynb`](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/general_evaluation.ipynb) (Execution Evaluation), [`High-Dimensional-LQR/Models`](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/High-Dimensional-LQR/Models) (LQR Training), [`Order-Execution/market_eval_demo.ipynb`](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/market_eval_demo.ipynb) (Market Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lqr["High-Dimensional LQR"]
  node_lqr_train["LQR Training"]
  node_lqr_eval["LQR Evaluation<br/>[evaluation.ipynb]"]
  node_lqr_compute["LQR Analytics<br/>[compute_helper.py]"]
  node_lqr_plot["LQR Plots<br/>[plot_helper.py]"]
end

subgraph group_execution["Order Execution"]
  node_oe_train["Execution Training"]
  node_oe_eval["Execution Evaluation"]
  node_oe_compute["Execution Analytics<br/>[compute_helper.py]"]
  node_market_demo["Market Demo"]
  node_market_eval["Market Tools<br/>[market_eval.py]"]
end

subgraph group_model["Models And Artifacts"]
  node_lqr_loader["LQR Model Loader<br/>[loading_helper.py]"]
  node_oe_loader["Execution Model Loader<br/>[loading_helper.py]"]
  node_lqr_runs[("LQR Checkpoints")]
  node_oe_runs[("Execution Checkpoints")]
end

subgraph group_analysis["Evaluation And Diagnostics"]
  node_lqr_results["LQR Comparisons<br/>[plot_helper.py]"]
  node_oe_results["Execution Comparisons<br/>[plot_helper.py]"]
end

node_researcher(("Researcher"))
node_market_data[("BBO Market Data")]

node_researcher -->|"runs notebooks"| node_lqr_train
node_researcher -->|"evaluates"| node_lqr_eval
node_lqr_train -->|"saves artifacts"| node_lqr_runs
node_lqr_eval -->|"restores model"| node_lqr_loader
node_lqr_loader -->|"reads checkpoint"| node_lqr_runs
node_lqr_eval -->|"evaluates trajectories"| node_lqr_compute
node_lqr_eval -->|"plots comparisons"| node_lqr_plot
node_lqr_train -->|"uses control helpers"| node_lqr_compute
node_researcher -->|"runs notebooks"| node_oe_train
node_researcher -->|"evaluates"| node_oe_eval
node_oe_train -->|"saves artifacts"| node_oe_runs
node_oe_eval -->|"restores models"| node_oe_loader
node_oe_loader -->|"reads checkpoint"| node_oe_runs
node_oe_eval -->|"generates trajectories"| node_oe_compute
node_oe_eval -->|"plots comparisons"| node_oe_results
node_oe_compute -->|"supplies trajectories"| node_oe_results
node_researcher -->|"configures analysis"| node_market_demo
node_market_demo -->|"uses market tools"| node_market_eval
node_market_demo -->|"loads policy"| node_oe_loader
node_market_data -->|"parses quotes"| node_market_eval

click node_lqr_train "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/High-Dimensional-LQR/Models"
click node_lqr_eval "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/evaluation.ipynb"
click node_lqr_compute "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/compute_helper.py"
click node_lqr_plot "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/plot_helper.py"
click node_oe_train "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/Order-Execution/Models"
click node_oe_eval "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/general_evaluation.ipynb"
click node_oe_compute "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/compute_helper.py"
click node_market_demo "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/market_eval_demo.ipynb"
click node_market_eval "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/market_eval.py"
click node_lqr_loader "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/loading_helper.py"
click node_oe_loader "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/loading_helper.py"
click node_lqr_runs "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/High-Dimensional-LQR/runs"
click node_oe_runs "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/Order-Execution/runs"
click node_lqr_results "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/plot_helper.py"
click node_oe_results "https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/plot_helper.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_lqr_train,node_lqr_eval,node_lqr_compute,node_lqr_plot toneBlue
class node_oe_train,node_oe_eval,node_oe_compute,node_market_demo,node_market_eval,node_market_data toneAmber
class node_lqr_loader,node_oe_loader,node_lqr_runs,node_oe_runs toneMint
class node_lqr_results,node_oe_results toneRose
class node_researcher toneIndigo
```

## Components

### High-Dimensional LQR

- [LQR Training](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/High-Dimensional-LQR/Models): `High-Dimensional-LQR/Models`
- [LQR Evaluation](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/evaluation.ipynb): `High-Dimensional-LQR/evaluation.ipynb`
- [LQR Analytics](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/compute_helper.py): `High-Dimensional-LQR/compute_helper.py`
- [LQR Plots](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/plot_helper.py): `High-Dimensional-LQR/plot_helper.py`

### Order Execution

- [Execution Training](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/Order-Execution/Models): `Order-Execution/Models`
- [Execution Evaluation](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/general_evaluation.ipynb): `Order-Execution/general_evaluation.ipynb`
- [Execution Analytics](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/compute_helper.py): `Order-Execution/compute_helper.py`
- [Market Demo](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/market_eval_demo.ipynb): `Order-Execution/market_eval_demo.ipynb`
- [Market Tools](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/market_eval.py): `Order-Execution/market_eval.py`

### Models And Artifacts

- [LQR Model Loader](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/loading_helper.py): `High-Dimensional-LQR/loading_helper.py`
- [Execution Model Loader](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/loading_helper.py): `Order-Execution/loading_helper.py`
- [LQR Checkpoints](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/High-Dimensional-LQR/runs): `High-Dimensional-LQR/runs`
- [Execution Checkpoints](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/tree/main/Order-Execution/runs): `Order-Execution/runs`

### Evaluation And Diagnostics

- [LQR Comparisons](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/High-Dimensional-LQR/plot_helper.py): `High-Dimensional-LQR/plot_helper.py`
- [Execution Comparisons](https://github.com/anthimevalin/multi-trajectory-pinns-zero-terminal-hjb/blob/main/Order-Execution/plot_helper.py): `Order-Execution/plot_helper.py`

### Other components

- **Researcher**
- **BBO Market Data**

## Connections

- Researcher → LQR Training: runs notebooks
- Researcher → LQR Evaluation: evaluates
- LQR Training → LQR Checkpoints: saves artifacts
- LQR Evaluation → LQR Model Loader: restores model
- LQR Model Loader → LQR Checkpoints: reads checkpoint
- LQR Evaluation → LQR Analytics: evaluates trajectories
- LQR Evaluation → LQR Plots: plots comparisons
- LQR Training → LQR Analytics: uses control helpers
- Researcher → Execution Training: runs notebooks
- Researcher → Execution Evaluation: evaluates
- Execution Training → Execution Checkpoints: saves artifacts
- Execution Evaluation → Execution Model Loader: restores models
- Execution Model Loader → Execution Checkpoints: reads checkpoint
- Execution Evaluation → Execution Analytics: generates trajectories
- Execution Evaluation → Execution Comparisons: plots comparisons
- Execution Analytics → Execution Comparisons: supplies trajectories
- Researcher → Market Demo: configures analysis
- Market Demo → Market Tools: uses market tools
- Market Demo → Execution Model Loader: loads policy
- BBO Market Data → Market Tools: parses quotes
