Package: brick 0.14.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.14.1.tar.gz
brick_0.14.1.zip(r-4.7)brick_0.14.1.zip(r-4.6)brick_0.14.1.zip(r-4.5)
brick_0.14.1.tgz(r-4.6-any)brick_0.14.1.tgz(r-4.5-any)
brick_0.14.1.tar.gz(r-4.7-any)brick_0.14.1.tar.gz(r-4.6-any)
brick_0.14.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
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.86 score 1 packages 1 scripts 12 exports 180 dependencies

Last updated from:7321eea385. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK270
source / vignettesOK251
linux-release-x86_64OK249
macos-release-arm64OK184
macos-oldrel-arm64OK119
windows-develOK178
windows-releaseOK177
windows-oldrelOK164
wasm-releaseOK167

Exports:brick.filecheckStockBalcreateCalibrationTargetcreateMatchingDatagetBrickMappinginitModelplotRefDeviationplotSummaryreadInputreportMifsetSlurmConfigstartModel

Dependencies:abindaskpassbackportsbase64encbitbit64bootbroombslibcachemcallrcarcarDatacellrangerclicliprcollectionscolorspacecommonmarkcorrplotcountrycodecowplotcpp11crayoncredentialscrosstalkcurldata.tableDerivdescdigestdoBydplyrevaluatefarverfastmapfilelockfontawesomeforcatsforecastFormulafracdifffsgamstransfergenericsgertggplot2ggpubrggrepelggsankeyggsciggsignifgitcredsgluegmsgridExtragtablehighrhmshtmltoolshtmlwidgetshttpuvhttrhttr2igraphiniisobandjquerylibjsonlitekableExtraKernSmoothknitrlabelinglaterlatticelazyevallifecyclelme4lmtestlubridatelusweavemadratmagclassmagrittrMASSMatrixMatrixModelsmemoisemgcvmicrobenchmarkmimeminqamipmodelrnlmenloptrnnetnumDerivopensslotelpbkrtestpiamPlotComparisonpiamutilspillarpkgbuildpkgconfigpkgloadplotlyplyrpolynomprettyunitsprocessxprogresspromisespspurrrqualVquantregquitteR.methodsS3R.ooR.utilsR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreadrreadxlreformulasrematchrenvreportbrickreshape2rlangrmarkdownrprojrootrstatixrstudioapiS7sassscalesshinysourcetoolsSparseMstringistringrsurvivalsvglitesyssystemfontstextshapingtibbletidyrtidyselecttimechangetimeDatetinytextrafficlighttzdburcausethisutf8vctrsviridisLitevroomwhiskerwhoamiwithrwritexlxfunxml2xtableyamlymlthiszipzoo

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
Add time stamp.addTimeStamp
Handle the case that the step size adaptation condition is not satisfied after the predefined number of iterations..adjustStepSizeAfterIteration
Aggregate data across given dimensions by a given function.aggregateDim
Get hash for further arguments.argsHash
Convert to numeric vector.asNumeric
Check if the Armijo condition holds or if a local minimum of the outer objective has been identified. Return only data combinations for which it does not hold..checkStepCondition
Check for the stopping criterion of the iteration.checkStoppingCriterion
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 as the log ratio. Then compute the adjustment term for the calibration 'd'.computeDeviation
Evaluate the outer objective function..computeOuterObjective
Compute the step size adaptation paramters delta and phi-derivative.computeStepSizeParams
Compute the sum of the squares for a calibration target.computeSumSqTarget
Create a list of empty data frames with given names.createListWithEmptyDf
crop gdx parameters to historic periods.cropParamsToThist
Assemble specific costs from initial specific costs and the optimization variable.determineSpecCost
Make zeros explicit.explicitZero
Filter data frame rows with reference data frames.filter
filter rows with specified entry in column.filterLevel
Find config file path.findCfg
Determine the so far minimum step size. If the outerObjective is increasing again after a decrease, set the step size to the value yielding the current minimum..findMinimumStepSize
find origin gdx file.findOriginGdxFile
Find region mapping.findRegionMapping
Freeze Parameters.freezeParameters
Get BRICK mapping.getMapping
Initialize the data frame for the optimization variables.initOptimVar
Initialize the data frame for the objective function value.initOuterObjective
Compute the initial step size of the step size iteration algorithm.initStepSize
Insert element between each element of a vector.insertBetween
Test if vector elements are TRUE.isTRUE
Calculate log-Likelihood of historical values.logLikelihood
Make vintage characteristic identical.makeIdentVin
Lapply with output named by given list.namedLapply
Check if gamstransfer is available.onLoad
Overwrite list with another list.overwriteList
Pick lines from data.frame by identifiers.pick
Print message that the calibration converged..printConvergenceMessage
Read calibration targets from input folder.readCalibTarget
Read config file.readCfg
Read the outer objective from a gams calibration run..readOuterObjectiveOptim
Create reference mapping name.refMapName
Reject step sizes with unsuccesful Gams run.rejectErrorRun
Calculate sum of squared differences between results and historic values.sumSquare
Extract elements that are unique to gams.unique
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
Write the stock of the calibration result to a csv file.writeStock
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
Check if stock balance is fulfilledcheckStockBal
Compute the share of heating systems to be renovatedcomputeShareRen
Copy gams scripts to output foldercopyGamsFiles
Copy history gdx to output foldercopyHistoryGdx
Copy initial gdx to output foldercopyInitialGdx
Create calibration targetscreateCalibrationTarget
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
Get Brick dimension mappinggetDimMap
Initialize the model:initModel
Insert code into gams scriptsinsertGamsCode
Insert reference-dependent code for matching into gams scriptsinsertMatchingCode
Is Slurm AvaiableisSlurmAvailable
Convert named list to data.framelistToDf
Load calibration targets from matching resultsloadCalibrationTarget
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
Update matching reference selection and weightsreweightMatchingReferences
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