The AngleMonitoringResult object contains all the relevant results of the angle monitoring algorithm.

JSON import & export

The AngleMonitoringResult can be written to and read from a JSON file.
Example:

// Export
AngleMonitoringResult angleMonitoringResult = ...
OutputStream os = ...
new AngleMonitoringResultExporter().export(angleMonitoringResult, os);

// Import
InputStream is = ...
Crac crac = ...
AngleMonitoringResult angleMonitoringResult2 =new AngleMonitoringResultImporter().importAngleMonitoringResult(is, crac);

Contents

The AngleMonitoringResult object contains the results of the angle monitoring algorithm.

Status

The AngleMonitoringResult describes the security status of the network in regard to the angle constraints defined in the CRAC:

  • SECURE: the network is secure; no angle thresholds are violated
  • UNSECURE: the network is not secure; at least one angle CNEC has an angle constraint
  • DIVERGENT: the load-flow computation diverged; angle monitoring could not be run normally
  • UNKNOWN: the angle monitoring failed for any other reason
// get the overall status (one of 4 values above)
public Status getStatus()

// know which value it has
public boolean isSecure()
public boolean isUnsecure()
public boolean isDivergent()
public boolean isUnknown()

Example:

{
  "type": "ANGLE_MONITORING_RESULT",
  "status": "SECURE",
  ...
}

Applied CRAs

Since the angle monitoring [algorithm]{#algorithm} can apply CRAs, these methods detail which ones were selected.

(see states, network actions, re-dispatch network actions)

// get activated network actions for each state
public Map<State, Set<NetworkAction>> getAppliedCras()

// get activated network actions for a given state
public Set<NetworkAction> getAppliedCras(State state)

// get activated network action IDs for a given state ID
public Set<String> getAppliedCras(String stateId)

Example:

"applied-cras": [
    {
      "instant": "curative",
      "contingency": "co1",
      "remedial-actions": [
        "na2"
      ]
    },
    {
      "instant": "preventive",
      "remedial-actions": [
        "na1"
      ]
    }
  ]

Angle values

The following methods return the angle values for angle CNECs after applying angle CRAs.

// get the angle value for a given CNEC, and a given angle unit
public double getAngle(AngleCnec angleCnec, Unit unit)

// get all angle results (an AngleResult contains an AngleCnec and its angle value)
public Set<AngleResult> getAngleCnecsWithAngle()

Example:

  "angle-cnec-quantities-in-degrees": [
    {
      "instant": "preventive",
      "cnec-id": "ac1",
      "quantity": 2.3
    },
    {
      "instant": "curative",
      "contingency": "co1",
      "cnec-id": "ac2",
      "quantity": 4.6
    }
  ]

Printing the result

You can get a human-readable report of the angle monitoring algorithm, using the following method of the AngleMonitoringResult object:

public List<String> printConstraints()

Complete JSON example

{
  "type": "ANGLE_MONITORING_RESULT",
  "status": "SECURE",
  "angle-cnec-quantities-in-degrees": [
    {
      "instant": "preventive",
      "cnec-id": "ac1",
      "quantity": 2.3
    },
    {
      "instant": "curative",
      "contingency": "co1",
      "cnec-id": "ac2",
      "quantity": 4.6
    }
  ],
  "applied-cras": [
    {
      "instant": "curative",
      "contingency": "co1",
      "remedial-actions": [
        "na2"
      ]
    },
    {
      "instant": "preventive",
      "remedial-actions": [
        "na1"
      ]
    }
  ]
}