Alinson S. Xavier 4 months ago
parent ea58cf1615
commit 062b38514b

@ -0,0 +1 @@
FAST_REFRESH=false

6329
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -13,11 +13,16 @@
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.126",
"@types/papaparse": "^5.3.16",
"@types/react": "^19.1.3",
"@types/react-dom": "^19.1.3",
"@typescript-eslint/utils": "^8.32.1",
"ajv": "^8.17.1",
"papaparse": "^5.5.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-scripts": "5.0.1",
"react-scripts": "^5.0.1",
"tabulator-tables": "^6.3.1",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
},
@ -31,7 +36,13 @@
"extends": [
"react-app",
"react-app/jest"
]
],
"rules": {
"semi": [
"error",
"always"
]
}
},
"browserslist": {
"production": [
@ -44,5 +55,9 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/tabulator-tables": "^6.2.6",
"eslint": "^8.57.1"
}
}

@ -20,10 +20,10 @@
--box-shadow: 0px 2px 4px -3px rgba(0, 0, 0, 0.2);
--border-radius: 4px;
--primary: #0d6efd;
--contrast-100: #202020;
--contrast-80: #606060;
--contrast-60: #909090;
--contrast-20: #d6d6d6;
--contrast-10: #f6f6f6;
--contrast-0: #fefefe;
}
@ -31,7 +31,11 @@
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: var(--contrast-10)
background-color: #333;
}
.content {
background-color: var(--contrast-10);
padding-bottom: 36px;
}
</style>
</head>

@ -0,0 +1,84 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import {UnitCommitmentScenario} from "../../../core/data";
import {changeBusData, createBus, deleteBus, renameBus} from "./BusOperations";
import assert from "node:assert";
export const BUS_TEST_DATA_1: UnitCommitmentScenario = {
"Parameters": {
"Version": "0.4",
"Power balance penalty ($/MW)": 1000.0,
"Time horizon (h)": 5,
"Time step (min)": 60,
},
"Buses": {
"b1": {"Load (MW)": [35.79534, 34.38835, 33.45083, 32.89729, 33.25044]},
"b2": {"Load (MW)": [14.03739, 13.48563, 13.11797, 12.9009, 13.03939]},
"b3": {"Load (MW)": [27.3729, 26.29698, 25.58005, 25.15675, 25.4268]},
}
};
test("createBus", () => {
const newScenario = createBus(BUS_TEST_DATA_1);
assert.deepEqual(Object.keys(newScenario.Buses), ["b1", "b2", "b3", "b4"]);
});
test("changeBusData", () => {
let scenario = BUS_TEST_DATA_1;
scenario = changeBusData("b1", "Load 0", "99", scenario);
scenario = changeBusData("b1", "Load 3", "99", scenario);
scenario = changeBusData("b3", "Load 4", "99", scenario);
assert.deepEqual(scenario, {
"Parameters": {
"Version": "0.4",
"Power balance penalty ($/MW)": 1000.0,
"Time horizon (h)": 5,
"Time step (min)": 60,
},
"Buses": {
"b1": {"Load (MW)": [99, 34.38835, 33.45083, 99, 33.25044]},
"b2": {"Load (MW)": [14.03739, 13.48563, 13.11797, 12.9009, 13.03939]},
"b3": {"Load (MW)": [27.3729, 26.29698, 25.58005, 25.15675, 99]},
}
});
});
test("deleteBus", () => {
let scenario = BUS_TEST_DATA_1;
scenario = deleteBus("b2", scenario);
assert.deepEqual(scenario, {
"Parameters": {
"Version": "0.4",
"Power balance penalty ($/MW)": 1000.0,
"Time horizon (h)": 5,
"Time step (min)": 60,
},
"Buses": {
"b1": {"Load (MW)": [35.79534, 34.38835, 33.45083, 32.89729, 33.25044]},
"b3": {"Load (MW)": [27.3729, 26.29698, 25.58005, 25.15675, 25.4268]},
}
});
});
test("renameBus", () => {
let scenario = BUS_TEST_DATA_1;
scenario = renameBus("b2", "b99", scenario);
assert.deepEqual(scenario, {
"Parameters": {
"Version": "0.4",
"Power balance penalty ($/MW)": 1000.0,
"Time horizon (h)": 5,
"Time step (min)": 60,
},
"Buses": {
"b1": {"Load (MW)": [35.79534, 34.38835, 33.45083, 32.89729, 33.25044]},
"b99": {"Load (MW)": [14.03739, 13.48563, 13.11797, 12.9009, 13.03939]},
"b3": {"Load (MW)": [27.3729, 26.29698, 25.58005, 25.15675, 25.4268]},
}
});
});

@ -0,0 +1,81 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import {Buses, UnitCommitmentScenario} from "../../../core/data";
function generateUniqueBusName(scenario: UnitCommitmentScenario) {
let newBusName = "b";
let counter = 1;
let name = `${newBusName}${counter}`;
while (name in scenario.Buses) {
counter++;
name = `${newBusName}${counter}`;
}
return name;
}
function generateDefaultBusLoad(scenario: UnitCommitmentScenario) {
const T = scenario.Parameters["Time horizon (h)"] * (60 / scenario.Parameters["Time step (min)"]);
return new Array(T).fill(0);
}
export function createBus(scenario: UnitCommitmentScenario) {
const load = generateDefaultBusLoad(scenario);
let name = generateUniqueBusName(scenario);
return {
...scenario,
"Buses": {
...scenario.Buses,
[name]: {
"Load (MW)": load
}
}
};
}
export function changeBusData(bus: string, field: string, newValue: string, scenario: UnitCommitmentScenario) {
// Load (MW)
const match = field.match(/Load (\d+)/);
if(match) {
const idx = parseInt(match[1]!, 10);
const newLoad = [...scenario.Buses[bus]!["Load (MW)"]];
newLoad[idx] = parseFloat(newValue);
return {
...scenario,
Buses: {
...scenario.Buses,
[bus]: {
"Load (MW)": newLoad,
}
}
};
}
throw Error(`Unknown field: ${field}`);
}
export function deleteBus(bus: string, scenario: UnitCommitmentScenario) {
const { [bus]: _, ...newBuses} = scenario.Buses;
return {
...scenario,
Buses: newBuses
};
}
export function renameBus(oldName: string, newName: string, scenario: UnitCommitmentScenario) {
const newBuses: Buses = Object.keys(scenario.Buses).reduce((acc, val) => {
if(val === oldName) {
acc[newName] = scenario.Buses[val]!;
} else {
acc[val] = scenario.Buses[val]!;
}
return acc;
}, {} as Buses);
return {
...scenario,
Buses: newBuses
};
}

@ -0,0 +1,58 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import SectionHeader from "../../Common/SectionHeader/SectionHeader";
import {UnitCommitmentScenario} from "../../../core/data";
import BusesTable, {generateBusesCsv, parseBusesCsv} from "./BusesTable";
import SectionButton from "../../Common/Buttons/SectionButton";
import {faDownload, faPlus, faUpload} from "@fortawesome/free-solid-svg-icons";
import {offerDownload} from "../../Common/io";
import FileUploadElement from "../../Common/Buttons/FileUploadElement";
import {useRef} from "react";
interface BusesProps {
scenario: UnitCommitmentScenario,
onBusCreated: () => void,
onBusDataChanged: (bus: string, field: string, newValue: string) => void,
onBusDeleted: (bus: string) => void,
onBusRenamed: (oldName: string, newName: string) => void,
onDataChanged: (scenario: UnitCommitmentScenario) => void,
}
function BusesComponent(props: BusesProps) {
const fileUploadElem = useRef<FileUploadElement>(null);
const onDownload = () => {
const csvContents = generateBusesCsv(props.scenario);
offerDownload(csvContents, "text/csv", "buses.csv");
};
const onUpload = () => {
fileUploadElem.current!.showFilePicker((csvContents: any) => {
const newScenario = parseBusesCsv(props.scenario, csvContents);
props.onDataChanged(newScenario);
});
};
return (
<div>
<SectionHeader title="Buses">
<SectionButton icon={faPlus} tooltip="Add" onClick={props.onBusCreated}/>
<SectionButton icon={faDownload} tooltip="Download" onClick={onDownload}/>
<SectionButton icon={faUpload} tooltip="Upload" onClick={onUpload}/>
</SectionHeader>
<BusesTable
scenario={props.scenario}
onBusDataChanged={props.onBusDataChanged}
onBusDeleted={props.onBusDeleted}
onBusRenamed={props.onBusRenamed}
/>
<FileUploadElement ref={fileUploadElem} accept=".csv"/>
</div>
);
}
export default BusesComponent;

@ -0,0 +1,68 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import assert from "node:assert";
import {generateBusesCsv, parseBusesCsv} from "./BusesTable";
import {BUS_TEST_DATA_1} from "./BusOperations.test";
test("generate CSV", () => {
const actualCsv = generateBusesCsv(BUS_TEST_DATA_1);
const expectedCsv =
"Name,Load 0,Load 1,Load 2,Load 3,Load 4\n" +
"b1,35.79534,34.38835,33.45083,32.89729,33.25044\n" +
"b2,14.03739,13.48563,13.11797,12.9009,13.03939\n" +
"b3,27.3729,26.29698,25.58005,25.15675,25.4268";
assert.strictEqual(actualCsv, expectedCsv);
});
test("parse valid CSV", () => {
const csvContents =
"Name,Load 0,Load 1,Load 2,Load 3,Load 4\n" +
"b1,0,1,2,3,4\n" +
"b3,27.3729,26.29698,25.58005,25.15675,25.4268";
const newScenario = parseBusesCsv(BUS_TEST_DATA_1, csvContents);
assert.deepEqual(newScenario.Buses, {
"b1": {
"Load (MW)": [
0,
1,
2,
3,
4,
]
},
"b3": {
"Load (MW)": [
27.3729,
26.29698,
25.58005,
25.15675,
25.4268,
]
},
});
});
test("parse invalid CSV (wrong headers)", () => {
const csvContents =
"Name,Load 5,Load 7,Load 23,Load 3,Load 4\n" +
"b1,0,1,2,3,4\n" +
"b3,27.3729,26.29698,25.58005,25.15675,25.4268";
expect(() => {
parseBusesCsv(BUS_TEST_DATA_1, csvContents);
}).toThrow(Error);
});
test("parse invalid CSV (wrong data length)", () => {
const csvContents =
"Name,Load 0,Load 1,Load 2,Load 3,Load 4\n" +
"b1,0,1,2,3\n" +
"b3,27.3729,26.29698,25.58005,25.15675,25.4268";
expect(() => {
parseBusesCsv(BUS_TEST_DATA_1, csvContents);
}).toThrow(Error);
});

@ -0,0 +1,177 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import Papa from 'papaparse';
import {Buses, UnitCommitmentScenario} from "../../../core/data";
import {useEffect, useRef} from "react";
import {CellComponent, ColumnDefinition, TabulatorFull as Tabulator} from "tabulator-tables";
const generateBusesTableData = (scenario: UnitCommitmentScenario) => {
const tableData: { [name: string]: any }[] = [];
for (const [busName, busData] of Object.entries(scenario.Buses)) {
const entry: { [key: string]: any } = {};
entry["Name"] = busName;
for (const [i, mw] of Object.entries(busData["Load (MW)"])) {
entry[`Load ${i}`] = mw;
}
tableData.push(entry);
}
return tableData;
};
const generateBusesTableColumns = (scenario: UnitCommitmentScenario): [ColumnDefinition] => {
const timeHorizonHours = scenario["Parameters"]["Time horizon (h)"];
const timeStepMin = scenario["Parameters"]["Time step (min)"];
const columnsCommonAttrs: ColumnDefinition = {
title: "",
editor: "input",
editorParams: {
selectContents: true,
},
headerHozAlign: "right",
cssClass: "custom-cell-style",
headerWordWrap: true,
formatter: "plaintext",
headerSort: false,
resizable: false,
};
const columns: [ColumnDefinition] = [
{
...columnsCommonAttrs,
title: "Name",
field: "Name",
width: 150,
},
];
for (let m = 0, offset = 0; m < timeHorizonHours * 60; m += timeStepMin, offset += 1) {
const hours = Math.floor(m / 60);
const mins = m % 60;
const formattedTime = `${String(hours).padStart(2, '0')}:${String(mins).padStart(2, '0')}`;
columns.push({
...columnsCommonAttrs,
title: `Load (MW)<div class="subtitle">${formattedTime}</div>`,
field: `Load ${offset}`,
width: 100,
});
}
return columns;
};
export const generateBusesCsv = (scenario: UnitCommitmentScenario) => {
const columns = generateBusesTableColumns(scenario);
const csvHeader = columns.map(row => row.field).join(",");
const csvBody = Object.entries(scenario.Buses).map(([busName, busData]) => {
const csvLoad = busData["Load (MW)"].join(",");
return `${busName},${csvLoad}`;
}).join("\n");
return `${csvHeader}\n${csvBody}`;
};
function getNumTimesteps(scenario: UnitCommitmentScenario) {
return scenario.Parameters["Time horizon (h)"] * scenario.Parameters["Time step (min)"] / 60;
}
export const parseBusesCsv = (scenario: UnitCommitmentScenario, csvData: string): UnitCommitmentScenario => {
const results = Papa.parse(csvData, {
header: true,
skipEmptyLines: true,
transformHeader: (header) => header.trim(),
transform: (value) => value.trim()
});
// Check for parsing errors
if (results.errors.length > 0) {
throw Error(`Invalid CSV: Parsing error: ${results.errors}`);
}
// Check CSV headers
const expectedFields = generateBusesTableColumns(scenario).map(col => col.field)!;
const actualFields = results.meta.fields!;
for (let i = 0; i < expectedFields.length; i++) {
if (expectedFields[i] !== actualFields[i]) {
throw Error(`Invalid CSV: Header mismatch at column ${i + 1}"`);
}
}
// Parse each row
const T = getNumTimesteps(scenario);
const buses: Buses = {};
for (let i = 0; i < results.data.length; i++) {
const row = results.data[i] as { [key: string]: any };
const busName = row["Name"] as string;
const busLoad: number[] = Array(T);
for (let j = 0; j < T; j++) {
busLoad[j] = parseFloat(row[`Load ${j}`]);
}
buses[busName] = {
"Load (MW)": busLoad
};
}
return {
...scenario,
Buses: buses,
};
};
interface BusesTableProps {
scenario: UnitCommitmentScenario
onBusDataChanged: (bus: string, field: string, newValue: string) => void,
onBusDeleted: (bus: string) => void,
onBusRenamed: (oldName: string, newName: string) => void,
}
function BusesTable(props: BusesTableProps) {
const tableContainerRef = useRef<HTMLDivElement | null>(null);
useEffect(() => {
const onCellEdited = (cell: CellComponent) => {
let newValue = cell.getValue();
let oldValue = cell.getOldValue();
if (newValue === oldValue) return;
if (cell.getField() === "Name") {
if (newValue === "") {
props.onBusDeleted(oldValue);
cell.getRow().delete();
} else {
props.onBusRenamed(
oldValue,
newValue,
);
}
} else {
const row = cell.getRow().getData();
const bus = row["Name"];
props.onBusDataChanged(
bus, cell.getField(), newValue
);
}
};
if (tableContainerRef.current === null) return;
const table = new Tabulator(tableContainerRef.current, {
layout: "fitColumns",
data: generateBusesTableData(props.scenario),
columns: generateBusesTableColumns(props.scenario),
maxHeight: "500px",
});
table.on("cellEdited", (cell) => {
onCellEdited(cell);
});
table.on("cellEditing", (cell) => {
});
// table.on("scrollHorizontal", (left, leftDir) => {
// console.log(left, leftDir);
// });
table.rowManager.scrollHorizontal(100, false);
// table.columnManager.scrollHorizontal(100, false);
}, [props, props.scenario]);
return <div className="tableContainer" ref={tableContainerRef}/>;
}
export default BusesTable;

@ -1,11 +1,88 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import Header from "./Header/Header";
import Parameters from "./Parameters/Parameters";
import BusesComponent from "./Buses/Buses";
import {BLANK_SCENARIO, TEST_SCENARIO, UnitCommitmentScenario} from "../../core/data";
import "tabulator-tables/dist/css/tabulator.min.css";
import "../Common/Forms/Tables.css";
import {useState} from "react";
import Footer from "./Footer/Footer";
import {validate} from "../../core/Validation/validate";
import {offerDownload} from "../Common/io";
import {changeBusData, createBus, deleteBus, renameBus} from "./Buses/BusOperations";
const CaseBuilder = () => {
const [scenario, setScenario] = useState(TEST_SCENARIO);
const onClear = () => {
setScenario(BLANK_SCENARIO);
};
const onSave = () => {
offerDownload(
JSON.stringify(scenario, null, 2),
'application/json',
'case.json',
);
};
const onBusCreated = () => {
const newScenario = createBus(scenario);
setScenario(newScenario);
};
const onBusDataChanged = (bus: string, field: string, newValue: string) => {
const newScenario = changeBusData(bus, field, newValue, scenario);
setScenario(newScenario);
};
const onBusDeleted = (bus: string) => {
const newScenario = deleteBus(bus, scenario);
setScenario(newScenario);
};
const onBusRenamed = (oldName: string, newName: string) => {
const newScenario = renameBus(oldName, newName, scenario);
setScenario(newScenario);
};
const onDataChanged = (newScenario: UnitCommitmentScenario) => {
setScenario(newScenario);
};
const onLoad = (scenario: UnitCommitmentScenario) => {
if (!validate(scenario)) {
console.error(validate.errors);
return;
}
setScenario(scenario);
};
function CaseBuilder() {
return <div>
<Header/>
<Parameters/>
<Header
onClear={onClear}
onSave={onSave}
onLoad={onLoad}
/>
<div className="content">
<Parameters scenario={scenario}/>
<BusesComponent
scenario={scenario}
onBusCreated={onBusCreated}
onBusDataChanged={onBusDataChanged}
onBusRenamed={onBusRenamed}
onBusDeleted={onBusDeleted}
onDataChanged={onDataChanged}
/>
</div>
<Footer/>
</div>;
}
};
export default CaseBuilder;

@ -0,0 +1,14 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.Footer {
background-color: #333;
text-align: center;
color: #aaa;
font-size: 14px;
padding: 16px;
line-height: 24px;
}

@ -0,0 +1,18 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import styles from "./Footer.module.css";
function Footer() {
return (
<div className={styles.Footer}>
UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment <br/>
Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
</div>
);
}
export default Footer;

