import { useState, useEffect, lazy, Suspense, useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; import { BarChart3, TrendingUp, Grid3X3, Target, Filter, Brain, RefreshCw, Download, Layers, LucideIcon } from 'lucide-react'; import { useStudy } from '../context/StudyContext'; import { Card } from '../components/common/Card'; // Lazy load charts const PlotlyParetoPlot = lazy(() => import('../components/plotly/PlotlyParetoPlot').then(m => ({ default: m.PlotlyParetoPlot }))); const PlotlyParallelCoordinates = lazy(() => import('../components/plotly/PlotlyParallelCoordinates').then(m => ({ default: m.PlotlyParallelCoordinates }))); const PlotlyParameterImportance = lazy(() => import('../components/plotly/PlotlyParameterImportance').then(m => ({ default: m.PlotlyParameterImportance }))); const PlotlyConvergencePlot = lazy(() => import('../components/plotly/PlotlyConvergencePlot').then(m => ({ default: m.PlotlyConvergencePlot }))); const PlotlyCorrelationHeatmap = lazy(() => import('../components/plotly/PlotlyCorrelationHeatmap').then(m => ({ default: m.PlotlyCorrelationHeatmap }))); const PlotlyFeasibilityChart = lazy(() => import('../components/plotly/PlotlyFeasibilityChart').then(m => ({ default: m.PlotlyFeasibilityChart }))); const PlotlySurrogateQuality = lazy(() => import('../components/plotly/PlotlySurrogateQuality').then(m => ({ default: m.PlotlySurrogateQuality }))); const PlotlyRunComparison = lazy(() => import('../components/plotly/PlotlyRunComparison').then(m => ({ default: m.PlotlyRunComparison }))); const ChartLoading = () => (
Loading...
Deep analysis for {selectedStudy.name || selectedStudy.id}
| Rank | Trial | Objective | Source | {Object.keys(trials[0]?.params || {}).slice(0, 3).map(p => ({p} | ))}
|---|---|---|---|---|
| {idx + 1} | #{trial.trial_number} | {trial.values[0]?.toExponential(4)} | {trial.source} | {Object.keys(trials[0]?.params || {}).slice(0, 3).map(p => ({trial.params[p]?.toFixed(4)} | ))}
| Trial | {metadata?.objectives?.map(obj => ({obj.name} | ))}
|---|---|
| #{sol.trial_number} | {sol.values?.map((v: number, i: number) => ({v?.toExponential(4)} | ))}
Increasing parameter increases objective
Some positive relationship
Some negative relationship
Increasing parameter decreases objective
| Trial | Objective | Source |
|---|---|---|
| #{trial.trial_number} | {trial.values[0]?.toExponential(4) || 'N/A'} | {trial.source} |
Compare different optimization runs within this study. Studies with adaptive optimization may have multiple runs (e.g., initial FEA exploration, NN-accelerated iterations).
Not enough data for correlation analysis
; } return (| Parameter | Correlation with {objectiveName} | Strength |
|---|---|---|
| {param} |
0 ? 'bg-blue-500' : 'bg-red-500'}`}
style={{ width: `${absCorr * 100}%`, marginLeft: correlation < 0 ? 'auto' : 0 }}
/>
0.7 ? 'text-white font-bold' :
absCorr > 0.3 ? 'text-dark-200' : 'text-dark-400'
}`}>
{correlation > 0 ? '+' : ''}{correlation.toFixed(3)}
|
0.7 ? 'bg-primary-500/20 text-primary-400' : absCorr > 0.3 ? 'bg-yellow-500/20 text-yellow-400' : 'bg-dark-600 text-dark-400' }`}> {absCorr > 0.7 ? 'Strong' : absCorr > 0.3 ? 'Moderate' : 'Weak'} |