Skip to contents

energyRt 0.90.0 (pre-release)

The first release since 0.50-beta, consolidating the unreleased 0.60-0.80 cycles. The modelling API is the one planned for 1.0; testing and debugging continue. Upgrading from 0.50 is not a drop-in: see Breaking changes.

License

  • The per-object timeslice maps (mTechTimeslice and its siblings, mCommTimeslice, mWeatherTimeslice), the technology activity and output domains (mvTechAct, mvTechOut), meqTechActSng and the availability-factor maps (meqTechAfLo, meqTechAfUp, meqTechAfFx, where the bound is one number per technology, region and year) are defined by a rule, the join of the small tables they are made of, and their tables are dropped at the end of interpolate_model(). Readers see the same tuples; the multimod route enumerates the rule itself and the saved scenario no longer carries the tables. The output and single-output domains keep their tables in a model with coarse processes. options(energyRt.map_rules = FALSE) keeps every table; options(energyRt.map_rules_verify = TRUE) checks each rule against the table it replaces. The availability-factor maps are decided per technology, region and year and recorded as rules without building their tables, in a sparse, unfolded interpolation; a full-year one-country model builds them about 3.5 times faster, with a quarter less peak memory.
  • Relicensed from AGPL-3 to Apache-2.0. Releases up to v0.89 remain AGPL-3.

