def from_txt(cls, f): Descr_val = read_string(f) Vers_val = read_float(f) SrtMd_val = read_integer(f) KldTypDim = get_diap(f) KldTyp_dim = KldTypDim[1][0] - KldTypDim[0][0] + 1 KldTyp_val = [None for j in range(KldTyp_dim)] for i in range(KldTyp_dim): KldTyp_val[i] = read_string(f) Rsrv1_val = read_integer(f) Rsrv2_val = read_float(f) Rsrv3_val = read_float(f) Rsrv4_val = read_float(f) rez = cls(Descr=Descr_val, Vers=Vers_val, SrtMd=SrtMd_val, KldTyp=KldTyp_val, Rsrv1=Rsrv1_val, Rsrv2=Rsrv2_val, Rsrv3=Rsrv3_val, Rsrv4=Rsrv4_val) rez.save() return rez
def from_txt(cls, f): CvID_val = read_integer(f) CvMvg_val = read_integer(f) CvQf_val = read_float(f) rez = cls(CvID=CvID_val, CvMvg=CvMvg_val, CvQf=CvQf_val) return rez
def from_txt(cls, f): VarNo_val = read_integer(f) Catg_val = read_integer(f) LcmFl_val = read_string(f) LcmNam_val = read_string(f) Mloc_val = read_float(f) CctID_val = read_integer(f) Qcoct_val = read_integer(f) Qtr_val = read_integer(f) Ltr_val = read_integer(f) DTc_val = read_float(f) ToStrt_val = read_integer(f) rsrvTj1_val = read_integer(f) rsrvTj2_val = read_integer(f) StHom_val = read_integer(f) StEnd_val = read_integer(f) Vstrt_val = read_integer(f) Vkon_val = read_integer(f) Kpsi_val = read_float(f) UT_val = read_integer(f) MxPoz_val = read_float(f) DPoz_val = read_float(f) SpdZn_val = read_integer(f) OptVbg_val = read_boolean(f) UsRecp_val = read_boolean(f) UsMxRcp_val = read_boolean(f) StOstDim = get_diap(f) i_max = StOstDim[1][0] - StOstDim[0][0] + 1 j_max = StOstDim[1][1] - StOstDim[0][1] + 1 StOst_val = [[0.0 for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): StOst_val[i][j] = read_integer(f) rez = cls(VarNo=VarNo_val, Catg=Catg_val, LcmFl=LcmFl_val, LcmNam=LcmNam_val, Mloc=Mloc_val, CctID=CctID_val, Qcoct=Qcoct_val, Qtr=Qtr_val, Ltr=Ltr_val, DTc=DTc_val, ToStrt=ToStrt_val, rsrvTj1=rsrvTj1_val, rsrvTj2=rsrvTj2_val, StHom=StHom_val, StEnd=StEnd_val, Vstrt=Vstrt_val, Vkon=Vkon_val, Kpsi=Kpsi_val, UT=UT_val, MxPoz=MxPoz_val, DPoz=DPoz_val, SpdZn=SpdZn_val, OptVbg=OptVbg_val, UsRecp=UsRecp_val, UsMxRcp=UsMxRcp_val, StOst=StOst_val) rez.save() return rez
def from_txt(cls, f): Comment_val = read_string(f) UFile_val = read_string(f) UVersFl_val = read_integer(f) TVersFl_val = read_integer(f) TVersPrg_val = read_float(f) DTj_val = read_float(f) TstrtKm_val = read_float(f) TskExc_val = read_integer(f) mVar_val = read_integer(f) mTcb_val = read_integer(f) WdirO_val = read_string(f) rsrvT1_val = read_string(f) rsrvT2_val = read_string(f) rsrvT3_val = read_float(f) rsrvT4_val = read_integer(f) rez = cls( Comment= Comment_val, UFile=UFile_val, UVersFl=UVersFl_val, TVersFl=TVersFl_val, TVersPrg=TVersPrg_val, DTj=DTj_val, TstrtKm=TstrtKm_val, TskExc=TskExc_val, mVar=mVar_val, mTcb=mTcb_val, WdirO=WdirO_val, rsrvT1=rsrvT1_val, rsrvT2=rsrvT2_val, rsrvT3=rsrvT3_val, rsrvT4=rsrvT4_val ) rez.save() return rez
def from_txt(cls, f): PozNam_val = read_string(f) MxXap_val = read_integer(f) ExapDim = get_diap(f) i_max = ExapDim[1][0] - ExapDim[0][0] + 1 j_max = ExapDim[1][1] - ExapDim[0][1] + 1 Exap_val = [[0.0 for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): Exap_val[i][j] = read_float(f) rez = cls(PozNam=PozNam_val, MxXap=MxXap_val, Exap=Exap_val) return rez
def from_txt(cls, f): CatgNam_val = read_string(f) PutSpec_val = read_integer(f) RsrvC1_val = read_float(f) TrTYPDim = get_diap(f) i_max = TrTYPDim[1][0] - TrTYPDim[0][0] + 1 j_max = TrTYPDim[1][1] - TrTYPDim[0][1] + 1 TrTYP_val = [[0 for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): TrTYP_val[i][j] = read_integer(f) rez = cls(CatgNam=CatgNam_val, PutSpec=PutSpec_val, RsrvC1=RsrvC1_val, TrTYP=TrTYP_val) return rez
def from_txt(cls, f): CcID_val = read_integer(f) CcNam_val = read_string(f) CcMvg_val = read_integer(f) CcMos_val = read_integer(f) CcQf_val = read_float(f) CcLf_val = read_float(f) CcKldn_val = read_integer(f) CcKp_val = read_float(f) CcPg_val = read_float(f) CcWoDim = get_diap(f) i_max = CcWoDim[1][0] - CcWoDim[0][0] + 1 j_max = CcWoDim[1][1] - CcWoDim[0][1] + 1 CcWo_val = [[0.0 for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): CcWo_val[i][j] = read_float(f) CcVgMx_val = read_integer(f) CcVgsDim = get_diap(f) CcVgs_dim = CcVgsDim[1][0] - CcVgsDim[0][0] + 1 CcVgs_val = [None for i in range(CcVgs_dim)] for i in range(CcVgs_dim): CcVgs_val[i] = CcVgsSTRUCT.from_txt(f) CcRsv1_val = read_float(f) CcRsv2_val = read_integer(f) rez = cls(CcID=CcID_val, CcNam=CcNam_val, CcMvg=CcMvg_val, CcMos=CcMos_val, CcQf=CcQf_val, CcLf=CcLf_val, CcKldn=CcKldn_val, CcKp=CcKp_val, CcPg=CcPg_val, CcWo=CcWo_val, CcVgMx=CcVgMx_val, CcRsv1=CcRsv1_val, CcRsv2=CcRsv2_val) rez.save() for i in range(CcVgs_dim): CcVgs_val[i].cc = rez CcVgs_val[i].save() if dbg_train: print("CoctavSTRUCT constructor: CcVgs[%d]:\n%s" % (i, CcVgs_val[i])) return rez
def from_txt(cls, f): Nam_val = read_string(f) Kod_val = read_integer(f) Obg_val = read_integer(f) MputPrg_val = read_integer(f) RsrvS1_val = read_integer(f) KmlDim = get_diap(f) i_max = KmlDim[1][0] - KmlDim[0][0] + 1 j_max = KmlDim[1][1] - KmlDim[0][1] + 1 Kml_val = [[0.0 for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): Kml_val[i][j] = read_float(f) rez = cls(Nam=Nam_val, Kod=Kod_val, Obg=Obg_val, MputPrg=MputPrg_val, RsrvS1=RsrvS1_val, Kml=Kml_val) return rez
def from_txt(cls, f): Vers_val = read_float(f) LocmTyp_val = read_string(f) Rdnz_val = read_integer(f) UTnom_val = read_float(f) Comment_val = read_string(f) Rsrv0_val = read_integer(f) Phor_val = read_float(f) DvgNam_val = read_string(f) Ploc_val = read_float(f) Lloc_val = read_float(f) Vloc_val = read_float(f) Pbsm_val = read_float(f) Ibsm_val = read_float(f) MxPoz_val = read_integer(f) lng = get_diap(f) TGxp_dim = lng[1][0] - lng[0][0] + 1 TG_val = [None for j in range(TGxp_dim)] for i in range(TGxp_dim): TG_val[i] = XapSTRUCT_TGxp.from_txt(f) lng = get_diap(f) i_max = lng[1][0] - lng[0][0] + 1 j_max = lng[1][1] - lng[0][1] + 1 k_max = lng[1][2] - lng[0][2] + 1 LocWo_val = [[[0.0 for k in range(k_max)] for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): for k in range(k_max): if dbg_engine: print("LocomSTRUCT constructor: LocWo [%d, %d, %d]" % (i, j, k)) LocWo_val[i][j][k] = read_float(f) lng = get_diap(f) i_max = lng[1][0] - lng[0][0] + 1 Koefs_val = [0.0 for i in range(i_max)] for i in range(i_max): if dbg_engine: print("LocomSTRUCT constructor: Koefs [%d]" % (i)) Koefs_val[i] = read_float(f) Tdop_val = read_float(f) MxTau_val = read_integer(f) lng = get_diap(f) i_max = lng[1][0] - lng[0][0] + 1 j_max = lng[1][1] - lng[0][1] + 1 Tau8_val = [[0.0 for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): if dbg_engine: print("LocomSTRUCT constructor: Tau8_val [%d, %d]" % (i, j)) Tau8_val[i][j] = read_float(f) MxPozRc_val = read_integer(f) lng = get_diap(f) RCxp_dim = lng[1][0] - lng[0][0] + 1 RC_val = [None for j in range(RCxp_dim)] for i in range(RCxp_dim): RC_val[i] = XapSTRUCT_RCxp.from_txt(f) Rsrv1_val = read_integer(f) Rsrv2_val = read_float(f) Rsrv3_val = read_float(f) Rsrv4_val = read_float(f) rez = cls(Vers=Vers_val, LocmTyp=LocmTyp_val, Rdnz=Rdnz_val, UTnom=UTnom_val, Comment=Comment_val, Rsrv0=Rsrv0_val, Phor=Phor_val, DvgNam=DvgNam_val, Ploc=Ploc_val, Lloc=Lloc_val, Vloc=Vloc_val, Pbsm=Pbsm_val, Ibsm=Ibsm_val, MxPoz=MxPoz_val, LocWo=LocWo_val, Koefs=Koefs_val, Tdop=Tdop_val, MxTau=MxTau_val, Tau8=Tau8_val, MxPozRc=MxPozRc_val, Rsrv1=Rsrv1_val, Rsrv2=Rsrv2_val, Rsrv3=Rsrv3_val, Rsrv4=Rsrv4_val) rez.save() for i in range(TGxp_dim): TG_val[i].xp = rez TG_val[i].save() for i in range(RCxp_dim): RC_val[i].xp = rez RC_val[i].save() if dbg_engine: print("LocomSTRUCT constructor: rez.id: %d" % (rez.id)) return rez
def from_txt(cls, f): rcLh_val = read_float(f) rcLe_val = read_float(f) rcUT_val = read_integer(f) rcPoz_val = read_float(f) rcReg_val = read_integer(f) rcKps_val = read_float(f) rcVtrm_val = read_integer(f) rcPozR_val = read_float(f) rcKtrm_val = read_float(f) rcRsrv0_val = read_float(f) rcRsrv1_val = read_float(f) rcRsrv2_val = read_float(f) rcRsrv3_val = read_float(f) rcRsrv4_val = read_float(f) rcRsrv5_val = read_float(f) rez = cls( rcLh=rcLh_val, rcLe=rcLe_val, rcUT=rcUT_val, rcPoz=rcPoz_val, rcReg=rcReg_val, rcKps=rcKps_val, rcVtrm=rcVtrm_val, rcPozR=rcPozR_val, rcKtrm=rcKtrm_val, rcRsrv0=rcRsrv0_val, rcRsrv1=rcRsrv1_val, rcRsrv2=rcRsrv2_val, rcRsrv3=rcRsrv3_val, rcRsrv4 = rcRsrv4_val, rcRsrv5=rcRsrv5_val) return rez
def from_txt(cls, f): KodDor_val = read_integer(f) KodUch_val = read_integer(f) DorNam_val = read_string(f) UchNam_val = read_string(f) Comment_val = read_string(f) RsrvU1_val = read_string(f) VersFile_val = read_integer(f) VersProg_val = read_float(f) mGput_val = read_integer(f) Difl_val = read_boolean(f) RsrvU2_val = read_float(f) mStan_val = read_integer(f) StansDim = get_diap(f) Stans_dim = StansDim[1][0] - StansDim[0][0] + 1 Stans_val = [None for j in range(Stans_dim)] for i in range(Stans_dim): Stans_val[i] = StansSTRUCT.from_txt(f) NechSt_val = read_integer(f) mCtg_val = read_integer(f) CATEGSDim = get_diap(f) CATEGS_dim = CATEGSDim[1][0] - CATEGSDim[0][0] + 1 CATEGS_val = [None for i in range(CATEGS_dim)] for i in range(CATEGS_dim): CATEGS_val[i] = CategSTRUCT.from_txt(f) mVorp_val = read_integer(f) VorpMx_val = read_integer(f) lng = get_diap(f) i_max = lng[1][0] - lng[0][0] + 1 j_max = lng[1][1] - lng[0][1] + 1 k_max = lng[1][2] - lng[0][2] + 1 l_max = lng[1][3] - lng[0][3] + 1 Vorp_val = [[[[0.0 for l in range(l_max)] for k in range( k_max)] for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): for k in range(k_max): for l in range(l_max): if dbg_track: print( "UchSTRUCT constructor: Vorp [%d, %d, %d, %d]" % (i, j, k, l)) Vorp_val[i][j][k][l] = read_float(f) mPrf_val = read_integer(f) lng = get_diap(f) i_max = lng[1][0] - lng[0][0] + 1 j_max = lng[1][1] - lng[0][1] + 1 k_max = lng[1][2] - lng[0][2] + 1 Prof_val = [[[0.0 for k in range(k_max)] for j in range(j_max)] for i in range(i_max)] for i in range(i_max): for j in range(j_max): for k in range(k_max): if dbg_track: print( "UchSTRUCT constructor: Prof [%d, %d, %d]" % (i, j, k)) Prof_val[i][j][k] = read_float(f) rez = cls(KodDor=KodDor_val, KodUch=KodUch_val, DorNam=DorNam_val, UchNam=UchNam_val, Comment=Comment_val, RsrvU1=RsrvU1_val, VersFile=VersFile_val, VersProg=VersProg_val, mGput=mGput_val, Difl=Difl_val, RsrvU2=RsrvU2_val, mStan=mStan_val, NechSt=NechSt_val, mCtg=mCtg_val, mVorp=mVorp_val, VorpMx=VorpMx_val, Vorp=Vorp_val, mPrf=mPrf_val, Prof=Prof_val) rez.save() for i in range(Stans_dim): Stans_val[i].uch = rez Stans_val[i].save() if dbg_track: print("UchSTRUCT constructor: Stans[%d]:\n%s" % ( i, Stans_val[i])) for i in range(CATEGS_dim): CATEGS_val[i].uch = rez CATEGS_val[i].save() if dbg_track: print("UchSTRUCT constructor: CATEGS[%d]:\n%s" % ( i, CATEGS_val[i])) return rez