@@ -157,7 +157,7 @@ export default function ResultsPage() {
157157 console . log ( "multiLCAConfigs:" , multiLCAConfigs ) ;
158158 console . log ( "singleLCAConfigs:" , singleLCAConfigs ) ;
159159 var someParetoSols = [ ] ;
160- var paretoFront = [ ] ;
160+ var paretoFront = [ ] ;
161161 if ( multiLCAConfigs . length > 0 ) {
162162 // Flatten all LCA runs
163163 const allLcaRuns = multiLCAConfigs . flatMap ( ( [ _ , runs ] ) => runs ) ;
@@ -201,7 +201,7 @@ export default function ResultsPage() {
201201 const makespanData = [ ] ;
202202 const runTimeData = [ ] ;
203203 console . log ( "nonLCARuns" , nonLCARuns ) ;
204-
204+
205205 [ ...nonLCARuns , ...singleLCAConfigs , ...someParetoSols ] . forEach ( ( run , runIdx ) => {
206206 const label = run . id ? `${ run . id } ` : `Run ${ runIdx + 1 } ` ;
207207 labels . push ( label ) ;
@@ -321,67 +321,71 @@ export default function ResultsPage() {
321321
322322
323323 return (
324- < div className = "gridsearch-results" >
325- < h3 > Grid Search Results (LCA)</ h3 >
326-
327- { /* Pareto Scatter Plot */ }
328- < div style = { { height : 400 , marginBottom : "2rem" } } >
324+ < div className = "card" >
325+ < div className = "card-title mb-0" >
329326 < h4 > Pareto Front: Makespan vs Total Cost</ h4 >
330- < Scatter
331- data = { {
332- datasets : [
333- {
334- label : "All Runs" ,
335- data : paretoData . map ( p => ( { x : p . makespan , y : p . cost } ) ) ,
336- backgroundColor : "#93c5fd" ,
337- pointRadius : 4 ,
338- } ,
339- {
340- label : "Pareto Front" ,
341- data : paretoFront . map ( p => ( { x : p . makespan , y : p . cost } ) ) ,
342- backgroundColor : "#ef4444" ,
343- pointRadius : 6 ,
344- } ,
345- ] ,
346- } }
347- options = { {
348- responsive : true ,
349- plugins : {
350- tooltip : {
351- callbacks : {
352- label : ( ctx ) => {
353- const point = paretoData . find ( p =>
354- p . makespan === ctx . parsed . x && p . cost === ctx . parsed . y
355- ) ;
356- return [
357- `Run: ${ point ?. id ?? "?" } ` ,
358- `Makespan: ${ ctx . parsed . x . toFixed ( 2 ) } ` ,
359- `Cost: ${ ctx . parsed . y . toFixed ( 2 ) } ` ,
360- ...( point ?. fitness !== undefined ? [ `Fitness: ${ point . fitness . toFixed ( 4 ) } ` ] : [ ] ) ,
361- ] ;
327+ </ div >
328+
329+ < div className = "card-body " >
330+ < div className = "gridsearch-results grid-full" >
331+ < h3 > Grid Search Results (MO-LCA)</ h3 >
332+
333+ { /* Pareto Scatter Plot */ }
334+ < div style = { { height : 400 , } } >
335+ < Scatter
336+ data = { {
337+ datasets : [
338+ {
339+ label : "All Runs" ,
340+ data : paretoData . map ( p => ( { x : p . makespan , y : p . cost } ) ) ,
341+ backgroundColor : "#93c5fd" ,
342+ pointRadius : 4 ,
343+ } ,
344+ {
345+ label : "Pareto Front" ,
346+ data : paretoFront . map ( p => ( { x : p . makespan , y : p . cost } ) ) ,
347+ backgroundColor : "#ef4444" ,
348+ pointRadius : 6 ,
349+ } ,
350+ ] ,
351+ } }
352+ options = { {
353+ responsive : true ,
354+ plugins : {
355+ tooltip : {
356+ callbacks : {
357+ label : ( ctx ) => {
358+ const point = paretoData . find ( p =>
359+ p . makespan === ctx . parsed . x && p . cost === ctx . parsed . y
360+ ) ;
361+ return [
362+ `Run: ${ point ?. id ?? "?" } ` ,
363+ `Makespan: ${ ctx . parsed . x . toFixed ( 2 ) } ` ,
364+ `Cost: ${ ctx . parsed . y . toFixed ( 2 ) } ` ,
365+ ...( point ?. fitness !== undefined ? [ `Fitness: ${ point . fitness . toFixed ( 4 ) } ` ] : [ ] ) ,
366+ ] ;
367+ }
368+ }
369+ } ,
370+ legend : { position : "top" } ,
371+ title : {
372+ display : true ,
373+ text : "Pareto Front: Makespan vs Total Cost" ,
374+ }
375+ } ,
376+ scales : {
377+ x : {
378+ title : { display : true , text : "Makespan" } ,
379+ } ,
380+ y : {
381+ title : { display : true , text : "Total Cost" } ,
362382 }
363383 }
364- } ,
365- legend : { position : "top" } ,
366- title : {
367- display : true ,
368- text : "Pareto Front: Makespan vs Total Cost" ,
369- }
370- } ,
371- scales : {
372- x : {
373- title : { display : true , text : "Makespan" } ,
374- } ,
375- y : {
376- title : { display : true , text : "Total Cost" } ,
377- }
378- }
379- } }
380- />
381-
384+ } }
385+ />
386+ </ div >
387+ </ div >
382388 </ div >
383-
384-
385389 </ div >
386390 ) ;
387391 } ) ( ) }
0 commit comments