@@ -40,16 +40,16 @@ data.
4040
4141#### JSON schema attributes object
4242
43- [ ` Attributes ` ] ( #json-schema-attributes-object ) contains specified attributes per [ ` Component ` ] ( #json-schema-component )
44- type ( e.g.: ` "node" ` ).
45- It is only required for those components that contain ` HomogeneousComponentData ` objects and that data needs to follow
46- the attributes listed in this object.
47- It may be empty if for data for all instances certain component is ` InhomogeneousComponentData ` .
48- It reduces compression when a dataset largely follows the exact same pattern .
43+ [ ` Attributes ` ] ( #json-schema-attributes-object ) defines the attribute list and ordering
44+ for each [ ` Component ` ] ( #json-schema-component ) ( e.g.: ` "node" ` ), e.g., when component data is represented
45+ using the compact list format ( ` use_compact_list=True ` ).
46+
47+ The order of attributes in this section determines the order of values in the compact list representation .
48+ This is independent of whether the component data is stored as ` DenseComponentData ` or ` SparseComponentData ` .
4949
5050- [ ` Attributes ` ] ( #json-schema-attributes-object ) : ` Object `
51- - [ ` Component ` ] ( #json-schema-component ) : [ ` ComponentAttributes ` ] ( #json-schema-component-attributes ) containing the
52- desired [ ` Attribute ` ] ( #json-schema-attribute ) s for that [ ` Component ` ] ( #json-schema- component) .
51+ - [ ` Component ` ] ( #json-schema-component ) : [ ` ComponentAttributes ` ] ( #json-schema-component-attributes )
52+ defining the ordered list of [ ` Attribute ` ] ( #json-schema-attribute ) s for that component.
5353
5454For example, for an ` "update" ` dataset that contains only updates to the ` "from_status" ` attribute of ` "branch" `
5555components, it may be ` {"branch": ["from_status"]} ` .
@@ -80,8 +80,8 @@ E.g.: `"id"`.
8080
8181#### JSON schema dataset object
8282
83- The [ ` Dataset ` ] ( #json-schema-dataset-object ) object is either a [ ` SingleDataset ` ] ( #json-schema-single-dataset-object ) if
84- the [ ` is_batch ` ] ( #json-schema-root-object ) field in the [ ` PowerGridModelRoot ` ] ( #json-schema-root-object ) object is
83+ The [ ` Dataset ` ] ( #json-schema-dataset-object ) object is either a [ ` SingleDataset ` ] ( #json-schema-single-dataset-object )
84+ if the [ ` is_batch ` ] ( #json-schema-root-object ) field in the [ ` PowerGridModelRoot ` ] ( #json-schema-root-object ) object is
8585` false ` , or a [ ` BatchDataset ` ] ( #json-schema-batch-dataset-object ) otherwise.
8686
8787- [ ` Dataset ` ] ( #json-schema-dataset-object ) : [ ` SingleDataset ` ] ( #json-schema-single-dataset-object ) |
@@ -124,35 +124,33 @@ remains the same.
124124
125125#### JSON schema component data object
126126
127- A [ ` ComponentData ` ] ( #json-schema-component-data-object ) object is either a
128- [ ` HomogeneousComponentData ` ] ( #json-schema-homogeneous-component-data-object ) object or an
129- [ ` InhomogeneousComponentData ` ] ( #json-schema-inhomogeneous-component-data-object ) object
127+ A [ ` ComponentData ` ] ( #json-schema-component-data-object ) represents the data of a single component instance.
130128
131129- [ ` ComponentData ` ] ( #json-schema-component-data-object ) :
132- [ ` HomogeneousComponentData ` ] ( #json-schema-homogeneous-component-data-object ) |
133- [ ` InhomogeneousComponentData ` ] ( #json-schema-inhomogeneous-component-data-object )
130+ [ ` DenseComponentData ` ] ( #json-schema-component-data-object-dense-representation ) |
131+ [ ` SparseComponentData ` ] ( #json-schema-component-data-object-sparse-representation )
132+
133+ #### JSON schema component data object (dense representation)
134134
135- #### JSON schema homogeneous component data object
135+ A [ ` DenseComponentData ` ] ( #json-schema-component-data-object-dense-representation ) object
136+ stores values in a fixed positional order defined by the ` attributes ` field in the root object.
136137
137- A [ ` HomogeneousComponentData ` ] ( #json-schema-homogeneous- component-data-object ) object contains the actual values of a
138- certain component following the exact order of the attributes listed in the [ ` attributes ` ] ( #json-schema-root-object )
139- field in the [ ` PowerGridModelRoot ` ] ( #json-schema-root-object ) object .
138+ - [ ` DenseComponentData ` ] ( #json-schema-component-data-object-dense-representation ) : ` Array `
139+ - [ ` AttributeValue ` ] ( #json-schema-attribute-value ) : values in the exact order defined by the component's attribute
140+ list .
140141
141- - [ ` HomogeneousComponentData ` ] ( #json-schema-homogeneous-component-data-object ) : ` Array `
142- - [ ` AttributeValue ` ] ( #json-schema-attribute-value ) : the value of each attribute.
142+ #### JSON schema component data object (sparse representation)
143143
144- #### JSON schema inhomogeneous component data object
144+ A [ ` SparseComponentData ` ] ( #json-schema-component-data-object-sparse-representation ) object
145+ stores values grouped by attribute.
145146
146- An [ ` InhomogeneousComponentData ` ] ( #json-schema-inhomogeneous-component-data-object ) object contains actual values per
147- attribute of a certain component.
148- Contrary to the [ ` HomogeneousComponentData ` ] ( #json-schema-homogeneous-component-data-object ) , it lists the names of the
149- attributes for which the values are specified, so the attributes may be in arbitrary order and do not have to follow the
150- schema listed in the [ ` attributes ` ] ( #json-schema-root-object ) field in the
151- [ ` PowerGridModelRoot ` ] ( #json-schema-root-object ) object.
147+ Unlike [ ` DenseComponentData ` ] ( #json-schema-component-data-object-dense-representation ) ,
148+ it explicitly stores attribute names, allowing attributes to appear in arbitrary order and vary between components or
149+ scenarios.
152150
153- - [ ` InhomogeneousComponentData ` ] ( #json-schema-inhomogeneous- component-data-object ) : ` Object `
154- - [ ` Attribute ` ] ( #json-schema-attribute ) : [ ` AttributeValue ` ] ( #json-schema-attribute-value ) : the value of each attribute
155- per attribute.
151+ - [ ` SparseComponentData ` ] ( #json-schema-component-data-object-sparse-representation ) : ` Object `
152+ - [ ` Attribute ` ] ( #json-schema-attribute ) :
153+ [ ` AttributeValue ` ] ( #json-schema- attribute-value )
156154
157155#### JSON schema attribute value
158156
@@ -255,11 +253,11 @@ The type is listed for each attribute in [Components](components.md).
255253
256254The following example contains an input dataset.
257255The nodes and sym_loads are represented using
258- [ ` HomogeneousComponentData ` ] ( #json-schema-homogeneous- component-data-object ) ,
259- the lines are represented using [ ` InomogeneousComponentData ` ] ( #json-schema-inhomogeneous- component-data-object ) ,
256+ [ ` DenseComponentData ` ] ( #json-schema-component-data-object-dense-representation ) ,
257+ the lines are represented using [ ` SparseComponentData ` ] ( #json-schema-component-data-object-sparse-representation ) ,
260258while the sources are represented using a mixture of
261- [ ` HomogeneousComponentData ` ] ( #json-schema-homogeneous- component-data-object ) and
262- [ ` InomogeneousComponentData ` ] ( #json-schema-inhomogeneous- component-data-object ) .
259+ [ ` DenseComponentData ` ] ( #json-schema-component-data-object-dense-representation ) and
260+ [ ` SparseComponentData ` ] ( #json-schema-component-data-object-sparse-representation ) .
263261
264262``` json
265263{
0 commit comments