build_constraints: Calculate the cumulative minimum and maximum charge for a...

Description Usage Arguments Details Value Examples

View source: R/build_constraints.R

Description

Given the physical parameters, this function calculates the necessary, i.e lower limits, and possible, i.e. upper limits, for charging a storage.

Usage

1
2
3
4
5
6
7
8
build_constraints(
  cycles,
  state,
  capacity,
  loss_rate,
  charge_rate,
  parameters = NULL
)

Arguments

cycles

a positive integer, the number of cycles this function should consider

state

a positive integer, the starting state of energy in the storage

capacity

a positive integer, the maximum amount of energy that can be stored

loss_rate

a positive integer, the energy / cycle depleted from storage

charge_rate

a positive integer, the maximum energy / cycle which with the storage can be charged

parameters

a numerical, named vector, can substitute the use of the parameters capacity, loss_rate, and charge_rate. When used, all three values must be supplied by named values.

Details

Considering a steady loss rate in some kind of energy storage, this function calculates the cumulative minimal charge required to not go below zero charge.

In the same sense, a maximum cumulative charge is calculated which indicates the physical and realistic maximum of energy that could be put into the storage until it is full.

The function thinks in time cycles, where one would charge x amount of energy from the beginning of the cycle until the end of the same cycle.

Value

a data frame with cycle number, minimum, and maximum cumulative charge

Examples

1
build_constraints(10, 5, 20, 2, 4)

henobe/flexoptr documentation built on March 11, 2021, 6:04 p.m.