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

  • delete_project() removes a project folder. It refuses a folder that holds no project, a project another session has open or with a run still being written, and one with sealed entries; force = TRUE overrides the last two.

  • open_project() and create_project() record the session in the project folder (.sessions/); close_project() removes the record and returns the store paths to their defaults. list_project_users() lists the sessions that have a project open and the runs still being written.

  • interpolate_model(overwrite = TRUE) and save_scenario(clean_start = TRUE) stop when a run of the scenario is still being written by another process; delete_marked() and drop_solver_outputs() skip such scenarios and runs (skipped_running).

  • ondisk = "auto" follows the build: a scenario started in memory continues on disk when the build outgrows the ondisk_ram allowance, and one left in memory moves to disk at a later write or read once it has outgrown it.

  • A scenario built on a base keeps the base’s storage parts: a charger or discharger declared only by an efficiency or an af was dropped from the base’s own storages.

  • TOPIA’s two stores declare inp2out = 1: the charger is rated as the discharger, where charging power was unbounded.

  • Notes printed during a stage start on their own line, indented under it, and lines wider than the console wrap with a hanging indent.

  • Rows dropped because their timeslices are outside a sampled calendar are reported as a message, not a warning.

  • The unsized_part advisory is split over lines and states the consequence: the flow is not limited by a rating.

  • The JuMP build draws a fixed-length progress bar that survives a console resize, prints no solver line ahead of the solver’s log and closes with a rule when it hands back to R.

  • A write for GAMS, JuMP, GLPK or Pyomo that stops part-way no longer leaves the artificial fold member in an on-disk scenario’s tables; a later matrix build read it as a year no equation indexes and wrote zero availability and demand.

  • A scenario built again from the same inputs resumes the run already written instead of writing the model again.

  • interpolate_model(overwrite = TRUE) starts the scenario’s folder afresh in memory too, naming the runs removed. Without it, the runs an earlier build left in the folder are kept, and scenario_runs() marks them in a new stale column; save_scenario() names them.

  • load_scenario() keeps a second scenario of the same name, loaded from another folder, under a numbered key (BASE_2) and says so.

  • A scenario derived from a base (interpolate_model(base = )) goes on disk when ondisk asks for it; it was always left in memory.

  • solve_model() on a scenario made by newScenario() builds it with the settings the scenario carries.

  • get_status() reports the mode a scenario was saved in, read from its manifest.

  • The dispatch plots take the day and the step within it from the calendar, so a calendar whose finest timeslices are not named _hNN is drawn too.

  • gg_year_calendars() draws the timeslices each milestone year is solved on, coloured by their weight, for a model or scenario whose milestones have calendars of their own. The full scenario and model reports include it, and the full scenario report draws one dispatch day per distinct calendar.

  • autoplot(<scenario>, timeslice = ) with several years draws one panel per year; it summed them.

  • autoplot() is re-exported and works after library(energyRt) alone; ggplot2 moves from Suggests to Imports.

  • create_project() makes a project folder, its stores and an empty registry, and opens it. open_project() stops on a folder that does not exist and takes ondisk = as the project’s default.

  • A scenario keeps its tables in memory or on disk and the mode stays with it: an on-disk scenario is recorded at every stage, so its folder loads after any of them, and a later stage reads no parameter table. to_disk() / to_memory() switch.

  • interpolate_model(ondisk = ) defaults to the ondisk option. "auto" puts a scenario on disk when it is expected to take more memory than options(energyRt.ondisk_ram = ) allows: a share of the available RAM, or gigabytes above 1.

  • interpolate_model(overwrite = TRUE) names the runs it removes with an on-disk scenario, and refuses a sealed one.

  • Every stage opens and closes with one line at verbose = 1 and is silent at verbose = 0. A numeric verbose is honoured by open_project(), seal_*() and mark_delete(), and reaches the interpolation solve_model() runs.

  • Parameter interpolation, the mapping builds, the writers and the solution read report progress, at verbose = 1 and above and with show_progress_bar() on.

  • base_year_scenario = accepts a scenario folder.

  • obj2mem() reads a loaded scenario and one interpolated on disk.

  • Every backend leaves <run>/solver.log. GLPK, GAMS, Pyomo, JuMP and the matrix route are each asked to log natively, and log = names the file or turns it off; glpsol’s log moves up from output/.

  • recast_object(as = "split") inverts the cluster relabel, each cluster going back to the member it was, and as = "objects" mints one object per former member. A derived cluster is refused rather than divided.

  • The matrix backends solve in a process of their own. The write leaves a solve.R driver beside model.mps, so wait = FALSE returns once the matrix is written; mm_run(dir) is that driver as a function. mmcloud stays in-process.

  • A NEOS solve detaches too. solve_scenario(wait = FALSE) returns once the job is launched, and a driver beside the model collects the result; invisible = TRUE keeps it quiet.

  • force = TRUE claims a run whose running record this session cannot verify – a detached solve, or one from another machine – with a warning, and refuses one whose process is alive. A detached matrix solve claims its record with its own pid.

  • HiGHS writes its progress to solver.log beside the matrix; the highs package does not surface the solver’s console output.

  • A matrix solve that returns a verdict rather than a solution – infeasible, unbounded – reports it instead of failing in the decoder.

  • autoplot() on a model or repository draws its declared objects together. class =, comm = and by = choose the objects and the series key; declared data as points, its interpolation as lines. type = "windows" remains the default.

  • getData() gains class = on the object, model and repository methods: the classes to keep, or all-negative to drop them ("-trade"). An unknown class is refused.

  • On a model or repository, comm = selects the objects that reference a commodity on any side, then filters the rows that name one. It could only filter rows before, so a slot with no comm column passed every row.

  • merge = TRUE keeps cluster and vintage as index columns.

  • The variant provenance columns (class, base, vintage, cluster) are dropped when no row returned is a variant, so a query about an import no longer carries four all-NA columns; they stay as soon as one row matches.

  • apply_to_scenario_data() accepts a model or repository, so the get_process_*() accessors work on declarations.

  • get_process_comm(return_list = FALSE) returns the two-column frame it documents.

  • Three numbers describe a timeslice: share, width and weight. share is one unit of its timeframe as a fraction of the year, width (new in @timetable) its length in those units, weight its repetitions. Widths of 1 change nothing.

  • The length of a timeslice in the model (pTimesliceShare) is share x width, and the hours it stands for are that times weight times 8760.

  • Calendars gain @units and newCalendar(units = ): the length of one unit of a timeframe in hours, e.g. list(HOUR = 1). A listed timeframe is counted in those units; one that is not listed is its own unit.

  • A timeslice of zero weight is left out: the model is built on the sample that keeps the others, with the gaps located from the calendar’s own rows. Data declared on the timeslices left out is accepted and ignored.

  • storage@cycle names the timeframe within which a storage’s level closes on itself: "ANNUAL" (default), any timeframe above the storage’s own, or the shorthands "year" and "timeframe". interpolate_model(storage_cycle = ) takes a name too.

  • load_scenario() gains model =: opens a saved scenario with the given model (an object, or a name in the model store) in place of the recorded one, without changing anything on disk.

  • relink_scenario() rewrites the model reference of a saved scenario – manifest, scenario file, dependents and registry row – without loading its data. Differences warn, or error with strict = TRUE; dry_run = TRUE writes nothing.

  • check_scenario_models() reports, from the manifests alone, whether the model each saved scenario references is still in the store: ok, moved, name_only, missing or embedded.

  • getData() can weight results by timeslice and by period length. apply_weights = TRUE multiplies by pTimesliceWeight, so a sampled scenario’s per-slice results annualise; apply_period_length = TRUE multiplies by pPeriodLen(year).

  • add_weights / add_period_length attach the factor as a column (weight, period_length); "auto", the default, attaches it when it was applied, so no existing result changes shape.

    What is multiplied is decided by the declared catalogue, not by the column being there: only a result declared sum on the time axis is weighted, and only a flow-like role is spread over a period. A level is a snapshot, a capacity is a stock and an input parameter is a rate, so none of them is scaled – and whatever was left alone is named in a warning. The four arguments were accepted and silently ignored before.

  • The objective can be weighted by milestone year and by region. setObjectiveWeights(mod, years = , regions = ) writes horizon@intervals$weight and config@objweight, which multiply into pObjWeight[region, year] in eqObjective.

  • The year weight is for uneven time resolution, where a cheaply resolved interim year still carries full-year cost at full period weight; the region weight is for a study that does not value every region’s costs equally.

    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, plus the weight of every cell – no second solve. verify_solution()’s objective identity now carries the weight.

  • The store lifecycle verbs take a folder path. seal_*(), unseal_*() and list_dependents() accept a stored entry’s directory as well as its registered name or the object itself, reaching an entry outside the project’s store.

  • The entry’s name is read from its manifest, so a registry row stays keyed on the name and never on the path; a layout-2 folder, which keeps no scenario.yml, now says so instead of reporting the scenario missing.

  • interpolate_model(storage_cycle = ) overrides every storage’s own @cycle for one build: "year", "timeframe", or NULL (default) to honour the objects. The model is not changed and the override is recorded in scen@misc$storage.

  • Storage level targets: storage@target sets soft floors on the level (stg.af.target), each priced per unit short (stg.af.cost), and tiers stack. Reported as vStorageShort / vStorageShortCost; stg.varom may now be negative.

  • Storage columns of the storing part take the stg. prefix and the per-part efficiencies and costs are dotted: af.* -> stg.af.*, stgeff/inpeff/outeff -> stg.eff/inp.eff/out.eff, stgcost -> stg.varom, and so on.

  • The old storage column names are accepted with a deprecation warning, and 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(max_vintages = ) caps the vintages a process keeps, merging the cohorts it drops by each column’s declared space rule.

  • build_topia(clusters = FALSE) drops the weather clusters, collapsing each resource to one member per region and leaving the supply tiers alone.

  • calendars$d365_h24_3dpm: three consecutive days per month at hourly resolution, so a sampled store cycles over 72 hours rather than 24.

  • build_topia(storage_duration = , storage_inp2out = ) set a store’s shape: a number pins the ratio, two give it a range, "free" unpins it.

  • A ramp declared where the model does not step is reported. interpolate_model() warns when rampup/rampdown name a timeslice that gates no equation, instead of storing a limit that does nothing.

  • 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 no series, 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_scenario() resumes a scenario already written to a run, solving the files on disk instead of writing them again. A fingerprint in run.yml guards it: a changed model, or a run written before fingerprints existed, is rewritten.

  • The write stage records its run with status: "written", so a written-but-unsolved directory is addressable by label and scenario_run_info() no longer errors on it.

  • write_model(run = "<label>") writes into that run. The label was silently dropped and the run named after the solver instead.

  • A write that is refused leaves nothing behind: the run directory is claimed before the solver files are written, not after. Sealed outputs, and a run another session is still solving, were both refused with the files already on disk.

  • read_solution() gained dir = (a solve that ran outside R), wait = (block until the solver’s output is complete) and save =. Reading an external directory and keeping the result is now one call.

  • write() writes a scenario’s model, the short form of write_model(), beside the existing interpolate(), solve() and read(). base::write() is unaffected.

  • 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

  • Stored tables carry their SET columns as Arrow dictionaries – integer codes plus one copy of each label, with the declared set as the levels – so the files are much smaller and faster to read. set_storage_dictionary(FALSE) turns it off.

  • The encoding is only at the file boundary: obj2mem() decodes, so nothing in memory holds a factor and the content hashes are unchanged.

  • en_characters_to_factors() / en_factors_to_characters() convert a table’s set columns to and from dictionaries, for code that reads a store directly rather than through getData().

  • getData(stringsAsFactors = TRUE, process = TRUE) gives the process column one level set covering every process of the problem, so results about different classes stack and join.

  • 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().

  • draw() takes vintage = and cluster = on storage and trade, and cluster = on supply, demand, import and export: each member is drawn with its own values.

  • 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

  • save_scenario() returns the scenario as it was given: one held in memory keeps its tables. to_disk(), or save_scenario(thin = TRUE), returns the emptied object.

  • A base_year_scenario that is named and holds no optimal base-year solution is an error; the projection was built from the declared stock with a message. horizon_segment = "projection" asks for that explicitly.

  • open_project() returns project_root and ondisk with the paths it replaced.

  • The base-year capacity pin is a constraint, not a bound. base_year_capacity = "fixed" wrote ncap.up = 0 into the capacity tables, which carries forward, so a pin meant for the observed years banned investment in every later year.

  • A forced build in an observed year (ncap.lo / ncap.fx) is kept and the pin steps aside for it, per variant; it was deleted before.

  • A declared ncap.up in an observed year is left alone. The pin wrote a blank-key zero, which is the broader row and overrode any narrower ceiling.

  • getData(class = ) on a model or repository selects objects. It reached the row filter before, which skips a column it cannot find, so it selected nothing and the call looked like it had worked.

  • Ramp times are hours. rampup and rampdown of technology@af were a fraction of the year and are now the hours a technology needs to go from zero to full output. Existing values must be multiplied by 8760.

  • The share of an HOUR timeslice is one hour of the year in every calendar. newCalendar() and make_timetable() refuse one with a longer share; a block of hours is an HOUR timeslice several hours wide.

  • The averaged calendars s4_h24, m12_h24, wd7_h24 and w52_h24 hold the hours of an average day as single hours with the days they stand for in weight, as they did, and record no source.

  • The timeframe HOURTYPE of s4_hp3 is now HOUR: each block has the share of one hour, its hours in a day in width and the season’s days in weight, so models on it give other numbers than before.

  • The blocks of s4_hp3 changed: hour 21 moved from DAY to NIGHT, so DAY is h06 to h16 (11 hours), PEAK h17 to h20 (4) and NIGHT h21 to h05 (9). Stored calendars are not converted.

  • storage@fullYear is storage@cycle. The logical is replaced by a timeframe name: TRUE is "ANNUAL", FALSE is "timeframe". newStorage(fullYear = ) still works, with a message; saved storages are upgraded on interpolation.

  • A sampled calendar records its source in misc$sample_of, keeping the source calendar itself only when it is not one of the shipped ones. A sample that records the source’s two successor tables keeps working.

  • The shipped samples m12_subset_q1, d365_h24_1dps, d365_h24_1dpm and m12_d365_h24_1dpm now carry a source, so a storage level is no longer carried between sampled days that are not adjacent and results with storage can move.

  • A calendar that records no source and has no timeslice of zero weight has no gaps, whatever its weights, and no longer warns that its gaps cannot be located.

  • upgrade_model_calendar() adds the width column and the units slot to calendars saved without them, and renames a finest timeframe HOURTYPE whose timeslices are counted in hours to HOUR.

  • A calendar holding an average day as blocks under a timeframe DAYHOUR, written by a development version, is converted to single hours with the days in weight, with a message: a model built on it has to be rebuilt.

  • topia runs on d365_h24 and its sample d365_h24_1dps. s4_h24 is replaced by d365_h24_1dps throughout, and topia$weather / topia$demand carry the measured hourly series on that sample’s timeslices.

  • The simulated dataset is no longer shipped: topia_simulate() generates it for any calendar, and topia_profiles(calendar = ) accepts "d365_h24_1dps" (the default) and "d365_h24".

  • A calendar’s timetable holds timeslice names. Each timeframe column of calendar@timetable holds the name of the row’s timeslice at that timeframe (MONTH = "m01", HOUR = "m01_h00"), and the timeslice column is gone.

  • Code that read cal@timetable$timeslice reads the finest column, cal@timetable[[cal@default_timeframe]]. newCalendar() still accepts a table of per-timeframe labels, with or without a timeslice column, and converts it.

  • calendar@timeslices_in_frame counts the timeslices of each timeframe and equals lengths(cal@timeframes): 288 hours for m12_h24, where it gave 24. Reports show the same counts.

  • calendar gains a tokens slot, the timescales token of each timeframe (list(MONTH = "m12", HOUR = "h24")), read off the labels when the calendar is built; newCalendar(tokens = ) sets it and a sample takes its source’s.

  • upgrade_model_calendar() brings a calendar saved by an earlier version, or the calendars of a model or scenario, to the current form; timeslice names, shares and every model set stay as they were.

  • Saved calendars are upgraded where they are read or passed in (load_model(), load_scenario(), newModel(), setCalendar(), interpolate_model(), sampling, plots), so an upgraded model’s content hash differs from the recorded one.

  • calendar_samples(by = ) chooses what a member of level is: "label" (default, as before) draws the labels of the level wherever they occur, "timeslice" the timeslices of the level.

  • The shipped calendars are in the current form.

  • solve_recursive(on_error = "return") is now "continue", the spelling solve_by_sample() and solve_by_region() already use. The old value warns once and still works.

  • Solver-run arguments renamed. tmp.dir is solver.dir and tmp.del is transient, each warning once and forwarding; tmp.path and tmp.name are gone – pass the whole directory as solver.dir.

  • interpolate_model(horizon_segment = ) is the spelling of segment, which still works; naming both is refused unless they agree.

  • solve_scenario() and solve_model() declare invisible = rather than taking it through ....

  • interpolate_model(segment = ) is deprecated in favour of horizon_segment = and says so.

  • read_solution(dir = ) is deprecated in favour of solver.dir =, the name the solve and the write use, and says so.

  • solve_base_year() is deprecated: use interpolate_model(horizon_segment = "base_year") then solve_scenario(), which returns a scenario rather than a four-field list. horizon_segment is inferred from base_year_scenario when unset.

  • Base-year retirement follows base_year_capacity. solve_base_year(optimize_retirement = TRUE) warns; pass base_year_capacity = "free" to leave the base year open.

  • write_script() is now write_model(), after the stage it performs and the .write_model_*() backends it dispatches to. The old name warns once and forwards; write_sc() is removed.

  • A completed solve closes its run record even when wait = FALSE. The mm, mmcloud and neos backends solve in the R session and ignore wait, so their records read running for a finished solve.

  • import_solution() is deprecated: read_solution(object, run = , save = TRUE), which reads an external directory too (dir =).

  • A logical run is deprecated. run is the run’s label; use write_model() to write without solving.

  • set_gdxlib_path() / get_gdxlib_path() are deprecated and the gdxlib_path option is not read: GDX i/o goes through gamstransfer, in-process, so there is no library to locate. Use set_gams_path().

  • solve(object, "NAME") uses the name instead of discarding it.

  • Writing into a scenario whose outputs are sealed is refused. A write adds a run, so an outputs seal stops it; an inputs-only seal still allows it.

  • levcost()’s supply cost component is now input, and a process that consumes anything always reports one – the old name claimed to know the commodity was a fuel.

  • A free input is reported as a zero in the breakdown and in cost_yearly instead of being omitted, which used to make levcost() on a bare technology look like a complete cost.

  • A storage’s charger and discharger exist wherever the object declares an inp. / out. column. Read from the object, not the pruned parameters, so inp.invcost = 0 and inp.cap.up = Inf count and sparse = no longer decides its parts.

  • inp2out, inp2stg and duration declare both of their ends; comm, unit and cap2act declare nothing. A part declared by a zero or an Inf gains a real capacity variable, so an af bound on it starts binding.

  • An af, a link or an aux coupling alone no longer errors: validate_scenario_parameters() reports a part nothing sizes as unsized_part.

  • A storage level no longer crosses a gap left by a sampled calendar. A sample drops part of the year, so its successor relation chained blocks months apart; 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. interpolate_model(bridge_storage_gaps = TRUE), or the option of the same name, restores the old chain.

  • Ramping still bridges gaps, a ramp limit across one being restrictive rather than permissive, and gaps are located from the calendar a sample records as its source – so a hand-made sample 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, label_color and show_leafs are 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 the calendars the shipped profiles are built for; "m12_h24" and "topia_seasons" are removed.