New features

  • The objective can be weighted by milestone year and by region. setObjectiveWeights(mod, years = , regions = ) writes the two halves – horizon@intervals$weight per milestone and config@objweight per (region, year) – and they multiply into pObjWeight[region, year], one more factor in eqObjective beside pPeriodLen and pDiscountFactor. The year half is for uneven time resolution: a milestone solved on a sample of the calendar still carries full-year cost at full period weight, so several cheaply resolved interim years can dominate the sum. The region half is for a study that does not value every region’s costs equally – income level, purchasing power, or a region modelled only as context.

    The weight scales the whole cost cell, capital and fuel and penalties alike, so no trade-off inside a cell changes and only its share of the cross-cell investment decision moves; a uniform weight rescales the objective exactly. Weights are strictly positive and are not interpolated – a cell no declaration names counts in full, and an undeclared model writes no rows at all, so it is unchanged. A cost declared at a coarse region inherits one weight its children agree on and is refused where they differ, as the discount factor already is.

  • objective_weights(scen) reports the solved objective beside the same sum recomputed WITHOUT the weights – the net present value of the plan as costed – plus the weight of every cell. No second solve: vTotalCost is exported per cell. verify_solution()’s objective identity now carries the weight.

  • The store lifecycle verbs take a folder path. seal_*(), unseal_*() and list_dependents() now accept a stored entry’s directory as well as its registered name or the object itself: the three forms load_scenario() takes. That reaches an entry outside the project’s store, and a scenario whose name two folders answer to, which no refresh_registry() can disambiguate. The entry’s name is read from its manifest, so the registry row stays keyed on the name and never on the path. A layout-2 scenario folder, which keeps no scenario.yml to hold the flag, now says so instead of reporting the scenario missing from its store.

  • interpolate_model(storage_cycle = ) overrides every storage’s own @fullYear for one build: "year" closes every cycle over the year, "timeframe" closes it at each parent timeframe boundary, NULL (default) honours the objects. The model is not changed; the override is recorded in scen@misc$storage.

  • Storage level targets: storage@target sets soft floors on the level (stg.af.target, a share of storing capacity), each with a price per unit short (stg.af.cost). Tiers stack, so a deeper tier with its own price makes draining dearer the further it goes. Reported as vStorageShort / vStorageShortCost. varom$stg.varom may now be negative, a reward for holding a charged store.

  • Storage columns of the storing part take the stg. prefix, and the per-part efficiencies and variable costs are dotted: af.* -> stg.af.*, weather waf.* -> stg.waf.*, seff stgeff/inpeff/outeff -> stg.eff/inp.eff/out.eff, varom stgcost/inpcost/outcost -> stg.varom/inp.varom/out.varom. The old names are accepted with a deprecation warning; saved storages and process specs are renamed on load.

  • fold may now include the timeslice axis while a milestone carries its own calendar; the combination was refused before. Folding happens while the data still spans the model calendar’s universe, so the uniformity it asserts holds for every year’s subset of it, and a wildcard expanded back is trimmed to the cells each year actually has. Measured on a sampled-year model: same objective folded and unfolded on GLPK, Pyomo/CBC and Julia/HiGHS.

  • subset_model_regions() prunes a cluster roster declared without a region column: a variant whose rows the cut removed is no longer declared, where before the model was refused for carrying no rows for it.

  • A base-year ledger carried into a SUBSET of the model it was solved on is narrowed to the regions the model declares, naming what it left out, instead of writing capacity for regions the cut removed.

  • aggregate_model_regions() no longer averages weather. A series is already a clustered object, and the weight such a mean needs – the resource available for that grade in that province – is not something a geoscale can carry, so every fine series is preserved: the province becomes part of the variant label (HI in R07 becomes HI_R07 under Z4) and no value is touched. The objects that share those labels – the series, the resource commodity and both sides of its market – are composed together.

  • aggregate_model_regions(dryrun = TRUE) returns a plan instead of aggregating: the geoframe each region-keyed slot sits at and what will happen to it, the copy columns that disagree, each corridor’s fate, the clustering each family resolves to, and whether the call is ready.

  • subset_model_regions() reports what share of the system a cut keeps – demand, capacity, supply and the geoscale’s own weights – in the dryrun report and in @misc$subset.

  • check_model_levels() reports the level rule interpolate_model() raises: every strict-class declaration that sits at a different level than its commodity, plus a @geoframe or @timeframe the model’s geoscale or calendar does not have. Works on a model, before interpolation.

  • verify_aggregation(fine, coarse) says what a coarsening conserved: an extensive total must be unchanged, a rate must stay inside the range it came from, and a class that lost objects – corridors internal to a coarse region – is reported as such instead of as loss.

  • aggregate_model_regions(max_clusters = ) caps clusters per coarse region – max_clusters = 3, or per family with list(all = 3) – instead of clusters’ model-wide k. Each region takes the best number below the cap, and one with nothing to separate is left plainly aggregated.

  • aggregate_model_regions() now coarsens a model whose objects are not all declared at its finest regions: each row is recast from the geoframe its own code sits at, one already at the target is carried, one above it is kept, and a stale @geoframe is cleared.

  • update() on a model moves the frame an element is declared at: update(mod, geoframe = list(ELC = "zone")), with the classes pinned to the commodity moving with it. Data not already at the frame is refused; dryrun = TRUE reports, force = TRUE writes the frame anyway.

  • subset_model_regions(region = ) takes a code at any geoframe: region = "Z3" keeps that zone’s provinces.

  • A region subset drops objects it leaves with nothing to do, and records the cut in @misc$subset.

  • A region subset no longer stops at a group it divides when everything declared there is a rate: a price or a factor holds for each child unchanged, so there is nothing to apportion. A quantity still stops the call, and now names the weight it would need.

  • subset_model_regions(dryrun = TRUE) reports, before cutting, whether a region set can be cut and what it still needs: which groups it splits, which values ask for a weight, which are carried, and the ways on. is_separable() is its verdict alone.

  • A resource tier no object references is no longer materialized as a commodity, so a region subset that narrows a graded technology (TOPIA’s EWIN to HI/MD) stops warning about the tier it left behind (LANDW_CLLO).

  • A spatial sample at interpolation is the same operation as the verb: interpolate_model(geoscale = ) keeps the coarse declarations a whole group covers, refuses a group it divides on the same terms, and takes split_weight / keep / drop. A rebuilt scenario copy is cut the same way.

  • subset_model_regions(split_weight = , keep = , drop = ) cuts through a region group a subset divides: a quantity declared at the group is apportioned by the weight named (split_weight = "area" for all of them), held whole (keep) or left out (drop). A subset and its complement still sum to the whole; a corridor endpoint at a split group is still refused.

  • Reports name the calendar each milestone is solved on. Where milestones do not share one calendar, the model, scenario and config reports carry a Calendar by milestone year table – year, calendar, timeslices, timeframes, and whether the year takes the model’s calendar or one of its own – and the configuration gains a per-year calendars row. A model whose years all share a calendar reports exactly what it reported before.

  • autoplot() on a horizon labels each interval with the calendar that milestone is solved on, when intervals$calendar names one.

  • topia_simulate() generates TOPIA’s weather and demand profiles. The shipped "simulated" dataset is one cached run of it; every other parameter set is an alternative, and the result feeds build_topia(weather = , demand = ).

    topia_simulate(calendar = "d365_h24")                 # the defaults
    topia_simulate(wind_season = rep(1, 12))              # no seasonal wind
    topia_simulate(clusters = FALSE)                      # one series per resource
    topia_simulate(jitter = 0.08, seed = 1)               # another draw

    Levels are calibrated against the measured set per resource, cluster and province; the arguments change the shape. Clusters differ through wind_grade and solar_halflen, so a grade is a different resource rather than another ceiling on one series. The returned frames carry a dataset attribute naming the generator and the parameters that differ from the defaults.

  • build_topia(weather = , demand = ) replace the series. Each takes the name of a shipped dataset or a data.frame shaped like the matching element of topia_profiles(), so the output of one is the input of the other. A weather frame must cover every (cluster, region) pair the object declares; a demand frame carrying load is a relative shape, scaled to the annual energy the shipped object holds.

  • build_topia() cuts smaller cases from the shipped model. One call for a province, a zone or a sample, resolving the parts that are tedious by hand:

    build_topia("Z3", as = "model")      # the zone, ready to interpolate
    build_topia(preset = "island")       # R01: no wire, no domestic fuel
    identical(build_topia(), topia$modules$electricity)   # TRUE

    A zone code expands to the provinces beneath it, so a request does not cut a zone the fossil fuels balance on; one that still does is refused and names the province to add. The two levers carrying a spatial shape travel with the model – GREEN_H2, whose for.each names every province, and CO2_CAP, whose cap is a per-province allowance times the province count.

    techs and modules select processes, and a dependency closure follows them: drop every coal burner and COA, SUP_COA, IMP_COA and both coal corridors go too. modules uses the nine sub-repositories the article builds the model from, carried through as topia$modules$electricity$groups rather than re-derived.

    build_topia(techs = "-ECOA")        # and the whole coal chain with it
    build_topia(techs = "vre")          # declares a weather series
    build_topia(modules = "-hydrogen")  # the chain declared across 3 sections

    calendar re-keys the series and the demand curve onto a cheaper sample of the hourly year, holding the annual energy fixed, so a case stays comparable with the full model:

    build_topia(preset = "tiny")                 # 1 region, 101 timeslices
    build_topia(calendar = "d365_h24_1dpm")      # one day a month

    Only a sample is accepted – one whose timeslices are a subset of the model calendar’s. s4_h24 carries names of its own and a simulated stand-in with no resource grades, so it would leave every clustered technology with no weather row and running unbounded; it is refused, naming the slices that do not match.

    It authors nothing: every object it returns was declared in TOPIA I, which generates the shipped data files. With every argument at its default it returns topia$modules$electricity unchanged. clusters, demand, weather and level are not built yet and are refused rather than ignored.

  • A milestone year can be solved on a sample of the model calendar. Hourly where the investment decisions land, cheaper in the years that only carry the trajectory between them:

    mod <- setCalendar(mod, calendars$d365_h24_1dpm, years = 2040)
    getYearCalendars(mod)

    The horizon names a calendar per milestone (horizon@intervals$calendar) and the calendars themselves live in config@misc$calendars; an absent column is one calendar for every year, as before. A year’s calendar must be a sample of the model’s – the same timeframe levels, slices from the same universe, the same share per slice – which setCalendar() checks, naming the level or slice at fault. Each year’s weights come from its own calendar, so every year still annualises exactly, and the variable and equation domains carry only the slices their year has. fold may not include the timeslice axis while a per-year calendar is declared.

  • sample_calendar() is exported: it builds a calendar from a subset of another’s timeslices, keeping the parent’s names, levels and shares and carrying the weights that annualise. It was internal to solve_by_sample(). timescales::filter_calendar() is the same operation on a timescales::Calendar.

  • setCalendar() gained model and scenario methods, and accepts a calendar object. Both were documented from 0.92 but neither existed: the only method took newCalendar()’s arguments, so passing a calendar – the form the help page showed – failed on the name assertion.

  • Money carries a year. convert(1, "MEUR2015", "MUSD2020") is an exchange-rate question and an inflation question at once, and the two routes through it – deflate then convert, or convert then deflate – do not agree: the gap is the change in the real exchange rate over the interval. Both are computed, the World Bank and IPCC convention ("deflate_then_fx") is the default, and a material disagreement warns.

    convert(1, "MEUR2015", "MUSD2020")
    convert(1, "MEUR2015", "MUSD2020", currency_route = "both")
    convert(1, "MEUR", "MUSD", from_year = 2015, to_year = 2020)

    basis = "cpi" deflates on consumer prices instead of GDP. A year is read only where the unit is a currency: MWh2020 is still an unknown unit. currency_base_year() reads or sets the year untagged money is read at, and add_currency_fx() / add_currency_deflator() add a rate or an index for the session.

  • normalize_model_currency() converts a model’s costs to one currency-year, and reports every factor it applied rather than applying it silently. interpolate_model() runs it on the copy it builds from, so a model’s objects keep the values they were written with while the scenario carries the converted ones, and scen@misc$currency records each factor with the exchange-rate and deflator rows behind it. The columns it converts are every parameter whose declared unit carries the currency token; physical units are not normalised.

  • One object can override a parameter’s default or interpolation rule for its own rows. @defVal and @interpolation on technology, storage, trade, supply, demand, import, export, weather, tax and subsidy, keyed by the short column name the value is written under:

    tech@interpolation$af.up <- "inter"   # this technology only
    weather@defVal$wval      <- 3

    A parameter name works too and is resolved (pTechAf.up, or pTechAf for every bound at once), and any accepted rule spelling is normalised. A key naming no column or parameter of that class is an error, not a silent no-op. These are the third of three layers – the catalogue, then config@defVal/@interpolation, then the object – and a value equal to the layer above it records nothing, so a model that sets no override interpolates exactly as it did before.

  • A weather series may declare what it measures, and a process what it expects. weather@units$wval states the series’ own unit; the new unit column of technology@weather, storage@weather, trade@weather and supply@weather states what that row expects from the series it names – per row, because one process may read a temperature from one series and a wind speed from another. Where both are declared and differ, newModel() and interpolate_model() stop:

    1 weather unit mismatch(es):
      technology HP expects degK from weather 'TEMP', which declares degC

    Both sides are optional and silence is the default, so a model that has never heard of weather units is unaffected. Nothing is converted: a coefficient fitted to one measure and applied to another is wrong, and there is no conversion in a model to reconcile them. The coefficient itself stays a factor either way – the relation is reciprocal for a temperature and direct for other measures, so it is not derived.

  • getUnits() works on a config (and a settings), reporting the model’s rates and its dummy-flow prices. config has no catalogued columns of its own — settings contains config and the shared slots are filed under the child — so the lookup resolves through that relation.

  • getUnits() works for trade, tax, subsidy, weather and calendar, which had no method. trade reports all 40 of its columns, with {comm} resolved from the new @units$comm; tax and subsidy gained a @units slot of their own (comm and currency), since a levy is a rate and both halves are needed to read it. demand, import and export gained a currency column, so price resolves where it could not.

  • getUnit() reads an object’s own measure, beside getUnits() for the table of its parameter units.

  • A weather series reports its declared unit: newWeather(unit = "degC") makes getUnits() say degC where it says {wval} for an undeclared one. Dimensionless stays the default, and the coefficients that read the series stay a factor either way — the relation is reciprocal for a temperature and direct for other measures, so it is not derived.

  • Exchange rates and deflators ship as data: currency_fx (one rate per currency and year), currency_deflator (price indices on a GDP or a CPI basis, for moving money between years) and currency_codes (every spelling convert() accepts, resolved to an ISO code and a scale). All three are built by data-raw/currency.R from World Bank series, which also generates the currency rates in convert_data – those were typed by hand before and could not be rebuilt.

    attr(currency_fx, "base_year") is the year untagged money is read at. A crore or a cent is now derived from its currency’s rate through scale, rather than carrying its own copy of a number.

  • aggregate_model_regions(resolve_conflicts = ) decides what happens to a value with no merged form, such as a lifetime or a levy rate. The default stops and names the object, the column and the regions that disagree; "force" takes their mean and "drop" leaves the value unset, so the parameter falls back to its default rather than to a fabricated number. Both warn and record what was resolved in each object’s @misc$aggregation, which also records the level every object was aggregated to.

  • newHorizon(base_year = ) marks one milestone as GIVEN rather than decided. The marked year is interpolated as any other but never reaches the solver, and the milestones before it are historical and enter no LP at all; both still anchor interpolation. solve_base_year() solves the base year on its own, and interpolate_model(base_year_scenario = ) carries what it decided into the projection as sunk stock at its true vintage, leaving the model’s declared @stock untouched. With no source the projection still excludes the base year and starts from the model’s own stock. getData(base_year = TRUE) returns both, labelled by a source column.

  • Solver preset mm_cuopt_wsl_py: cuOpt on a local GPU through WSL, run through cuOpt’s Python interface. The solution is kept at a time limit, and gpu_save_warm_start = TRUE / gpu_warm_start = <file> save and continue from PDLP’s warm-start data.

  • solve_by_sample() accepts a saved scenario as its first argument, or an explicit base =: the scenario’s model drives the sequence and the scenario becomes the base, so each sample’s interpolated tables are stored as a row filter over it instead of a copy. The base must have its inputs sealed (seal_scenario()), which leaves it solvable, and only tables at or above energyRt.param_ref_min_rows qualify. A base that cannot be used falls back to copying and says why.

  • solve_by_sample(ncap_floor =) solves the ensemble twice: freely, then against a floor of ncap_floor times the samples’ own new capacity, so the spread becomes period variation at one plan rather than variation between plans. ncap_stat picks the mean or the median. The consensus is taken across all samples, so it does not depend on the order they were solved, and a sample that built nothing counts as a zero rather than being skipped. It is a floor, not a fix: a sample may still build above it, which marks a period the consensus plan cannot serve. The floored solves are stored as <sample>_f variants beside the free ones and the free pass stays in $scenarios_free; $runs gains a pass column. ncap_floor = 0 is the default and changes nothing.

  • recast_model_calendar() rebuilds a model’s time-varying data on another calendar. Timeslice values are rates, so aggregation is a weighted mean and annual totals are conserved; rules = overrides it per column. TOPIA at 4 seasons instead of 96 hourly slices solves in 1.4 s rather than 408 s.

  • subset_model_regions() keeps a declaration made above the region level (a @geoframe = "zone" supply or trade) when the whole group survives, instead of dropping it. A subset that splits such a group now errors and names the options. interpolate_model(geoscale = ) does not do this yet.

  • check_feasibility() reports unservable demand, missing process inputs and binding supply ceilings, on a model or an interpolated scenario; interpolate_model(check = TRUE) runs it.

  • check_feasibility() is aware of economic retirement. A requirement that follows from standing capacity is forced only while that capacity must stand, so findings carry a retirement column and are reported under both settings – off (the whole stock stands) and on (what the ret.up / ret.fx bounds still pin) – with the model’s own setting named in the report and in the retirement_actual attribute. interpolate_model(check = TRUE) stops only on findings under the live setting, since a finding under the other one is a counterfactual.

