Esempio n. 1
0
    def save_scn(self,
                 dir_file_name_save_scn=None,
                 dir_file=None,
                 name_save_scn=None,
                 switch_command_line=False):

        if dir_file_name_save_scn is not None:
            save_file(rastr_win=self.rastr_win,
                      file_path=dir_file_name_save_scn,
                      shabl=Shabl.shablon_file_scenario,
                      switch_command_line=switch_command_line)

        elif (dir_file is not None) and (name_save_scn is not None):
            save_file(rastr_win=self.rastr_win,
                      file_path=f'{dir}/{name_save_scn}',
                      shabl=Shabl.shablon_file_scenario,
                      switch_command_line=switch_command_line)
Esempio n. 2
0
            if row_area_file_two != (-1):
                na_file_two = get_two.get_cell(table=Area.table, column=Area.na, row_id=row_area_file_two)

                pg_area_file_two = get_two.get_cell(table=Area.table, column=Area.pg, row_id=row_area_file_two)

                if pg_area_file_two > 0:
                    k_pg = pg_area_node_file_one / pg_area_file_two
                else:
                    k_pg = 1

                grupCorr_pg_file_two = GroupCorr(rastr_win=two_rastr, table=Node.table, column=Node.pg,
                                                 switch_command_line=True)
                grupCorr_pg_file_two.calc(key=f'na={na_file_two}', formula=f'pg*{k_pg}')

                na_area_node_file_two = get_two.get_cell(table=Area.table, column=Area.na, row_id=row_area_file_two)

                name_area_file_two = get_two.get_cell(table=Area.table, column=Area.name, row_id=row_area_file_two)

                pg_area_node_file_two = get_two.get_cell(table=Area.table, column=Area.pg, row_id=row_area_file_two)

                pn_area_node_file_two = get_two.get_cell(table=Area.table, column=Area.pn, row_id=row_area_file_two)

                area.write(
                    f'{x}. na_f1={na_area_node_file_one}; name_f1={name_area_node_file_one}; pg_f1={pg_area_node_file_one} => na_f2={na_area_node_file_two}; name_f2={name_area_file_two}; pg_f2={pg_area_node_file_two}; k_pg={k_pg}\n')

    area.close()

save_file(rastr_win=two_rastr, file_path=rf'{dir_file}\Режим 4.rst',
          shabl=Shabl.shablon_file_dynamic, switch_command_line=True)
Esempio n. 3
0
                        sel=None,
                        sta=None,
                        Name=f'Генератор {i}',
                        CustomModel=None,
                        ModelType=None,
                        Brand=None,
                        ExcControlId=123456789,
                        ForcerId=123456789,
                        Texc=0.123456789,
                        Kig=0.123456789,
                        Kif=0.123456789,
                        Uf_min=0.123456789,
                        Uf_max=0.123456789,
                        If_min=0.123456789,
                        If_max=0.123456789,
                        Karv=0.123456789,
                        T2exc=0.123456789,
                        T3exc=0.123456789,
                        Type_rg_max=1,
                        Udop2=0.123456789,
                        Uexc=0.123456789,
                        Urvi_max=0.123456789,
                        Urvi_min=0.123456789,
                        Type_rg=1,
                        switch_command_line=False)

    save_file(rastr_win=RASTR,
              file_path=
              r'C:\Users\Ohrimenko_AG\Desktop\test_filling\test_Exciter.rst',
              shabl=Shabl.shablon_file_dynamic)
Esempio n. 4
0
                       Kif1=0.123456,
                       K_cosfi=0.123456,
                       K_Ia=0.123456,
                       K_Ir=0.123456,
                       K_P=0.123456,
                       K_Q=0.123456,
                       K_Usd=0.123456,
                       Kiu=0.123456,
                       Kpi=0.123456,
                       KST=0.123456,
                       Kuf=0.123456,
                       Urv_max=0.123456,
                       Urv_min=0.123456,
                       dEqdt=0.123456,
                       dVdt=0.123456,
                       Uarv=0.123456,
                       Udop1=0.123456,
                       U11=0.123456,
                       U22=0.123456,
                       Alpha=0.123456,
                       dSudt=0.123456,
                       deltaF=0.123456,
                       switch_command_line=False)

