public void UpdateJumpVerWei(double jgbWei, List <ElecCalsWorkCondition> anWeathComm) { foreach (var nameWd in WireWorkConditionNames) { var wea = JmWireData.WeatherParas.WeathComm.Where(item => item.Name == nameWd).FirstOrDefault(); var anWea = anWeathComm.Where(item => item.Name == nameWd).FirstOrDefault(); var iceThick = Math.Max(wea == null ? 0 : wea.IceThickness, anWea == null ? 0 : anWea.IceThickness); double rslt = JumpVerWei(JumpStr.Weight, JumpStr.PieceNum, JumpStr.LNum, JumpStr.GoldPieceNum, JumpStr.SuTubleLen, JumpStr.SoftLineLen, JumpStr.JGBNum, iceThick, JmWireData.Wei, JmWireData.Dia, jgbWei, JmWireData.DevideNum, JumpStr.SuTubleWei, JumpStr.SuTubleDia, out string str); int index = LoadList.FindIndex(item => item.GKName == nameWd); if (index < 0) { LoadList.Add(new LoadThrDe() { GKName = nameWd, JumpVerWei = rslt, JumpVerWeiStr = str, }); } else { LoadList[index].JumpVerWei = rslt; LoadList[index].JumpVerWeiStr = str; } } }
public virtual void UpdateLoStr(double secInc, double constrError, double isntallError, double extendPara) { foreach (var nameWd in WireWorkConditionNames) { double rslt; string str; if (nameWd != "安装情况") { rslt = LoStr(out str, secInc, WireData.DevideNum, WireData.YLTableXls[nameWd], WireData.Sec, constrError); } else { rslt = LoStr(out str, secInc, WireData.DevideNum, WireData.YLTableXls[nameWd], WireData.Sec, isntallError, extendPara); } int index = LoadList.FindIndex(item => item.GKName == nameWd); if (index < 0) { LoadList.Add(new LoadThrDe() { GKName = nameWd, LoStr = rslt, LoStrStr = str, }); } else { LoadList[index].LoStr = rslt; LoadList[index].LoStrStr = str; } } }
public void UpdateVerWei(double weiInc, int numJGB, double weiJGB, int numFZ, double weiFZ) { foreach (var nameWd in WireWorkConditionNames) { var wea = WireData.WeatherParas.WeathComm.Where(item => item.Name == nameWd).FirstOrDefault(); double iceThick = wea == null ? 0 : wea.IceThickness; var laod = LoadList.Where(item => item.GKName == nameWd).FirstOrDefault(); double verSpan = laod == null ? 0 : laod.VetiSpan; double rslt = VerWei(weiInc, WireData.DevideNum, WireData.BzDic[nameWd].VerHezai, verSpan, StrLoad[nameWd].VerLoad, numJGB, weiJGB, weiFZ, iceThick, numFZ, HangStr.DampLength, WireData.bGrd, out string str); int index = LoadList.FindIndex(item => item.GKName == nameWd); if (index < 0) { LoadList.Add(new LoadThrDe() { GKName = nameWd, VerWei = rslt, VerWeiStr = str, }); } else { LoadList[index].VerWei = rslt; LoadList[index].VerWeiStr = str; } } }
protected void SetLoadList(List <Load> loadList) { LoadList.Clear(); foreach (Load load in loadList) { LoadList.Add(load); } }
public virtual bool TakeLoad(Load load) { if (GetLoadsWeight() + load.Weight > CarryingCapacity) { return(false); } else { if (load is SpoiledLoad) { double lostCapacity = BatteryCapacity * 0.005; BatteryCapacity -= lostCapacity; } LoadList.Add(load); return(true); } }
public override void UpdateHorFor(double diaInc) { foreach (var nameWd in WireWorkConditionNames) { double rslt = HorFor(diaInc, WireData.DevideNum, SpaceStr.HorSpan, HangStr.DampLength, WireData.BzDic[nameWd].WindHezai, StrLoad[nameWd].WindLoad, out string str); int index = LoadList.FindIndex(item => item.GKName == nameWd); if (index < 0) { LoadList.Add(new LoadThrDe() { GKName = nameWd, HorFor = rslt, HorForStr = str, }); } else { LoadList[index].HorFor = rslt; LoadList[index].HorForStr = str; } } }
public void UpdateJumpHorFor() { foreach (var nameWd in WireWorkConditionNames) { double rslt = JumpHorFor(JumpStrLoad[nameWd].JumpStrWindLoad, JumpStrLoad[nameWd].JumpWindLoad, JumpStrLoad[nameWd].SuTubleWindLoad, JmWireData.DevideNum, out string str); int index = LoadList.FindIndex(item => item.GKName == nameWd); if (index < 0) { LoadList.Add(new LoadThrDe() { GKName = nameWd, JumpHorFor = rslt, JumpHorForStr = str, }); } else { LoadList[index].JumpHorFor = rslt; LoadList[index].JumpHorForStr = str; } } }
/// <summary> /// 计算垂直档距 /// </summary> /// public void UpdateVertialSpan() { foreach (var nameWd in WireWorkConditionNames) { //这儿比载excel中用的是孤立档应力,用的是普通档应力 double rslt = VerticalSpan(SpaceStr.Span, SpaceStr.SubHei, WireData.YLTableXls[nameWd], WireData.BzDic[nameWd].BiZai, out string str); int index = LoadList.FindIndex(item => item.GKName == nameWd); if (index < 0) { LoadList.Add(new LoadThrDe() { GKName = nameWd, VetiSpan = rslt, VetiSpanStr = str, }); } else { LoadList[index].VetiSpan = rslt; LoadList[index].VetiSpanStr = str; } } }