Model building

  • Three-part storage: charger, reservoir and discharger with their own capacities, costs and availability, coupled by @duration, @inp2out and @inp2stg.
  • Vintages (@vintage) and clusters (@cluster) expand a process into variants at interpolation; getVariants() lists them.
  • Resource tiers: a commodity or weather object with @cluster gets one balance per tier.
  • Weather transforms derive many series from one, and a weather object may be declared at a coarser region than the processes reading it.
  • Transmission: newACLine(), newDCLink(), an optional Kirchhoff voltage law, loss tranches (lossTranches()), route ratings (@trade$af), route ratings over a parent timeslice (@trade$afs) and weather factors of the ratings (@weather, read at the route’s source region).
  • Supply, import and export curves: asSupplyCurve(), asImportCurve(), asExportCurve().
  • Taxes and subsidies are indexed by instrument and can be levied on processes. cap and ncap charge technologies and trades (a trade in each region the levy is placed in); a storage’s capacity is levied by part with stg.cap/stg.ncap (reservoir), inp.cap/inp.ncap (charger) and out.cap/out.ncap (discharger).
  • commodity@property for physical properties; discount rates at any geoscale level; a WACC per technology with payback as its cost-recovery life.
  • Portable process definitions: process_to_spec() / process_from_spec() (YAML/JSON), process_designer(), read_technology_xlsx() / write_technology_xlsx().

Time and space

  • Calendars from timescales, including irregular calendars (months of 28-31 days), sampled calendars (representative days) and the new m12_d365_h24 and m12_d365_h24_1dpm.
  • Multi-level geography from geoscales: commodities and processes may sit at a coarser @geoframe than the flows they touch, with auxiliary flows held in the finer cells beneath.
  • Region aggregation with clustering: aggregate_model_regions(clusters = ), get_process_groups(), process_cluster_sweep(), model_clusters().
  • Sub-territory solves from a filtered geoscale, and subset_model_regions().
  • Auxiliary flows sit at the auxiliary commodity’s timeframe: an annual emission is one variable per year, not one per hour.

