newSupply | R Documentation |
Creates an instance of the supply
class and
initializes it with the given data and parameters.
newSupply(
name = "",
desc = "",
commodity = character(),
unit = character(),
weather = data.frame(),
reserve = data.frame(),
availability = data.frame(),
region = character(),
misc = list(),
...
)
name |
character. Name of the supply object, used in sets. |
desc |
character. Description of the supply object. |
commodity |
character. The supplied commodity short name. |
unit |
character. The main unit of the commodity used in the model. |
weather |
data.frame. Weather factors to apply to the supply.
|
reserve |
data.frame. Total available resource. Applicable to exhaustible resources. Set for each region. If not set, the resource is considered infinite.
|
availability |
data.frame. Availability of the resource in physical units.
|
region |
character. Regions where the supply process exists. Must include all regions used in other slots. |
misc |
list. List of additional parameters that are not used in the model but can be used for reference or user-defined functions. For example, links to the source of the supply data, or other metadata. |
The supply
class is used to add a domestic source of a commodity
to the model, with given reserves, availability, and costs.
supply object with given specifications.
SUP_COA <- newSupply(
name = "SUP_COA",
desc = "Coal supply",
commodity = "COA",
unit = "PJ",
reserve = data.frame(
region = c("R1", "R2", "R3"),
res.up = c(2e5, 1e4, 3e6) # total reserves/deposits
),
availability = data.frame(
region = c("R1", "R2", "R3"),
year = NA_integer_,
slice = "ANNUAL",
ava.up = c(1e3, 1e2, 2e2), # annual availability
cost = c(10, 20, 30) # cost of the resource (currency per unit)
),
region = c("R1", "R2", "R3")
)
class(SUP_COA)
# draw(SUP_COA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.