Files
Atomizer/dashboard
Anto01 91fb929f6a refactor: Centralize NX and environment configuration in config.py
MAJOR IMPROVEMENT: Single source of truth for all system paths

Now to change NX version or Python environment, edit ONE file (config.py):
  NX_VERSION = "2412"           # Change this for NX updates
  PYTHON_ENV_NAME = "atomizer"  # Change this for env updates

All code automatically uses new paths - no manual file hunting!

New Central Configuration (config.py):
- NX_VERSION: Automatically updates all NX paths
- NX_INSTALLATION_DIR: Derived from version
- NX_RUN_JOURNAL: Path to run_journal.exe
- NX_MATERIAL_LIBRARY: Path to physicalmateriallibrary.xml
- NX_PYTHON_STUBS: Path to Python stubs for intellisense
- PYTHON_ENV_NAME: Python environment name
- PROJECT_ROOT: Auto-detected project root
- Helper functions: get_nx_journal_command(), validate_config(), print_config()

Updated Files to Use Config:
- optimization_engine/nx_updater.py: Uses NX_RUN_JOURNAL from config
- dashboard/api/app.py: Uses NX_RUN_JOURNAL from config
- Both have fallbacks if config unavailable

Benefits:
1. Change NX version in 1 place, not 10+ files
2. Automatic validation of paths on import
3. Helper functions for common operations
4. Clear error messages if paths missing
5. Easy to add new Simcenter versions

Future NX Update Process:
1. Edit config.py: NX_VERSION = "2506"
2. Run: python config.py (verify paths)
3. Done! All code uses NX 2506

Migration Scripts Included:
- migrate_to_config.py: Full migration with documentation
- apply_config_migration.py: Applied to update dashboard

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 14:31:33 -05:00
..

Atomizer Dashboard

Professional web-based dashboard for controlling and monitoring optimization runs.

Features

Study Management

  • List all studies - View all optimization studies with metadata
  • Resume studies - Continue existing studies with additional trials
  • Delete studies - Clean up old/unwanted studies
  • Study details - View complete history, results, and metadata

Optimization Control

  • Start new optimizations - Configure and launch optimization runs
  • Real-time monitoring - Track progress of active optimizations
  • Configuration management - Load and save optimization configs

Visualization

  • Progress charts - Objective values over trials
  • Design variable plots - Track parameter evolution
  • Constraint visualization - Monitor constraint satisfaction
  • Running best - See convergence progress

Results Analysis

  • Best results cards - Quick view of optimal solutions
  • Trial history table - Complete trial-by-trial data
  • Export capabilities - Download results in CSV/JSON

Installation

  1. Install dependencies:
cd dashboard
pip install -r requirements.txt
  1. Start the dashboard server:
python api/app.py
  1. Open your browser to:
http://localhost:8080

Quick Start

Method 1: Using the launcher script

cd C:\Users\antoi\Documents\Atomaste\Atomizer
python dashboard/start_dashboard.py

Method 2: Manual start

cd dashboard
python api/app.py

The dashboard will automatically open in your default browser at http://localhost:8080

Usage

Starting a New Optimization

  1. Click "New Optimization" button
  2. Enter study name
  3. Set number of trials
  4. Select configuration file
  5. Optionally check "Resume existing" if continuing a study
  6. Click "Start Optimization"

Viewing Study Results

  1. Click on a study in the sidebar
  2. View summary cards showing best results
  3. Examine charts for optimization progress
  4. Review trial history table for details

Resuming a Study

  1. Select the study from the sidebar
  2. Click "Resume Study"
  3. Enter number of additional trials
  4. Optimization continues from where it left off

Monitoring Active Optimizations

Active optimizations appear in the sidebar with:

  • Real-time progress bars
  • Current trial number
  • Status indicators

API Endpoints

Studies

  • GET /api/studies - List all studies
  • GET /api/studies/<name> - Get study details
  • DELETE /api/studies/<name>/delete - Delete a study

Optimization

  • POST /api/optimization/start - Start new optimization
  • GET /api/optimization/status - Get all active optimizations
  • GET /api/optimization/<name>/status - Get specific optimization status

Configuration

  • GET /api/config/load?path=<path> - Load config file
  • POST /api/config/save - Save config file

Visualization

  • GET /api/results/visualization/<name> - Get chart data

Architecture

dashboard/
├── api/
│   └── app.py           # Flask REST API server
├── frontend/
│   ├── index.html       # Main dashboard UI
│   ├── app.js           # JavaScript logic
│   └── styles.css       # Modern styling
├── requirements.txt     # Python dependencies
└── README.md           # This file

Technology Stack

  • Backend: Flask (Python)
  • Frontend: Vanilla JavaScript + Chart.js
  • Styling: Modern CSS with gradients and shadows
  • Charts: Chart.js for interactive visualizations

Features in Detail

Real-time Monitoring

The dashboard polls active optimizations every 5 seconds to show:

  • Current trial number
  • Progress percentage
  • Status (running/completed/failed)

Study Persistence

All studies are stored in SQLite databases with:

  • Complete trial history
  • Optuna study state
  • Metadata (creation date, config hash, resume count)

Configuration Detection

The system automatically detects when a study configuration has changed:

  • Warns when resuming with different geometry
  • Calculates MD5 hash of critical config parameters
  • Helps prevent invalid resume operations

Troubleshooting

Dashboard won't start

  • Check that Flask is installed: pip install flask flask-cors
  • Ensure port 5000 is not in use
  • Check firewall settings

Can't see studies

  • Verify optimization_results folder exists
  • Check that studies have metadata files
  • Refresh the studies list

Charts not showing

  • Ensure Chart.js loaded (check browser console)
  • Verify study has trial history
  • Check API endpoints are responding

Future Enhancements

  • Multi-objective Pareto front visualization
  • Export results to PDF/Excel
  • Optimization comparison tool
  • Parameter importance analysis
  • Surrogate model visualization
  • Configuration editor UI
  • Live log streaming
  • Email notifications on completion

Support

For issues or questions:

  1. Check the console for error messages
  2. Verify API is running (http://localhost:5000/api/studies)
  3. Review optimization logs in the console