Solving

  • Solve drivers: solve_recursive(), solve_by_sample(), solve_by_region() and solve_guided().

  • First-order LP solvers (cuOpt, HiGHS PDLP), and lang = "mm", which builds the problem matrix with multimod. Remote solving on the NEOS server and on cloud GPUs.

  • Matrix presets (backend = "mm") are solved by multimod::solve_mps(): HiGHS in the R session or through Julia, cuOpt on a local GPU through WSL (mm_cuopt_wsl) or on a rented GPU (mm_cuopt_cloud, pyomo_cuopt_cloud).

  • On the lang = "mm" route the activity and output definitions (eqTechAfFx, eqTechActSng) and the per-process totals (eqTechOutTot, eqTechInpTot, the storage, supply, import, export and demand totals) are substituted while the matrix is built: their rows and the columns they define are not written, which reduces a full-year model several-fold. The preset field substitute names the equations; character() builds every row. With a multimod that composes roll-ups, the commodity output and input totals (eqOutTot, eqInpTot) are substituted too.

  • The matrix route removes model.mps (and its compressed copy) once the solution is decoded; the index tables and the solution file stay. The preset field keep_mps = TRUE keeps it. A preset’s mm_solver and where choose the solver and the place. A Pyomo- or JuMP-written matrix carries index tables (from Pyomo’s symbol map, from JuMP’s containers) and is decoded by multimod like its own; julia_mps writes the JuMP matrix and julia_cuopt_cloud solves it on a rented GPU.

  • interpolate_model() is about 6x faster on large models; fx_equ = TRUE writes fixed bounds as single equality rows (about 25% fewer rows on hourly VRE models).

  • MPS output (solver_options$pyomo_mps), read_solution() for solutions produced elsewhere, and en_check_solve(), en_check_packages(), en_install_deps(), en_install_julia_pkgs() to check and set up the toolchains.

  • interpolate_model(model, ..., base = REF) builds a scenario on an interpolated base when the objects added are constraints, cost terms, taxes or subsidies: only what they add is computed, the base’s tables are reused and its store is never written to, and the result equals a full interpolation. Anything else is interpolated in full, with a message saying why. The saved scenario names its base in scenario.yml.

  • A scenario keeps the model as given in @model: the variants, tiers and transform clones interpolation builds are rebuilt when a reader needs them. A saved scenario references its sealed model instead of copying it, also for models with vintages, clusters or a spatial sample. getObject() on a scenario returns the objects as defined.

  • save_dataset(rehash = FALSE) and save_dataset(overwrite = TRUE) stop when another store entry references the version they would rewrite, and name the dependents.

  • base = REF also takes new processes, commodities and other model objects: the per-object tables of the objects REF holds are reused and every map is rebuilt.

  • base = REF takes a sample of REF’s calendar or regions (a calendar of some of its timeslices, a filtered geoscale with boundary_prices): REF’s tables are reused filtered to the sample. Saved, such a scenario references the sealed REF’s tables through a row filter.

Results and project management

  • A project registry keyed on path, with a lifecycle (seal_*(), mark_delete(), …); objects are reachable by name (getScenario("base")).
  • Runs and artifacts: scenario_runs(), scenario_solutions(), promote_solution(), import_solution(), drop_scenario_run().
  • Results in Arrow stores, readable when larger than memory; getData(run = ) reads several runs at once.
  • prepare_for_sharing() and strip_user_info().
  • The dataset store keeps versions by content under one name (datasets/<name>/<hash>/): saving other content under a name adds a version instead of overwriting, load_dataset(name, hash = ) pins one, and the registry lists every version. A references table beside the registry records which scenario points at which version.
  • save_scenario() keeps a scenario’s large interpolated tables (numeric parameters, bounds and maps from energyRt.param_ref_min_rows rows, 1e6 by default; weather and demand series from energyRt.ondisk_min_rows) in its own store and records their hashes in scenario.yml. A scenario built with interpolate_model(base = ) on a saved and sealed base references every table identical to the base’s instead of storing a copy, and keeps the rest. load_scenario() resolves the references; the lazy readers follow them; a writer that changes a table drops its reference. unseal_scenario() refuses while scenarios reference the base’s tables (force = TRUE to unseal anyway). References into the dataset store held by scenarios saved earlier still load; a weather or demand table whose version is gone is recomputed from the model.
  • A scenario seals its inputs and its outputs separately: seal_scenario(x, inputs = TRUE, outputs = FALSE). With sealed inputs and open outputs it can still be solved under a new run label; save_scenario() then writes that run only, so scenarios built on it keep reading the same tables. unseal_scenario(x, inputs = FALSE, outputs = TRUE) reopens the runs alone. A scenario sealed before reads as both parts sealed.
  • save_model() and save_scenario() take mode = "ref" (default, options(energyRt.save_mode)) or "full". "ref" references a repository or model only when its exact content is a SEALED version, and copies it in otherwise; "full" copies everything in. save_scenario() no longer stores an unsealed model in the model store to reference it. Changed: a scenario whose model is stored but not sealed now carries its own copy.
  • A scenario whose model is a sealed version plus repositories added by interpolate_model() references the sealed version and keeps only the added repositories (model: added in its manifest); load_scenario() adds them back.
  • list_versions() lists the versions of models, repositories and datasets with a status (current, in use, marked, unused), when they were sealed, how many entries reference them and their size (details = TRUE for more). mark_delete(version = ) marks superseded versions (sealed ones of models and repositories; a hash, or "unused"), and delete_marked() deletes them when still unreferenced. delete_marked() also keeps an entry while any of its sealed versions has a dependent.
  • list_dependents() replaces store_dependents(): the verified dependents recorded on sealed versions (with recursive = TRUE, transitively) plus the references found in manifests; prune = TRUE drops stale records.
  • Unsealed saves of models and repositories record a save id instead of a content hash (hashed: false in the manifest), so saving a large model no longer serializes it for hashing. The content hash is computed when a decision needs it: saving onto a sealed entry, comparing with the sealed versions of a name, and sealing (which now loads and hashes the payload). An identical re-save of an unsealed entry is written again. options(energyRt.lazy_hash = FALSE) hashes every save.
  • A model whose repository holds unchanged objects of one sealed repository version (taken with getObject() from a loaded sealed repository) references that version with the object names and the hash of the selected objects, verified by load_model(). Sealing a repository records each object’s hash for this.
  • Sealing a model or repository freezes its content as a version (<entry>/<hash>/): unsealed saves update the entry in place and leave the sealed versions untouched, and references and load_*(hash = ) reach a sealed version exactly. A sealed version records the models and scenarios that reference it, and unseal_model() / unseal_repository() list them and refuse while they exist unless force = TRUE.
  • Referenced tables read back into memory are dropped before the scenario shell (scen.RData) is written. A shell above options(energyRt.shell_max_mb = 256) warns and names its largest slots.
  • The mm route no longer copies the scenario’s tables into the multimod model: multimod reads them from the scenario’s store or the dataset store as the matrix is built (multimod_from_energyRt(inMemory = FALSE)), a table held in memory is attached rather than dropped, and the memo size is the preset’s data_cache_gb (32 by default). Once the matrix is written, the model, the memo and the scenario’s tables that are persisted on disk or in the store are released, so a solve, local or in the cloud, waits with the memory free.

Validation and comparison

