Skip to content

[DEFECT] Storage ramp and discharge ramp constraints ignored when capacity is 0 #422

@GabrielSoto-INL

Description

@GabrielSoto-INL

Defect Description

When the capacity of a storage component is set to 0, storage ramping constraints for charge and discharge are ignored. This does not happen when the capacity is nonzero.

What did you expect to see happen?

Charge and discharge values to be below the capacity if the limits are set to 1.

What did you see instead?

Charge and discharge values are above the capacity.

Do you have a suggested fix for the development team?

Fix the charge and discharge values to 0 if the capacity is 0.

Describe how to Reproduce
Steps to reproduce the behavior:

  1. Set a constrained system with fixed dispatch Producer, fixed dispatch Demand component.
  2. Add extra source and sink for the resource.
  3. Increase the capacity of the Producer component higher than the demand.
  4. Add storage with 0 capacity.

Screenshots and Input Files
The following HERON script results in the error.

<HERON>

  <Case name="bad_charge_limits">
    <mode>sweep</mode>
    <debug/>
    <num_arma_samples>20</num_arma_samples>
    <!--<verbosity>debug</verbosity>-->
    <time_discretization>
      <year_variable>YEAR</year_variable>
      <time_variable>HOUR</time_variable>
      <end_time>23</end_time>
      <num_steps>24</num_steps>
    </time_discretization>
    <economics>
      <ProjectTime>3</ProjectTime>
      <DiscountRate>0.08</DiscountRate>
      <tax>0.1</tax>
      <inflation>0.1</inflation>
      <verbosity>50</verbosity>
    </economics>
    <dispatcher>
      <pyomo/>
    </dispatcher>
  </Case>


  <Components>
    <Component name="grid">
      <demands resource="electricity" dispatch="fixed">
        <capacity>
          <ARMA variable="TOTALLOAD">synth</ARMA>
          <multiplier>-1</multiplier>
        </capacity>
      </demands>
      <economics>
        <lifetime>1</lifetime>
        <CashFlow name="VOM" type="repeating" taxable='True' inflation='none' >
          <driver>
            <activity>electricity</activity>
            <multiplier>-1</multiplier>
          </driver>
          <reference_price>
            <fixed_value>5</fixed_value>
          </reference_price>
        </CashFlow>
      </economics>
    </Component>

    <Component name="npp">
      <produces resource="electricity" dispatch="fixed">
        <capacity resource="electricity"><!-- GW -->
          <sweep_values debug_value="35">10, 20</sweep_values>
        </capacity>
      </produces>
      <economics>
        <lifetime>10</lifetime>
        <CashFlow name="VOM" type="repeating" taxable='True' inflation='none' >
          <driver>
            <activity>electricity</activity>
            <multiplier>-1</multiplier>
          </driver>
          <reference_price>
            <fixed_value>5</fixed_value>
          </reference_price>
        </CashFlow>
      </economics>
    </Component>

    <Component name="battery">
      <stores resource="electricity" dispatch="independent">
        <capacity resource="electricity">
          <sweep_values debug_value="0">5,10</sweep_values>
        </capacity>
        <periodic_level>False</periodic_level>
        <RTE>0.8</RTE>
        <max_charge_rate>1.0</max_charge_rate>
        <max_discharge_rate>1.0</max_discharge_rate>
      </stores>
      <economics>
        <lifetime>100</lifetime>
      </economics>
    </Component>

    <Component name="source">
      <produces resource="electricity" dispatch="independent">
        <capacity resource="electricity">
          <fixed_value>100</fixed_value> <!-- GW -->
        </capacity>
      </produces>
      <economics>
        <lifetime>1</lifetime>
        <CashFlow name="costs" type="repeating" taxable='True' inflation='none' >
          <driver>
            <activity>electricity</activity>
            <multiplier>-1</multiplier>
          </driver>
          <reference_price>
            <fixed_value>1e10</fixed_value>
          </reference_price>
        </CashFlow>
      </economics>
    </Component>

    <Component name="sink">
      <demands resource="electricity" dispatch="independent">
        <capacity resource="electricity">
          <fixed_value>100</fixed_value>
          <multiplier>-1</multiplier>
        </capacity>
      </demands>
      <economics>
        <lifetime>100</lifetime>
        <CashFlow name="costs" type="repeating" taxable="True" inflation="True" npv_exempt="True">
          <driver>
            <activity>electricity</activity>
            <multiplier>-1</multiplier>
          </driver>
          <reference_price>
            <fixed_value>-1e10</fixed_value>
          </reference_price>
        </CashFlow>
      </economics>
    </Component>

  </Components>

  <DataGenerators>
    <ARMA name='synth' variable="TOTALLOAD">%HERON_DATA%/TSA/NYISO/nyiso_arma_2yr.pk</ARMA>
  </DataGenerators>

</HERON>

Here, while the storage level is not displayed, the charge and discharge levels are very high where they should be 0.
Image

Whatever is causing this noise, while the storage level remains 0 seems to break resource conservation:
Image

For comparison, the same system with storage capacity of 5 looks (as expected) like this:

Image

Platform (please complete the following information):

  • OS: Windows

For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.

  • 1. Is it tagged with a type: defect or task?
  • 2. Is it tagged with a priority: critical, normal or minor?
  • 3. If it will impact requirements or requirements tests, is it tagged with requirements?
  • 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
  • 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.

  • 1. If the issue is a defect, is the defect fixed?
  • 2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
  • 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
  • 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
  • 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSomething isn't workingpriority-normaltasks that may be time sensitive, but are not necessarily critical

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions