public override void SetProperty(Property property) { switch (property.Id) { case ModelCode.ENERGYCONSUMER_GROUNDED: grounded = (WindingConnection)property.AsEnum(); break; case ModelCode.ENERGYCONSUMER_PHASECONNECTION: phaseConnection = (PhaseShuntConnectionKind)property.AsEnum(); break; case ModelCode.ENERGYCONSUMER_PFIXED: pFixed = property.AsFloat(); break; case ModelCode.ENERGYCONSUMER_PFIXEDPCT: pFixedPct = property.AsFloat(); break; case ModelCode.ENERGYCONSUMER_QFIXED: qFixed = property.AsFloat(); break; case ModelCode.ENERGYCONSUMER_QFIXEDPCT: qFixedPct = property.AsFloat(); break; default: base.SetProperty(property); break; } }
public ShuntCompensator(DataRow data) : base(data) { b = (float)data["b"]; b0 = (float)data["b0"]; c = (float)data["c"]; c0 = (float)data["c0"]; grounded = (bool)data["Grounded"]; //I think this should work like converting from an int - I will check to make sure phaseConnection = (PhaseShuntConnectionKind)data["phaseConnection"]; }
public TransformerEnd(DataRow data, PowerTransformer parent) : base(data) { parentTransformer = parent; BaseKV = (float)(double)data["BaseKV"]; r = (float)(double)data["R"]; x = (float)(double)data["X"]; g = (float)(double)data["G"]; r0 = (float)(double)data["R0"]; g0 = (float)(double)data["G0"]; x0 = (float)(double)data["X0"]; ConnectionType = (PhaseShuntConnectionKind)Enum.Parse ( typeof(PhaseShuntConnectionKind), (string)data["phaseConnection"], true ); equipmentType = EquipmentTopoTypes.Shunt; }
public EnergyConsumer(DataRow objFields) : base(objFields) { qfixed = (float)(double)objFields["qFixed"]; pfixed = (float)(double)objFields["pFixed"]; loadResponseName = (string)objFields["LoadResponse"]; equipmentType = EquipmentTopoTypes.Shunt; phaseConnection = (PhaseShuntConnectionKind)Enum.Parse ( typeof(PhaseShuntConnectionKind), (string)objFields["phaseConnection"], true ); }