Reporting and visualisation

  • report() for every class and for models and scenarios (HTML, PDF, Word, TeX), with spatial and solved context (geoscale =, model =, scenario =).

  • levcost(): analytic levelized cost of technologies, storage (LCOS) and trade (LCOT) per vintage, cluster and region; ex-post per variant on a solved scenario.

  • levcost() on a storage takes by_variant = and by_region =, as on a technology: the table per vintage and cluster, or one result per region.

  • draw() process diagrams; autoplot() for objects, calendars, horizons, scenarios and comparisons; plot_map(), plot_trade_map(), plot_trade_network().

  • getMix("generation") includes technology consumption, so a process that consumes the balanced commodity appears as a sink instead of vanishing.

  • style = "map" for supply, import, export, demand, technology and storage; trade maps take comm and any geoscale level, and separate stock from investable capacity.

  • Shared autoplot() settings: @desc as subtitle, the object’s unit on the y axis, legends titled by the key they show.

  • autoplot(<supply>): param = picks the quantity, style = the chart; type = is deprecated.

  • sequence_coverage() reports what a solve sequence covered, one row per unit and element, and autoplot() draws it: a sampled calendar as a tile grid or a wall calendar, a region sample on its geoscale, a recursive walk as a horizon Gantt with the look-ahead years marked apart from the decided ones. Elements no unit covered stay visible as gaps.

  • autoplot(<by_sample>, "histogram") draws a result’s spread across the samples, weighted by each sample’s coverage, with the free pass overlaid on the floored one when ncap_floor > 0.

  • solve_scenario(wait = FALSE) launches the solver detached and returns at once, for running several scenarios or carrying on working. wait is a documented argument now, and is refused together with read.solution = TRUE, transient = TRUE or an external solver.dir, none of which can be honoured once the call returns before the solve does. Collect the result later with import_solution(). Detached solving covers the backends that launch a solver process (GLPK, GAMS, Pyomo, JuMP).

  • A run record now identifies the process that wrote it (pid, pid_started, detached), so a run still being written can be told from one whose writer is gone. While a run is in flight, reading it, dropping it, re-solving into it and sealing the scenario’s outputs are refused rather than allowed to corrupt or overwrite it; clear_run() is the override, and get_status() reports a run whose process has gone without finishing as crashed. A run recorded on another host refuses as well, since the process cannot be checked from elsewhere.

  • get_status() reports the state of a saved object – sealed (for a scenario, inputs and outputs separately), marked for deletion, runs held, size on disk – for one model, repository, dataset or scenario, or for every saved object in the project. It reads the manifests, so it does not depend on the registry being current. For a derived scenario it separates base, which is provenance, from the tables it actually borrows, which are what block unsealing or deleting that base.

  • The solve drivers report progress through progressr: set_progress_bar() for a bar, verbose = TRUE for a line per unit, either or both. ### Shipped data

  • TOPIA (was UTOPIA) rebuilt as one 11-region model: land as the scarce resource (LANDS, LANDW) in place of SOL/WIN, wind site clusters, vintages, fuel supply curves, a transmission network from the geoscale, and a hydrogen chain (H2ELC, STG_H2, EXP_H2). Tangled from vignettes/topia-build.Rmd.

  • New TOPIA lever GREEN_H2: electrolysis capped by renewable generation in the same region and timeslice (hourly matching, not unbundling).

Breaking changes

  • A storage level no longer crosses a gap left by a sampled calendar. A sample keeps blocks of the year and drops the rest, so its successor relation chained blocks months apart as if they were adjacent, moving a season’s energy through one block’s worth of level capacity. Each contiguous block now closes onto its own first timeslice. A full calendar has no gaps and is unaffected; a sampled year’s results can move, and only upward – the feasible set shrinks. interpolate_model(bridge_storage_gaps = TRUE), or options(energyRt.bridge_storage_gaps = TRUE), restores the old chain. Ramping still bridges gaps: a ramp limit across one is restrictive rather than permissive. Gaps are located from the calendar a sample records as its source, so a calendar sampled by hand warns instead of guessing.

  • setCalendar()’s first argument after the object is now calendar, which takes a calendar object. Passing newCalendar()’s arguments by name (setCalendar(cfg, name = , timetable = )) is unchanged; passing them positionally is not.

  • A model’s currency and an object’s are reconciled, not merely compared. An object priced in another currency used to be an error at newModel(); where convert() can answer it, it is now converted at interpolation and reported. A pair with no conversion at all – bnEUR is not a unit – is still refused, at construction.

  • The figure functions that return a ggplot object are named gg_*: gg_map(), gg_heatmap(), gg_trade_map(), gg_trade_network(), gg_share_frontier(). The plot_* names forward with a one-time warning and go before 1.0. plot_geoscale() is deprecated without a successor here: call geoscales::gg_geoscale() on getGeoscale(object).

  • plot() on every energyRt class now draws the figure and returns it invisibly, like base plot(); autoplot() returns the ggplot to modify.

  • autoplot() on a calendar is drawn by timescales::gg_calendar(). labels takes "name", "timeslice" or "none" (label_by is gone), the text colour is automatic (label_color is gone) and show_leafs is gone: subset the calendar first. reference stays.

  • The s4_h24_subset_2seasons and m12_h24_subset_4months calendars are removed: both sampled an already-representative design, so their weight was the product of two reductions.

  • weather@defVal, tax@defVal and subsidy@defVal are the override table above, not a number. The defVal = argument is unchanged – a bare number folds into the column the class owns (wval; a levy’s inp/out/bal), and defVal = 0 equals the catalogue default and so records nothing. The three slots were inert: nothing read a levy’s, and a weather’s reached no parameter, so this gives them the effect they always described.

  • The currency rates in convert_data moved. They were undated and not all from the same year – a euro rate from one year sat beside a yen rate from another – and are now generated from currency_fx at one declared base year. convert("MEUR", "MUSD") and every other cross-currency conversion returns a different number; conversions within one currency, such as convert("EUR/kW", "MEUR/GW"), are unaffected.

  • config@currency is gone, folded into config@units$currency. The model declares its generic units in one slot, with the same column names an object uses, so the check compares currency with currency rather than a differently-named scalar:

    newModel("demo", currency = "MUSD")                        # unchanged
    newModel("demo", units = data.frame(currency = "MUSD"))    # the same thing

    currency = is unchanged as an argument and a saved config’s @currency is migrated from the orphaned attribute, as @unit is. config@units also carries comm, capacity, activity and use — the model’s generic units, declared and reported. Nothing here converts a value.

  • The scalar @unit slot is gone. A commodity’s, a flow’s or a weather series’ own measure lives in @units, the same slot a process already used: @units$comm for the commodity an object is counted in, @units$wval for a weather value. commodity, demand, import, export and weather gained the slot; supply carried both shapes and lost the scalar one. Read it with the new getUnit() accessor, which returns one value or NA_character_:

    co <- newCommodity("ELC", desc = "Electricity", unit = "GWh")
    getUnit(co)        # "GWh"  -- was co@unit
    co@units$comm      # "GWh"  -- where it is stored

    unit = is unchanged as a constructor and update() argument, so authoring code does not move; it writes the column, and an explicit units = in the same call wins. A saved object’s @unit is migrated, not lost: a slot removed from a class definition survives deserialization as a plain attribute, and both getUnit() and the unit resolver read it.

    Three places declared units in two shapes under two names one letter apart, which is why six classes could not state a currency at all and trade could not state the commodity its 39 priced columns are measured in.

  • config@defVal and config@interpolation are empty override tables keyed by parameter name, not pre-filled tables keyed by column name. Set config@interpolation$pDemand <- "inter" or config@defVal$pTechAf.up <- 0.5; a key naming no parameter is an error. Every parameter is now overridable, where 103 of 190 columns were not. A model or scenario saved before this release carries the old ~100-column table in these slots and must have it cleared or re-keyed.

    A parameter’s default and interpolation rule are declared in one place, the catalogue (data-raw/parameters.yml). data-raw/config_default_values.yml, data-raw/config_default_interpolation.yml, R/defaults.R, .defVal and .defInt are gone: they were a second copy of every default, keyed by bare column name, and had drifted — stock resolved to trade’s rule for technology too.

  • solve_myopic() is renamed solve_recursive(), with myopic_objective() to recursive_objective() and the result class from myopic to recursive. The driver steps through the horizon’s milestones carrying capacity forward, which is recursive dynamic; it is only myopic in its default special case (step = 1, overlap = 0), since overlap gives a step look-ahead and step > 1 solves several milestones jointly. There are no aliases.

    Sequences already on disk are unaffected: variant.yml now records type: recursive_step, and read_sequence() reads the older myopic_step as the same driver.

  • slice is timeslice, and a calendar is required; the tsl2*() helpers moved to timescales.

  • Storage: vStorageStore is vStorageLevel; @cap2stg, @charge and @inflow are refused (use @duration, @startLevel or a supply); flows are bounded by converter capacity (inp.af.up / out.af.up default to 1).

  • technology@aeff no longer takes stg2ainp, stg2aout, sinp2ainp, sinp2aout, sout2ainp or sout2aout; they were never read for a technology. A storage’s own @aeff keeps its couplings.

  • @start, @end and @olife are merged into @vintage; vintage and cluster labels must be declared.

  • @geolevel is @geoframe, and a model carries a Geoscale.

  • Taxes and subsidies are indexed by instrument; newConstraintS() and newSub() are removed.

  • Storage auxiliary couplings are part-prefixed (inp.cap2ainp, …).

  • The first argument is object in 66 functions; the scenario API is verb-first (save_scenario(), load_scenario(), …) with en_registry; 46 helpers are no longer exported; the 0.5-era deprecations are removed.

  • The Julia and Python backends exchange Arrow files (Arrow.jl, pyarrow); arrow_format is split into storage_format and exchange_format.

  • UTOPIA is TOPIA (regions W1/W2, C1-C6, E1-E3); the test tier nightly is full.

  • topia$modules$golden is no longer shipped. The retiring per-layout kits are a test fixture (tests/testthat/fixtures/topia_golden.rds); examples and articles use topia$modules$electricity.

  • TOPIA’s horizons are rekeyed: $horizons$base is $BY2025_50_by10 and $unit is $BY2025.

  • The cloud presets are renamed: mmcloud is mm_cuopt_cloud, mmcloud_crossover is mm_cuopt_cloud_crossover, mmcloud_pyomo is pyomo_cuopt_cloud, mmcloud_pyomo_crossover is pyomo_cuopt_cloud_crossover; a solve with a former name stops and names its replacement. mm_engine is replaced by mm_solver and where; settings stored by earlier versions are still read.

  • get_hf_token() and set_hf_token() are removed: use mmcloud::get_hf_token() and mmcloud::set_hf_token().

  • autoplot() on a horizon marks the milestones that are given rather than optimised: the base year and any milestones before it are washed out, with a rule at the last given year and a caption naming the states.

