PlugToPins_n

model PlugToPins_n "Connect all (negative) pins"
    parameter Integer m(final min = 1) = 3 "number of phases";
    Interfaces.NegativePlug plug_n(final m = m) annotation (Placement(transformation(extent = {
        {-30, -10}, 
        {-10, 10}})));
    QuasiStationary.SinglePhase.Interfaces.NegativePin pin_n[m] annotation (Placement(transformation(extent = {
        {10, -10}, 
        {30, 10}})));
    PlugToPin_n plugToPin_n[m](each final m = m, final k = {j for j in 1:m}) annotation (Placement(transformation(extent = {
        {-10, -10}, 
        {10, 10}})));
equation
    for j in 1:m loop
        connect(plug_n,plugToPin_n[j].plug_n);
        connect(plugToPin_n[j].pin_n,pin_n[j]);
    end for;

    annotation (
        defaultComponentName = "plugToPins",
        Icon(graphics = {
            Rectangle(
                extent = {
                    {-20, 20}, 
                    {40, -20}},
                fillColor = {170, 255, 255},
                fillPattern = FillPattern.Solid), 
            Ellipse(
                extent = {
                    {-40, 20}, 
                    {0, -20}},
                fillColor = {170, 255, 255},
                fillPattern = FillPattern.Solid), 
            Text(
                extent = {
                    {-150, 50}, 
                    {150, 90}},
                textString = "%name",
                lineColor = {0, 0, 255})}),
        Documentation(info = "<html>\n<p>\nConnects all <code>m</code> single phase (negative) pins of the multi phase (negative) plug to an array of <code>m</code> single phase (negative) pins.\n</p>\n<h4>See also</h4>\n<p>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.PlugToPin_p\">PlugToPin_p</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.PlugToPin_n\">PlugToPin_n</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.PlugToPins_p\">PlugToPins_p</a>\n</p>\n</html>"));
end PlugToPins_n;