@ -1,3 +1,9 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.HeaderBox {
background-color: var(--contrast-0);
border-bottom: var(--box-border);

@ -1,18 +1,42 @@
import styles from "./Header.module.css"
import Button from "../../Common/Buttons/Button";
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import styles from "./Header.module.css";
import SiteHeaderButton from "../../Common/Buttons/SiteHeaderButton";
import {UnitCommitmentScenario} from "../../../core/data";
import {useRef} from "react";
import FileUploadElement from "../../Common/Buttons/FileUploadElement";
interface HeaderProps {
onClear: () => void
onSave: () => void
onLoad: (data: UnitCommitmentScenario) => void
}
function Header(props: HeaderProps) {
const fileElem = useRef<FileUploadElement>(null);
function onLoad() {
fileElem.current!.showFilePicker((data: any) => {
const scenario = JSON.parse(data) as UnitCommitmentScenario;
props.onLoad(scenario);
});
}
function Header() {
return (
<div className={styles.HeaderBox}>
<div className={styles.HeaderContent}>
<h1>UnitCommitment.jl</h1>
<h2>Case Builder</h2>
<div className={styles.buttonContainer}>
<Button title="Clear"/>
<Button title="Load"/>
<Button title="Save"/>
<Button title="Submit"/>
<SiteHeaderButton title="Clear" onClick={props.onClear}/>
<SiteHeaderButton title="Load" onClick={onLoad}/>
<SiteHeaderButton title="Save" onClick={props.onSave}/>
</div>
<FileUploadElement ref={fileElem} accept=".json"/>
</div>
</div>
);

@ -1,36 +1,48 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import SectionHeader from "../../Common/SectionHeader/SectionHeader";
import Form from "../../Common/Forms/Form";
import TextInputRow from "../../Common/Forms/TextInputRow";
import {UnitCommitmentScenario} from "../../../core/data";
interface ParametersProps {
scenario: UnitCommitmentScenario
}
function Parameters() {
function Parameters({scenario}: ParametersProps) {
return (
<div>
<SectionHeader title="Parameters" />
<SectionHeader title="Parameters">
</SectionHeader>
<Form>
<TextInputRow
label="Time horizon"
unit="h"
tooltip="Length of the planning horizon (in hours)."
currentValue="48"
currentValue={`${scenario.Parameters["Time horizon (h)"]}`}
defaultValue="24"
/>
<TextInputRow
label="Time step"
unit="min"
tooltip="Length of each time step (in minutes). Must be a divisor of 60 (e.g. 60, 30, 20, 15, etc)."
currentValue=""
currentValue={`${scenario.Parameters["Time step (min)"]}`}
defaultValue="60"
/>
<TextInputRow
label="Power balance penalty"
unit="$/MW"
tooltip="Penalty for system-wide shortage or surplus in production (in /MW). This is charged per time step. For example, if there is a shortage of 1 MW for three time steps, three times this amount will be charged."
currentValue=""
currentValue={`${scenario.Parameters["Power balance penalty ($/MW)"]}`}
defaultValue="1000.0"
/>
</Form>
</div>
)
);
}
export default Parameters;

@ -1,7 +0,0 @@
import styles from "./Button.module.css"
function Button({title}: {title: string}) {
return <button className={styles.Button}>{title}</button>
}
export default Button;

@ -0,0 +1,42 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import React, {Component} from "react";
class FileUploadElement extends Component<any> {
private inputRef = React.createRef<HTMLInputElement>();
private callback: (data: any) => void = () => {};
showFilePicker = (callback: (data: any) => void) => {
this.callback = callback;
this.inputRef.current?.click();
};
onFileSelected = (event: React.ChangeEvent<HTMLInputElement>) => {
const file = event.target.files![0];
if (file) {
const reader = new FileReader();
reader.onload = async (e) => {
this.callback(e.target?.result as string);
this.callback = () => {};
};
reader.readAsText(file);
}
event.target.value = '';
};
override render() {
return <input
ref={this.inputRef}
type="file"
accept={this.props.accept}
style={{ display: "none" }}
onChange={this.onFileSelected}
/>;
}
}
export default FileUploadElement;

@ -1,3 +1,9 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.tooltip {
visibility: hidden;
background-color: var(--contrast-80);
@ -27,6 +33,7 @@
.HelpButton {
border: 0;
background-color: transparent;
cursor: pointer;
}
.HelpButton:hover .tooltip {

@ -1,6 +1,12 @@
import styles from "./HelpButton.module.css"
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'
import {faCircleQuestion} from '@fortawesome/free-regular-svg-icons'
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import styles from "./HelpButton.module.css";
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faCircleQuestion} from '@fortawesome/free-regular-svg-icons';
function HelpButton({text}: { text: String }) {

@ -0,0 +1,26 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.SectionButton {
height: 48px;
width: 48px;
font-size: 16px;
border: 0;
background-color: transparent;
margin: 8px 0 8px 0px;
cursor: pointer;
color: var(--contrast-60);
}
.SectionButton:hover {
color: var(--contrast-100);
background-color: var(--contrast-20);
border-radius: var(--border-radius);
}
.SectionButton:active {
background-color: var(--contrast-60);
}

@ -0,0 +1,29 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import {IconDefinition} from "@fortawesome/fontawesome-svg-core";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import styles from "./SectionButton.module.css";
interface SectionButtonProps {
icon: IconDefinition,
tooltip: string,
onClick?: () => void,
}
function SectionButton(props: SectionButtonProps) {
return (
<button
className={styles.SectionButton}
title={props.tooltip}
onClick={props.onClick}
>
<FontAwesomeIcon icon={props.icon}/>
</button>
);
}
export default SectionButton;

@ -1,4 +1,10 @@
.Button {
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.SiteHeaderButton {
padding: 6px 36px;
margin: 0 0 0 8px;
line-height: 24px;
@ -13,10 +19,10 @@
background: linear-gradient(var(--contrast-0) 25%, var(--contrast-10) 100%);
}
.Button:hover {
.SiteHeaderButton:hover {
background: rgb(245, 245, 245);
}
.Button:active {
.SiteHeaderButton:active {
background: rgba(220, 220, 220);
}

@ -0,0 +1,19 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import styles from "./SiteHeaderButton.module.css";
function SiteHeaderButton({title, onClick}: { title: string, onClick?: () => void }) {
return (
<button
className={styles.SiteHeaderButton}
onClick={onClick}>
{title}
</button>
);
}
export default SiteHeaderButton;

@ -1,3 +1,9 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.Form {
background-color: var(--contrast-0);
border: var(--box-border);
@ -7,6 +13,7 @@
margin: 0 auto;
min-width: var(--site-min-width);
max-width: var(--site-max-width);
max-height: 500px;
padding: 12px 0;
}

@ -1,8 +1,14 @@
import { ReactNode } from 'react';
import styles from "./Form.module.css"
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
function Form({ children }: { children: ReactNode }) {
return <div className={styles.Form}>{children}</div>
import {ReactNode} from 'react';
import styles from "./Form.module.css";
function Form({children}: { children: ReactNode }) {
return <div className={styles.Form}>{children}</div>;
}
export default Form;

@ -0,0 +1,76 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.tabulator {
background-color: var(--contrast-0);
border: var(--box-border) !important;
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
min-height: 48px;
margin: 0 auto;
min-width: var(--site-min-width);
max-width: var(--site-max-width);
padding: 0;
}
.tabulator .tabulator-header {
border-bottom: 1px solid #ccc;
font-size: 13px;
font-weight: bold;
color: var(--contrast-100);
line-height: 18px;
}
.tabulator .tabulator-header .subtitle {
color: var(--contrast-80);
font-weight: normal;
}
.tabulator .tabulator-header .tabulator-col {
border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
vertical-align: middle !important;
}
.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
padding: 6px 8px;
height: 48px;
}
.tabulator .tabulator-header .tabulator-col:last-child {
border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
}
.tabulator-row .tabulator-cell {
font-family: monospace;
font-size: 12px;
line-height: 28px;
height: 28px;
text-align: right;
vertical-align: middle !important;
border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
padding: 0 8px;
}
.tabulator-row-even {
background-color: rgba(0, 0, 0, 0.03) !important;
}
.tabulator-row-odd {
background-color: rgba(0, 0, 0, 0) !important;
}
.tabulator-row .tabulator-cell.tabulator-editing {
border: 0;
padding: 0 4px;
background-color: #cee;
}
.tabulator-row .tabulator-cell.tabulator-editing input {
font-family: monospace;
text-align: right;
font-size: 12px;
}

@ -1,5 +1,11 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import formStyles from "./Form.module.css";
import HelpButton from "./HelpButton";
import HelpButton from "../Buttons/HelpButton";
function TextInputRow({label, unit, tooltip, currentValue, defaultValue}: {
label: string,
@ -19,9 +25,9 @@ function TextInputRow({label, unit, tooltip, currentValue, defaultValue}: {
placeholder={defaultValue}
value={currentValue}
/>
<HelpButton text={tooltip} />
<HelpButton text={tooltip}/>
</div>
)
);
}
export default TextInputRow;

@ -1,3 +1,9 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
.SectionHeader {
max-width: var(--site-max-width);
min-width: var(--site-min-width);
@ -10,4 +16,9 @@
padding: 0 12px;
font-size: 16px;
line-height: 64px;
}
.SectionButtonsContainer {
float: right;
height: 64px;
}

@ -1,8 +1,24 @@
import styles from "./SectionHeader.module.css"
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
function SectionHeader({title}: {title: string}) {
import styles from "./SectionHeader.module.css";
import {ReactNode} from "react";
interface SectionHeaderProps {
title: string,
children: ReactNode
}
function SectionHeader({title, children}: SectionHeaderProps) {
return (
<div className={styles.SectionHeader}>
<div className={styles.SectionButtonsContainer}>
{children}
</div>
<h1>{title}</h1>
</div>
);

@ -0,0 +1,17 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
export function offerDownload(data: string, type: string, filename: string) {
const dataBlob = new Blob([data], {type: type});
const url = URL.createObjectURL(dataBlob);
const link = document.createElement('a');
link.href = url;
link.download = filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(url);
}

@ -0,0 +1,366 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
export const schema = {
$schema: "http://json-schema.org/draft-07/schema#",
title: "Schema for Unit Commitment Input File",
definitions: {
Parameters: {
type: "object",
properties: {
"Version": {
type: "string",
const: "0.4",
description: "Version of UnitCommitment.jl"
},
"Time horizon (min)": {
type: "number",
exclusiveMinimum: 0,
description: "Length of the planning horizon in minutes"
},
"Time horizon (h)": {
type: "number",
exclusiveMinimum: 0,
description: "Length of the planning horizon in hours"
},
"Time step (min)": {
type: "number",
default: 60,
enum: [60, 30, 20, 15, 12, 10, 6, 5, 4, 3, 2, 1],
description: "Must be a divisor of 60"
},
"Power balance penalty ($/MW)": {
type: "number",
default: 1000.0,
minimum: 0,
description: "Penalty for system-wide shortage or surplus"
},
"Scenario name": {
type: "string",
default: "s1",
description: "Name of the scenario"
},
"Scenario weight": {
type: "number",
default: 1.0,
exclusiveMinimum: 0,
description: "Weight of the scenario"
}
},
required: ["Time step (min)", "Power balance penalty ($/MW)"],
oneOf: [
{ required: ["Time horizon (min)"] },
{ required: ["Time horizon (h)"] }
],
not: {
required: ["Time horizon (min)", "Time horizon (h)"]
}
},
Bus: {
type: "object",
additionalProperties: {
type: "object",
properties: {
"Load (MW)": {
oneOf: [
{ type: "null" },
{ type: "number" },
{
type: "array",
items: {
oneOf: [
{ type: "number" },
{ type: "null" }
]
}
}
]
}
}
},
},
TransmissionLines: {
type: "object",
additionalProperties: {
type: "object",
properties: {
"Source bus": {
type: "string",
minLength: 1,
},
"Target bus": {
type: "string",
minLength: 1,
not: {
const: { $data: "1/Source bus" }
}
},
"Susceptance (S)": {
type: "number",
minimum: 0
},
"Normal flow limit (MW)": {
type: "number",
minimum: 0
},
"Emergency flow limit (MW)": {
type: "number",
minimum: 0
},
"Flow limit penalty ($/MW)": {
type: "number",
minimum: 0,
default: 5000.0
}
},
required: ["Source bus", "Target bus", "Susceptance (S)"]
}
},
StorageUnits: {
type: "object",
additionalProperties: {
type: "object",
properties: {
"Bus": {
type: "string",
minLength: 1,
},
"Minimum level (MWh)": {
type: "number",
},
"Maximum level (MWh)": {
type: "number",
minimum: 0
},
"Allow simultaneous charging and discharging": {
type: "boolean",
default: true
},
"Charge cost ($/MW)": {
type: "number",
minimum: 0
},
"Discharge cost ($/MW)": {
type: "number",
minimum: 0
},
"Charge efficiency": {
type: "number",
minimum: 0,
maximum: 1
},
"Discharge efficiency": {
type: "number",
minimum: 0,
maximum: 1
},
"Loss factor": {
type: "number",
minimum: 0
},
"Minimum charge rate (MW)": {
type: "number",
minimum: 0
},
"Maximum charge rate (MW)": {
type: "number",
minimum: 0
},
"Minimum discharge rate (MW)": {
type: "number",
minimum: 0
},
"Maximum discharge rate (MW)": {
type: "number",
minimum: 0
},
"Initial level (MWh)": {
type: "number",
minimum: 0
},
"Last period minimum level (MWh)": {
type: "number",
minimum: 0
},
"Last period maximum level (MWh)": {
type: "number",
minimum: 0
}
},
required: ["Bus"]
}
},
Generators: {
type: "object",
additionalProperties: {
type: "object",
if: {
properties: {
"Type": { const: "Thermal" }
}
},
then: {
properties: {
"Bus": {
type: "string",
minLength: 1,
},
"Type": {
type: "string",
const: "Thermal"
},
"Production cost curve (MW)": {
type: "array",
items: {
type: "number",
minimum: 0
},
minItems: 1
},
"Production cost curve ($)": {
type: "array",
items: {
type: "number",
minimum: 0
},
minItems: 1
},
"Startup costs ($)": {
type: "array",
items: {
type: "number",
minimum: 0
},
default: [0.0]
},
"Startup delays (h)": {
type: "array",
items: {
type: "integer",
minimum: 1
},
default: [1]
},
"Minimum uptime (h)": {
type: "integer",
default: 1,
minimum: 0
},
"Minimum downtime (h)": {
type: "integer",
default: 1,
minimum: 0
},
"Ramp up limit (MW)": {
type: "number",
minimum: 0
},
"Ramp down limit (MW)": {
type: "number",
minimum: 0
},
"Startup limit (MW)": {
type: "number",
minimum: 0
},
"Shutdown limit (MW)": {
type: "number",
minimum: 0
},
"Initial status (h)": {
type: "integer",
default: 1,
not: { const: 0 }
},
"Initial power (MW)": {
type: "number",
minimum: 0
},
"Must run?": {
type: "boolean",
default: false
}
},
required: [
"Bus",
"Type",
"Production cost curve (MW)",
"Production cost curve ($)",
"Initial status (h)",
"Initial power (MW)"
]
},
else: {
properties: {
"Type": { const: "Profiled" },
"Bus": {
type: "string",
minLength: 1,
},
"Maximum power (MW)": {
oneOf: [
{
type: "number",
},
{
type: "array",
items: {
type: "number",
}
}
]
},
"Cost ($/MW)": {
type: "number",
minimum: 0
}
},
required: ["Type", "Bus", "Maximum power (MW)", "Cost ($/MW)"]
}
}
},
Contingencies: {
type: "object",
additionalProperties: {
type: "object",
properties: {
"Affected lines": {
type: "array",
items: {
type: "string"
},
maxItems: 1,
minItems: 1
}
},
required: ["Affected lines"]
}
}
},
type: "object",
properties: {
Parameters: {
$ref: "#/definitions/Parameters"
},
Buses: {
$ref: "#/definitions/Bus"
},
"Transmission lines": {
$ref: "#/definitions/TransmissionLines"
},
"Storage units": {
$ref: "#/definitions/StorageUnits"
},
"Generators": {
$ref: "#/definitions/Generators"
},
"Contingencies": {
$ref: "#/definitions/Contingencies"
}
},
required: ["Parameters"],
};

@ -0,0 +1,17 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import { schema } from './schema';
import Ajv from "ajv";
// Create Ajv instance with detailed debug options
const ajv = new Ajv({
verbose: true,
allErrors: true,
$data: true,
});
export const validate = ajv.compile(schema);

@ -0,0 +1,200 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
export interface Buses {
[busName: string]: { "Load (MW)": number[] };
}
export interface UnitCommitmentScenario {
Parameters: {
Version: string,
"Power balance penalty ($/MW)": number,
"Time horizon (h)": number,
"Time step (min)": number,
},
Buses: Buses
}
export const BLANK_SCENARIO: UnitCommitmentScenario = {
"Parameters": {
"Version": "0.4",
"Power balance penalty ($/MW)": 1000.0,
"Time horizon (h)": 24,
"Time step (min)": 60,
},
"Buses": {}
};
export const TEST_SCENARIO: UnitCommitmentScenario = {
"Parameters": {
"Version": "0.4",
"Power balance penalty ($/MW)": 1000.0,
"Time horizon (h)": 36,
"Time step (min)": 60,
},
"Buses": {
"b1": {
"Load (MW)": [
35.79534,
34.38835,
33.45083,
32.89729,
33.25044,
33.93851,
35.8654,
37.27098,
38.08378,
38.99327,
38.65134,
38.83212,
37.60031,
37.27939,
37.11823,
37.73063,
40.951,
44.77115,
43.67527,
44.40959,
44.33812,
42.29071,
40.07654,
37.42093,
35.61175,
34.28185,
32.74174,
33.17336,
33.5181,
35.63558,
38.12722,
39.61689,
40.80105,
42.55277,
42.76017,
42.12535
]
},
"b2": {
"Load (MW)": [
14.03739,
13.48563,
13.11797,
12.9009,
13.03939,
13.30922,
14.06486,
14.61607,
14.93482,
15.29148,
15.15739,
15.22828,
14.74522,
14.61937,
14.55617,
14.79633,
16.05921,
17.55731,
17.12756,
17.41553,
17.3875,
16.58459,
15.71629,
14.67487,
13.96539,
13.44386,
12.8399,
13.00916,
13.14435,
13.97474,
14.95185,
15.53603,
16.00041,
16.68736,
16.76869,
16.51974
]
},
"b3": {
"Load (MW)": [
27.3729,
26.29698,
25.58005,
25.15675,
25.4268,
25.95298,
27.42649,
28.50134,
29.12289,
29.81839,
29.55691,
29.69515,
28.75318,
28.50777,
28.38453,
28.85284,
31.31547,
34.23676,
33.39874,
33.96028,
33.90562,
32.33996,
30.64676,
28.61601,
27.23252,
26.21553,
25.0378,
25.36786,
25.63149,
27.25074,
29.15611,
30.29527,
31.2008,
32.54035,
32.69895,
32.2135
]
},
"b4": {
"Load (MW)": [
27.3729,
26.29698,
25.58005,
25.15675,
25.4268,
25.95298,
27.42649,
28.50134,
29.12289,
29.81839,
29.55691,
29.69515,
28.75318,
28.50777,
28.38453,
28.85284,
31.31547,
34.23676,
33.39874,
33.96028,
33.90562,
32.33996,
30.64676,
28.61601,
27.23252,
26.21553,
25.0378,
25.36786,
25.63149,
27.25074,
29.15611,
30.29527,
31.2008,
32.54035,
32.69895,
32.2135
]
},
}
};

@ -1,3 +1,9 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import React from 'react';
import ReactDOM from 'react-dom/client';
import reportWebVitals from './reportWebVitals';

@ -1 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
<!--
- UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
- Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
- Released under the modified BSD license. See COPYING.md for more details.
-->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
<g fill="#61DAFB">
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
<circle cx="420.9" cy="296.5" r="45.7"/>
<path d="M520.5 78.1z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -1 +1,7 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
/// <reference types="react-scripts" />

@ -1,15 +1,21 @@
import { ReportHandler } from 'web-vitals';
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import {ReportHandler} from 'web-vitals';
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({getCLS, getFID, getFCP, getLCP, getTTFB}) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;

@ -1 +1,7 @@
/*
* UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
* Copyright (C) 2020-2025, UChicago Argonne, LLC. All rights reserved.
* Released under the modified BSD license. See COPYING.md for more details.
*/
import '@testing-library/jest-dom';

@ -31,8 +31,8 @@
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"checkJs": true
},
"include": [

Loading…
Cancel
Save