Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Datatypes

Txy

The Txy datatype is used for Break point series and includes the following input. The parameters in bold are required, one of the two parameters in italics are required and the others are optional.

Txy datatype

ParameterTypeDescription
timestampsarray of stringsArray of timestamps. Local timezone.
scenariosarray of doubleThe array must be the same size as timestaps. The scenario values are active at the time specified in corresponding timestamps
external_referencetakes attributesReference to external data on formats hdf5, sqlite and csv. Attributes: “type”, “filename”, “path”, optional
namestring, optionalOptional object name
#commentstring, optionalOptional comment.
unitstring, optionalOptional string for the unit type. Can be anything. Some examples are “NOK”, “SEK”, “MWh”.

Example usage of Txy for a dc-line

Example

"forward_capacity": {
    "timestamps": [
        "2024-01-01T00:00:00Z"
    ],
    "scenarios": [
        [
            20
        ]
    ]
}

Txy special cases

Two special cases exists for Txy datatype.

Example of optional scenarios can be found here: Time in the LtmApi.

Example for setting a constant value with optional timestamps is shown below.

Constant value Txy for a dc-line

Example

"forward_capacity": {
    "scenarios": [
        [
            20
        ]
    ]
}

TxyLin

It is recommend to the read the LTM-core documentation for the piecewise linear Time dependent constraints.

The TxyLin datatype is used for specifying Time dependent piecewise linear constraints. TxyLin input is idential to the Txy, but the datapoints are linearised in the LTM-core (unlike the Txy datatype = break points series).

The TxyLin datatype are used for the constaints:

and for specifying the: - reference_curve

TxyLin value-pairs in the TxyLin datatype referes to points which are used for linearisation, these points must be specified correctly, thus a stricter handling of the the TxyLin datatype than the Txy datatype is necessary.

TxyLin requirements:

It is possible to set a constant value for the TxyLin datatype similar to Txy. The timestamp must start at or before the data_period start. A constant value means no linearisation!

Using external_reference

Supported types are internal, hdf5, sqlite and csv. Any other type will generate an error with the following description:

Could not assign external_datatype from value 'does_not_exist'.
Value is unrecognized. Known values are 'csv, hdf5, internal, sqlite'

Examples:

"external_reference": {
    "type": "hdf5",
    "filename": "path/source.hdf5",
    "path": "internal/hdf5/path"
}
"external_reference": {
    "type": "sqlite",
    "filename": "sqlite.db",
    "path": "table_name"
}
"external_reference": {
    "type": "csv",
    "filename": "path/timeseriesdata.csv"
}

External reference points to external timeseries data and will only be loaded when writing LTM files to disk.

xy

The xy datatype includes the following input. The parameters in bold are required.

xy datatype

ParameterTypeDescription
xarray of doubleArray of x with a functional relationship with y
yarray of doubleArray of y must have the same size as x. y-value for a given x-value.

water_value_weights

The water_value datatype used on area objects for user specification of water value weights (water_value_weights) is optional and specialist settings.

The water_value_weights includes the following input. The parameters in bold are required and the others are optional.

water_value datatype

ParameterTypeDescription
weightsArray of a pair of int, array of doubleThe int of the pair is the week number and the array of double of the pair contains the weights
inflow_conditionsintSpecifies the number of inflow states
"areas": [
      {
          "name": "numedal"
      },
      {
          "#comment": "water_value_manual_weights",
          "name": "test_102",
          "water_value_weights":{
              "inflow_conditions": 1,
              "weights":[
                  [18, [1.0, 5.0, 9.0, 20.0, 9.0, 5.0, 1.0]],
                  [40, [1.0, 5.0, 9.0, 20.0, 9.0, 5.0, 1.0]],
                  [70, [1.0, 5.0, 9.0, 20.0, 9.0, 5.0, 1.0]]
              ]
          }
      }
  ]

reservoir_type

The reservoir_type are used on the Reservoir objects to select the type of reservoir. The options are “BUFFER” or “REGULATION” reservoirs. The buffer and regulation reservoirs are described Reservoir types.

"reservoirs": [
        {
            "name": "upper_main",
            "max_volume": 100.0,
            "average_energy_equivalent": 0.5,
            "reservoir_type": "REGULATION",
            "regulated_inflow_name": "ten",
            "average_regulated_inflow": 200.0,
            "max_discharge": 70.3,
            "reference_curve": {
                "timestamps": [
                    "2023-04-24T00:00:00Z",
                    "2023-10-02T00:00:00Z",
                    "2023-12-11T00:00:00Z"
                ],
                "scenarios": [
                    [
                        20.0,
                        85.0,
                        75.0
                    ]
                ]
            }
        }
    ]

feedback_factors

The feedback_factors are used on area objects for user specification of area feedback factors and they are optional. The feeback factors are used for EMPS model strategy and calibration of the EMPS model in the strategy phase.

The feedback_factors includes the following input. The parameters in bold are required and the others are optional. The parameter feedback_factor is more commonly used than the form_factor and the flexibility_factor.

feedback_factors

ParameterTypeDescription
feedback_factorTxyAdjusts the area load (firm power). Increase the feedback factor to increase the simulated reservoir levels for an area and vice versa.
form_factorTxyAdjusts the area load (firm power). Determines the annual distribution of the load. A factor > 1.0 increases the winter load and decreases the summer load and vice versa.
flexibility_factorTxyAdjusts occasional market. A small scaling factor will shrink the supply/demand curve, leading to denser iso-price curves and thus fewer possible outcomes for simulated reservoir development.
inflow_conditionsintSpecifies the number of inflow states
#commentstring, optionalOptional comment.
"areas": [
    {
        "name": "test",
        "feedback_factors": {
            "feedback_factor": {
                "start_week_values": {
                    "timestamps": [
                        "2000-01-02T00:00:00Z"
                    ],
                    "scenarios": [
                        [
                            1.95
                        ]
                    ]
                }
            },
            "form_factor": {
                "start_week_values": {
                    "timestamps": [
                        "2000-01-02T00:00:00Z"
                    ],
                    "scenarios": [
                        [
                            2.65
                        ]
                    ]
                }
            },
            "flexibility_factor": {
                "start_week_values": {
                    "timestamps": [
                        "2000-01-02T00:00:00Z"
                    ],
                    "scenarios": [
                        [
                            3.65
                        ]
                    ]
                }
            },
            "conversion_limit": {
                "normal_value": 4.43,
                "value": 4.67
            },
            "artificial_minimum_production": 1.4
        }
    }
]