diff --git a/relog-web/src/casebuilder/validate.js b/relog-web/src/casebuilder/validate.js index a681f12..7243e87 100644 --- a/relog-web/src/casebuilder/validate.js +++ b/relog-web/src/casebuilder/validate.js @@ -18,6 +18,9 @@ const schema = { "time horizon (years)": { type: "number", }, + "distance metric": { + type: "string", + }, }, required: ["time horizon (years)"], }, @@ -159,6 +162,15 @@ const schema = { "initial amounts": { $ref: "#/definitions/InitialAmount", }, + "disposal limit (tonne)": { + $ref: "#/definitions/TimeSeries", + }, + "disposal cost ($/tonne)": { + $ref: "#/definitions/TimeSeries", + }, + "acquisition cost ($/tonne)": { + $ref: "#/definitions/TimeSeries", + }, }, required: ["transportation cost ($/km/tonne)"], }, diff --git a/src/schemas/input.json b/src/schemas/input.json index d3cc9aa..4659024 100644 --- a/src/schemas/input.json +++ b/src/schemas/input.json @@ -1,206 +1,189 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://anl-ceeesa.github.io/RELOG/input", - "title": "Schema for RELOG Input File", - "definitions": { - "TimeSeries": { - "type": "array", - "items": { - "type": "number" - } - }, - "Parameters": { - "type": "object", - "properties": { - "time horizon (years)": { - "type": "number" - }, - "distance metric": { - "type": "string" - } - }, - "required": [ - "time horizon (years)" - ] + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://anl-ceeesa.github.io/RELOG/input", + "title": "Schema for RELOG Input File", + "definitions": { + "TimeSeries": { + "type": "array", + "items": { + "type": "number" + } + }, + "Parameters": { + "type": "object", + "properties": { + "time horizon (years)": { + "type": "number" }, - "Plant": { + "distance metric": { + "type": "string" + } + }, + "required": ["time horizon (years)"] + }, + "Plant": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "input": { + "type": "string" + }, + "outputs (tonne/tonne)": { "type": "object", "additionalProperties": { - "type": "object", - "properties": { - "input": { - "type": "string" - }, - "outputs (tonne/tonne)": { - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "energy (GJ/tonne)": { - "$ref": "#/definitions/TimeSeries" - }, - "emissions (tonne/tonne)": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TimeSeries" - } - }, - "locations": { - "$ref": "#/definitions/PlantLocation" - } - }, - "required": [ - "input", - "locations" - ] + "type": "number" } - }, - "PlantLocation": { + }, + "energy (GJ/tonne)": { + "$ref": "#/definitions/TimeSeries" + }, + "emissions (tonne/tonne)": { "type": "object", "additionalProperties": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "latitude (deg)": { - "type": "number" - }, - "longitude (deg)": { - "type": "number" - }, - "disposal": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "cost ($/tonne)": { - "$ref": "#/definitions/TimeSeries" - }, - "limit (tonne)": { - "$ref": "#/definitions/TimeSeries" - } - }, - "required": [ - "cost ($/tonne)" - ] - } - }, - "storage": { - "type": "object", - "properties": { - "cost ($/tonne)": { - "$ref": "#/definitions/TimeSeries" - }, - "limit (tonne)": { - "type": "number" - } - }, - "required": [ - "cost ($/tonne)", - "limit (tonne)" - ] - }, - "capacities (tonne)": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "variable operating cost ($/tonne)": { - "$ref": "#/definitions/TimeSeries" - }, - "fixed operating cost ($)": { - "$ref": "#/definitions/TimeSeries" - }, - "opening cost ($)": { - "$ref": "#/definitions/TimeSeries" - } - }, - "required": [ - "variable operating cost ($/tonne)", - "fixed operating cost ($)", - "opening cost ($)" - ] - } - } - }, - "required": [ - "capacities (tonne)" - ] + "$ref": "#/definitions/TimeSeries" } + }, + "locations": { + "$ref": "#/definitions/PlantLocation" + } }, - "InitialAmount": { + "required": ["input", "locations"] + } + }, + "PlantLocation": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "latitude (deg)": { + "type": "number" + }, + "longitude (deg)": { + "type": "number" + }, + "disposal": { "type": "object", "additionalProperties": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "latitude (deg)": { - "type": "number" - }, - "longitude (deg)": { - "type": "number" - }, - "amount (tonne)": { - "$ref": "#/definitions/TimeSeries" - } + "type": "object", + "properties": { + "cost ($/tonne)": { + "$ref": "#/definitions/TimeSeries" }, - "required": [ - "amount (tonne)" - ] + "limit (tonne)": { + "$ref": "#/definitions/TimeSeries" + } + }, + "required": ["cost ($/tonne)"] } - }, - "Product": { + }, + "storage": { + "type": "object", + "properties": { + "cost ($/tonne)": { + "$ref": "#/definitions/TimeSeries" + }, + "limit (tonne)": { + "type": "number" + } + }, + "required": ["cost ($/tonne)", "limit (tonne)"] + }, + "capacities (tonne)": { "type": "object", "additionalProperties": { - "type": "object", - "properties": { - "transportation cost ($/km/tonne)": { - "$ref": "#/definitions/TimeSeries" - }, - "transportation energy (J/km/tonne)": { - "$ref": "#/definitions/TimeSeries" - }, - "transportation emissions (tonne/km/tonne)": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TimeSeries" - } - }, - "initial amounts": { - "$ref": "#/definitions/InitialAmount" - }, - "disposal limit (tonne)": { - "$ref": "#/definitions/TimeSeries" - }, - "disposal cost ($/tonne)": { - "$ref": "#/definitions/TimeSeries" - } + "type": "object", + "properties": { + "variable operating cost ($/tonne)": { + "$ref": "#/definitions/TimeSeries" + }, + "fixed operating cost ($)": { + "$ref": "#/definitions/TimeSeries" }, - "required": [ - "transportation cost ($/km/tonne)" - ] + "opening cost ($)": { + "$ref": "#/definitions/TimeSeries" + } + }, + "required": [ + "variable operating cost ($/tonne)", + "fixed operating cost ($)", + "opening cost ($)" + ] } - } + } + }, + "required": ["capacities (tonne)"] + } }, - "type": "object", - "properties": { - "parameters": { - "$ref": "#/definitions/Parameters" + "InitialAmount": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "latitude (deg)": { + "type": "number" + }, + "longitude (deg)": { + "type": "number" + }, + "amount (tonne)": { + "$ref": "#/definitions/TimeSeries" + } }, - "plants": { - "$ref": "#/definitions/Plant" + "required": ["amount (tonne)"] + } + }, + "Product": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "transportation cost ($/km/tonne)": { + "$ref": "#/definitions/TimeSeries" + }, + "transportation energy (J/km/tonne)": { + "$ref": "#/definitions/TimeSeries" + }, + "transportation emissions (tonne/km/tonne)": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TimeSeries" + } + }, + "initial amounts": { + "$ref": "#/definitions/InitialAmount" + }, + "disposal limit (tonne)": { + "$ref": "#/definitions/TimeSeries" + }, + "disposal cost ($/tonne)": { + "$ref": "#/definitions/TimeSeries" + }, + "acquisition cost ($/tonne)": { + "$ref": "#/definitions/TimeSeries" + } }, - "products": { - "$ref": "#/definitions/Product" - } + "required": ["transportation cost ($/km/tonne)"] + } + } + }, + "type": "object", + "properties": { + "parameters": { + "$ref": "#/definitions/Parameters" + }, + "plants": { + "$ref": "#/definitions/Plant" }, - "required": [ - "parameters", - "plants", - "products" - ] -} \ No newline at end of file + "products": { + "$ref": "#/definitions/Product" + } + }, + "required": ["parameters", "plants", "products"] +}