mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-06 15:48:51 -06:00
Allow user to specify product acquisition costs
This commit is contained in:
@@ -118,9 +118,17 @@ const ProductBlock = (props) => {
|
||||
/>
|
||||
|
||||
<h1 style={{ display: nCenters == 0 ? "none" : "block" }}>
|
||||
Disposal
|
||||
Acquisition & disposal
|
||||
</h1>
|
||||
<div style={{ display: nCenters == 0 ? "none" : "block" }}>
|
||||
<TextInputRow
|
||||
label="Acquisition cost"
|
||||
unit="$/tonne"
|
||||
tooltip="Cost of acquiring one tonne of this product at a collection center."
|
||||
value={props.value["acquisition cost ($/tonne)"]}
|
||||
onChange={(v) => onChange("acquisition cost ($/tonne)", v)}
|
||||
validate="floatList"
|
||||
/>
|
||||
<TextInputRow
|
||||
label="Disposal cost"
|
||||
unit="$/tonne"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export const defaultProduct = {
|
||||
"initial amounts": {},
|
||||
"acquisition cost ($/tonne)": "0",
|
||||
"disposal cost ($/tonne)": "0",
|
||||
"disposal limit (tonne)": "0",
|
||||
"disposal limit (%)": "",
|
||||
|
||||
@@ -139,12 +139,14 @@ export const exportProduct = (original, parameters) => {
|
||||
);
|
||||
|
||||
// Copy cost time series (with inflation)
|
||||
["disposal cost ($/tonne)", "transportation cost ($/km/tonne)"].forEach(
|
||||
(key) => {
|
||||
const v = exportValue(original[key], T, R);
|
||||
if (v.length > 0) result[key] = v;
|
||||
}
|
||||
);
|
||||
[
|
||||
"disposal cost ($/tonne)",
|
||||
"acquisition cost ($/tonne)",
|
||||
"transportation cost ($/km/tonne)",
|
||||
].forEach((key) => {
|
||||
const v = exportValue(original[key], T, R);
|
||||
if (v.length > 0) result[key] = v;
|
||||
});
|
||||
|
||||
// Copy dictionaries
|
||||
["transportation emissions (tonne/km/tonne)"].forEach((key) => {
|
||||
@@ -344,16 +346,19 @@ export const importProduct = (original) => {
|
||||
const [R, T] = computeInflationAndTimeHorizon(original, [
|
||||
"transportation cost ($/km/tonne)",
|
||||
"disposal cost ($/tonne)",
|
||||
"acquisition cost ($/tonne)",
|
||||
]);
|
||||
parameters["inflation rate (%)"] = String((R - 1) * 100);
|
||||
parameters["time horizon (years)"] = String(T);
|
||||
|
||||
// Import cost lists
|
||||
["transportation cost ($/km/tonne)", "disposal cost ($/tonne)"].forEach(
|
||||
(key) => {
|
||||
prod[key] = importList(original[key], R);
|
||||
}
|
||||
);
|
||||
[
|
||||
"transportation cost ($/km/tonne)",
|
||||
"disposal cost ($/tonne)",
|
||||
"acquisition cost ($/tonne)",
|
||||
].forEach((key) => {
|
||||
prod[key] = importList(original[key], R);
|
||||
});
|
||||
|
||||
// Import dicts
|
||||
["transportation emissions (tonne/km/tonne)"].forEach((key) => {
|
||||
|
||||
@@ -27,6 +27,7 @@ const sampleProductsOriginal = [
|
||||
"amount (tonne)": [100, 200, 300],
|
||||
},
|
||||
},
|
||||
"acquisition cost ($/tonne)": "4",
|
||||
"disposal cost ($/tonne)": "50",
|
||||
"disposal limit (tonne)": "30",
|
||||
"disposal limit (%)": "",
|
||||
@@ -57,6 +58,7 @@ const sampleProductsOriginal = [
|
||||
"amount (tonne)": [100, 200, 300],
|
||||
},
|
||||
},
|
||||
"acquisition cost ($/tonne)": "4",
|
||||
"disposal cost ($/tonne)": "50",
|
||||
"disposal limit (tonne)": "",
|
||||
"disposal limit (%)": "10",
|
||||
@@ -87,6 +89,7 @@ const sampleProductsOriginal = [
|
||||
"amount (tonne)": [100, 200, 300],
|
||||
},
|
||||
},
|
||||
"acquisition cost ($/tonne)": "4",
|
||||
"disposal cost ($/tonne)": "50",
|
||||
"disposal limit (tonne)": "",
|
||||
"disposal limit (%)": "",
|
||||
@@ -118,6 +121,7 @@ const sampleProductsExported = [
|
||||
"amount (tonne)": [100, 200, 300],
|
||||
},
|
||||
},
|
||||
"acquisition cost ($/tonne)": [4, 8, 16],
|
||||
"disposal cost ($/tonne)": [50, 100, 200],
|
||||
"disposal limit (tonne)": [30, 30, 30],
|
||||
"transportation cost ($/km/tonne)": [0, 0, 0],
|
||||
@@ -145,6 +149,7 @@ const sampleProductsExported = [
|
||||
"amount (tonne)": [100, 200, 300],
|
||||
},
|
||||
},
|
||||
"acquisition cost ($/tonne)": [4, 4, 4],
|
||||
"disposal cost ($/tonne)": [50, 50, 50],
|
||||
"disposal limit (tonne)": [30, 60, 90],
|
||||
"transportation cost ($/km/tonne)": [5, 5, 5],
|
||||
@@ -172,6 +177,7 @@ const sampleProductsExported = [
|
||||
"amount (tonne)": [100, 200, 300],
|
||||
},
|
||||
},
|
||||
"acquisition cost ($/tonne)": [4, 4, 4],
|
||||
"disposal cost ($/tonne)": [50, 50, 50],
|
||||
"transportation cost ($/km/tonne)": [5, 5, 5],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user