2025-11-15 13:37:33 -05:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
<title>Atomizer - Optimization Dashboard</title>
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
|
|
|
|
|
|
<link rel="stylesheet" href="styles.css">
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
|
|
<div class="dashboard-container">
|
|
|
|
|
|
<!-- Header -->
|
|
|
|
|
|
<header class="dashboard-header">
|
|
|
|
|
|
<div class="header-content">
|
|
|
|
|
|
<h1>⚛️ Atomizer</h1>
|
|
|
|
|
|
<p class="subtitle">Optimization Dashboard</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="header-actions">
|
|
|
|
|
|
<button class="btn btn-primary" onclick="showNewOptimizationModal()">
|
|
|
|
|
|
▶️ New Optimization
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="refreshStudies()">
|
|
|
|
|
|
🔄 Refresh
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Main Content -->
|
|
|
|
|
|
<div class="main-content">
|
|
|
|
|
|
<!-- Sidebar -->
|
|
|
|
|
|
<aside class="sidebar">
|
|
|
|
|
|
<div class="sidebar-section">
|
|
|
|
|
|
<h3>Studies</h3>
|
|
|
|
|
|
<div id="studiesList" class="studies-list">
|
|
|
|
|
|
<p class="loading">Loading studies...</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sidebar-section">
|
|
|
|
|
|
<h3>Active Optimizations</h3>
|
|
|
|
|
|
<div id="activeOptimizations" class="active-list">
|
|
|
|
|
|
<p class="empty">No active optimizations</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Content Area -->
|
|
|
|
|
|
<main class="content-area">
|
|
|
|
|
|
<!-- Welcome Screen -->
|
|
|
|
|
|
<div id="welcomeScreen" class="welcome-screen">
|
|
|
|
|
|
<h2>Welcome to Atomizer</h2>
|
2025-11-15 14:00:00 -05:00
|
|
|
|
<p>Select a study from the sidebar or create a new study</p>
|
2025-11-15 13:37:33 -05:00
|
|
|
|
<div class="quick-actions">
|
2025-11-15 14:00:00 -05:00
|
|
|
|
<button class="btn btn-large btn-primary" onclick="showCreateStudyModal()">
|
|
|
|
|
|
Create New Study
|
2025-11-15 13:37:33 -05:00
|
|
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-large btn-secondary" onclick="refreshStudies()">
|
|
|
|
|
|
View Existing Studies
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-11-15 14:00:00 -05:00
|
|
|
|
<!-- Study Configuration View -->
|
|
|
|
|
|
<div id="studyConfig" class="study-config" style="display: none;">
|
|
|
|
|
|
<div class="study-header">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<h2 id="configStudyTitle">Configure Study</h2>
|
|
|
|
|
|
<p id="configStudyMeta" class="study-meta"></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="study-actions">
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="backToStudyList()">
|
|
|
|
|
|
← Back
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-primary" onclick="saveStudyConfiguration()">
|
|
|
|
|
|
💾 Save Configuration
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Configuration Steps -->
|
|
|
|
|
|
<div class="config-steps">
|
|
|
|
|
|
<!-- Step 1: Sim Files -->
|
|
|
|
|
|
<div class="config-step">
|
|
|
|
|
|
<h3>1. Simulation Files</h3>
|
|
|
|
|
|
<div class="step-content">
|
|
|
|
|
|
<p class="step-description">Drop your .sim and .prt files in the sim folder, then explore the model</p>
|
|
|
|
|
|
<div class="file-info">
|
|
|
|
|
|
<p><strong>Sim Folder:</strong> <span id="simFolderPath"></span></p>
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="openSimFolder()">Open Folder</button>
|
|
|
|
|
|
<button class="btn btn-primary" onclick="refreshSimFiles()">Refresh Files</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="simFilesList" class="files-list"></div>
|
|
|
|
|
|
<button id="exploreBtn" class="btn btn-primary" onclick="exploreSimFile()" disabled>
|
|
|
|
|
|
🔍 Explore .sim File
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<div id="expressionsList" class="expressions-list" style="display: none;"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step 2: Design Variables -->
|
|
|
|
|
|
<div class="config-step">
|
|
|
|
|
|
<h3>2. Design Variables</h3>
|
|
|
|
|
|
<div class="step-content">
|
|
|
|
|
|
<p class="step-description">Select expressions to use as design variables and set their bounds</p>
|
|
|
|
|
|
<div id="designVariablesConfig" class="variables-config">
|
|
|
|
|
|
<p class="empty">Explore .sim file first to see available expressions</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="addDesignVariable()">+ Add Variable</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step 3: Objectives -->
|
|
|
|
|
|
<div class="config-step">
|
|
|
|
|
|
<h3>3. Objectives</h3>
|
|
|
|
|
|
<div class="step-content">
|
|
|
|
|
|
<p class="step-description">Define what you want to optimize (minimize or maximize)</p>
|
|
|
|
|
|
<div id="objectivesConfig" class="objectives-config">
|
|
|
|
|
|
<p class="empty">No objectives defined yet</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="addObjective()">+ Add Objective</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step 4: Constraints -->
|
|
|
|
|
|
<div class="config-step">
|
|
|
|
|
|
<h3>4. Constraints</h3>
|
|
|
|
|
|
<div class="step-content">
|
|
|
|
|
|
<p class="step-description">Set limits on simulation outputs</p>
|
|
|
|
|
|
<div id="constraintsConfig" class="constraints-config">
|
|
|
|
|
|
<p class="empty">No constraints defined yet</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="addConstraint()">+ Add Constraint</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step 5: Optimization Settings -->
|
|
|
|
|
|
<div class="config-step">
|
|
|
|
|
|
<h3>5. Optimization Settings</h3>
|
|
|
|
|
|
<div class="step-content">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Number of Trials</label>
|
|
|
|
|
|
<input type="number" id="nTrials" value="50" min="1">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Sampler</label>
|
|
|
|
|
|
<select id="samplerType">
|
|
|
|
|
|
<option value="TPE" selected>TPE (Tree-structured Parzen Estimator)</option>
|
|
|
|
|
|
<option value="CMAES">CMA-ES</option>
|
|
|
|
|
|
<option value="GP">Gaussian Process</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Startup Trials (random exploration)</label>
|
|
|
|
|
|
<input type="number" id="startupTrials" value="20" min="0">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-11-15 13:37:33 -05:00
|
|
|
|
<!-- Study Details View -->
|
|
|
|
|
|
<div id="studyDetails" class="study-details" style="display: none;">
|
|
|
|
|
|
<div class="study-header">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<h2 id="studyTitle">Study Name</h2>
|
|
|
|
|
|
<p id="studyMeta" class="study-meta"></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="study-actions">
|
|
|
|
|
|
<button class="btn btn-primary" onclick="resumeCurrentStudy()">
|
|
|
|
|
|
▶️ Resume Study
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-danger" onclick="deleteCurrentStudy()">
|
|
|
|
|
|
🗑️ Delete
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Best Result Card -->
|
|
|
|
|
|
<div class="results-cards">
|
|
|
|
|
|
<div class="result-card">
|
|
|
|
|
|
<h3>Best Result</h3>
|
|
|
|
|
|
<div class="result-value" id="bestObjective">-</div>
|
|
|
|
|
|
<p class="result-label">Objective Value</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-card">
|
|
|
|
|
|
<h3>Total Trials</h3>
|
|
|
|
|
|
<div class="result-value" id="totalTrials">-</div>
|
|
|
|
|
|
<p class="result-label">Completed</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-card">
|
|
|
|
|
|
<h3>Best Parameters</h3>
|
|
|
|
|
|
<div id="bestParams" class="params-list"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Charts -->
|
|
|
|
|
|
<div class="charts-container">
|
|
|
|
|
|
<div class="chart-card">
|
|
|
|
|
|
<h3>Optimization Progress</h3>
|
|
|
|
|
|
<canvas id="progressChart"></canvas>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="chart-card">
|
|
|
|
|
|
<h3>Design Variables</h3>
|
|
|
|
|
|
<canvas id="designVarsChart"></canvas>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="chart-card">
|
|
|
|
|
|
<h3>Constraints</h3>
|
|
|
|
|
|
<canvas id="constraintsChart"></canvas>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- History Table -->
|
|
|
|
|
|
<div class="history-section">
|
|
|
|
|
|
<h3>Trial History</h3>
|
|
|
|
|
|
<div class="table-container">
|
|
|
|
|
|
<table id="historyTable">
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>Trial</th>
|
|
|
|
|
|
<th>Objective</th>
|
|
|
|
|
|
<th>Design Variables</th>
|
|
|
|
|
|
<th>Constraints</th>
|
|
|
|
|
|
<th>Timestamp</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody></tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</main>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- New Optimization Modal -->
|
|
|
|
|
|
<div id="newOptimizationModal" class="modal" style="display: none;">
|
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
|
<h2>Start New Optimization</h2>
|
|
|
|
|
|
<button class="close-btn" onclick="closeNewOptimizationModal()">×</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Study Name</label>
|
|
|
|
|
|
<input type="text" id="newStudyName" placeholder="my_optimization_study" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Number of Trials</label>
|
|
|
|
|
|
<input type="number" id="newTrials" value="50" min="1" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Configuration File</label>
|
|
|
|
|
|
<select id="newConfigPath">
|
|
|
|
|
|
<option value="examples/bracket/optimization_config_stress_displacement.json">
|
|
|
|
|
|
Bracket - Stress Minimization
|
|
|
|
|
|
</option>
|
|
|
|
|
|
<option value="examples/bracket/optimization_config.json">
|
|
|
|
|
|
Bracket - Multi-objective
|
|
|
|
|
|
</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>
|
|
|
|
|
|
<input type="checkbox" id="resumeExisting" />
|
|
|
|
|
|
Resume existing study (if exists)
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="closeNewOptimizationModal()">
|
|
|
|
|
|
Cancel
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-primary" onclick="startOptimization()">
|
|
|
|
|
|
Start Optimization
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-11-15 14:00:00 -05:00
|
|
|
|
<!-- Create Study Modal -->
|
|
|
|
|
|
<div id="createStudyModal" class="modal" style="display: none;">
|
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
|
<h2>Create New Study</h2>
|
|
|
|
|
|
<button class="close-btn" onclick="closeCreateStudyModal()">×</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Study Name</label>
|
|
|
|
|
|
<input type="text" id="createStudyName" placeholder="my_optimization_study" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label>Description (optional)</label>
|
|
|
|
|
|
<input type="text" id="createStudyDescription" placeholder="Brief description of this study" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
|
<button class="btn btn-secondary" onclick="closeCreateStudyModal()">Cancel</button>
|
|
|
|
|
|
<button class="btn btn-primary" onclick="createNewStudy()">Create Study</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-11-15 13:37:33 -05:00
|
|
|
|
<script src="app.js"></script>
|
2025-11-15 14:00:00 -05:00
|
|
|
|
<script src="study_config.js"></script>
|
2025-11-15 13:37:33 -05:00
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|