forked from pik-piam/brick
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1db1f1b
Showing
38 changed files
with
2,214 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^\.buildlibrary$ | ||
^\.pre-commit-config\.yaml$ | ||
^Makefile$ | ||
^workflow$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ValidationKey: 0.0 | ||
AutocreateReadme: yes | ||
AcceptedWarnings: | ||
- 'Warning: package ''.*'' was built under R version' | ||
- 'Warning: namespace ''.*'' is not available and has been replaced' | ||
AcceptedNotes: ~ | ||
allowLinterWarnings: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
output/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Type: Package | ||
Package: brick | ||
Title: Building sector model with heterogeuous renovation and construction of | ||
the stock | ||
Version: 0.0.1 | ||
Date: 2023-02-03 | ||
Authors@R: | ||
person("Robin", "Hasse", , "[email protected]", | ||
role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0003-1818-3186")) | ||
Description: This building stock model represents residential and commercial | ||
buildings at customisable regional and temporal resolution. The building | ||
stock is quantified in floor area and distinuished by building type | ||
(SFH/MFH) and location (rural/urban). In each building category, | ||
construction cohorts are tracked explicitly. This allows to characterise | ||
buildings specifically for each of subset of buildings. The evolution of the | ||
building stock follows from the flows of constructed, renovated and | ||
demolished buildings and is optimised under cost minimisation with a benefit | ||
for heterogeneity in the choice of construction and renovation alternatives. | ||
This benefit captures heterogeneity in the preferences of the aganets and | ||
the building structure. | ||
License: LGPL-3 | ||
URL: https://github.com/pik-piam/brick | ||
Depends: | ||
madrat, | ||
magclass, | ||
mredgebuildings, | ||
mrdrivers, | ||
mrremind | ||
Imports: | ||
dplyr, | ||
gamstransfer, | ||
gdxrrw, | ||
quitte, | ||
tidyr, | ||
yaml | ||
Suggests: | ||
testthat | ||
Encoding: UTF-8 | ||
RoxygenNote: 7.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(arrayToGdx) | ||
export(createInputData) | ||
export(createRunFolder) | ||
export(dfToGdx) | ||
export(listToGdx) | ||
export(readConfig) | ||
export(runGams) | ||
export(startModel) | ||
export(toolMakeHandle) | ||
import(madrat) | ||
import(magclass) | ||
import(mrdrivers) | ||
import(mredgebuildings) | ||
import(mrremind) | ||
importFrom(dplyr,"%>%") | ||
importFrom(dplyr,.data) | ||
importFrom(dplyr,across) | ||
importFrom(dplyr,all_of) | ||
importFrom(dplyr,arrange) | ||
importFrom(dplyr,filter) | ||
importFrom(dplyr,group_by) | ||
importFrom(dplyr,lag) | ||
importFrom(dplyr,left_join) | ||
importFrom(dplyr,mutate) | ||
importFrom(dplyr,rename) | ||
importFrom(dplyr,rename_with) | ||
importFrom(dplyr,right_join) | ||
importFrom(dplyr,select) | ||
importFrom(dplyr,summarise) | ||
importFrom(dplyr,sym) | ||
importFrom(dplyr,ungroup) | ||
importFrom(gamstransfer,Container) | ||
importFrom(gdxrrw,igdx) | ||
importFrom(gdxrrw,wgdx) | ||
importFrom(madrat,calcOutput) | ||
importFrom(madrat,readSource) | ||
importFrom(magclass,"getItems<-") | ||
importFrom(magclass,add_dimension) | ||
importFrom(magclass,collapseDim) | ||
importFrom(magclass,getItems) | ||
importFrom(magclass,getYears) | ||
importFrom(magclass,mbind) | ||
importFrom(magclass,mselect) | ||
importFrom(quitte,as.quitte) | ||
importFrom(quitte,calc_addVariable) | ||
importFrom(quitte,inline.data.frame) | ||
importFrom(quitte,interpolate_missing_periods) | ||
importFrom(quitte,revalue.levels) | ||
importFrom(tidyr,complete) | ||
importFrom(yaml,read_yaml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#' Prepare data frame for GDX | ||
#' | ||
#' Create an object that can be handled by [gdxrrw::wgdx()] to write the data | ||
#' frame as a gams parameter into a gdx file. | ||
#' | ||
#' This function takes an array and creates a list ready to be written into a | ||
#' gdx file. It will currently always create an output for a gams parameter. | ||
#' | ||
#' @author Robin Hasse | ||
#' | ||
#' @param a array with factor columns for gams dimensions and one value | ||
#' column. | ||
#' @param name character, object name | ||
#' @returns A list with a particular structure required by [gdxrrw::wgdx()]. | ||
#' @export | ||
#' | ||
arrayToGdx <- function(a, name) { | ||
list(name = name, | ||
val = a, | ||
uels = dimnames(a), | ||
dim = length(dim(a)), | ||
form = "full", | ||
type = "parameter") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# The package documentation is defined in this file. | ||
# You can get it via `library(<package>); ?<package>`. | ||
#' @docType package | ||
"_PACKAGE" |
Oops, something went wrong.