column=Generator.tq01,
                                       row_id=row_id,
                                       value=tq01)


if __name__ == '__main__':
    from RastrWinLib.AstraRastr import RASTR
    from RastrWinLib.Load import load_file
    from RastrWinLib.Save import save_file
    from RastrWinLib.Tables.Dynamic.Generator import Generator

    load_file(rastr_win=RASTR,
              path_file=r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test.rst',
              shabl=Shabl.shablon_file_dynamic)

    table_ = RASTR.Tables(Generator.table)

    for i in range(0, 100):
        table_.AddRow()
        filling_generators(rastr_win=RASTR,
                           row_id=i,
                           sta=None,
                           Num=123456789,
                           Name=f'Генератор {i}',
                           Node=123456789,
                           ModelType=None,
                           Brand=None,
                           NumBrand=None,
                           ExciterId=123456789,
                           ARSId=123456789,
                           Pnom=100,
                                       column=DFWTHYNE14.Xp,
                                       row_id=row_id,
                                       value=Xp)


if __name__ == '__main__':
    from RastrWinLib.AstraRastr import RASTR
    from RastrWinLib.Load import load_file
    from RastrWinLib.Save import save_file
    from RastrWinLib.Tables.Dynamic.DFWTHYNE14 import DFWTHYNE14

    load_file(rastr_win=RASTR,
              path_file=r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test.rst',
              shabl='динамика')

    table_ = RASTR.Tables(DFWTHYNE14.table)

    for i in range(0, 100):
        table_.AddRow()

        filling_DFWTHYNE14(rastr_win=RASTR,
                           row_id=i,
                           sel=None,
                           sta=None,
                           Id=123456789,
                           Name=f'Генератор {i}',
                           ModelType=None,
                           Brand=None,
                           UELId=123456789,
                           PSSId=123456789,
                           Aex=0.123456,
Exemple #3
0
                                       value=Vsi2min)


