示例#1
0
        public override void SetCalculatedInfo()
        {
            int _posNet = SystemGrid.MainGrid[PinPos].Net;
            int _NegNet = SystemGrid.MainGrid[PinNeg].Net;

            double vP = _posNet > 0 ? SystemGrid.solutionMatrix[_posNet - 1] : 0;
            double vN = _NegNet > 0 ? SystemGrid.solutionMatrix[_NegNet - 1] : 0;

            VoltageAccross = vP - vN;
            Console.WriteLine("Voltage: " + VoltageAccross.ToString());
        }
示例#2
0
 public override void UpdateValues()
 {
     VoltageAccross += (CurrentThrough / PrimaryValue) * SystemGrid.TimeSpace;
     Console.WriteLine("Voltage: " + VoltageAccross.ToString());
     Console.WriteLine("Current " + CurrentThrough.ToString());
 }
示例#3
0
 /// <summary>
 /// Each component provides additional information
 /// </summary>
 /// <returns>a string of their calculated vales</returns>
 public virtual string GetCalculatedInfo()
 {
     return(VoltageAccross.ToString() + " " + CurrentThrough.ToString());
 }