get_index_sets {gEcon}R Documentation

List of index sets

Description

The get_index_sets function retrieves a list of all the index sets specified in the .gcn file.

Usage

get_index_sets(model)

Arguments

model

an object of gecon_model class.

Details

Cf. gEcon users' guide, chapter ‘Templates’.

Value

The function returns a list of index sets. Each element of the list corresponds to one set and contains the set components' names as a character vector.

Examples

# copy the example to the current working directory
file.copy(from = file.path(system.file("examples", package = "gEcon"),
          "pure_exchange.gcn"), to = getwd())

# make and load the model
pure_exchange_t <- make_model("pure_exchange.gcn")

# retrieve the index sets
pure_exchange_ind_sets <- get_index_sets(pure_exchange_t)

[Package gEcon version 1.2.0 Index]