Commit f272adbc authored by Niina Helistö's avatar Niina Helistö
Browse files

Updating s and t dimensions in the spinetoolbox project

- Converting samples and time steps into indices when storing p_s_discountFactor, sGroup, gnss_bound, uss_bound, t_invest, and utAvailabilityLimits.
- Storing sGroup, gnss_bound, uss_bound, t_invest, and utAvailabilityLimits as boolean parameters of group, grid__node, unit, model, and unit object/relationship classes, respectively.
- Adding a 'model' object class for t_invest and p_s_discountFactor.
parent 68ecb62a
......@@ -185,7 +185,6 @@
},
"table_row_types": {},
"selected_tables": [
"s",
"scenario",
"up_down",
"input_output",
......
......@@ -1904,15 +1904,48 @@
{
"map_type": "ObjectClass",
"position": "hidden",
"value": "t_invest"
"value": "model"
},
{
"map_type": "Object",
"position": 0
"position": "hidden",
"value": "backbone"
},
{
"map_type": "ObjectMetadata",
"position": "hidden"
},
{
"map_type": "ParameterDefinition",
"position": "hidden",
"value": "t_invest"
},
{
"map_type": "Alternative",
"position": "hidden",
"value": "Base"
},
{
"map_type": "ParameterValueMetadata",
"position": "hidden"
},
{
"map_type": "ParameterValueType",
"position": "hidden",
"value": "map"
},
{
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 0
},
{
"map_type": "ExpandedValue",
"position": "hidden",
"value": "true"
}
]
}
......@@ -2012,7 +2045,7 @@
{
"map_type": "RelationshipClass",
"position": "hidden",
"value": "grid__node__sample__sample"
"value": "grid__node"
},
{
"map_type": "RelationshipClassObjectClass",
......@@ -2024,16 +2057,6 @@
"position": "hidden",
"value": "node"
},
{
"map_type": "RelationshipClassObjectClass",
"position": "hidden",
"value": "s"
},
{
"map_type": "RelationshipClassObjectClass",
"position": "hidden",
"value": "s"
},
{
"map_type": "Relationship",
"position": "hidden",
......@@ -2050,18 +2073,48 @@
"import_objects": true
},
{
"map_type": "RelationshipObject",
"position": 2,
"import_objects": true
"map_type": "RelationshipMetadata",
"position": "hidden"
},
{
"map_type": "RelationshipObject",
"position": 3,
"import_objects": true
"map_type": "ParameterDefinition",
"position": "hidden",
"value": "boundSamples"
},
{
"map_type": "RelationshipMetadata",
"map_type": "Alternative",
"position": "hidden",
"value": "Base"
},
{
"map_type": "ParameterValueMetadata",
"position": "hidden"
},
{
"map_type": "ParameterValueType",
"position": "hidden",
"value": "map"
},
{
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 2
},
{
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 3
},
{
"map_type": "ExpandedValue",
"position": "hidden",
"value": "true"
}
]
}
......@@ -2072,45 +2125,57 @@
"Mapping 1": {
"mapping": [
{
"map_type": "RelationshipClass",
"map_type": "ObjectClass",
"position": "hidden",
"value": "unit__sample__sample"
"value": "unit"
},
{
"map_type": "RelationshipClassObjectClass",
"position": "hidden",
"value": "unit"
"map_type": "Object",
"position": 0
},
{
"map_type": "RelationshipClassObjectClass",
"map_type": "ObjectMetadata",
"position": "hidden"
},
{
"map_type": "ParameterDefinition",
"position": "hidden",
"value": "s"
"value": "boundSamples"
},
{
"map_type": "RelationshipClassObjectClass",
"map_type": "Alternative",
"position": "hidden",
"value": "s"
"value": "Base"
},
{
"map_type": "Relationship",
"map_type": "ParameterValueMetadata",
"position": "hidden"
},
{
"map_type": "ParameterValueType",
"position": "hidden",
"value": "relationship"
"value": "map"
},
{
"map_type": "RelationshipObject",
"position": 0
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "RelationshipObject",
"map_type": "ParameterValueIndex",
"position": 1
},
{
"map_type": "RelationshipObject",
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 2
},
{
"map_type": "RelationshipMetadata",
"position": "hidden"
"map_type": "ExpandedValue",
"position": "hidden",
"value": "true"
}
]
}
......@@ -2249,11 +2314,12 @@
{
"map_type": "ObjectClass",
"position": "hidden",
"value": "s"
"value": "model"
},
{
"map_type": "Object",
"position": 0
"position": "hidden",
"value": "backbone"
},
{
"map_type": "ObjectMetadata",
......@@ -2274,7 +2340,20 @@
"position": "hidden"
},
{
"map_type": "ParameterValue",
"map_type": "ParameterValueType",
"position": "hidden",
"value": "map"
},
{
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 0
},
{
"map_type": "ExpandedValue",
"position": 1
}
]
......@@ -2286,48 +2365,48 @@
"Mapping 1": {
"mapping": [
{
"map_type": "RelationshipClass",
"map_type": "ObjectClass",
"position": "hidden",
"value": "unit__t__availability"
"value": "unit"
},
{
"map_type": "RelationshipClassObjectClass",
"position": "hidden",
"value": "unit"
"map_type": "Object",
"position": 0
},
{
"map_type": "RelationshipClassObjectClass",
"position": "hidden",
"value": "t_availability"
"map_type": "ObjectMetadata",
"position": "hidden"
},
{
"map_type": "RelationshipClassObjectClass",
"position": "hidden",
"value": "availability"
"map_type": "ParameterDefinition",
"position": 2
},
{
"map_type": "Relationship",
"map_type": "Alternative",
"position": "hidden",
"value": "relationship"
"value": "Base"
},
{
"map_type": "RelationshipObject",
"position": 0,
"import_objects": true
"map_type": "ParameterValueMetadata",
"position": "hidden"
},
{
"map_type": "RelationshipObject",
"position": 1,
"import_objects": true
"map_type": "ParameterValueType",
"position": "hidden",
"value": "map"
},
{
"map_type": "RelationshipObject",
"position": 2,
"import_objects": true
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "RelationshipMetadata",
"position": "hidden"
"map_type": "ParameterValueIndex",
"position": 1
},
{
"map_type": "ExpandedValue",
"position": "hidden",
"value": "true"
}
]
}
......@@ -2417,36 +2496,50 @@
"Mapping 1": {
"mapping": [
{
"map_type": "RelationshipClass",
"map_type": "ObjectClass",
"position": "hidden",
"value": "sample__group"
"value": "group"
},
{
"map_type": "RelationshipClassObjectClass",
"position": "hidden",
"value": "s"
"map_type": "Object",
"position": 1
},
{
"map_type": "RelationshipClassObjectClass",
"map_type": "ObjectMetadata",
"position": "hidden"
},
{
"map_type": "ParameterDefinition",
"position": "hidden",
"value": "group"
"value": "samples"
},
{
"map_type": "Relationship",
"map_type": "Alternative",
"position": "hidden",
"value": "relationship"
"value": "Base"
},
{
"map_type": "RelationshipObject",
"position": 0
"map_type": "ParameterValueMetadata",
"position": "hidden",
"value": ""
},
{
"map_type": "RelationshipObject",
"position": 1
"map_type": "ParameterValueType",
"position": "hidden",
"value": "map"
},
{
"map_type": "RelationshipMetadata",
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 0
},
{
"map_type": "ExpandedValue",
"position": "hidden",
"value": "true"
}
]
}
......
......@@ -10,7 +10,7 @@
{
"map_type": "ObjectClass",
"position": "table_name",
"filter_re": "^grid$|^node$|^flow$|^unittype$|^unit$|^group$|^restype$|^emission$|^t_invest$"
"filter_re": "^grid$|^node$|^flow$|^unittype$|^unit$|^group$|^restype$|^emission$"
},
{
"map_type": "Object",
......@@ -54,7 +54,7 @@
{
"map_type": "RelationshipClass",
"position": "table_name",
"filter_re": "^unitUnittype$|^restypeDirection$|^flowUnit$|^uGroup$|^sGroup$"
"filter_re": "^unitUnittype$|^restypeDirection$|^flowUnit$|^uGroup$"
},
{
"map_type": "RelationshipClassObjectClass",
......@@ -89,7 +89,7 @@
{
"map_type": "RelationshipClass",
"position": "table_name",
"filter_re": "^unitUnitEffLevel$|^effLevelGroupUnit$|^utAvailabilityLimits$|^gnGroup$|^uss_bound$"
"filter_re": "^unitUnitEffLevel$|^effLevelGroupUnit$|^gnGroup$"
},
{
"map_type": "RelationshipClassObjectClass",
......@@ -133,7 +133,7 @@
{
"map_type": "RelationshipClass",
"position": "table_name",
"filter_re": "^gnuGroup$|^gn2nGroup$|^gnss_bound$"
"filter_re": "^gnuGroup$|^gn2nGroup$"
},
{
"map_type": "RelationshipClassObjectClass",
......@@ -197,7 +197,7 @@
"map_type": "ParameterDefinition",
"position": 1,
"header": "*",
"filter_re": "^((?!(eff|op)).)*$"
"filter_re": "^((?!(eff|op|becomeAvailable|becomeUnavailable|boundSamples)).)*$"
},
{
"map_type": "ParameterValueList",
......@@ -237,11 +237,12 @@
{
"map_type": "ObjectClass",
"position": "hidden",
"filter_re": "s"
"filter_re": "^model$"
},
{
"map_type": "ParameterDefinition",
"position": "hidden"
"position": "hidden",
"filter_re": "^discountFactor$"
},
{
"map_type": "ParameterValueList",
......@@ -250,8 +251,7 @@
},
{
"map_type": "Object",
"position": 0,
"header": "*"
"position": "hidden"
},
{
"map_type": "Alternative",
......@@ -262,7 +262,16 @@
"position": "hidden"
},
{
"map_type": "ParameterValue",
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 0,
"header": "*"
},
{
"map_type": "ExpandedValue",
"position": 1
}
],
......@@ -304,7 +313,8 @@
},
{
"map_type": "ParameterValueType",
"position": "hidden"
"position": "hidden",
"filter_re": "single_value"
},
{
"map_type": "ParameterValue",
......@@ -2001,7 +2011,7 @@
"map_type": "ParameterDefinition",
"position": 2,
"header": "*",
"filter_re": "^((?!(influx|storageValue)).)*$"
"filter_re": "^((?!(influx|storageValue|boundSamples)).)*$"
},
{
"map_type": "ParameterValueList",
......@@ -2283,6 +2293,316 @@
"enabled": true,
"always_export_header": true,
"use_fixed_table_name": true
},
"t_invest": {
"type": "object_parameter_values",
"mapping": [
{
"map_type": "FixedValue",
"position": "table_name",
"value": "t_invest"
},
{
"map_type": "ObjectClass",
"position": "hidden",
"filter_re": "model"
},
{
"map_type": "ParameterDefinition",
"position": "hidden",
"filter_re": "^t_invest$"
},
{
"map_type": "ParameterValueList",
"position": "hidden",
"ignorable": true
},
{
"map_type": "Object",
"position": "hidden"
},
{
"map_type": "Alternative",
"position": "hidden"
},
{
"map_type": "ParameterValueType",
"position": "hidden"
},
{
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 0,
"header": "*"
},
{
"map_type": "ExpandedValue",
"position": "hidden",
"filter_re": "true"
}
],
"enabled": true,
"always_export_header": true,
"use_fixed_table_name": true
},
"sGroup": {
"type": "object_parameter_values",
"mapping": [
{
"map_type": "FixedValue",
"position": "table_name",
"value": "sGroup"
},
{
"map_type": "ObjectClass",
"position": "hidden",
"filter_re": "^group$"
},
{
"map_type": "ParameterDefinition",
"position": "hidden",
"filter_re": "^samples$"
},
{
"map_type": "ParameterValueList",
"position": "hidden",
"ignorable": true
},
{
"map_type": "Object",
"position": 1,
"header": "*"
},
{
"map_type": "Alternative",
"position": "hidden"
},
{
"map_type": "ParameterValueType",
"position": "hidden"
},
{
"map_type": "IndexName",
"position": "hidden"
},
{
"map_type": "ParameterValueIndex",
"position": 0,
"header": "*"
},
{
"map_type": "ExpandedValue",
"position": "hidden",
"filter_re": "true"
}
],
"enabled": true,
"always_export_header": true,
"use_fixed_table_name": true
},
"uss_bound": {
"type": "object_parameter_values",
"mapping": [
{
"map_type": "FixedValue",
"position": "table_name",
"value": "uss_bound"
},
{