if __name__ == '__main__':
    from RastrWinLib.AstraRastr import RASTR
    from RastrWinLib.Load import load_file
    from RastrWinLib.Save import save_file
    from RastrWinLib.Tables.Dynamic.DFWIEEE421PSS13 import DFWIEEE421PSS13

    load_file(rastr_win=RASTR,
              path_file=r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test.rst',
              shabl='динамика')

    load_file(rastr_win=RASTR, path_file=r'', shabl='автоматика')

    table_ = RASTR.Tables(DFWIEEE421PSS13.table)

    for i in range(0, 10):
        table_.AddRow()

        filling_DFWIEEE421PSS13(rastr_win=RASTR,
                                row_id=i,
                                sel=None,
                                sta=None,
                                Id=123456789,
                                Name=f'Генератор {i}',
                                ModelType=None,
                                Brand=None,
                                CustomModel=None,
                                Input1Type=None,
                                Input2Type=None,
Exemple #4
0
    variable_.make_changes_filling_row(table=Forcer.table,
                                       column=Forcer.Texc_rf,
                                       row_id=row_id,
                                       value=Texc_rf)


if __name__ == '__main__':
    from RastrWinLib.Load import load_file
    from RastrWinLib.Save import save_file
    from RastrWinLib.Tables.Dynamic.Forcer import Forcer

    load_file(rastr_win=RASTR,
              path_file=r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test.rst',
              shabl=Shabl.shablon_file_dynamic)

    table_ = RASTR.Tables(Forcer.table)

    for i in range(0, 100):
        table_.AddRow()

        filling_Forcer(rastr_win=RASTR,
                       row_id=i,
                       sel=None,
                       sta=None,
                       Id=123456789,
                       Name=f'Генератор {i}',
                       ModelType=None,
                       Brand=None,
                       CustomModel=None,
                       Ubf=0.123456789,
                       Uef=123456789,
Exemple #5
0
                                       value=RIFlim)


if __name__ == '__main__':
    from RastrWinLib.AstraRastr import RASTR
    from RastrWinLib.Tables.Dynamic.DFWIEEE421 import DFWIEEE421
    from RastrWinLib.Load import load_file
    from RastrWinLib.Save import save_file

    load_file(rastr_win=RASTR,
              path_file=r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test.rst',
              shabl='динамика')

    load_file(rastr_win=RASTR, path_file='', shabl='автоматика')

    table_ = RASTR.Tables(DFWIEEE421.table)

    for i in range(0, 1000):
        table_.AddRow()
        filling_DFWIEEE421(rastr_win=RASTR,
                           row_id=i,
                           sel=None,
                           sta=None,
                           Id=123456789,
                           Name=f'Генератор {i}',
                           ModelType=None,
                           Brand=None,
                           CustomModel=None,
                           UELId=123456789,
                           UELPos=None,
                           OELId=123456789,
Exemple #6
0
def delete_switches(viborka):
    node = RASTR.Tables(Node.table)
    vetv = RASTR.Tables(Vetv.table)
    generator = RASTR.Tables(Generator.table)

    groupCorrVetvGroupidObj = GroupCorr(rastr_win=RASTR,
                                        table=Vetv.table,
                                        column=Vetv.groupid)

    findNextSelNodeObj = FindNextSel(rastr_win=RASTR,
                                     table=Node.table)

    variableObj = Variable(rastr_win=RASTR,
                           switch_command_line=False)

    gettingParameterObj = GettingParameter(rastr_win=RASTR)

    node.SetSel(viborka)
    node.Cols(Node.sel).Calc("1")

    k = findNextSelNodeObj.row(key='iq.sel=1 & ip.sel=0 &!sta')
    while k != (-1):
        iq1 = gettingParameterObj.get_cell_row(table=Vetv.table,
                                               column=Vetv.iq,
                                               row_id=k)
        k2 = findNextSelNodeObj.row(key=f'{Node.ny}={iq1}')
        if k2 != (-1):
            variableObj.make_changes_row(table=Node.table,
                                         column=Node.sel,
                                         row_id=k2,
                                         value=0)
        k = vetv.FindNextSel(k)

    k = findNextSelNodeObj.row(key='iq.sel=0 & ip.sel=1 & !sta')
    while k != (-1):
        ip1 = gettingParameterObj.get_cell_row(table=Vetv.table,
                                               column=Vetv.ip,
                                               row_id=k)
        k2 = findNextSelNodeObj.row(key=f'{Node.ny}={ip1}')
        if k2 != (-1):
            variableObj.make_changes_row(table=Node.table,
                                         column=Node.sel,
                                         row_id=k2,
                                         value=0)
        k = vetv.FindNextSel(k)

    k = findNextSelNodeObj.row(key='(iq.sel=1 & ip.sel=0)|(ip.sel=1 & iq.sel=0) & tip=2')
    while k != (-1):
        iq1 = gettingParameterObj.get_cell_row(table=Vetv.table,
                                               column=Vetv.iq,
                                               row_id=k)
        k2 = findNextSelNodeObj.row(key=f'{Node.ny}={iq1}')
        if k2 != (-1):
            variableObj.make_changes_row(table=Node.table,
                                         column=Node.sel,
                                         row_id=k2,
                                         value=0)
        ip1 = gettingParameterObj.get_cell_row(table=Vetv.table,
                                               column=Vetv.ip,
                                               row_id=k2)
        k2 = findNextSelNodeObj.row(key=f'{Node.ny}={ip1}')
        if k2 != (-1):
            variableObj.make_changes_row(table=Node.table,
                                         column=Node.sel,
                                         row_id=k2,
                                         value=0)

        k = findNextSelNodeObj.row(key='(iq.sel=1 &ip.sel=0) | (ip.sel=1 &iq.sel=0) & tip=2')

    viborka_in_bsh = '(iq.bsh>0 & ip.bsh=0) | (ip.bsh>0 & iq.bsh=0) | (iq.bshr>0 & ip.bshr=0) | (ip.bshr>0 & iq.bshr=0)| ip.sel=0 | iq.sel=0)'

    groupCorrVetvGroupidObj.calc(key='1',
                                 formula='0')

    groupCorrVetvGroupidObj.calc(key=viborka_in_bsh,
                                 formula='1')
    nvet = 0
    flvykl = 0
    for povet in range(0, 10000):
        ivet = findNextSelNodeObj.row(
            key='x<0.01 & x>-0.01 & r<0.005 & r>=0 & (ktr=0 | ktr=1) & !sta & groupid!=1 & b<0.000005')
        if ivet == -1:
            break
        ip = gettingParameterObj.get_cell_row(table=Vetv.table,
                                              column=Vetv.ip,
                                              row_id=ivet)
        iq = gettingParameterObj.get_cell_row(table=Vetv.table,
                                              column=Vetv.iq,
                                              row_id=ivet)

        if ip > iq:
            ny = iq
            ndel = ip
        else:
            ny = ip
            ndel = iq

        ndny = 0
        ndndel = 0
Exemple #7
0
        if row != (-1):
            col = table_.Cols(column)
            col.SetZ(row, value)
        else:
            print('Error')


if __name__ == '__main__':
    from RastrWinLib.AstraRastr import RASTR
    from RastrWinLib.Load import load_file

    load_file(
        rastr_win=RASTR,
        path_file=
        r'C:\Users\Ohrimenko_AG\Documents\RastrWin3\test-rastr\RUSTab\test9.scn',
        shabl='сценарий',
        switch_command_line=False)

    load_file(
        rastr_win=RASTR,
        path_file=
        r'C:\Users\Ohrimenko_AG\Documents\RastrWin3\test-rastr\RUSTab\test9.rst',
        shabl='динамика',
        switch_command_line=False)

    find = FindNextSelection(rastr_win=RASTR, table="com_dynamics")

    tras = RASTR.Tables("com_dynamics").Cols("Tras").Z(0)

    print(find.row(key=tras))
                                       column=Governor.BoilerId,
                                       row_id=row_id,
                                       value=BoilerId)


if __name__ == '__main__':
    from RastrWinLib.AstraRastr import RASTR
    from RastrWinLib.Load import load_file
    from RastrWinLib.Save import save_file
    from RastrWinLib.Tables.Dynamic.Governor import Governor

    load_file(rastr_win=RASTR,
              path_file=r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test.rst',
              shabl='динамика')

    table_ = RASTR.Tables(Governor.table)

    for i in range(0, 100):
        table_.AddRow()

        filling_Governor(rastr_win=RASTR,
                         row_id=i,
                         sel=None,
                         sta=None,
                         Id=123456789,
                         Name=f'Генератор {i}',
                         ModelType=None,
                         CustomModel=None,
                         Brand=None,
                         strs=0.123,
                         zn=0.123,
                                       value=Vuimax)


if __name__ == '__main__':
    from RastrWinLib.AstraRastr import RASTR
    from RastrWinLib.Tables.Dynamic.DFW421UEL import DFW421UEL
    from RastrWinLib.Load import load_file
    from RastrWinLib.Save import save_file

    load_file(rastr_win=RASTR,
              path_file=r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test.rst',
              shabl='динамика')

    load_file(rastr_win=RASTR, path_file='', shabl='динамика')

    table_ = RASTR.Tables(DFW421UEL.table)

    for i in range(0, 1000):
        table_.AddRow()
        filling_DFW421UEL(rastr_win=RASTR,
                          row_id=i,
                          sel=None,
                          sta=None,
                          Id=123456789,
                          Name=f'Генератор {i}',
                          ModelType=None,
                          Brand=None,
                          CustomModel=None,
                          Dependency_F1=12345679,
                          Output=None,
                          K1=0.123456,