@hestia-earth/engine-models 0.76.0 → 0.76.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/Cycle.json +16 -18
- package/config/ImpactAssessment.json +81 -83
- package/dist/validate-config.d.ts +14 -1
- package/dist/validate-config.js +68 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/model-links.json +15 -627
- package/package.json +1 -1
- package/search-results.json +1 -1
- package/src/validate-config.spec.ts +22 -20
- package/src/validate-config.ts +36 -1
- package/src/version.ts +1 -1
package/config/Cycle.json
CHANGED
|
@@ -52,24 +52,22 @@
|
|
|
52
52
|
"stage": 1
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
],
|
|
55
|
+
{
|
|
56
|
+
"key": "practices",
|
|
57
|
+
"model": "hestia",
|
|
58
|
+
"value": "croppingIntensity",
|
|
59
|
+
"runStrategy": "add_blank_node_if_missing",
|
|
60
|
+
"mergeStrategy": "list",
|
|
61
|
+
"stage": 1
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"key": "practices",
|
|
65
|
+
"model": "geospatialDatabase",
|
|
66
|
+
"value": "croppingIntensity",
|
|
67
|
+
"runStrategy": "add_blank_node_if_missing",
|
|
68
|
+
"mergeStrategy": "list",
|
|
69
|
+
"stage": 1
|
|
70
|
+
},
|
|
73
71
|
{
|
|
74
72
|
"key": "siteDuration",
|
|
75
73
|
"model": "cycle",
|
|
@@ -335,18 +335,6 @@
|
|
|
335
335
|
},
|
|
336
336
|
"stage": 1
|
|
337
337
|
},
|
|
338
|
-
{
|
|
339
|
-
"key": "impacts",
|
|
340
|
-
"model": "fantkeEtAl2016",
|
|
341
|
-
"value": "damageToHumanHealthParticulateMatterFormation",
|
|
342
|
-
"runStrategy": "always",
|
|
343
|
-
"mergeStrategy": "list",
|
|
344
|
-
"mergeArgs": {
|
|
345
|
-
"replaceThreshold": ["value", 0.01],
|
|
346
|
-
"sameMethodModel": true
|
|
347
|
-
},
|
|
348
|
-
"stage": 1
|
|
349
|
-
},
|
|
350
338
|
{
|
|
351
339
|
"key": "impacts",
|
|
352
340
|
"model": "frischknechtEtAl2000",
|
|
@@ -666,7 +654,7 @@
|
|
|
666
654
|
{
|
|
667
655
|
"key": "impacts",
|
|
668
656
|
"model": "recipe2016Egalitarian",
|
|
669
|
-
"value": "
|
|
657
|
+
"value": "ozoneDepletionPotential",
|
|
670
658
|
"runStrategy": "always",
|
|
671
659
|
"mergeStrategy": "list",
|
|
672
660
|
"mergeArgs": {
|
|
@@ -678,32 +666,6 @@
|
|
|
678
666
|
{
|
|
679
667
|
"key": "impacts",
|
|
680
668
|
"model": "recipe2016Hierarchist",
|
|
681
|
-
"value": "marineEutrophicationPotential",
|
|
682
|
-
"runStrategy": "always",
|
|
683
|
-
"mergeStrategy": "list",
|
|
684
|
-
"mergeArgs": {
|
|
685
|
-
"replaceThreshold": ["value", 0.01],
|
|
686
|
-
"sameMethodModel": true
|
|
687
|
-
},
|
|
688
|
-
"stage": 1
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
"key": "impacts",
|
|
692
|
-
"model": "recipe2016Individualist",
|
|
693
|
-
"value": "marineEutrophicationPotential",
|
|
694
|
-
"runStrategy": "always",
|
|
695
|
-
"mergeStrategy": "list",
|
|
696
|
-
"mergeArgs": {
|
|
697
|
-
"replaceThreshold": ["value", 0.01],
|
|
698
|
-
"sameMethodModel": true
|
|
699
|
-
},
|
|
700
|
-
"stage": 1
|
|
701
|
-
}
|
|
702
|
-
],
|
|
703
|
-
[
|
|
704
|
-
{
|
|
705
|
-
"key": "impacts",
|
|
706
|
-
"model": "recipe2016Egalitarian",
|
|
707
669
|
"value": "ozoneDepletionPotential",
|
|
708
670
|
"runStrategy": "always",
|
|
709
671
|
"mergeStrategy": "list",
|
|
@@ -715,7 +677,7 @@
|
|
|
715
677
|
},
|
|
716
678
|
{
|
|
717
679
|
"key": "impacts",
|
|
718
|
-
"model": "
|
|
680
|
+
"model": "recipe2016Individualist",
|
|
719
681
|
"value": "ozoneDepletionPotential",
|
|
720
682
|
"runStrategy": "always",
|
|
721
683
|
"mergeStrategy": "list",
|
|
@@ -727,7 +689,7 @@
|
|
|
727
689
|
},
|
|
728
690
|
{
|
|
729
691
|
"key": "impacts",
|
|
730
|
-
"model": "
|
|
692
|
+
"model": "edip2003",
|
|
731
693
|
"value": "ozoneDepletionPotential",
|
|
732
694
|
"runStrategy": "always",
|
|
733
695
|
"mergeStrategy": "list",
|
|
@@ -815,18 +777,6 @@
|
|
|
815
777
|
}
|
|
816
778
|
],
|
|
817
779
|
[
|
|
818
|
-
{
|
|
819
|
-
"key": "impacts",
|
|
820
|
-
"model": "edip2003",
|
|
821
|
-
"value": "ozoneDepletionPotential",
|
|
822
|
-
"runStrategy": "always",
|
|
823
|
-
"mergeStrategy": "list",
|
|
824
|
-
"mergeArgs": {
|
|
825
|
-
"replaceThreshold": ["value", 0.01],
|
|
826
|
-
"sameMethodModel": true
|
|
827
|
-
},
|
|
828
|
-
"stage": 1
|
|
829
|
-
},
|
|
830
780
|
{
|
|
831
781
|
"key": "impacts",
|
|
832
782
|
"model": "aware2-0",
|
|
@@ -947,18 +897,56 @@
|
|
|
947
897
|
},
|
|
948
898
|
"stage": 1
|
|
949
899
|
},
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
"
|
|
958
|
-
|
|
900
|
+
[
|
|
901
|
+
{
|
|
902
|
+
"key": "impacts",
|
|
903
|
+
"model": "recipe2016Egalitarian",
|
|
904
|
+
"value": "marineEutrophicationPotential",
|
|
905
|
+
"runStrategy": "always",
|
|
906
|
+
"mergeStrategy": "list",
|
|
907
|
+
"mergeArgs": {
|
|
908
|
+
"replaceThreshold": ["value", 0.01],
|
|
909
|
+
"sameMethodModel": true
|
|
910
|
+
},
|
|
911
|
+
"stage": 1
|
|
959
912
|
},
|
|
960
|
-
|
|
961
|
-
|
|
913
|
+
{
|
|
914
|
+
"key": "impacts",
|
|
915
|
+
"model": "recipe2016Hierarchist",
|
|
916
|
+
"value": "marineEutrophicationPotential",
|
|
917
|
+
"runStrategy": "always",
|
|
918
|
+
"mergeStrategy": "list",
|
|
919
|
+
"mergeArgs": {
|
|
920
|
+
"replaceThreshold": ["value", 0.01],
|
|
921
|
+
"sameMethodModel": true
|
|
922
|
+
},
|
|
923
|
+
"stage": 1
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"key": "impacts",
|
|
927
|
+
"model": "recipe2016Individualist",
|
|
928
|
+
"value": "marineEutrophicationPotential",
|
|
929
|
+
"runStrategy": "always",
|
|
930
|
+
"mergeStrategy": "list",
|
|
931
|
+
"mergeArgs": {
|
|
932
|
+
"replaceThreshold": ["value", 0.01],
|
|
933
|
+
"sameMethodModel": true
|
|
934
|
+
},
|
|
935
|
+
"stage": 1
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"key": "impacts",
|
|
939
|
+
"model": "environmentalFootprintV3-1",
|
|
940
|
+
"value": "marineEutrophicationPotential",
|
|
941
|
+
"runStrategy": "always",
|
|
942
|
+
"mergeStrategy": "list",
|
|
943
|
+
"mergeArgs": {
|
|
944
|
+
"replaceThreshold": ["value", 0.01],
|
|
945
|
+
"sameMethodModel": true
|
|
946
|
+
},
|
|
947
|
+
"stage": 1
|
|
948
|
+
}
|
|
949
|
+
],
|
|
962
950
|
{
|
|
963
951
|
"key": "impacts",
|
|
964
952
|
"model": "usetoxV2",
|
|
@@ -1248,6 +1236,18 @@
|
|
|
1248
1236
|
}
|
|
1249
1237
|
],
|
|
1250
1238
|
[
|
|
1239
|
+
{
|
|
1240
|
+
"key": "impacts",
|
|
1241
|
+
"model": "fantkeEtAl2016",
|
|
1242
|
+
"value": "damageToHumanHealthParticulateMatterFormation",
|
|
1243
|
+
"runStrategy": "always",
|
|
1244
|
+
"mergeStrategy": "list",
|
|
1245
|
+
"mergeArgs": {
|
|
1246
|
+
"replaceThreshold": ["value", 0.01],
|
|
1247
|
+
"sameMethodModel": true
|
|
1248
|
+
},
|
|
1249
|
+
"stage": 1
|
|
1250
|
+
},
|
|
1251
1251
|
{
|
|
1252
1252
|
"key": "impacts",
|
|
1253
1253
|
"model": "lcImpactCertainEffects100Years",
|
|
@@ -1813,7 +1813,7 @@
|
|
|
1813
1813
|
{
|
|
1814
1814
|
"key": "endpoints",
|
|
1815
1815
|
"model": "lcImpactCertainEffects100Years",
|
|
1816
|
-
"value": "
|
|
1816
|
+
"value": "damageToTerrestrialEcosystemsPdfYear",
|
|
1817
1817
|
"runStrategy": "always",
|
|
1818
1818
|
"mergeStrategy": "list",
|
|
1819
1819
|
"mergeArgs": {
|
|
@@ -1825,7 +1825,7 @@
|
|
|
1825
1825
|
{
|
|
1826
1826
|
"key": "endpoints",
|
|
1827
1827
|
"model": "lcImpactAllEffects100Years",
|
|
1828
|
-
"value": "
|
|
1828
|
+
"value": "damageToTerrestrialEcosystemsPdfYear",
|
|
1829
1829
|
"runStrategy": "always",
|
|
1830
1830
|
"mergeStrategy": "list",
|
|
1831
1831
|
"mergeArgs": {
|
|
@@ -1837,7 +1837,7 @@
|
|
|
1837
1837
|
{
|
|
1838
1838
|
"key": "endpoints",
|
|
1839
1839
|
"model": "lcImpactCertainEffectsInfinite",
|
|
1840
|
-
"value": "
|
|
1840
|
+
"value": "damageToTerrestrialEcosystemsPdfYear",
|
|
1841
1841
|
"runStrategy": "always",
|
|
1842
1842
|
"mergeStrategy": "list",
|
|
1843
1843
|
"mergeArgs": {
|
|
@@ -1849,7 +1849,7 @@
|
|
|
1849
1849
|
{
|
|
1850
1850
|
"key": "endpoints",
|
|
1851
1851
|
"model": "lcImpactAllEffectsInfinite",
|
|
1852
|
-
"value": "
|
|
1852
|
+
"value": "damageToTerrestrialEcosystemsPdfYear",
|
|
1853
1853
|
"runStrategy": "always",
|
|
1854
1854
|
"mergeStrategy": "list",
|
|
1855
1855
|
"mergeArgs": {
|
|
@@ -1863,7 +1863,7 @@
|
|
|
1863
1863
|
{
|
|
1864
1864
|
"key": "endpoints",
|
|
1865
1865
|
"model": "lcImpactCertainEffects100Years",
|
|
1866
|
-
"value": "
|
|
1866
|
+
"value": "damageToFreshwaterEcosystemsPdfYear",
|
|
1867
1867
|
"runStrategy": "always",
|
|
1868
1868
|
"mergeStrategy": "list",
|
|
1869
1869
|
"mergeArgs": {
|
|
@@ -1875,7 +1875,7 @@
|
|
|
1875
1875
|
{
|
|
1876
1876
|
"key": "endpoints",
|
|
1877
1877
|
"model": "lcImpactAllEffects100Years",
|
|
1878
|
-
"value": "
|
|
1878
|
+
"value": "damageToFreshwaterEcosystemsPdfYear",
|
|
1879
1879
|
"runStrategy": "always",
|
|
1880
1880
|
"mergeStrategy": "list",
|
|
1881
1881
|
"mergeArgs": {
|
|
@@ -1887,7 +1887,7 @@
|
|
|
1887
1887
|
{
|
|
1888
1888
|
"key": "endpoints",
|
|
1889
1889
|
"model": "lcImpactCertainEffectsInfinite",
|
|
1890
|
-
"value": "
|
|
1890
|
+
"value": "damageToFreshwaterEcosystemsPdfYear",
|
|
1891
1891
|
"runStrategy": "always",
|
|
1892
1892
|
"mergeStrategy": "list",
|
|
1893
1893
|
"mergeArgs": {
|
|
@@ -1899,7 +1899,7 @@
|
|
|
1899
1899
|
{
|
|
1900
1900
|
"key": "endpoints",
|
|
1901
1901
|
"model": "lcImpactAllEffectsInfinite",
|
|
1902
|
-
"value": "
|
|
1902
|
+
"value": "damageToFreshwaterEcosystemsPdfYear",
|
|
1903
1903
|
"runStrategy": "always",
|
|
1904
1904
|
"mergeStrategy": "list",
|
|
1905
1905
|
"mergeArgs": {
|
|
@@ -1913,7 +1913,7 @@
|
|
|
1913
1913
|
{
|
|
1914
1914
|
"key": "endpoints",
|
|
1915
1915
|
"model": "lcImpactCertainEffects100Years",
|
|
1916
|
-
"value": "
|
|
1916
|
+
"value": "damageToMarineEcosystemsPdfYear",
|
|
1917
1917
|
"runStrategy": "always",
|
|
1918
1918
|
"mergeStrategy": "list",
|
|
1919
1919
|
"mergeArgs": {
|
|
@@ -1925,7 +1925,7 @@
|
|
|
1925
1925
|
{
|
|
1926
1926
|
"key": "endpoints",
|
|
1927
1927
|
"model": "lcImpactAllEffects100Years",
|
|
1928
|
-
"value": "
|
|
1928
|
+
"value": "damageToMarineEcosystemsPdfYear",
|
|
1929
1929
|
"runStrategy": "always",
|
|
1930
1930
|
"mergeStrategy": "list",
|
|
1931
1931
|
"mergeArgs": {
|
|
@@ -1937,7 +1937,7 @@
|
|
|
1937
1937
|
{
|
|
1938
1938
|
"key": "endpoints",
|
|
1939
1939
|
"model": "lcImpactCertainEffectsInfinite",
|
|
1940
|
-
"value": "
|
|
1940
|
+
"value": "damageToMarineEcosystemsPdfYear",
|
|
1941
1941
|
"runStrategy": "always",
|
|
1942
1942
|
"mergeStrategy": "list",
|
|
1943
1943
|
"mergeArgs": {
|
|
@@ -1949,7 +1949,7 @@
|
|
|
1949
1949
|
{
|
|
1950
1950
|
"key": "endpoints",
|
|
1951
1951
|
"model": "lcImpactAllEffectsInfinite",
|
|
1952
|
-
"value": "
|
|
1952
|
+
"value": "damageToMarineEcosystemsPdfYear",
|
|
1953
1953
|
"runStrategy": "always",
|
|
1954
1954
|
"mergeStrategy": "list",
|
|
1955
1955
|
"mergeArgs": {
|
|
@@ -1963,7 +1963,7 @@
|
|
|
1963
1963
|
{
|
|
1964
1964
|
"key": "endpoints",
|
|
1965
1965
|
"model": "lcImpactCertainEffects100Years",
|
|
1966
|
-
"value": "
|
|
1966
|
+
"value": "damageToHumanHealth",
|
|
1967
1967
|
"runStrategy": "always",
|
|
1968
1968
|
"mergeStrategy": "list",
|
|
1969
1969
|
"mergeArgs": {
|
|
@@ -1975,7 +1975,7 @@
|
|
|
1975
1975
|
{
|
|
1976
1976
|
"key": "endpoints",
|
|
1977
1977
|
"model": "lcImpactAllEffects100Years",
|
|
1978
|
-
"value": "
|
|
1978
|
+
"value": "damageToHumanHealth",
|
|
1979
1979
|
"runStrategy": "always",
|
|
1980
1980
|
"mergeStrategy": "list",
|
|
1981
1981
|
"mergeArgs": {
|
|
@@ -1987,7 +1987,7 @@
|
|
|
1987
1987
|
{
|
|
1988
1988
|
"key": "endpoints",
|
|
1989
1989
|
"model": "lcImpactCertainEffectsInfinite",
|
|
1990
|
-
"value": "
|
|
1990
|
+
"value": "damageToHumanHealth",
|
|
1991
1991
|
"runStrategy": "always",
|
|
1992
1992
|
"mergeStrategy": "list",
|
|
1993
1993
|
"mergeArgs": {
|
|
@@ -1999,7 +1999,7 @@
|
|
|
1999
1999
|
{
|
|
2000
2000
|
"key": "endpoints",
|
|
2001
2001
|
"model": "lcImpactAllEffectsInfinite",
|
|
2002
|
-
"value": "
|
|
2002
|
+
"value": "damageToHumanHealth",
|
|
2003
2003
|
"runStrategy": "always",
|
|
2004
2004
|
"mergeStrategy": "list",
|
|
2005
2005
|
"mergeArgs": {
|
|
@@ -2007,9 +2007,7 @@
|
|
|
2007
2007
|
"sameMethodModel": true
|
|
2008
2008
|
},
|
|
2009
2009
|
"stage": 1
|
|
2010
|
-
}
|
|
2011
|
-
],
|
|
2012
|
-
[
|
|
2010
|
+
},
|
|
2013
2011
|
{
|
|
2014
2012
|
"key": "endpoints",
|
|
2015
2013
|
"model": "recipe2016Egalitarian",
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { allowedType, IOrchestratorModelConfig } from './config';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Use inter-dependencies to detect models that are in the wrong order.
|
|
4
|
+
*
|
|
5
|
+
* @param nodeType Cycle, Site, or ImpactAssessment
|
|
6
|
+
* @returns List of models that have dependencies that could not be found prior to running.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateConfigOrder: (nodeType: allowedType) => {
|
|
3
9
|
model: IOrchestratorModelConfig;
|
|
4
10
|
existing: string[];
|
|
5
11
|
missing: string[];
|
|
6
12
|
}[];
|
|
13
|
+
/**
|
|
14
|
+
* Detect multiple models running in parallel when they should not.
|
|
15
|
+
* Note: we use the `mergeArgs` to handle special cases when multiple identical models CAN run in parallel
|
|
16
|
+
*
|
|
17
|
+
* @param nodeType Cycle, Site, or ImpactAssessment
|
|
18
|
+
*/
|
|
19
|
+
export declare const validateConfigDuplicates: (nodeType: allowedType) => IOrchestratorModelConfig[];
|
package/dist/validate-config.js
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
30
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
+
if (ar || !(i in from)) {
|
|
32
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
+
ar[i] = from[i];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
+
};
|
|
2
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
39
|
+
exports.validateConfigDuplicates = exports.validateConfigOrder = void 0;
|
|
4
40
|
var config_1 = require("./config");
|
|
5
41
|
var utils_1 = require("./utils");
|
|
6
42
|
// models not included in the links
|
|
@@ -46,11 +82,40 @@ var matchDependencies = function (models) { return function (model) {
|
|
|
46
82
|
})) !== null && _c !== void 0 ? _c : []
|
|
47
83
|
};
|
|
48
84
|
}; };
|
|
49
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Use inter-dependencies to detect models that are in the wrong order.
|
|
87
|
+
*
|
|
88
|
+
* @param nodeType Cycle, Site, or ImpactAssessment
|
|
89
|
+
* @returns List of models that have dependencies that could not be found prior to running.
|
|
90
|
+
*/
|
|
91
|
+
var validateConfigOrder = function (nodeType) {
|
|
50
92
|
var config = (0, config_1.loadConfig)(nodeType);
|
|
51
93
|
// flatten all models to process one by one, starting with the last one
|
|
52
94
|
var models = config.models.flat();
|
|
53
95
|
var results = models.filter(includeModel).map(matchDependencies(models));
|
|
54
96
|
return results.filter(function (r) { return r.missing.length > 0; });
|
|
55
97
|
};
|
|
56
|
-
exports.
|
|
98
|
+
exports.validateConfigOrder = validateConfigOrder;
|
|
99
|
+
var findDuplicatedConfigs = function (models) {
|
|
100
|
+
var modelsByValue = models.reduce(function (prev, curr) {
|
|
101
|
+
var _a;
|
|
102
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[curr.value] = __spreadArray(__spreadArray([], __read((prev[curr.value] || [])), false), [curr], false), _a)));
|
|
103
|
+
}, {});
|
|
104
|
+
return Object.values(modelsByValue)
|
|
105
|
+
.map(function (values) { return values.filter(function (v) { var _a; return !((_a = v.mergeArgs) === null || _a === void 0 ? void 0 : _a.sameMethodModel); }); })
|
|
106
|
+
.filter(function (values) { return values.length > 1; });
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Detect multiple models running in parallel when they should not.
|
|
110
|
+
* Note: we use the `mergeArgs` to handle special cases when multiple identical models CAN run in parallel
|
|
111
|
+
*
|
|
112
|
+
* @param nodeType Cycle, Site, or ImpactAssessment
|
|
113
|
+
*/
|
|
114
|
+
var validateConfigDuplicates = function (nodeType) {
|
|
115
|
+
var config = (0, config_1.loadConfig)(nodeType);
|
|
116
|
+
var duplicates = config.models
|
|
117
|
+
.map(function (value) { return (Array.isArray(value) ? findDuplicatedConfigs(value) : []); })
|
|
118
|
+
.flat(2);
|
|
119
|
+
return duplicates;
|
|
120
|
+
};
|
|
121
|
+
exports.validateConfigDuplicates = validateConfigDuplicates;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ENGINE_VERSION = "0.76.
|
|
1
|
+
export declare const ENGINE_VERSION = "0.76.2";
|
package/dist/version.js
CHANGED