.AixLib.ThermalZones.ReducedOrder.Multizone.BaseClasses.SumCondition

Information

Returns the sum of entries of a vector and their share if a condition is true.

Inputs:

  1. Vector
  2. Condition (vector with boolean values)
  3. Dimension (dimension of vectors)

Output:

  1. Sum of vector elements where condition is true
  2. Share of vector elements where condition is true

Interface

function SumCondition
  input Real vector[dimension] "Input vector";
  input Boolean condition[dimension] "Vector of conditions";
  input Integer dimension "Dimension of inputs";
  output Real vectorSum = 0 "Sum of vector elements where condition is true";
  output Real vectorShare[dimension] "Share of vector elements where condition is true, entries with conditon is
      false are set to zero";
end SumCondition;

Generated at 2024-12-22T19:25:51Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos