Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.3.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ Enhancements
Bug fixes
~~~~~~~~~

* Fixes snlinverter Pnt problem (:issue:`140`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I asked for brief, but maybe something more like "Fixes night tare issue in snlinverter. The night tare was erroneously activated when the AC output power, rather than the DC input power, was less than the inverter's self-consumption" or similar. I had to look up Pnt, so I'm sure others would need to as well.



Contributors
~~~~~~~~~~~~

* ejmiller2
2 changes: 1 addition & 1 deletion pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ def snlinverter(inverter, v_dc, p_dc):

ac_power = (Paco/(A-B) - C*(A-B)) * (p_dc-B) + C*((p_dc-B)**2)
ac_power[ac_power > Paco] = Paco
ac_power[ac_power < Pso] = - 1.0 * abs(Pnt)
ac_power[p_dc < Pso] = - 1.0 * abs(Pnt)

if len(ac_power) == 1:
ac_power = ac_power.ix[0]
Expand Down
11 changes: 11 additions & 0 deletions pvlib/test/test_pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,17 @@ def test_snlinverter_float():
assert_almost_equals(pacs, 132.004278, 5)


def test_snlinverter_Pnt_micro():
inverters = sam_data['cecinverter']
testinv = 'Enphase_Energy__M250_60_2LL_S2x___ZC____NA__208V_208V__CEC_2013_'
vdcs = pd.Series(np.linspace(0,50,3))
idcs = pd.Series(np.linspace(0,11,3))
pdcs = idcs * vdcs

pacs = pvsystem.snlinverter(inverters[testinv], vdcs, pdcs)
assert_series_equal(pacs, pd.Series([-0.043000, 132.545914746, 240.000000]))


def test_PVSystem_creation():
pv_system = pvsystem.PVSystem(module='blah', inverter='blarg')

Expand Down