Breaking changes

  • TOPIA’s finest geoframe is province, not region. region is energyRt’s own spatial dimension – newModel(region = ) and the region column of every parameter table – so a geoframe of the same name made level = "region" read as the generic one. The hierarchy is now nation -> zone -> province over the same codes R01..R12, and geoframe = "province" addresses the finest level:

    geoscale_regions(topia$geoscales$honeycomb, geoframe = "province")
    filter_geoscale(topia$geoscales$honeycomb, "province", c("R04", "R05"))

    The leaftable still carries a region column – the atom key, a copy of province – so anything joining on region is unaffected, and the model’s regions are still the twelve codes. level = "zone" and level = "nation" are unchanged.

  • topia’s EBIO is a multi-fuel plant. It takes a grouped input over BIO and the new WST commodity, with cinp2ginp of 1.00 and 0.74 and no grp.share bounds, so one plant burns either fuel or any blend.

  • topia gains WST and SUP_WST. WST carries limtype = "FX", so what arises may not be spilled, and SUP_WST offers it free at the gate under an ava.up ceiling in every milestone. Waste is therefore the first fuel EBIO burns wherever it is built.

  • topia’s EXP_H2 is bounded by a terminal. It is declared in the five coastal provinces with an exp.up throughput each, where it was declared in all twelve at a bound high enough to be no bound at all.

  • topia_profiles(calendar = ) accepts only "s4_h24" and "d365_h24", the two the shipped profiles are built for; "m12_h24" and "topia_seasons" are removed.

