.TransiEnt.Grid.Electrical.GridConnector.Components.MatrixListIndexMap

Information

1. Purpose of model

This function is used to map connection lines between nodes of a grid defined in a matrix into a loopable connection list

Application example: electrical transmission lines between superstructures in TransmissionGrid_ConnectionMatrix:


parameter Integer connectMatrix[nRegions,nRegions]=[0,1,2,1; 3,0,2,1; 1,3,0,1; 2,0,2,0] "Definition of connections between regions. Multiple transmission line between regions are possible";

final parameter Integer nTL = sum(connectMatrix) "number of transmission lines";

final parameter Integer connectListElectric[nTL,2]= Functions.MatrixListIndexMap(connectMatrix);

equation 

  for i in 1:nTL loop

    connect(epp[connectListElectric[i, 1]], transmissionLine[i].epp_n) annotation (Line(

      points={{-100,0},{-80,0},{-80,16},{-10,16}},

      color={28,108,200},

      thickness=0.5));

    connect(epp[connectListElectric[i, 2]], transmissionLine[i].epp_p) annotation (Line(

      points={{-100,0},{86,0},{86,16},{10,16}},

      color={28,108,200},

      thickness=0.5));

  end for;



2. Level of detail, physical effects considered, and physical insight

(Description)

3. Limits of validity

(Description)

4. Interfaces

  input  Integer matrix[:,:];

  output Integer list[sum(matrix),2];

5. Nomenclature

(no elements)

6. Governing Equations

(no equations)

7. Remarks for Usage

(none)

8. Validation

(no validation or testing necessary)

9. References

(none)

10. Version History

Model created by Aleš Vojáček (vojacek@xrg-simulation.de), 06.09.2021

Interface

function MatrixListIndexMap
  input Integer matrix[:, :];
  output Integer list[sum(matrix), 2];
end MatrixListIndexMap;

Generated at 2025-01-21T19:25:52Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos