Example #1
0
 public Sim_Substation(String Name, double Longitude, double Latitude, Sim_Boundary Parent, Sim_Builder Builder)
 {
     this.Name      = Name;
     this.Longitude = Longitude;
     this.Latitude  = Latitude;
     this.Parent    = Parent;
     this.Owner     = Builder.GetOwner();
     this.ElemGuid  = Guid.NewGuid();
     this.Operator  = Builder.GetOperator();
     this.TEID      = Builder.NextTEID();
 }
Example #2
0
 public Sim_TransformerWinding(string Name, Sim_Transformer Transformer, Sim_Bus Bus, Sim_Company Owner, Sim_Company Operator, bool IsPrimary, Sim_Builder Builder)
 {
     this.Name            = Name;
     this.TEID            = Builder.NextTEID();
     this.Owner           = Owner;
     this.Operator        = Operator;
     this.Bus             = Bus;
     this.IsPrimary       = IsPrimary;
     this.Transformer     = Transformer;
     this.Substation      = Transformer.Substation;
     this.WindingNodeTEID = Builder.NextTEID();
 }
Example #3
0
 public Sim_Load(String Name, Sim_Substation Parent, Sim_Bus Bus, double MW_Est, double MVAR_Est, Sim_Builder Builder)
 {
     this.Substation = Parent;
     this.ElemGuid   = Guid.NewGuid();
     this.Substation.Elements.Add(this);
     this.Name     = Name;
     this.MW_Est   = MW_Est;
     this.MVAR_Est = MVAR_Est;
     this.Owner    = Builder.GetOwner();
     this.Operator = Builder.GetOperator();
     this.TEID     = Builder.NextTEID();
     this.Bus      = Bus;
 }
Example #4
0
 public Sim_Breaker(String Name, Sim_Substation Sub, Sim_Bus NearBus, Sim_Bus FarBus, Sim_Builder Builder, bool Open, bool IsBreaker)
 {
     this.Name       = Name;
     this.ElemGuid   = Guid.NewGuid();
     this.IsBreaker  = IsBreaker;
     this.Substation = Sub;
     this.NearBus    = NearBus;
     this.FarBus     = FarBus;
     this.Owner      = Builder.GetOwner();
     this.Operator   = Builder.GetOperator();
     this.TEID       = Builder.NextTEID();
     this.Open       = Open;
     this.Substation.Elements.Add(this);
 }
Example #5
0
 /// <summary>
 /// Initialize a new transformer
 /// </summary>
 /// <param name="Name"></param>
 /// <param name="Sub"></param>
 /// <param name="MW_Est"></param>
 /// <param name="MVAR_Est"></param>
 /// <param name="Bus1"></param>
 /// <param name="Bus2"></param>
 /// <param name="Builder"></param>
 public Sim_Transformer(String Name, Sim_Substation Sub, double MW_Est, double MVAR_Est, Sim_Bus Bus1, Sim_Bus Bus2, Sim_Builder Builder)
 {
     this.Name       = Name;
     this.Substation = Sub;
     this.ElemGuid   = Guid.NewGuid();
     this.Substation.Elements.Add(this);
     this.Owner    = Builder.GetOwner();
     this.Operator = Builder.GetOperator();
     this.MW_Est   = MW_Est;
     this.MVAR_Est = MVAR_Est;
     this.TEID     = Builder.NextTEID();
     this.Winding1 = new Sim_TransformerWinding(Name + "_1", this, Bus1, Owner, Operator, true, Builder);
     this.Winding2 = new Sim_TransformerWinding(Name + "_2", this, Bus2, Owner, Operator, false, Builder);
 }
 public Sim_ShuntCompensator(String Name, Sim_Substation Sub, Sim_Bus Bus, bool Open, double MVAR_Est, double MVAR_Nominal, bool IsCapacitor, Sim_Builder Builder)
 {
     this.Name         = Name;
     this.Substation   = Sub;
     this.Bus          = Bus;
     this.Owner        = Builder.GetOwner();
     this.Operator     = Builder.GetOperator();
     this.TEID         = Builder.NextTEID();
     this.Open         = Open;
     this.Nominal_MVAR = MVAR_Nominal;
     Sub.Elements.Add(this);
     this.Estimated_MVAR = MVAR_Est;
     this.IsCapacitor    = IsCapacitor;
     this.ElemGuid       = Guid.NewGuid();
 }
Example #7
0
 /// <summary>
 /// Initialize our bus
 /// </summary>
 /// <param name="Sub"></param>
 /// <param name="BusNumber"></param>
 /// <param name="Name"></param>
 /// <param name="PerUnitVoltage"></param>
 /// <param name="Builder"></param>
 public Sim_Bus(Sim_Substation Sub, int BusNumber, String Name, double PerUnitVoltage, Sim_Builder Builder)
 {
     this.ElemGuid       = Guid.NewGuid();
     this.Name           = Name;
     this.Substation     = Sub;
     this.Voltage        = Builder.GetVoltage();
     this.PerUnitVoltage = PerUnitVoltage;
     this.Substation.Elements.Add(this);
     this.BusNumber = BusNumber;
     this.Owner     = Builder.GetOwner();
     this.ElemGuid  = Guid.NewGuid();
     this.NodeGuid  = Guid.NewGuid();
     this.Operator  = Builder.GetOperator();
     this.TEID      = Builder.NextTEID();
     this.NodeTEID  = Builder.NextTEID();
 }
Example #8
0
 public Sim_Unit(String Name, Sim_Bus Bus, Sim_Substation Parent, Sim_UnitType UnitType, double MW_Est, double MVAR_Est, double PercentageCapacity, Sim_Builder Builder)
 {
     this.Substation = Parent;
     this.Substation.Elements.Add(this);
     this.ElemGuid = Guid.NewGuid();
     this.Name     = Name;
     this.UnitType = UnitType;
     this.MW_Est   = MW_Est;
     this.MVAR_Est = MVAR_Est;
     this.LMP      = Builder.NextRandom(2, 50);
     this.MVA_Est  = Math.Round(Math.Sqrt(MW_Est * MW_Est + MVAR_Est * MVAR_Est));
     this.Capacity = this.MW_Est / PercentageCapacity;
     this.TEID     = Builder.NextTEID();
     this.UnitTEID = Builder.NextTEID();
     this.Owner    = Builder.GetOwner();
     this.Operator = Builder.GetOperator();
     this.Bus      = Bus;
 }
Example #9
0
 public Sim_Line(Sim_Substation From, Sim_Substation To, List <Sim_Line> Lines, Sim_Builder Builder, double MW_Est, double MVAR_Est, double LineLoading)
 {
     this.ElemGuid       = Guid.NewGuid();
     this.From           = From;
     this.To             = To;
     this.Name           = "Line" + Lines.Count.ToString("000");
     this.MW_Est         = MW_Est;
     this.MVAR_Est       = MVAR_Est;
     this.MVA_Est        = Math.Sqrt(MW_Est * MW_Est + MVAR_Est * MVAR_Est);
     this.NormalLimit    = this.MVA_Est / LineLoading;
     this.EmergencyLimit = this.NormalLimit + Builder.Randomizer.Next(10);
     this.LoadshedLimit  = this.EmergencyLimit + Builder.Randomizer.Next(10);
     this.Owner          = Builder.GetOwner();
     this.Operator       = Builder.GetOperator();
     this.TEID           = Builder.NextTEID();
     this.From.Elements.Add(this);
     this.To.Elements.Add(this);
     this.NearBus = From.FindBus(Builder);
     this.FarBus  = To.FindBus(Builder, this.NearBus.Voltage);
 }