Learn R Programming

antaresRead (version 2.9.2)

readBindingConstraints: Read binding constraints

Description

Antares API OK [Experimental]

This function reads the binding constraints of an Antares project.

Be aware that binding constraints are read in the input files of a study. So they may have changed since a simulation has been run.

Usage

readBindingConstraints(
  opts = simOptions(),
  with_time_series = TRUE,
  constraint_names = NULL
)

Value

An object of class bindingConstraints. This object is also a named list with 3 sections per read constraint.

Arguments

opts

list of simulation parameters returned by the function setSimulationPath

with_time_series

boolean if TRUE, the second member time series are read

constraint_names

str constraint names to filter on

Warning

Since release 2.7.0 the structure of the returned object has evolved for all versions of study Antares:

  • .ini parameters are in section properties

  • Coefficients links or thermal are in section coefs

  • Values are already in section values

Examples

Run this code
if (FALSE) {
setSimulationPath()

constraints <- readBindingConstraints()

# read properties
constraints$properties

# read coefs
constraints$coefs

# read values
constraints$values
  # both case ( study Antares >=8.7.0)
constraints$values$less
constraints$values$greater

# display equation (only for study Antares <8.7.0)
summary(constraints)

# read binding constraints without the time series
readBindingConstraints(opts = simOptions(), with_time_series = FALSE)
}

Run the code above in your browser using DataLab