time_calc = time() - start_time
print(f'Seconds: {"%.2f" % time_calc} [секунд]')

save_file(rastr_win=RASTR,
          file_path=file_rst_dir + '\\test2.rst',
          shabl=Shabl.shablon_file_dynamic)
Esempio n. 5
0
    file_path=
    r'C:\Users\Ohrimenko_AG\Desktop\Test_equiPy\02-БРМ Зима максимум [уст].rg2',
    shabl=Shabl.shablon_file_regime,
    switch_command_line=True)

get_ = GettingParameter()
variable_ = Variable()
for i in range(0, 26558):
    ip = get_.get_cell(table=vetv_table, column='ip', row_id=i)

    iq = get_.get_cell(table=vetv_table, column='iq', row_id=i)

    row_ny_ip = get_.get_row_node(node_ny=ip)
    row_ny_iq = get_.get_row_node(node_ny=iq)

    na_ip = get_.get_cell(table=node_table, column='na', row_id=row_ny_ip)

    na_iq = get_.get_cell(table=node_table, column='na', row_id=row_ny_iq)

    if na_ip == na_iq:
        print(f'na_ip={na_ip} == na_iq={na_iq}')
        variable_.make_changes_row(table=vetv_table,
                                   column='na',
                                   row_id=i,
                                   value=na_ip)
    else:
        print(f'ERROR: na_ip={na_ip} != na_iq={na_iq}')

save_file(file_path=r'C:\Users\Ohrimenko_AG\Desktop\Test_equiPy\test_123.rg2',
          shabl=Shabl.shablon_file_regime)
Esempio n. 6
0
from RastrWinLib.Load import load_file
from RastrWinLib.Load.save import save_file
from RastrWinLib.Load.shablon import shablon_file_dynamic
from CustomModels.AC5B.AC5B import change_parameters_AC5B

file = r'C:\Users\Ohrimenko_AG\Documents\RastrWin3\test-rastr\RUSTab\test9.rst'
file_save = r'C:\Users\Ohrimenko_AG\Desktop\test9.rst'

load_file(file_path=file,
          shablon=shablon_file_dynamic,
          switch_command_line=True)

load_file(switch_command_line=True)

# change_parameters_ARV3M(Id=1320, switch_command_line=True)
change_parameters_AC5B(Id=1300, switch_command_line=True)

save_file(file_path=file_save, shablon=shablon_file_dynamic)
regime.rgm()

remove_obj_sel = RemoveSelObjects(rastr_win=RASTR, switch_command_line=False)
remove_obj_sel.remove_sel_node()
remove_obj_sel.remove_sel_vetv()
#
# set_com_ekviv(selekv=0,
#               met_ekv=0,
#               tip_ekv=0,
#               ekvgen=0,
#               tip_gen=1,
#               kfc_x='',
#               pot_gen=0,
#               kpn='',
#               tip_sxn=0,
#               smart=0,
#               zmax=1000,
#               otm_n=0)

equivalent_gen(
    viborka_gen=
    '(na=102 | na=103 | na=104 | na=105 | na=106 | na=107 | na=108 | na=109)')
# equivalent_smart(viborka_rayon = '(na=102 | na=103 | na=104 | na=105 | na=106 | na=107 | na=108 | na=109)')
regime.rgm()
# common_info.get()

save_file(rastr_win=RASTR,
          file_path=r'C:\Users\Ohrimenko_AG\Desktop\Test_equiPy\test_100.rg2',
          shablon=shablon_file_regime,
          switch_command_line=True)
Esempio n. 8
0
# -*- coding: utf-8 -*-

from RastrWinLib.Load import load_file
from RastrWinLib.Load.shablon import shablon_file_dynamic, test_9_rst, shablon_file_ut_common
from RastrWinLib.Settings.dynamic import set_dynamic
from RastrWinLib.Load.save import save_file

load_file(file_path=test_9_rst,
          shablon=shablon_file_dynamic)
load_file(shablon=shablon_file_ut_common)

# set_regim(switch_command_line=True)
# set_ut_common(switch_command_line=True)
# set_com_ekviv(switch_command_line=True)

set_dynamic(switch_command_line=True)

save_file(file_path=r'C:\Users\Ohrimenko_AG\Desktop\Test_equiPy\test9_123.rst',
          shablon=shablon_file_dynamic)