Bug fixes

  • draw() draws technologies with an output group again.

  • The process window chart draws one bar per vintage. It showed only the earliest cohort, which for a vintaged process is the stock vintage that cannot be built, so every investable vintage was hidden and the chart read as having no investment window.

  • The model report calls the window chart’s processes “sampled” only when some were left out.

  • Rows appended to a parameter that is already on disk reach its store. .dat2par() wrote them to @data, which get_data_slot() reads only when the store comes back empty, so a coarse region’s investment rate was lost and the EAC then refused the cost that needed it.

  • A storage part whose stock a fixed ratio (inp2out.fx, duration.fx, inp2stg.fx) determines has it derived at interpolation; an undeclared part read as a hard zero and pinned the declared part to zero. Declared values that disagree are refused.

  • A set column read from a scenario’s on-disk store is character, as it is in memory. The dictionary encoding leaked past the file boundary through get_data_slot(), so the same table differed between the two storage modes by class alone.

  • getData(timeframe = ) on a single milestone year that has a calendar of its own rolls up with that year’s weights; it took the model calendar’s and understated the total by the year’s fraction.

  • The scenario report’s dispatch day is taken from the timeslices of the year it draws; it came back empty when the last milestone’s calendar lacked the first day of the model calendar.

  • getObjects(class = ) and getNames(class = ) take a vector of classes. A vector reached a comparison that recycles against the object list, so the call returned an arbitrary subset and said nothing.

  • A visible solver opens one console window on Windows, not two. system() already runs its argument through cmd.exe, so the cmd /k prefix added a second shell that outlived the solve.

  • A zero right-hand side reaches the solver as 0: a constraint’s own parameters now interpolate with every row explicit, so newConstraint(replace_zerros = ) is no longer needed and is deprecated.

  • It had substituted 1e-20 for each zero and for a zero defVal, which became the written parameter’s default, so every row of the constraint read 1e-20. An all-zero rhs table also used to stop the build; it interpolates.

  • A value too small to be meant is reported: validate_scenario_parameters() gains a tiny_value advisory, and audit_coefficients() reads the right-hand side it skipped by design – which is why a 1e-20 rhs was invisible to it.

  • A GMPL table carrying an NA paired its values with the wrong tuples; the write is refused naming the parameter.

  • write_model() and solve_scenario() declare round and round_tol rather than taking them through ....

  • round(scenario) / round_scenario(digits, tol) and write_model(round = ) strip values below a tolerance to exactly zero and optionally round the rest, for a scenario already built.

  • The JuMP backend narrates its build: a task block naming the project, scenario, run, solver and log files, a progress bar for the parameters, variables and constraints, the solver’s own log, and a closing summary.

  • It used to print one unconditional line per parameter and equation and nothing else, so a long build looked like a hung process. Needs ProgressMeter (en_install_julia_pkgs()).

  • A run directory is reported as project / scenario / run on three lines instead of one absolute path that wraps, and the record and log file names are named with it.

  • A detached run’s record is closed by the process that owns the solve, not by the one that launched it, however fast the solver finishes.

  • A detached run whose solver has stopped is no longer reported as running, and one that produced no usable solution reads failed rather than finished.

  • export_format = "gdx" works again, through GAMS Transfer (gamstransfer). No shared library is loaded, so set_gdxlib_path() is no longer a prerequisite.

  • A solved variable with a repeated dimension keeps it: the retirement variables and vTradeIr came back one dimension short.

  • Interpolation prints less at the default verbosity; verbose = 2 restores the detail.

  • A NEOS solve reports one status line, rewritten in place on a live console, rather than one line per poll.

  • GDX files are written compressed. GDX compression is a flag inside the format, so GAMS reads them unchanged; the file is several times smaller.

  • A scenario built with the default sparse = TRUE writes to GAMS; the refusal that asked for a second interpolation with sparse = FALSE is gone.

  • solver_options$neos_gams_gdx_cplex, neos_gams_gdx_cplex_barrier and neos_gams_gdx_cbc send the data to NEOS as a compressed GDX instead of inlining it as GAMS text, which is what gets an hourly model under the job-input cap.

  • verbose is a level on every pipeline verb, and a call’s level wins while it runs: 0 silent, 1 one line per stage, 2 per-parameter detail. As a logical it could not reach the gated emitters, so verbose = FALSE did not silence them.

  • Write, solve and read narrate like interpolation – a banner and one timed stage line each – and the backends’ own narration moved to level 2. A matrix solve’s loudest block, which nothing could silence, is now gated with the rest.

  • A run record never reads status: solved with no objective: a known objective is no longer overwritten with NA, and a run that was optimal while its vObjective came back empty is recorded unknown, with a warning naming the reason.

  • update() refuses period, on a horizon and through a config, and names newHorizon() / setHorizon(). intervals is derived from it, so writing one slot at a time left the milestones naming years the new period did not contain.

  • A slot of an unnamed object is checked for conflicting rows instead of stopping. @name is character(0) there, and the message built from it made the condition NA, so update() on any unnamed object died before a row was read.

  • update(config, ...) refuses the calendar slots derived from a timetable and names setCalendar(): timetable itself, timeslice_share, timeframe_rank, timeslices_in_frame, timeslice_family and the three relation slots.

  • They were accepted only because update() forwards every argument into the calendar’s slots, so setting one wrote it and left the rest describing the previous calendar.

  • A table handed to a keyed slot is checked for conflicting rows whether it is a data.frame or a data.table. The guard used data.frame indexing, which a data.table reads as a column name, so newSupply(supply = <data.table>) stopped on an error.

  • levcost() on a container says what it could not price: a process whose input commodity nothing supplies was skipped behind a verbose-gated message. It now warns once and carries attr(x, "unpriced") naming each process and the reason.

  • levcost() takes the region from every slot that names one, as by_region always did. Reading only @region and @capacity priced a technology whose regions appear in invcost alone in a region where no row matched, so every number was NA.

  • A trade levelized cost carries the traded commodity’s unit, taken from the container. PJ-priced fuel corridors otherwise sat in one table beside GWh-priced ones with nothing to tell them apart.

  • A levy on a storage part that does not exist is reported instead of charging nothing: inp.cap, out.ncap and their siblings are summed over the part’s own capacity map, so a rate on a storage without that converter multiplied nothing.

  • validate_scenario_parameters() names it as levy_no_part, per cell and per levy – an advisory, since a levy selecting every storage legitimately sweeps reservoir-only ones.

  • 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 a timeslice weight, so a model returns the same capacities and objective on any of them, and a timeframe named HOUR whose timeslices are longer than an hour is refused.

  • 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.