# -*- encoding: utf-8 -*-
"""
 Created by eniocc at 12/05/2021
"""
from py_dss_interface import DSS

# import pathlib

dss = DSS()

dss_file = r"C:\eniocc\EPRI\py_dss_interface-master\src\py_dss_interface\tests\py_dss_interface\13Bus\IEEE13Nodeckt" \
           r".dss "

dss.text("compile {0}".format(dss_file))

# Integer methods
print(45 * '=' + ' Integer Methods' + 45 * '=')
print(f'dss.ctrlqueue_clearqueue(): {dss.ctrlqueue_clearqueue()}')
print(f'dss.ctrlqueue_delete(): {dss.ctrlqueue_delete()}')
print(f'dss.ctrlqueue_numactions(): {dss.ctrlqueue_numactions()}')
print(f'dss.ctrlqueue_action(): {dss.ctrlqueue_action()}')
print(f'dss.ctrlqueue_actioncode(): {dss.ctrlqueue_actioncode()}')
print(f'dss.ctrlqueue_devicehandle(): {dss.ctrlqueue_devicehandle()}')
print(f'dss.ctrlqueue_push(): {dss.ctrlqueue_push()}')
print(f'dss.ctrlqueue_show(): {dss.ctrlqueue_show(dss)}')
print(f'dss.ctrlqueue_clearactions(): {dss.ctrlqueue_clearactions()}')
print(f'dss.ctrlqueue_popaction(): {dss.ctrlqueue_popaction()}')
print(f'dss.ctrlqueue_queuesize(): {dss.ctrlqueue_queuesize()}')
print(f'dss.ctrlqueue_doallqueue(): {dss.ctrlqueue_doallqueue()}')

# To iterate from begin we must call first()
Esempio n. 2
0
# -*- encoding: utf-8 -*-
"""
 Created by eniocc at 11/10/2020
"""
from py_dss_interface import DSS
import pathlib

dss = DSS()

dss_file = r"C:\eniocc\EPRI\py_dss_interface-master\src\py_dss_interface\tests\py_dss_interface\13Bus\IEEE13Nodeckt" \
           r".dss "


dss.text("compile {0}".format(dss_file))
overload_file_path = pathlib.Path(dss_file).parent.joinpath(f"{dss.circuit_name()}_EXP_OVERLOADS.CSV")

# Solve
# dss.text('export overloads')
# text.text('export overloads')
dss.text("? Load.611.kw")
dss.solution_solve()
# dss.text("solve")
dss.loadshapes_first()
dss.loadshapes_read_pmult()

#
new = list(dss.loadshapes_read_pmult())
new[2] = 0
# print(new)
#
dss.loadshapes_write_pmult(new)
# -*- encoding: utf-8 -*-
"""
 Created by eniocc at 12/05/2021
"""
from py_dss_interface import DSS

# import pathlib

dss = DSS()

dss_file = r"C:\eniocc\EPRI\py_dss_interface-master\src\py_dss_interface\tests\py_dss_interface\13Bus\IEEE13Nodeckt" \
           r".dss "

dss.text("compile {0}".format(dss_file))

# Integer methods
print(45 * '=' + ' Integer Methods ' + 45 * '=')
dss.capacitors_first()
print(f'dss.capacitors_read_nums_step(): {dss.capacitors_read_nums_steps()}')
print(f'dss.capacitors_write_num_steps(): {dss.capacitors_write_num_steps(5)}')
print(f'dss.capacitors_read_nums_step(): {dss.capacitors_read_nums_steps()}')
print(f'dss.capacitors_available_steps(): {dss.capacitors_available_steps()}')
print()
print(f'dss.capacitors_read_isdelta(): {dss.capacitors_read_isdelta()}')
print(f'dss.capacitors_write_isdelta(): {dss.capacitors_write_isdelta()}')
print(f'dss.capacitors_read_isdelta(): {dss.capacitors_read_isdelta()}')
print()
print(f'dss.capacitors_count(): {dss.capacitors_count()}')
print(f'dss.capacitors_first(): {dss.capacitors_first()}')
print(f'dss.capacitors_read_nums_steps(): {dss.capacitors_read_nums_steps()}')
print(f'dss.capacitors_available_steps(): {dss.capacitors_available_steps()}')