Skip to contents

Creates a PDF, HTML, or LaTeX document summarising key parameters of the object. The layout and content are controlled by the template argument.

For a technology, the datasheet describes that technology. For a repository, model, or solved scenario, give the technology via name = : the same datasheet is produced, but the embedded levelized cost is computed for that container / solution (the scenario method uses the ex-post cost from the solved model).

Without name, the container methods report the whole object:

model / repository

a full model report – the configuration (regions, horizon, calendar, discount), an inventory of commodities / supplies / demands / trade / constraints, the process availability windows chart, and every technology and storage described one-by-one (diagram + key parameters).

scenario

a results overview of the solved scenario – solve status and objective, generation / capacity / new-capacity mixes (via getMix and autoplot), a sub-annual dispatch profile when the calendar has one, emissions and cost tables.

Usage

report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  ...
)

# S4 method for class 'technology'
report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  reports_path = NULL,
  force = FALSE,
  ...
)

# S4 method for class 'storage'
report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  reports_path = NULL,
  force = FALSE,
  ...
)

# S4 method for class 'repository'
report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  reports_path = NULL,
  force = FALSE,
  logos = NULL,
  figure = NULL,
  ...
)

# S4 method for class 'model'
report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  reports_path = NULL,
  force = FALSE,
  logos = NULL,
  figure = NULL,
  ...
)

# S4 method for class 'scenario'
report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  reports_path = NULL,
  force = FALSE,
  run = NULL,
  verify = TRUE,
  logos = NULL,
  badges = NULL,
  ...
)

# S4 method for class 'list'
report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  reports_path = NULL,
  force = FALSE,
  ...
)

# S4 method for class 'scenarios_cmp'
report(
  object,
  template = NULL,
  image_file = NULL,
  file = NULL,
  format = c("html", "pdf", "tex", "docx"),
  levcost = NULL,
  cost_unit = NULL,
  open = interactive(),
  reports_path = NULL,
  force = FALSE,
  ...
)

Arguments

object

An energyRt S4 object: technology, repository, model, or solved scenario.

template

Character. Template name that defines which parameters to display. Currently "generic" is built into the package. Pass the absolute path to a custom .Rmd file to use your own template. Default NULL selects "generic" automatically.

image_file

Character. Optional path to a PNG/JPG image displayed in the upper-right corner of the page. Defaults to the object's own misc$image when that names an existing local file (see object_image); NULL with no misc$image skips the image.

file

Character. Destination file path (used verbatim). Without it the report lands inside the owning folder's reports/ when the object is saved (a scenario folder, a model/repository store entry), and otherwise in the temporary project-level get_reports_path() folder.

format

Character. Output format: "html" (default), "pdf", "tex" (standalone LaTeX source), or "docx" (Word; the templates' LaTeX styling degrades to Word's own styles). Multiple values are accepted; one file is produced per format. "pdf"/"tex" require a LaTeX installation (e.g. tinytex::install_tinytex()) and are skipped with a warning when none is found.

levcost

A levcost (or levcost_list) object returned by levcost, or NULL (default). When NULL and any levcost keyword arguments are passed via ... (e.g. group, repo, discount), levcost() is called automatically on object with those arguments.

cost_unit

Character or NULL. Cost unit label used on LCOE axis (e.g. "USD/GJ"). NULL derives the label from object@units.

open

Logical. Open the rendered report in the system browser/viewer when done. Defaults to interactive() (opens in an interactive session, stays quiet in scripts and knits).

...

Arguments forwarded to levcost (when levcost = NULL and levcost parameters are provided) and/or to rmarkdown::render(). Known levcost parameter names are intercepted automatically; everything else is passed to the renderer.

The scenario method additionally accepts run (character or NULL): the run id to report, as listed by scenario_runs ("<solve>" or "<variant>/<solve>"). The default NULL reports the active run; a different run is read into a local copy, so the caller's scenario keeps its active run. It also accepts verify (logical, default TRUE): include the verify_solution checks section. For a whole-scenario report, levcost = TRUE adds an ex-post levelized-cost table via levcost(scenario).

The model, repository and scenario methods accept branding arguments: logos (character vector of image paths rendered as a banner row; default from misc$logos, then the scalar misc$logo / misc$image – a scenario shows its model's logos first, then its own), the model method figure (an optional half-page hero figure, default misc$figure), and the scenario method badges (small property-indicator images, default misc$badges). Branding content enters the render key, so a changed logo re-renders an otherwise up-to-date report.

reports_path

Character. Redirects the default output directory for this call (file = still wins).

force

Logical. Re-render even when the existing files are up to date. Reports are skip-if-current: a sidecar (*.report.yml) records a content key over the object, template, arguments, image and levcost identity, and an unchanged report is not rebuilt.

name

Character (container/scenario methods). Name of the technology / process to report.

Value

The path(s) to the generated output file(s) (invisibly). A single string when one format is requested; a character vector when multiple formats are requested.