Everything the TOPIA teaching model needs, in one list: the maps of the
imaginary country "Topia", the deterministic weather / demand / stock
profiles, and the kit of ready energyRt building blocks and scenario levers.
Built by data-raw/topia_maps.R, topia_data.R and topia_modules.R,
folded together by data-raw/topia_assemble.R.
Format
A named list of five elements:
- geoscales
named list of four geoscales::GeoScale objects (
squares,honeycomb,island,continent). Each carries the same hierarchy –nation TOPIA -> zone Z1..Z5 -> provinceoverR01..R12– and that layout's polygons, plus a planarareaweight. This is the dataset's ONLY copy of the geometry: the plaintopia$mapand thetopia$geohierarchy table were removed in 0.91. Get either back withgeoscales::geoscale_geometry(gs, "province")andgeoscales::geoscale_leaftable(gs). Every layout draws the same twelve provinces in different places, and each assigns the codes so that a zone is one contiguous block on that picture. The finest geoframe isprovince, notregion: energyRt usesregionfor a model's own spatial dimension, so a geoframe of that name would makelevel = "region"ambiguous.provinceis the atom key (geoscales::geoscale_key(gs)), and the province names are ingeoscales::geoscale_labels(gs); zones and the nation have none.- weather
solar / wind / hydro capacity factors for the two calendars TOPIA runs on: a list with one table per calendar,
topia$weather$s4_h24andtopia$weather$d365_h24. Columnsdataset,resource(WSOL/WWIN/WHYD),region,cluster(the resource grade,NAwhere ungraded),timesliceandwval(capacity factor, 0-1).timesliceis bound to the table's calendar andregionto the hierarchy atprovince(timescales::calendar_link()), so a conversion given another calendar stops instead of matching the labels.samplecarries the graded hourly series ond365_h24– wind inHI/MD/LO, solar inFL/TH– andsimulatedthe small stand-in ons4_h24, whoseclusterisNAthroughout. A clustered technology therefore has no weather rows ons4_h24.- demand
relative electricity-load shapes by province and timeslice, one table per calendar as in
weather. Columnsdataset,region,timesliceandload(relative, mean ~1); scale by a province's annual demand and the timeslice shares to get energy per timeslice.- stock
deterministic base-year installed capacity per technology. Columns
techandgw.- grades
the resource grades the measured weather is split into:
resource,region,cluster,ann_cf(annual capacity factor),avail(the ceiling, GW) andcells(how many grid cells it pools). 36 rows – a province appears only in the grades its own ground reaches.- modules
the kit – see below.
Details
The profile tables are region-agnostic; expand them to a model's regions
with topia_profiles(). For synthetic shapes on any calendar (rather than
TOPIA's saved curves) use topia_profile().
The modules kit
Mirrors the structure of IDEEA::ideea_modules. Assemble a model from a
chosen region layout, solve it, and layer the levers to run scenarios (see
the topia-use vignette).
- info
a description string.
- calendars
the two calendars TOPIA runs on:
d365_h24(365 days x 24 hours, 9,126 timeslices), which is the only one carrying the measured graded weather, ands4_h24(4 seasons x 24 hours, 96), the small simulated stand-in. Samples of the hourly calendar –d365_h24_1dpm(301) andd365_h24_1dps(101) – live in calendars and keepd365_h24's timeslice names, so the measured grades survive being filtered onto them. The symmetric unit calendars (unit_s4, 4 equal seasons;unit_s4h4, 4x4) ship beside the unit kits under$unit$calendars, not here.- horizons
planning horizons, named for their MILESTONES rather than the period end, with
BYmarking a one-year base year at the front.BY2025_50_by10= milestones 2025/2030/2040/2050, a base year then 10-year intervals (its periods run to 2055). Each milestone is the MID-point of its period, so that is where its costs are discounted from.BY2025= the base year alone, for the unit kits.- electricity
THE model, over all twelve provinces
R01..R12:repo(the repository),regions,calendar(the name of the calendar it was built for),geoscale(itsnation -> zone -> provincehierarchy, without geometry – a model MUST carry it, see the examples), and the scenario leversCO2_CAP,CT_CO2,EARLY_RETandGREEN_H2, which are NOT inrepoand are added to a scenario on top of it. Built bydata-raw/topia_model.R, which tanglesvignettes/topia-build.Rmd– the vignette is the source, so what it documents and what ships cannot drift apart. Smaller cases come fromsubset_model_regions(), not from a saved layout.The resources are CONCENTRATED, which is what drives trade:
COAandGASare balanced per ZONE (commodity@geoframe) and traded between zones onTBD_COA_*/TBD_GAS_*corridors, with finiteava.upendowments – coal cheap and plentiful inWEST, gas inEAST– above whichIMP_COA/IMP_GASare the unbounded backstop. Electricity is balanced and traded at the region level (TBD_ELC_*). Reservoir hydro sits inC4(12 GW),E1(6) andC1(3), and the single nuclear station inC1. Costs are USD (MUSD/GW, MUSD/PJ).- unit
the "unit model" kits (
U1,U3): every input is 1 on the symmetricunit_s4calendar, single-yearunithorizon,discount = 0, so each variant's objective is a small hand-checkable integer – baseU1solves to exactly 8,U3(trade chain from theW1endowment) to 36,SUP_CURVE(2-step unit supply curve replacing the flat supply) to 10, the self-containedSOLARrepository (on/off resource fromtopia_profile()+ storage bridging) to 10. The arithmetic is written out indata-raw/topia_modules.Rand pinned bytest-unit-model.R.
See also
topia_profiles(), topia_profile(),
calendars, horizons, asSupplyCurve(), the TOPIA vignettes
Other topia:
topia_profile(),
topia_profiles(),
topia_simulate()
Examples
names(topia)
#> [1] "geoscales" "links" "weather" "demand" "stock" "grades"
#> [7] "modules"
names(topia$geoscales)
#> [1] "squares" "honeycomb" "island" "continent"
names(topia$weather)
#> [1] "d365_h24" "s4_h24"
head(topia$weather$s4_h24)
#> dataset resource region cluster timeslice wval
#> 1 simulated WHYD R01 <NA> WIN_h00 0.535
#> 2 simulated WHYD R01 <NA> WIN_h01 0.535
#> 3 simulated WHYD R01 <NA> WIN_h02 0.535
#> 4 simulated WHYD R01 <NA> WIN_h03 0.535
#> 5 simulated WHYD R01 <NA> WIN_h04 0.535
#> 6 simulated WHYD R01 <NA> WIN_h05 0.535
topia$stock
#> tech gw
#> 1 ECOA 6
#> 2 EGAS 3
#> 3 ENUC 2
#> 4 EHYD 5
#> 5 ESOL 1
#> 6 EWIN 1
if (FALSE) { # \dontrun{
gs <- topia$geoscales$honeycomb # hierarchy + that layout's polygons
geoscales::geoscale_leaftable(gs) # the province table
plot_geoscale(gs, type = "map")
um <- topia$modules$electricity
mod <- newModel("TOPIA", data = um$repo,
calendar = topia$modules$calendars$s4_h24,
region = um$regions,
horizon = topia$modules$horizons$BY2025_50_by10,
discount = 0.05)
mod <- setGeoscale(mod, um$geoscale)
scen <- solve_scenario(interpolate_model(mod, "BASE"),
solver = solver_options$glpk)
# the unit model: hand-checkable integer objective (8)
uk <- topia$modules$unit$U1
umod <- newModel("UNIT", data = uk$repo,
calendar = topia$modules$unit$calendars$unit_s4,
region = uk$regions,
horizon = topia$modules$horizons$BY2025, discount = 0)
} # }
