28 lines
837 B
C#
28 lines
837 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace HydraulicSimulator.Models
|
|
{
|
|
/// <summary>
|
|
/// Rama - Pure data container para TSNet
|
|
/// NO realiza cálculos hidráulicos - solo almacena propiedades para generación INP
|
|
/// </summary>
|
|
public class Branch
|
|
{
|
|
public string N1 { get; set; }
|
|
public string N2 { get; set; }
|
|
public List<Element> Elements { get; set; }
|
|
public string Name { get; set; }
|
|
public double Q { get; set; } = 0.0; // caudal actual (signo n1->n2)
|
|
|
|
public Branch(string n1, string n2, List<Element> elements, string name = "")
|
|
{
|
|
N1 = n1;
|
|
N2 = n2;
|
|
Elements = new List<Element>(elements);
|
|
Name = string.IsNullOrEmpty(name) ? $"{n1}->{n2}" : name;
|
|
}
|
|
}
|
|
}
|