Skip to contents

Costs object is used to define additional costs to add to the model's objective function.

Usage

newCosts(name, variable, desc = "", mult = NULL, subset = NULL, misc = NULL)

Arguments

name

get_slot_doc("costs", "name")

variable

get_slot_doc("costs", "variable")

desc

get_slot_doc("costs", "desc")

mult

data.frame. Named list or data frame with numeric values for the variable included in the costs-constraint. A constant or a data frame with the same dimensions as the subseted variable.

subset

data.frame. Named list or data frame with set-values for each dimension of the variable. This slot subsets the variable to the specified set values.

misc

list. Additional information.

Value

costs object with given specifications.

Examples

# a per-unit fee on the activity of two technologies, stated as a rate table
newCosts("ACTFEE", variable = "vTechAct",
         mult = data.frame(tech = c("ECOA", "EGAS"), value = c(2, 3)),
         desc = "Activity fee")
#> <costs> ACTFEE -- Activity fee
#> 
#> mult  [2 x 2]
#>    tech value
#> 1: ECOA     2
#> 2: EGAS     3

# one rate for a subset of processes: `mult` scalar, `subset` picks the members
newCosts("CAPFEE", variable = "vTechNewCap", mult = 1.5,
         subset = list(tech = "ECOA"))
#> <costs> CAPFEE
#> 
#> subset  [1 x 1]
#>    tech
#> 1: ECOA