Package: brick 0.6.1

Robin Hasse

brick: Building sector model with heterogeneous renovation and construction of the stock

This building stock model represents residential and commercial buildings at customisable regional and temporal resolution. The building stock is quantified in floor area and distinguished 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 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 agents and the building structure.

Authors:Robin Hasse [aut, cre], Ricarda Rosemann [aut]

brick_0.6.1.tar.gz
brick_0.6.1.zip(r-4.5)brick_0.6.1.zip(r-4.4)brick_0.6.1.zip(r-4.3)
brick_0.6.1.tgz(r-4.5-any)brick_0.6.1.tgz(r-4.4-any)brick_0.6.1.tgz(r-4.3-any)
brick_0.6.1.tar.gz(r-4.5-noble)brick_0.6.1.tar.gz(r-4.4-noble)
brick_0.6.1.tgz(r-4.4-emscripten)brick_0.6.1.tgz(r-4.3-emscripten)
brick.pdf |brick.html
brick/json (API)

# Install 'brick' in R:
install.packages('brick', repos = c('https://pik-piam.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pik-piam/brick/issues

On CRAN:

Conda:

3.76 score 1 packages 10 exports 141 dependencies

Last updated 16 days agofrom:7f3df15440. Checks:8 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 24 2025
R-4.5-winOKFeb 24 2025
R-4.5-macOKFeb 24 2025
R-4.5-linuxOKFeb 24 2025
R-4.4-winOKFeb 24 2025
R-4.4-macOKFeb 24 2025
R-4.3-winOKFeb 24 2025
R-4.3-macOKFeb 24 2025

Exports:brick.filecreateMatchingDatagetBrickMappinginitModelplotRefDeviationplotSummaryreadInputreportMifsetSlurmConfigstartModel

Dependencies:abindaskpassbase64encbitbit64bslibcachemcallrcellrangerclicliprcollectionscolorspacecommonmarkcountrycodecpp11crayoncredentialscrosstalkcurldata.tabledescdigestdplyrevaluatefansifarverfastmapfilelockfontawesomeforcatsfsgamstransfergenericsgertggplot2ghgitcredsgluegmsgridExtragtablehighrhmshtmltoolshtmlwidgetshttpuvhttrhttr2igraphiniisobandjquerylibjsonlitekableExtraKernSmoothknitrlabelinglaterlatticelazyevallifecyclelubridatelusweavemadratmagclassmagrittrMASSMatrixmemoisemgcvmimemipmunsellnlmeopensslpiamPlotComparisonpiamutilspillarpkgbuildpkgconfigpkgloadplotlyplyrprettyunitsprocessxprogresspromisespspurrrqualVquitteR.methodsS3R.ooR.utilsR6rappdirsRColorBrewerRcppreadrreadxlrematchrenvreportbrickreshape2rlangrmarkdownrprojrootrstudioapisassscalesshinysourcetoolsstringistringrsvglitesyssystemfontstibbletidyrtidyselecttimechangetinytextrafficlighttzdbusethisutf8vctrsviridisLitevroomwhiskerwhoamiwithrwritexlxfunxml2xtableyamlymlthiszipzoo

Readme and manuals

Help Manual

Help pageTopics
brick: Building sector model with heterogeneous renovation and construction of the stockbrick-package brick
Write the specific costs to the input.gdx.addSpecCostToInput
Add the calibration targets to the input gdx.addTargetsToInput
Check if the Armijo condition holds. Return only data combinations for which it does not hold..checkArmijoStep
Check if the condition of the heuristic step size adaptation holds: Check if the outer objective does not increase. Return only data combinations for which the condition does not hold, i.e. the outer objective increases.checkHeuristicStep
Read in brick results and compute the total outer objective function by combining resuls from construction and renovation..combineOuterObjective
Combine the step size paramters delta and phi-derivative from construction and renovation flows.combineStepSizeParams
Compute the descent direction from Brick results.computeDescentDirection
Compute the deviation between historic data and Brick results. Then compute the adjustment term for the calibration 'd'.computeDeviation
Evaluate the outer objective function..computeOuterObjective
Evaluate the outer objective function for the stock.computeOuterObjectiveStock
Compute the step size adaptation paramters delta and phi-derivative.computeStepSizeParams
crop gdx parameters to historic periods.cropParamsToThist
Assemble specific costs from initial specific costs and the optimization variable.determineSpecCost
Make zeros explicit.explicitZero
filter rows with specified entry in column.filterLevel
Find config file path.findCfg
find origin gdx file.findOriginGdxFile
Initialize the data frame for the optimization variable of construction.initOptimVarCon
Initialize the data frame for the optimization variable of renovation.initOptimVarRen
Initialize the data frame for the objective function value.initOuterObjective
Compute the initial step size of the step size iteration algorithm.initStepSize
Calculate log-Likelihood of historical values.logLikelihood
Check if gamstransfer is available.onLoad
Overwrite list with another list.overwriteList
Read config file.readCfg
Read the outer objective from a gams calibration run..readOuterObjectiveOptim
Calculate sum of squared differences between results and historic values.sumSquare
Update the step size for the selected combinations.updateStepSize
Update the optimization variable 'x'.updateX
Update the optimization variable 'x' for selected combinations only.updateXSelect
Write the intangible costs to a .csv file.writeCostIntang
Add assumed intangible costsaddAssump
Aggregate matching run results for calibrationaggregateMatching
Find the full file names of files in BRICKbrick.file
Check whether Gams finished successfullycheckGamsSuccess
Copy gams scripts to output foldercopyGamsFiles
Copy history gdx to output foldercopyHistoryGdx
Copy initial gdx to output foldercopyInitialGdx
Create input datacreateInputData
Create data for reference matchingcreateMatchingData
Create parameterscreateParameters
Create new run foldercreateRunFolder
Create setscreateSets
Expand set values to data frameexpandSets
Determine the latest path of a runfindLastRun
Retrieve mapping file from BRICKgetBrickMapping
guess column names based on column valuesguessColnames
Initialize the model:initModel
Is Slurm AvaiableisSlurmAvailable
Convert nested named list to long data.framelistToDf
Load Input data from mredgebuildingsloadMadratData
Named list to handle stringmakeHandle
get Period from configperiodFromConfig
Plot heat map of reference deviationplotRefDeviation
Plot Summary of a runplotSummary
Read config filereadConfig
Read madrat input files from input folderreadInput
Read symbol from gams containerreadSymbol
Create mif file for model runreportMif
Run the brick calibrationrunCalibration
Call the logit brick calibrationrunCalibrationLogit
Call the optimization brick calibrationrunCalibrationOptim
Run gams optimisationrunGams
Set the SLURM configurationsetSlurmConfig
Start the modelstartModel
interpolate and filter to get model resolutiontoModelResolution