Skip to content

Commit e3dd76d

Browse files
authored
Merge pull request #12 from epri-dev/develop_req_SQA
V2.1.5
2 parents 3054e2a + 0639e2b commit e3dd76d

File tree

6 files changed

+21
-7
lines changed

6 files changed

+21
-7
lines changed

CHANGELOG.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11

22
Changelog
33
=========
4+
2.1.5 (2024-06-12)
5+
------------------
6+
* Fixed a FutureWarning for pandas version 2.2.
7+
* Fixed bugs for single phase model.
8+
* Fixed a bug for negative sequence performance for Momentary Cessation
9+
410
2.1.4 (2024-03-29)
511
------------------
612
* Added a setting to enable and disable momentary cessation (MC_ENABLE)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def read(*names, **kwargs):
3838

3939
setup(
4040
name='opender',
41-
version='2.1.4',
41+
version='2.1.5',
4242
license='BSD',
4343
description='Open-source Distributed Energy Resources (DER) Model that represents IEEE Standard 1547-2018 '
4444
'requirements for steady-state and dynamic analyses',

src/opender/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '2.1.4'
1+
__version__ = '2.1.5'
22

33
from .common_file_format import DERCommonFileFormat
44
from .common_file_format import DERCommonFileFormatBESS

src/opender/common_file_format/common_file_format.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,14 @@ def __init__(self,
9494
df = pd.concat(frames)
9595
df = df.reindex(index=self._get_parameter_list())
9696

97+
def convert_to_numeric(value):
98+
try:
99+
return pd.to_numeric(value)
100+
except ValueError:
101+
return value
102+
97103
df["New Index"] = self._get_parameter_list()
98-
self.param_inputs = df.reset_index().set_index("New Index")["VALUE"].apply(pd.to_numeric, errors="ignore")
104+
self.param_inputs = df.reset_index().set_index("New Index")["VALUE"].apply(convert_to_numeric)
99105

100106
# Nameplate Variables with default values
101107
self._NP_NORMAL_OP_CAT = "CAT_B"
@@ -973,7 +979,6 @@ def NP_PHASE(self, NP_PHASE):
973979
self._NP_PHASE = 'SINGLE'
974980
else:
975981
self._NP_PHASE = 'THREE'
976-
raise ValueError("NP_PHASE should be either 'SINGLE' or 'THREE'")
977982

978983
@property
979984
def NP_TYPE(self):

src/opender/der.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,11 @@ def _update_der_input_v_f(self, v: Union[List[float], float] = None, theta: Unio
140140
self.der_input.v = v_pu * self.der_file.NP_AC_V_NOM
141141

142142
if theta is not None:
143-
if isinstance(theta,(int,float,np.floating,np.int_)):
144-
self.der_input.theta = theta
143+
if self.der_file.NP_PHASE == "SINGLE":
144+
if isinstance(theta,(int,float,np.floating,np.int_)):
145+
self.der_input.theta = theta
146+
elif isinstance(theta, list):
147+
self.der_input.theta = theta[0]
145148
else:
146149
self.der_input.theta_a = theta[0]
147150
self.der_input.theta_b = theta[1]

src/opender/rt_perf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def calculate_i_block(self):
216216

217217
self.i_pos_pu = (self.i_pos_d_ref_pu + self.i_pos_q_ref_pu * 1j) * np.exp(1j * self.der_input.v_angle)
218218

219-
self.i_neg_pu = 1j * self.der_input.v_neg_pu * self.der_file.NP_AC_V_NOM * \
219+
self.i_neg_pu = -1j * self.der_input.v_neg_pu * self.der_file.NP_AC_V_NOM * \
220220
self.der_file.NP_REACTIVE_SUSCEPTANCE / (
221221
self.der_file.NP_VA_MAX / self.der_file.NP_AC_V_NOM)
222222

0 commit comments

Comments
 (0)