Bug fixes

  • The setCalendar() example runs. Its horizon was built from newHorizon(c(2030, 2035, 2040), ...), where period is a span rather than a list of milestones, so the years it then asked for were not milestones of the horizon it built.

  • autoplot() on a single-interval horizon shows both of its boundaries. The leading tick was the first interval’s start unshifted, which collapses onto the milestone whenever that interval is one year, leaving the shipped one-year horizons as a slab with a single tick at the right edge.

  • The year legend of autoplot(<horizon>) breaks on whole years; on a short horizon the continuous scale put breaks between them (2032.5).

  • check_feasibility() reports a third contradiction, forced-supply-no-sink: a commodity balanced as an equality that is forced to arise where nothing can consume it. The sinks come from the interpolated gating maps, so a consumer whose vintage starts after the supply does is caught – a case that is invisible in the declarations, because it is the years interpolation fills between two milestones that have no consumer.

  • newHorizon() warns when years of the period belong to no interval. Such a year is in the horizon’s span but carries no milestone, so nothing of it enters the problem; it used to be accepted silently.

  • TOPIA’s waste arising is a ceiling (ava.up) rather than a fixed quantity. Fixed, it forced waste to arise in the years before EBIO’s vintage opens, where the equality balance left nowhere for it to go, so a horizon that modelled those years was infeasible.

  • topia_profiles() no longer fails when a requested province carries none of a resource’s grades; the absent series is dropped instead of being returned as a two-column frame.

  • topia$weather’s "simulated" set now carries the same grades as the measured one. It had a single ungraded series per resource, which no clustered technology could use.

  • A geoscale whose finest geoframe is not called region now works throughout. get_process_groups() and the clustered aggregation read that name from the geoscale instead of assuming it, and gg_trade_map() accepts a plain sf keyed on it rather than requiring a column called region.

  • get_process_groups() labels a corridor family with its own prefix. A trade named <prefix>_<src>_<dst> – one separator, which is what bi-directional corridors use – was read as carrying no endpoints and fell back to a constant, so every family in a model came back under one label and aggregate_model_regions(clusters = ) had no key that named any of them.

  • A process group’s label no longer ends inside a name part. ECOA_R01 and ECOA_R09 were labelled ECOA_R0, half a region code, because the longest common prefix was taken as the stem.

  • pYearFraction is the fraction of the year a milestone’s timeslices cover, read from that year’s calendar. It came from settings@yearFraction – a slot deprecated as unwired – whose single row was recycled across the year rows rather than joined on year, so it reported 1 however the calendar was sampled. No equation reads the parameter today, but all four backends declare it.

  • newHorizon() kept every column of an intervals table except on the path that forces the base-year interval to one year, which rebuilt the table from a fixed four columns and dropped the rest.

  • A resource grade declares the regions it exists in, so narrowing a model’s regions can delete a grade outright. subset_model_regions() dropped the roster row but left the rows keyed on that grade in @aeff, @invcost, @fixom and @af, and interpolating the sub-model then refused it (“Undeclared cluster label(s)”). The orphaned rows are dropped with the grade, and an object none of whose grades is in the sample leaves it.

  • levcost() averaged a graded resource’s profiles into one capacity factor, so every grade of a technology came out at the same levelized cost – the one thing grading them is for. Each cell is now priced at its own grade’s capacity factor. levcost() also failed outright on a graded or availability-bounded resource, naming regions its mini-model does not declare.

  • A container report’s levelized-cost table reported the first cell of a process declaring vintages or grades as the cost of the whole process, dropping the rest. It now carries one row per cell, with its vintage and grade.

  • Calendars whose timeslices stand for several of the unit their timeframe names – s4_h24, m12_h24, wd7_h24, w52_h24 – carried the repetition as a longer share, and share scales every per-timeslice bound. Storage built on them was oversized by that factor, while costs and annual totals stayed right. The repetition is now a timeslice weight, so a model returns the same capacities and objective on any of them. newCalendar() and interpolate_model() warn when a leaf timeframe’s timeslices are longer than the unit it is named after.

  • commodity@emis$unit and @agg$unit are rates, reported as declared. getUnits() divided both by the commodity’s own unit, which was right for neither: an emission factor’s denominator is already this commodity ("kt/PJ" was reported as kt/PJ/{comm}), while an aggregation coefficient’s numerator is the one that matches it ("kt" on a kt aggregate was reported as kt/{comm}). A new check warns when either column holds a quantity instead of a rate, and when the side that must agree with @units$comm does not – a warning, never an error, since a unit is reported and cross-checked and never converted.

  • getUnits() on a commodity errored with “argument is of length zero” whenever the commodity declared no unit, which is every commodity in the shipped test models: the default was character() and nzchar() on it returns logical(0).

  • A unit declared in @units$comm was read as a commodity name by the undeclared-name and unused-name checks, which sweep every slot for a column called comm. A model with newCommodity("ELC", unit = "MWh") failed to build with “The model references undeclared name(s): commodity: MWh”.

  • storage@duration and @inp2stg were reported in hours, which is wrong. duration is energy capacity per unit of power capacity in the stored commodity’s own units — PJ per GW for an ELC store — because the equations multiply it by the discharging capacity with no conversion. A four-hour battery is 4 * 0.0036 = 0.0144, not 4. inp2stg is its inverse. The numbers in a model are unchanged; what getUnits() and the class documentation claimed about them was not.

  • Units now cover the classes that had none. trade’s 40 parameters, the 24 weather coefficients, tax, subsidy, calendar and the discount rates all report a unit where they reported nothing: 254 of 321 catalogued columns carry one, against 135 before. wacc and sdr are 1/year rather than a bare fraction, and a weather coefficient is factor — dimensionless but explicitly not bounded by 1, since low temperature raising conductivity can put output above nameplate.

  • The @units money column is currency, not costs: units = data.frame(capacity = "GW", activity = "GWh", currency = "MEUR"). The token is money in every formula and never stands alone, so costs named the quantity the formula builds by dividing. costs is still accepted and normalised on input, so existing code keeps working.

  • The short interpolation-rule spellings now work. bwd for back, int or mid for inter, fwd (also forw, frw) for forth, in any combination: bwd.mid.fwd is back.inter.forth. They were documented as aliases but errored with “Wrong interpolation rule”, because the token set was defined three times — a substring strip in the validator, a loose regex in one engine, literal matches in the other. There is one table now, every spelling is normalised to the canonical back.inter.forth form on the way in, and an unknown token is an error naming the accepted set.

  • A parameter’s unit is declared with it, as unit: on the parameter in data-raw/parameters.yml, rather than in three hand-written lists in R/units.R. getUnits() is unchanged in shape and gains the formulas those lists could no longer reach: 22 of their keys addressed columns that do not exist, so technology@ceff$grp.share.* and twelve storage aeff columns had silently lost their units.

  • A constraint’s terms move with it. @lhs is a list, so no slot loop reached it: aggregating regions moved a constraint’s row domain and its right-hand side but left each term’s coefficients, and the regions it sums over, naming regions that had been merged away – which then matched nothing. A coefficient that differs across the merged regions is refused, because the merged one would have to be weighted by the variable it multiplies, which is not known before the solve.

  • An object with no size of its own is weighted by the scale. Aggregating regions took a plain mean wherever the object carried no capacity to weight by – a weather profile has none – so every region counted equally, although the documentation promised a size-weighted mean. The weight now comes from the geoscale (area, or whatever weight it declares), which a profile cannot supply for itself.

  • Values that add are no longer averaged. A storage start level is energy, like stg.stock, and a per-region constraint right-hand side is the budget of the rows being merged; both were averaged across regions. payback is a lifetime, like olife, and is now copied rather than averaged, including storage’s out., inp. and stg. forms, which an exact-name lookup had missed.

  • recast_model_calendar() treats cluster as an identifier, not as a value to recast.

  • A wildcard row beside named rows is no longer ignored. An NA in a key column means “every member of that dimension”, but interpolation treated the NA as a member of its own: a base-year anchor written region = NA, timeslice = NA became a separate series, anchored nothing, and was dropped – the later milestone’s value was back-cast over it as if the row were absent. Every class was affected (reported on demand, reproduced on supply). A wildcard row is now broadcast onto the members its own object operates at, with explicit rows still winning cell by cell, so the two spellings of “all regions” give the same answer. Declaring the column and omitting it already worked and is unchanged.

  • A zero supply ceiling bound instead of reading as unbounded. ava.up = 0 was excluded from mSupAvaUp, which kept only rows with value != 0 although the upper bound’s default is Inf. The parameter carried the zero, no equation read it, and the supply solved without a limit. The gate now drops only genuinely default bounds (Inf for up, 0 for lo), so a declared zero closes the supply as written.

  • check_feasibility() read its tables from @data and its declarations from the object slots directly, so it saw nothing of a table parked in the scenario’s store (save_scenario() empties @data above energyRt.ondisk_min_rows), nothing of a map defined by a rule, and nothing of an object saved on disk – and reported “no contradiction” instead of checking, silently, on exactly the large models where it matters. Every query now goes through get_data_slot() and get_lazy_data().

  • open_project() returns the option values it replaced, as documented. It collected them from the set_*() calls, which report the previously SET value – empty for a working default never set explicitly – so on a fresh session the list came back empty and restoring a previous project from it did nothing.

  • clear_run() takes a path as well as a scenario, and records the abandonment in the registry. It required a loadable scenario, which the cases it exists for – a run recorded on another machine, or a store in a layout this version no longer reads – often cannot provide, although only the run’s directory is ever read. The run’s registry row is updated from the rewritten record, so a listing no longer says running until the next refresh_registry().

  • newModel() compares the model’s currency against each object’s @units$costs at construction. The check existed but ran only in interpolate_model(), so an object priced in another currency sat in a model until something unrelated failed much later.

  • plot_trade_network() draws routes declared at any level of a geoscale map. It placed nodes at one level – the finest, unless level = named another – so a corridor declared where its commodity is balanced was dropped with a warning about regions “not in map”. level = still selects one level, and plot_trade_map() already drew every level – the two views now agree.

  • autoplot() refuses a bare units value instead of dropping it. units names a base unit per commodity (units = list(ELC = "GWh")); a parameter name passed there – units = "cost", where param = "cost" is meant – was accepted and ignored, and the chart then drew something else in silence. A style that labels from the object says that units has no effect on it.

  • A demand naming no year was dropped instead of read: aggregate() drops NA groups, so check_feasibility() and autoplot(style = "area") both stopped with an aggregation error. The requirement is now checked and reported at year = NA, and years = keeps it; the annual stack asks for year = when the object names no window of its own.

  • drop_solver_outputs() could delete the working files of a solve in progress: .art_suggest() labelled any running record stale with no check of the owning process, and the cleanup unlinks exactly the suggested rows. Only a run whose process is demonstrably gone is now treated as reclaimable scratch.

  • A column a slot does not have is reported with the object, the slot, the columns that look meant (stock -> inp.stock, out.stock, stg.stock; a near spelling) and every column the slot accepts. An object whose slot was assigned directly (@<-) is checked when it enters a repository or a model, instead of failing later in interpolation with an unrelated message.

  • A storage’s stock without a vintage (inp.stock, out.stock, stg.stock) was given to every vintage, so a storage with several vintages carried its stock once per vintage. It now goes to the earliest vintage only, as a technology’s and a trade’s stock already did.

  • A user constraint row in which no term has a member of its variable’s domain (a technology that cannot be built yet in that year) is dropped at interpolation, with a message, when it could not bind anyway (<= a non-negative value, >= a non-positive one, == zero). Before, it reached the matrix as an empty row, which the matrix route refuses. An empty row that would make the model infeasible, or a constraint empty in every row, is an error. Rows the check cannot decide (a region or timeslice that sums the levels beneath it, a year lag or lead) are kept.

  • A vintage’s end ended the capacity built in it as well as its investment window: capacity of a vintage whose window closed before a later milestone was gone in that milestone. Capacity now stands from its build year for its operational life (olife), whatever the window.

  • newConstraint() discarded a single-value rhs whenever defVal was set, and defVal is always set (given, or 0 / Inf by default), so rhs = 100 built a constraint at 0, or with no limit for <=. A single value is now the right-hand side of every row and replaces defVal, with a warning when they differ.

  • A weather series at a coarser timeframe than the availability bound it multiplies (waf) read as zero and silently switched the technology off. It is now an error naming the series and the timeslices.

  • unmark_delete() left delete_importance and marked_at behind in the manifest, so an entry with no mark still carried an importance beside it and read as marked-at-some-tier to any reader that did not also test marked_delete. The registry masked this, since it NAs the importance of an unmarked entry; the manifest did not. Both fields are now cleared, for an entry and for a version.

  • interpolate_model(base =) refused every base when the caller also passed path =. The base is dispatched before the control arguments are read out of ..., so path reached the addition check and was reported as “an object of class character is added; interpolating in full.” Every solve driver passes path, so none of them could build on a base, and because the refusal is a message it was invisible behind their suppressMessages(). An argument now counts as a model addition only if it is an energyRt object.

  • A reloaded solve_by_region() sequence served every variant the FIRST unit’s model. The scenario stored the model it was interpolated from, which the driver had already cut, while @model lives on the shell and is written only on the first save – so region R2’s results came back beside a model declaring R1, whose own R2 rows were empty. verify_solution() re-derives identities from that model, and levcost() and report() read its declarations. The driver now stores the full model with each unit’s region set, and the cut is rebuilt per variant.

  • solve_by_region() accepted overlapping group = entries, or a repeated region in regions =, and solved and counted that region twice – including in the “sum of objectives” its print method presents as the whole-system cost. Overlaps are refused, naming the regions.

  • sample_summary()’s mean is weighted by each sample’s year_fraction. Samples need not cover equal shares of the year – method = "sequential" folds a trailing singleton block into its predecessor – and the mean previously gave a larger block the same single vote. The quantiles remain unweighted, and a message says so when coverage varies.

  • subset_model_regions() clears the parent’s recorded content hash. The subset keeps the model’s name on purpose and save_model() updates an entry in place by name, so saving one could overwrite the full model’s store entry.

  • read_sequence() no longer reports a by_region sequence as complete while returning its boundary stub counts as NA; they are declared missing.

  • A spatial sample survives a variant switch: the problem cartridge records it, where before only the shell held it and a reload restored another unit’s regions.

  • A filtered geoscale announces the sub-territory solve unconditionally. The mode is accepted silently, so a geoscale covering only some declared regions used to yield a smaller solve – a different answer from the full model’s – with nothing said unless verbose.

  • About 130 fixes, most of which change results: unwired parameters now reach the solver, equations are no longer instantiated without data, waf.fx binds from both sides, aeff$cout2ainp / cinp2aout bind, sub-region emissions are counted, coarse supply keeps its cost, and get_process_*(process = ) is honoured.

  • A tax or subsidy without @region charged the coarse regions of a geoscale too, i.e. the roll-up of their sub-regions a second time. A commodity rate now applies at the commodity’s own regions and a process rate at the regions the process is declared in; a region off that level is an error.

  • levcost() of a storage sized a charger with no inp2out or inp2stg like the discharger, and a discharger with no duration at one hour of storage. Each is now sized by its own flow, as in the solved model.

  • levcost() of a storage annualised every part over the discharger’s payback and wacc. The charger, discharger and energy now each use their own, as in the solved model; a battery whose store outlives its inverter was overpriced.

  • Auxiliary flows (aeff) of a process were lost when it gave the coefficient for all timeslices and another process gave the same coefficient for named timeslices.

  • Capacity taxes and subsidies on a storage charged nothing unless it had discharger data. They are now levied by part (see above); a levy that selects storages and sets only cap/ncap is an error.

  • A bound declared per region on one object and for all regions on another lost the second object’s bound equation (e.g. a fixed storage duration).

  • Content hashes of models with a geoscale are stable between R sessions (the S7 class object was hashed), so such models match their sealed versions in a new session.

Documentation

  • ?topia documents what the dataset actually ships: the two calendars, the dataset, region and cluster columns of weather and demand, and topia$grades.
  • The time-resolution and region-aggregation articles use s4_hp3 and s4_h24; they reached for topia_seasons, which no longer ships.
  • levcost() documents that a grouped input is priced like any other and that an unconstrained group has no share frontier; it had said a grouped input reports no fuel component.
  • A rebuilt pkgdown site with tutorial articles, and a runnable example on every public help page.
  • The testing strategy (tiers, the @covers matrix, goldens) is documented in tests/README.md and tests/TESTING.md.

energyRt 0.50.9-dev

Breaking changes

  • Time-slice weighting is rewritten: variables with a slice dimension are no longer weighted, for consistency between sampled and non-sampled runs. Slice weights can vary across model years.
  • Variables with a year dimension are no longer weighted to interval lengths, except cumulative variables (vSupReserveCum) and capacity variables, which represent the state at the end of the period.
  • New-capacity variables (vTechNewCap) are given per year — apply pPeriodLen to get total new capacity by the end of each period.
  • System costs are regrouped by type (capital, fixed O&M, variable O&M, supply, taxes, subsidies) and by process type, and the Total Costs equation rewritten to match.

Bug fixes

  • optimizeRetirment = TRUE no longer retires new technologies at the same time as their installation.
  • draw() on a trade no longer repeats arrows.
  • newCosts() is debugged, with an example in the Topia tutorial.
  • tsl2hour() identifies n-digit hours; it previously worked for two only.

energyRt 0.50.7-dev

Bug fixes

  • Several stability issues in draw().

Documentation

  • A “Hello World” example in the tutorial, a new logo design, and the first draft of the CRAN-style manual. Clean-up for CRAN in progress; the version may be unstable.

energyRt 0.50.6-dev

New features

  • draw() is drafted for every process class — technology, export, import, supply, demand, trade, storage.

Documentation

  • Docs completed for the main classes, with examples.

energyRt 0.50.5-dev

New features

  • draw() is rewritten on the grid package and is now a generic, with methods for technology, export and import.

Bug fixes

  • Several interface-level bugs introduced in 0.50.4-dev during clean-up.

energyRt 0.50.4-dev

Documentation

  • Class documentation ~70% complete; website reshaped with new (empty) articles. Untested — the version may hold surprises.

energyRt 0.50.3-dev

New features

  • Functions to document classes from classes.yaml.

Documentation

  • A NEWS.md file to track changes; technology-class and newTechnology() documented. Development version in preparation for CRAN submission.