From 86cc7fcbbe2dca1d47fd29d0c5bd9e87b805d4c0 Mon Sep 17 00:00:00 2001 From: Bobby Powers Date: Thu, 14 May 2026 07:50:27 -0700 Subject: [PATCH 01/49] doc: add Vensim macro support design plan The design phase for Vensim macro support: the validated design plan, a first-party reference document, and a 14-model macro test corpus from the MetaSD model library. The design reuses the engine's existing module machinery rather than adding a new primitive. Simlin already implements its stock-and-flow builtins (SMTH1, DELAY3, and friends) as small models instantiated as modules on function-call syntax; this generalizes that mechanism from a fixed build-time stdlib registry to a per-project, data-driven one. A macro definition becomes a Model carrying a new optional MacroSpec marker; a single-output invocation stays as function-call equation text expanded at compile time; only the multi-output ':' form is materialized in the datamodel. The compiler and VM are unchanged. Key decisions: - One additive protobuf field on Model; no new datamodel primitive - XMILE supported symmetrically via the simlin: extension namespace - Macros shadow builtins, eliminating a current silent-wrong-result bug - 7 implementation phases, C-LEARN as the hero validation Includes docs/reference/vensim-macros.md (implementation reference) and test/metasd/ (14 macro-using models, CC BY 3.0, trimmed to .mdl/.vdf sources with per-model provenance). Two of the bundled .vdf fixtures trip the Rust VDF slot-table scanner's known under-count; they are added to the vdf_structural_invariants exemption list and tracked in #549. --- docs/README.md | 2 + docs/design-plans/2026-05-13-macros.md | 262 + docs/reference/vensim-macros.md | 1235 ++++ .../tests/vdf_structural_invariants.rs | 20 +- .../FREE/FREE6/FREE6-corrected/all_data.mdl | 483 ++ .../FREE/FREE6/FREE6-corrected/all_data2.vdf | Bin 0 -> 9616 bytes .../FREE/FREE6/FREE6-corrected/conversion.mdl | 145 + .../FREE6/FREE6-corrected/conversion2.mdl | 161 + .../FREE6/FREE6-corrected/conversion3.mdl | 256 + .../FREE6/FREE6-corrected/energy_pos_loop.mdl | 298 + .../FREE6/FREE6-corrected/energy_tech_cld.mdl | 145 + .../FREE/FREE6/FREE6-corrected/tech_data.mdl | 52 + .../FREE/FREE6/FREE6-original/all_data.mdl | 483 ++ .../FREE/FREE6/FREE6-original/all_data2.vdf | Bin 0 -> 9616 bytes .../FREE/FREE6/FREE6-original/conversion.mdl | 145 + .../FREE/FREE6/FREE6-original/conversion2.mdl | 161 + .../FREE/FREE6/FREE6-original/conversion3.mdl | 256 + .../FREE6/FREE6-original/energy_pos_loop.mdl | 298 + .../FREE6/FREE6-original/energy_tech_cld.mdl | 145 + .../FREE/FREE6/FREE6-original/free 6.mdl | 5109 +++++++++++++++++ .../FREE/FREE6/FREE6-original/tech_data.mdl | 52 + test/metasd/FREE/PROVENANCE.md | 47 + test/metasd/bathtub-statistics/PROVENANCE.md | 39 + .../bathtub-statistics/integration3.mdl | 406 ++ test/metasd/beer-game/PROVENANCE.md | 49 + test/metasd/beer-game/RealBeer4-Sterman13.mdl | 765 +++ test/metasd/covid19-us-homer/PROVENANCE.md | 41 + .../homer v8/Covid19US v8.mdl | 2725 +++++++++ test/metasd/critical-slowing/PROVENANCE.md | 39 + .../critical-slowing/critical-slowing.mdl | 245 + .../early-warnings-catastrophe/PROVENANCE.md | 42 + .../catastropeWarning2.mdl | 512 ++ .../industrial-dynamics/IDch15/IDch15d.mdl | 1020 ++++ test/metasd/industrial-dynamics/PROVENANCE.md | 37 + .../InterpolatingArrays.mdl | 363 ++ .../metasd/interpolating-arrays/PROVENANCE.md | 32 + test/metasd/pink-noise/PROVENANCE.md | 34 + test/metasd/pink-noise/PinkNoise2010.mdl | 351 ++ .../scientific-revolution/PROVENANCE.md | 38 + test/metasd/scientific-revolution/scirev7.mdl | 1321 +++++ test/metasd/scientific-revolution/scirev8.mdl | 1870 ++++++ .../social-network-valuation/PROVENANCE.md | 40 + .../social-network-valuation/groupon 1.mdl | 456 ++ .../social-network-valuation/groupon 2.mdl | 776 +++ .../social-network-valuation/groupon 3.mdl | 787 +++ .../social-network-valuation/groupon3mid.vdf | Bin 0 -> 52037 bytes .../social-network-valuation/groupon3opt.vdf | Bin 0 -> 51933 bytes .../social-network-valuation/groupon3pess.vdf | Bin 0 -> 51913 bytes .../groupon3worst.vdf | Bin 0 -> 51697 bytes .../social-network-valuation/optimistic.vdf | Bin 0 -> 53630 bytes .../social-network-valuation/pessimistic.vdf | Bin 0 -> 53618 bytes test/metasd/theil-statistics/PROVENANCE.md | 38 + test/metasd/theil-statistics/Theil_2011.mdl | 769 +++ test/metasd/thyroid-dynamics/PROVENANCE.md | 36 + .../thyroid-dynamics/thyroid-2008-d.mdl | 1313 +++++ test/metasd/wonderland/PROVENANCE.md | 38 + test/metasd/wonderland/Wonderland3.mdl | 561 ++ 57 files changed, 24493 insertions(+), 5 deletions(-) create mode 100644 docs/design-plans/2026-05-13-macros.md create mode 100644 docs/reference/vensim-macros.md create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/all_data.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/all_data2.vdf create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/conversion.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/conversion2.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/conversion3.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/energy_pos_loop.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/energy_tech_cld.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-corrected/tech_data.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/all_data.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/all_data2.vdf create mode 100644 test/metasd/FREE/FREE6/FREE6-original/conversion.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/conversion2.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/conversion3.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/energy_pos_loop.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/energy_tech_cld.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/free 6.mdl create mode 100644 test/metasd/FREE/FREE6/FREE6-original/tech_data.mdl create mode 100644 test/metasd/FREE/PROVENANCE.md create mode 100644 test/metasd/bathtub-statistics/PROVENANCE.md create mode 100644 test/metasd/bathtub-statistics/integration3.mdl create mode 100644 test/metasd/beer-game/PROVENANCE.md create mode 100644 test/metasd/beer-game/RealBeer4-Sterman13.mdl create mode 100644 test/metasd/covid19-us-homer/PROVENANCE.md create mode 100644 test/metasd/covid19-us-homer/homer v8/Covid19US v8.mdl create mode 100644 test/metasd/critical-slowing/PROVENANCE.md create mode 100644 test/metasd/critical-slowing/critical-slowing.mdl create mode 100644 test/metasd/early-warnings-catastrophe/PROVENANCE.md create mode 100644 test/metasd/early-warnings-catastrophe/catastropeWarning2.mdl create mode 100644 test/metasd/industrial-dynamics/IDch15/IDch15d.mdl create mode 100644 test/metasd/industrial-dynamics/PROVENANCE.md create mode 100644 test/metasd/interpolating-arrays/InterpolatingArrays.mdl create mode 100644 test/metasd/interpolating-arrays/PROVENANCE.md create mode 100644 test/metasd/pink-noise/PROVENANCE.md create mode 100644 test/metasd/pink-noise/PinkNoise2010.mdl create mode 100644 test/metasd/scientific-revolution/PROVENANCE.md create mode 100644 test/metasd/scientific-revolution/scirev7.mdl create mode 100644 test/metasd/scientific-revolution/scirev8.mdl create mode 100644 test/metasd/social-network-valuation/PROVENANCE.md create mode 100644 test/metasd/social-network-valuation/groupon 1.mdl create mode 100644 test/metasd/social-network-valuation/groupon 2.mdl create mode 100644 test/metasd/social-network-valuation/groupon 3.mdl create mode 100644 test/metasd/social-network-valuation/groupon3mid.vdf create mode 100644 test/metasd/social-network-valuation/groupon3opt.vdf create mode 100644 test/metasd/social-network-valuation/groupon3pess.vdf create mode 100644 test/metasd/social-network-valuation/groupon3worst.vdf create mode 100644 test/metasd/social-network-valuation/optimistic.vdf create mode 100644 test/metasd/social-network-valuation/pessimistic.vdf create mode 100644 test/metasd/theil-statistics/PROVENANCE.md create mode 100644 test/metasd/theil-statistics/Theil_2011.mdl create mode 100644 test/metasd/thyroid-dynamics/PROVENANCE.md create mode 100644 test/metasd/thyroid-dynamics/thyroid-2008-d.mdl create mode 100644 test/metasd/wonderland/PROVENANCE.md create mode 100644 test/metasd/wonderland/Wonderland3.mdl diff --git a/docs/README.md b/docs/README.md index 2364a21c8..0a9ec32c7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -27,6 +27,7 @@ - [design-plans/2026-05-06-ltm-482-variable-level-loop-enumeration.md](design-plans/2026-05-06-ltm-482-variable-level-loop-enumeration.md) -- Tiered LTM loop enumeration: variable-level Johnson first, expand only the cross-element subgraph - [design-plans/2026-05-09-ltm-503-cross-element-agg.md](design-plans/2026-05-09-ltm-503-cross-element-agg.md) -- Cross-element LTM scoring: per-element arrayed-target partials, element-level cross-element loops, array reducers as aggregate nodes - [design-plans/2026-05-11-ltm-arrays-hardening.md](design-plans/2026-05-11-ltm-arrays-hardening.md) -- Arrayed/cross-element LTM hardening: unify the reference-site walkers behind one classification IR (#520), then layer eight fixes (#487, #511, #510, #514, #515, #483, #502, #492) + - [design-plans/2026-05-13-macros.md](design-plans/2026-05-13-macros.md) -- Vensim macro support: macros as a data-driven generalization of the stdlib module mechanism, persisted via a `MacroSpec` marker on `Model`; 7 implementation phases - [plans/](plans/README.md) -- Implementation plans (active and completed) - [test-plans/](test-plans/) -- Human verification plans for completed features - [implementation-plans/](implementation-plans/) -- Detailed phase-by-phase implementation plans @@ -40,6 +41,7 @@ ## Domain Knowledge - [reference/xmile-v1.0.html](reference/xmile-v1.0.html) -- XMILE interchange format specification +- [reference/vensim-macros.md](reference/vensim-macros.md) -- Vensim macros (`:MACRO:`): definition/call syntax, semantics (per-invocation stock state, locality, recursion), XMILE `` representation, xmutil's mapping, and implementation implications - [reference/ltm--loops-that-matter.md](reference/ltm--loops-that-matter.md) -- Loops That Matter technique: link scores, loop scores, algorithm reference - [array-design.md](array-design.md) -- Array/subscript design notes diff --git a/docs/design-plans/2026-05-13-macros.md b/docs/design-plans/2026-05-13-macros.md new file mode 100644 index 000000000..492f6f3fa --- /dev/null +++ b/docs/design-plans/2026-05-13-macros.md @@ -0,0 +1,262 @@ +# Vensim Macro Support Design + +## Summary + +Vensim's `.mdl` format and the XMILE standard both let modelers define **macros** -- reusable, parameterized templates of equations (including stocks and flows) that other parts of a model invoke like function calls. Today Simlin's engine parses these definitions and then throws them away: a macro-bearing model loses its macros on import, and the writers refuse to emit them. This design makes macros a first-class, persistent concept that survives the full import -> store -> simulate -> export lifecycle. + +The key insight is that Simlin already has a macro system and doesn't know it. The engine's stock-and-flow builtins (`SMTH1`, `DELAY3`, `TREND`, `NPV`) are implemented as tiny models that the compiler instantiates as **modules** -- self-contained sub-model instances with their own state -- whenever it sees the corresponding function-call syntax. This design generalizes that machinery from a fixed, compiled-in standard library to a per-project, data-driven registry. A macro definition becomes an ordinary model carrying one new marker field, a `MacroSpec`, that records its parameters and outputs. A single-output macro invocation needs no new representation at all: it stays as plain function-call equation text (`y = MYMACRO(a, b)`), exactly like a builtin call, and the synthetic module that runs it is created only at compile time. Only Vensim's multi-output `:` call syntax -- which returns several named values at once and so can't be expressed as equation text -- is materialized explicitly at import. The simulation compiler and VM are left untouched, because they already handle modules generically: per-instance state, recursive nesting, arrayed (apply-to-all) unrolling, and global-time access all work for free. The work is therefore concentrated in the front end -- parsing, the import/export converters, and a unified call-name resolver -- plus the datamodel and protobuf changes needed to persist the new marker. + +## Definition of Done + +Vensim macros become a first-class, persistent concept in the Simlin engine -- instead of being silently parsed and discarded as they are today. + +1. **Parsing & representation.** The engine parses the full Vensim `:MACRO:` syntax -- including the `:`-separated multi-output form that no parser handles today -- and the XMILE `` element. Macros are represented in the datamodel and protobuf so macro identity persists across import -> storage -> export: a macro-bearing model survives a round-trip with its macros intact, and the MDL and XMILE writers emit macros instead of rejecting them. + +2. **Simulation.** Models that invoke macros simulate with faithful Vensim semantics: per-invocation independent stock state, positional argument binding, multi-equation bodies with macro-local helper variables, arrayed and expression-valued arguments, `$`-suffixed global-time access, multiple outputs, and macro-to-macro nesting. A macro whose name shadows a builtin resolves to the macro, not the builtin. Recursive macros -- which Vensim's definition-before-use rule effectively precludes and no test model exercises -- are resolved in the design as either a supported case or an explicit, documented limitation. + +3. **Validation.** The 6 existing `test/test-models/tests/macro_*` fixtures are wired into the active test suite and pass; C-LEARN's three invoked macros (`SAMPLE UNTIL`, `SSHAPE`, `RAMP FROM TO`) compute correct values against Vensim DSS reference output; and the macro-using metasd models validate against Vensim DSS reference outputs. + +**Out of scope.** C-LEARN's non-macro blockers (circular dependencies, dimension mismatches, unit errors) and full end-to-end C-LEARN simulation -- tracked separately. Native authoring or interactive editing of macros in the Simlin UI. Fixing xmutil's C++ macro parser -- the native engine MDL parser is the path forward. (The diagram must still open macro-bearing models without crashing -- that floor is in scope -- but dedicated macro visualization or editing UX is not.) + +## Acceptance Criteria + +### macros.AC1: Macro definitions parse and represent faithfully +- **macros.AC1.1 Success:** A `.mdl` `:MACRO:` block imports as a macro-marked `Model` whose `MacroSpec.parameters` matches the header's input list in order, with body variables matching the body equations. +- **macros.AC1.2 Success:** A `:MACRO:` header with a `:` output list (`add3(a,b,c : minval, maxval)`) imports with `MacroSpec.additional_outputs` populated in order. +- **macros.AC1.3 Success:** An XMILE `` element imports as a macro-marked `Model`; an expression-form `` is normalized into a macro-named body variable. +- **macros.AC1.4 Success:** A macro-bearing project round-trips losslessly through protobuf and through JSON -- `MacroSpec` and macro body are identical after deserialize. +- **macros.AC1.5 Success:** `$`-suffixed time references in a macro body (`TIME STEP$`, `Time$`) import as the canonical time identifiers. +- **macros.AC1.6 Failure:** A `:MACRO:` block with no `:END OF MACRO:` reports a clear parse error. +- **macros.AC1.7 Edge:** A macro defined but never invoked (C-LEARN's `INIT`) imports as a valid macro-marked model and is preserved. + +### macros.AC2: Single-output invocations simulate with correct Vensim semantics +- **macros.AC2.1 Success:** A stockless single-output macro invocation (`macro_expression`) simulates and matches the fixture's `output.tab`. +- **macros.AC2.2 Success:** A stock-bearing macro invocation (`macro_stock`) simulates with correct per-invocation integration, matching the 11-step `output.tab`. +- **macros.AC2.3 Success:** The same macro invoked at multiple call sites produces independent per-invocation state -- two stock-bearing invocations don't share a stock. +- **macros.AC2.4 Success:** A macro invoked with an expression-valued argument (`MYMACRO(a + b, t)`) simulates correctly, with the argument evaluated in the caller's context. +- **macros.AC2.5 Success:** A multi-equation macro body with macro-local helpers (`macro_multi_expression`) simulates correctly; helper names don't leak into the caller's namespace. +- **macros.AC2.6 Success:** A macro that calls another macro (`macro_cross_reference`) expands recursively and simulates correctly. +- **macros.AC2.7 Success:** A macro body referencing global time via the `$` escape simulates with the global time values. +- **macros.AC2.8 Edge:** A macro invocation nested inside a larger expression (`y = c + MYMACRO(x, t)`) expands and simulates correctly. + +### macros.AC3: Multi-output and arrayed invocation +- **macros.AC3.1 Success:** A multi-output invocation (`total = add3(a,b,c : minv, maxv)`) materializes as a module instance; `total` receives the primary output and `minv`/`maxv` become model variables holding the additional outputs. +- **macros.AC3.2 Success:** `minv` and `maxv` are referenceable by subsequent equations and carry the correct values. +- **macros.AC3.3 Success:** The metasd multi-output models (`THEIL`, `SSTATS`) expand and simulate. +- **macros.AC3.4 Success:** An arrayed invocation (`y[Dim] = MYMACRO(x[Dim], …)`) expands into one independent macro instance per dimension element. +- **macros.AC3.5 Edge:** An arrayed invocation of a stock-bearing macro gives each element its own persistent stock. + +### macros.AC4: Round-trip and export +- **macros.AC4.1 Success:** A macro-bearing `.mdl` file round-trips with definitions emitted as `:MACRO:` blocks and invocations preserved. +- **macros.AC4.2 Success:** A macro-bearing XMILE file round-trips with `` elements and `simlin:` extensions; the `` header option is emitted. +- **macros.AC4.3 Success:** A multi-output macro round-trips through `.mdl` with the `:` call syntax reconstructed. +- **macros.AC4.4 Success:** A cross-format conversion (`.mdl` → datamodel → `.xmile`) preserves macro definitions and invocations. +- **macros.AC4.5 Edge:** A single-output-only model exports as standards-clean XMILE with no extensions; multi-output triggers the `simlin:` extension. + +### macros.AC5: Error handling and edge cases +- **macros.AC5.1 Failure:** A macro invoked with the wrong number of arguments reports an arity-mismatch diagnostic naming the macro. +- **macros.AC5.2 Failure:** A directly or mutually recursive macro is rejected with a cycle-detection error rather than expanding without termination. +- **macros.AC5.3 Failure:** Two macros sharing a name, or a macro name colliding with a model name, report a registry-build diagnostic. +- **macros.AC5.4 Success:** A macro shadowing a builtin (`SSHAPE`, `RAMP FROM TO`) resolves to the macro; the builtin is not invoked. +- **macros.AC5.5 Success:** A macro defined after its first use (`macro_trailing_definition`) still resolves and simulates. +- **macros.AC5.6 Failure:** A call to a name that is neither a macro, a stdlib function, nor a builtin reports an "unknown function or macro" error. + +### macros.AC6: Validation corpus and consumer floor +- **macros.AC6.1 Success:** All six `test/test-models/tests/macro_*` fixtures are wired into the active test suite and pass. +- **macros.AC6.2 Success:** C-LEARN's macros (`SAMPLE UNTIL`, `SSHAPE`, `RAMP FROM TO`, `INIT`) parse, register, and expand with no macro-specific errors. +- **macros.AC6.3 Success:** Focused models invoking C-LEARN's `SAMPLE UNTIL`, `SSHAPE`, and `RAMP FROM TO` with known inputs match Vensim DSS reference output. +- **macros.AC6.4 Success:** All 14 macro-using metasd models pass the expansion tier; those without unrelated blockers match Vensim DSS reference output. +- **macros.AC6.5 Success:** The diagram opens every macro-bearing fixture without crashing. +- **macros.AC6.6 Success:** Macro-marked models don't appear as standalone, navigable models in the diagram's model list. + +## Glossary + +- **Vensim**: A widely used commercial system dynamics modeling tool; its native model format is the `.mdl` text format. "Vensim DSS" is the professional edition, used here to generate reference simulation outputs. +- **XMILE**: The open XML standard for interchanging system dynamics models (`docs/reference/xmile-v1.0.html`); Simlin reads and writes it alongside `.mdl`. +- **Macro**: A reusable, parameterized template of equations -- potentially including stocks and flows -- that a model invokes like a function call. Defined in `.mdl` with a `:MACRO: ... :END OF MACRO:` block or in XMILE with a `` element. +- **Stock / flow / aux**: The three core system dynamics variable kinds. A stock accumulates over time (integrates its flows); a flow is a rate that changes a stock; an aux (auxiliary) is a computed intermediate value. In the engine these are the variants of `datamodel::Variable`. +- **Module**: A self-contained instance of a sub-model embedded in a larger model, with its own independent per-instance state. Represented by `Variable::Module` and `ModuleReference`. Macros expand into modules at compile time. +- **Stdlib (standard library)**: The engine's built-in stock-and-flow functions (`SMTH1`, `DELAY3`, `TREND`, `NPV`), each implemented as a small model (`stdlib/*.stmx`, transpiled to `stdlib.gen.rs`) and instantiated as a module by the compiler. Macros generalize exactly this mechanism. +- **Builtin**: A function recognized natively by the engine. A "module-function" builtin (the stdlib functions above) expands into a module instance; this design adds a rule that a project macro shadows a builtin of the same name. +- **`BuiltinVisitor`**: The compiler pass (`src/simlin-engine/src/builtins_visitor.rs`) that walks equation ASTs, recognizes function-call syntax for module-functions, and rewrites each call into a synthetic module instance plus hoisted argument variables. +- **MacroSpec**: The one new datamodel field this design adds to `Model`. It marks a model as a callable macro template and records its formal `parameters`, `primary_output`, and `:`-list `additional_outputs`. +- **Datamodel**: Simlin's in-memory, serializable representation of a project, model, and variables (`src/simlin-engine/src/datamodel.rs`), independent of any file format. Both `.mdl` and XMILE import to and export from it. +- **Apply-to-all**: A system dynamics construct where one equation applies element-wise across every element of a dimension (subscript). The engine "unrolls" it into per-element computation; arrayed macro invocation rides this existing path. +- **Multi-output (`:`) call syntax**: Vensim's macro-call form `total = add3(a, b, c : minv, maxv)`, where outputs after the `:` bind additional named values. It can't be expressed as plain equation text, so it is materialized as an explicit module plus binding variables. +- **`$`-time escape**: Vensim macro-body syntax (e.g. `Time$`, `TIME STEP$`) that reaches the caller's global time variables instead of any macro-local shadow. It needs only a front-end translation to canonical time identifiers because the VM already resolves global time at any module nesting depth. +- **C-LEARN**: The "hero" model driving this work -- a real macro-using Vensim model whose macros (`SAMPLE UNTIL`, `SSHAPE`, `RAMP FROM TO`, `INIT`) the implementation must parse, expand, and simulate correctly. +- **metasd corpus**: A collection of 14 macro-using community models used as a broader validation corpus beyond the hero model and the bundled fixtures. +- **`test/test-models/`**: The integration-test directory of model files paired with expected simulation outputs (`output.tab`); the six `macro_*` fixtures live here. +- **Round-trip**: Importing a model to the datamodel and exporting it back out without losing information -- a core correctness property for macro persistence. +- **Protobuf**: Protocol Buffers, the binary serialization format Simlin uses for persisted projects (`project_io.proto`). Changes must be additive for backward compatibility because serialized instances exist in a database. +- **serde**: The Rust serialization framework; here, specifically the conversion layer (`src/simlin-engine/src/serde.rs`) between the datamodel and the protobuf representation. +- **AST**: Abstract syntax tree -- the parsed, structured form of an equation that the parser produces and `BuiltinVisitor` rewrites. +- **Arity**: The number of arguments a macro or function expects; an "arity-mismatch" diagnostic is reported when a call passes the wrong count. +- **xmutil**: Simlin's existing C++-derived Vensim-to-XMILE converter (test-only); its macro parser is explicitly not the path forward -- the native Rust MDL parser is. +- **`$⁚` prefix**: The naming convention `BuiltinVisitor` uses for compiler-generated module instances and hoisted argument variables, which are never serialized. + +## Architecture + +Macros reuse Simlin's existing module machinery instead of adding a new primitive. The engine already implements its stock-and-flow builtins -- `SMTH1`, `DELAY3`, `TREND`, `NPV` -- as small models that the compiler instantiates as modules when it sees function-call syntax. That mechanism is already a macro system. This design generalizes it from a fixed, build-time stdlib registry to a per-project, data-driven one. + +The representation has two asymmetric halves. + +A **macro definition** becomes an ordinary `datamodel::Model` -- its body stocks, flows, and auxes are just `Model.variables` -- plus one new optional field, a `MacroSpec`: + +```rust +struct MacroSpec { + parameters: Vec, // formal parameters, in positional calling order + primary_output: String, // body variable the call-site LHS receives + additional_outputs: Vec, // the ':'-list outputs, usually empty +} +``` + +Macro-definition models live in the existing flat `project.models` list, distinguished only by carrying a `MacroSpec`. This mirrors how stdlib models are already just entries in that list. + +A **macro invocation**, in the common case, is nothing but function-call equation text. `y = MYMACRO(a, b)` is stored as an ordinary `Aux`/`Stock`/`Flow` equation, exactly like `y = SMTH1(x, 5)` today. It's never materialized in the datamodel; the synthetic module instance that runs it is a compile-time artifact that's never serialized. So a single-output invocation round-trips for free. The exception is Vensim's multi-output `:` syntax -- `total = add3(a, b, c : minv, maxv)` -- where equation-text sugar can't return multiple named values. A multi-output invocation is materialized at import as an explicit `Variable::Module` plus auxiliary variables that read the module's declared outputs. Both forms converge on the same module-instance mechanism at compile time; they differ only in whether the instance is compile-time sugar or materialized at import. + +The components: + +- **Module-function resolver.** Unifies the stdlib lookup and a per-project macro registry. Given a call name, it answers either "not a module-function" or `{ target model, ordered parameter ports, primary output }`. The `BuiltinVisitor` pass and the `model.rs` sites that consult the hardcoded `is_stdlib_module_function`/`stdlib_args` today all route through it. +- **Macro registry.** Built at compile time from the macro-marked models in `project.models`. It carries name-resolution precedence: a project macro shadows a stdlib function or builtin of the same name. This is Vensim's rule, and it fixes a current silent-wrong-result bug where C-LEARN's `RAMP FROM TO` resolves to an arity-compatible builtin. +- **Compile-time expansion.** `BuiltinVisitor` turns `MYMACRO(a, b)` into a synthetic module instance, hoists expression-valued arguments into synthetic auxes, and replaces the call with a reference to the instance's output. This is the existing stdlib transformation, reused unchanged -- only the lookup is generalized. +- **Import and export.** `mdl/convert` builds macro-marked models from the already-parsed `MacroDef` AST; the empty `xmile::Macro` stub is fleshed out. The MDL and XMILE writers emit `:MACRO:` blocks and `` elements. + +System boundaries: the datamodel gains exactly one optional field on `Model`; `Variable::Module` and `Project` are unchanged. The simulation compiler and VM are unchanged -- they already handle modules generically, with per-instance state, recursive nesting, and apply-to-all unrolling for arrayed invocation. Global time (`time`, `dt`, `initial_time`, `final_time`) resolves inside any module at any nesting depth through absolute VM slots, so Vensim's `$`-time escape needs only a front-end translation, not an engine change. + +## Existing Patterns + +This design follows the engine's existing stdlib mechanism closely. It doesn't introduce a new architectural pattern. + +- **Stdlib-as-modules.** `SMTH1`, `DELAY3`, `TREND`, and `NPV` are defined as small models (`stdlib/*.stmx`, transpiled to `src/simlin-engine/src/stdlib.gen.rs`) and instantiated as modules by `BuiltinVisitor` (`src/simlin-engine/src/builtins_visitor.rs`) when it sees function-call syntax. Macros generalize exactly this; the structural change is that the function-name/port-name lookup becomes data-driven instead of a hardcoded table. +- **Materializing definition-models into `project.models`.** `Project::ensure_referenced_stdlib_models()` (`src/simlin-engine/src/datamodel.rs`) already copies embedded stdlib models into the flat `project.models` list on demand. Macro-definition models live in that same list, distinguished by their `MacroSpec`. +- **The `$⁚` synthetic-variable convention.** `BuiltinVisitor` already names compiler-generated module instances and hoisted argument auxes with a `$⁚` prefix and never serializes them. Macro expansion reuses this untouched. +- **`Variable::Module`, `ModuleReference`, and the recursive module VM** are reused as-is for per-invocation state, nesting, and arrayed invocation. The hand-maintained `NPV` stdlib model confirms that global time resolves inside a module body. + +The one new element -- the `MacroSpec` marker on `Model` -- has a clear precedent: stdlib models are already "a special kind of model," distinguished today only by a name prefix. This design makes "this model is a callable template" an explicit, serialized property instead of a convention. + +## Implementation Phases + +Seven phases. The ordering front-loads what the C-LEARN hero model needs -- single-output macros with stocks, `$`-time access, and arrayed invocation, across Phases 2-4 -- then follows with the remaining formats and the validation corpus. + + +### Phase 1: Datamodel and serialization foundation +**Goal:** Represent macros in the datamodel and persist them losslessly. + +**Components:** +- `MacroSpec` type and an optional field on `datamodel::Model` (`src/simlin-engine/src/datamodel.rs`) +- An additive `MacroSpec` field on the `Model` protobuf message (`src/simlin-engine/src/project_io.proto`, next free field number) and its serde conversion (`src/simlin-engine/src/serde.rs`) +- The mirrored optional field and JSON converters in `src/core/datamodel.ts`, the `src/engine` JSON types, and `src/pysimlin` dataclasses + +**Dependencies:** None. + +**Covers:** macros.AC1 (representation and round-trip). + +**Done when:** `MacroSpec` round-trips losslessly through protobuf and JSON; types compile across all consumer packages; serde round-trip tests pass. + + + +### Phase 2: MDL parsing and import +**Goal:** Parse the full `:MACRO:` syntax and import macro definitions from `.mdl` files. + +**Components:** +- MDL parser support for the `:` separator in `:MACRO:` headers and in call-site argument lists; the call AST node gains an optional output-binding list (`src/simlin-engine/src/mdl/parser.rs`, `src/simlin-engine/src/mdl/ast.rs`) +- `mdl/convert`: each parsed `MacroDef` becomes a macro-marked `Model`; `$`-suffixed time references translate to canonical time idents; single-output invocations remain as equation text (`src/simlin-engine/src/mdl/convert/`) + +**Dependencies:** Phase 1 (`MacroSpec` to populate). + +**Covers:** macros.AC1 (MDL definitions). + +**Done when:** parser unit tests cover the `:` header and call forms; the six `test/test-models/tests/macro_*` `.mdl` fixtures import into datamodels with correct `MacroSpec`s and macro bodies; `$`-time translation is verified. + + + +### Phase 3: Compile-time expansion and single-output simulation +**Goal:** Resolve and expand macro calls so single-output macros simulate correctly. + +**Components:** +- The module-function resolver, unifying the stdlib lookup and the macro registry (`src/simlin-engine/src/builtins.rs`, `src/simlin-engine/src/builtins_visitor.rs`) +- The generalized `BuiltinVisitor` expansion; the `model.rs` sites (`equation_is_stdlib_call`, `collect_module_idents`) routed through the resolver +- Name-resolution precedence (a macro shadows a stdlib function or builtin), arity-mismatch diagnostics, and recursion cycle detection + +**Dependencies:** Phase 2 (macro-marked models to register and expand). + +**Covers:** macros.AC2 (single-output simulation), macros.AC5 (errors and edge cases). + +**Done when:** the single-output `.mdl` fixtures simulate and match their `output.tab`, wired into `simulate.rs`; new focused fixtures pass for a macro at multiple call sites, expression-valued arguments, `$`-time access, and builtin-name shadowing; resolver, shadowing, arity, and recursion-detection unit tests pass. + + + +### Phase 4: Multi-output and arrayed invocation +**Goal:** Support the `:` multi-output call form and subscripted macro invocation. + +**Components:** +- Import-time materialization of a multi-output invocation as a `Variable::Module` plus binding auxiliary variables that read the module's declared outputs (`src/simlin-engine/src/mdl/convert/`) +- Verification that arrayed invocation (`y[Dim] = MYMACRO(x[Dim], …)`) rides the existing apply-to-all per-element unrolling once the resolver recognizes macro calls + +**Dependencies:** Phase 3 (expansion mechanism), Phase 2 (the `:` parser). + +**Covers:** macros.AC3. + +**Done when:** new multi-output fixtures pass (none exist today); an arrayed-invocation fixture passes; the metasd multi-output models (`THEIL`, `SSTATS`) expand and simulate; C-LEARN's four macros -- including the arrayed `[COP]` `SAMPLE UNTIL` invocations -- expand without macro-specific errors. + + + +### Phase 5: XMILE import and export +**Goal:** Round-trip macros through XMILE, including multi-output via a Simlin extension. + +**Components:** +- A fleshed-out `xmile::Macro` (`name`, `parm`s, `eqn`, `variables`, optional `sim_specs`) plus `simlin:`-namespaced extension elements for additional outputs and multi-output bindings (`src/simlin-engine/src/xmile/mod.rs`) +- XMILE reader producing macro-marked `Model`s; the expression-form `` normalized into a macro-named body variable +- XMILE writer emitting `` elements, the `simlin:` extensions, and the `` header option + +**Dependencies:** Phases 1, 3, and 4. + +**Covers:** macros.AC1 (XMILE definitions), macros.AC4 (XMILE round-trip). + +**Done when:** the `.xmile` macro fixtures import and simulate; XMILE round-trip preserves macro definitions and invocations; a cross-format `.mdl` → datamodel → `.xmile` test preserves them. + + + +### Phase 6: MDL export and round-trip +**Goal:** Emit `:MACRO:` blocks from `.mdl` and close the round-trip loop. + +**Components:** +- MDL writer support: emit each macro-marked model as a `:MACRO: … :END OF MACRO:` block; reconstruct single-output invocations (already equation text) and multi-output invocations (from the materialized module plus its binding auxes) (`src/simlin-engine/src/mdl/writer.rs`) +- Macro models wired into the `mdl_roundtrip.rs` harness, which excludes them today + +**Dependencies:** Phase 2 (import, to round-trip against), Phase 4 (multi-output to reconstruct). + +**Covers:** macros.AC4 (MDL round-trip). + +**Done when:** `.mdl` round-trip preserves every macro fixture; multi-output reconstruction is verified; the `mdl_roundtrip.rs` macro exclusion is removed. + + + +### Phase 7: Hero validation, corpus, and consumer integration +**Goal:** Validate against C-LEARN and the metasd corpus; make consumers macro-aware. + +**Components:** +- C-LEARN macro validation: its macros parse, register, and expand with no macro-specific errors; focused models invoking `SAMPLE UNTIL`, `SSHAPE`, and `RAMP FROM TO` with known inputs, checked against Vensim DSS reference output +- A metasd corpus harness for the 14 macro-using models, tiered: macro expansion succeeds, then full simulation matches Vensim DSS reference output for models without unrelated blockers +- `src/diagram`: filter macro-marked models out of the model-navigation and `getAvailableModels` lists; confirm macro-bearing models open without crashing + +**Dependencies:** Phases 1-6. + +**Covers:** macros.AC6. + +**Done when:** C-LEARN's macros validate against reference output; the corpus harness passes at the expansion tier for all 14 models and at the simulation tier for those without unrelated blockers; the diagram opens every macro fixture without crashing, and macro-marked models don't appear as standalone models in navigation. + + +## Additional Considerations + +**Documented limitations.** Three macro features are deliberately left out of full support, each because no model in the test corpus exercises it: +- *Recursive macros* are rejected with a cycle-detection error rather than supported. Vensim's "definition before use" rule already makes self-recursion inexpressible in `.mdl`; XMILE permits it, but a per-call-site instantiation strategy can't terminate for genuine recursion. +- *XMILE per-macro ``* -- a macro running with its own dt and stop time -- isn't supported. It behaves more like a nested simulation per step than a module. +- *The non-time `$` escape* (`FOO$` for a non-time model variable) is wired as an implicit module input but deprioritized; the corpus only exercises `$`-time, which resolves for free. + +**Definition-order leniency.** Vensim requires a macro to be defined before it's used. The engine collects all top-level items before conversion, so this design is lenient: it accepts the `macro_trailing_definition` fixture and trailing definitions generally. This is a deliberate, compatibility-favoring deviation from Vensim's stated rule. + +**Test prerequisites.** The metasd corpus validation depends on Vensim DSS reference outputs generated for the 14 macro-using models -- a setup task, not implementation work. The `.stmx` variants of the six fixtures have pre-existing, unrelated parse issues and carry no `` element; they're out of scope. + +**Pre-existing writer gaps.** The MDL writer currently writes only the main model and drops all module variables. Phase 6 adds macro-related writer support; a general overhaul of MDL module export is out of scope. Two unrelated serialization gaps found during investigation are tracked separately as GitHub #538 and #539. diff --git a/docs/reference/vensim-macros.md b/docs/reference/vensim-macros.md new file mode 100644 index 000000000..cedf09e3a --- /dev/null +++ b/docs/reference/vensim-macros.md @@ -0,0 +1,1235 @@ +# Vensim Macros: Implementation Reference + +Status: reference document for designing and implementing Vensim macro support in +`simlin-engine`. The engine currently *parses* `:MACRO:` blocks but discards them +(`src/simlin-engine/src/mdl/convert/mod.rs:248`). This document collects what a +Vensim macro is, how it is written, and -- most importantly -- its precise +runtime semantics, so an implementation design can be grounded in fact rather +than guesswork. + +Authoritative sources used (cited inline throughout): + +- Vensim documentation, "Macros": https://www.vensim.com/documentation/macros.html +- Vensim documentation, "Defining Macros": https://www.vensim.com/documentation/22145.html +- Vensim documentation, "Using Macros": https://www.vensim.com/documentation/22150.html +- Vensim documentation, "Function and Language Changes": https://www.vensim.com/documentation/function_changes.html +- Vensim documentation, version 5.8 release notes: https://www.vensim.com/documentation/version_5_8___-___.html +- XMILE v1.0 OASIS specification (local copy: `docs/reference/xmile-v1.0.html`, + saved from https://docs.oasis-open.org/xmile/xmile/v1.0/xmile-v1.0.html) -- + sections 2.2.1, 2.10, 3.6/3.6.1/3.6.2, and 4.8/4.8.1/4.8.2/4.8.3. +- Local repository: the six `test/test-models/tests/macro_*` fixtures, the + C-LEARN hero model, the engine MDL parser (`src/simlin-engine/src/mdl/`), the + XMILE serde layer (`src/simlin-engine/src/xmile/mod.rs`), and the bundled + `xmutil` Vensim-to-XMILE converter (`src/xmutil/third_party/xmutil/`). + +A note on terminology: throughout, "the model" or "the whole-model" means the +top-level model that *invokes* a macro, as distinguished from the contents of +the macro definition itself. + +--- + +## 1. What a Vensim macro is + +A Vensim macro is a **named, parameterized fragment of model structure** -- one +or more equations, optionally including stocks, that is defined once and then +"called like a function" from anywhere in the model. Per the Vensim "Macros" +overview, macros exist so that modelers can "repeat model structures without +retyping equations" +(https://www.vensim.com/documentation/macros.html). + +Conceptually a macro is closer to a **textual / structural template that is +expanded inline at each call site** than to a true runtime function: + +- "When the macro is encountered, variables and equations will be made up so + that causal tracing will continue to function properly" + (https://www.vensim.com/documentation/22150.html). That is, calling a macro + *materializes new model variables* -- it does not perform an opaque function + call. +- "When Vensim expands the macro to create the detailed equations it does the + expansion recursively" for nested macros + (https://www.vensim.com/documentation/22145.html). +- The XMILE spec describes the same idea from the encoding side: macros with + variables "are, in fact, independent models that run to completion each time + they are invoked" (XMILE 1.0 section 3.6.1). + +How a macro differs from a regular variable: a regular variable has exactly one +value (or one arrayed value) in the model namespace. A macro has *no value of +its own*; it is invoked, and each invocation produces a fresh set of expanded +variables that do have values. + +How a macro differs from a built-in function: a built-in function (e.g. `MIN`, +`ABS`) is implemented by the engine and is stateless from the model's point of +view. A macro is defined in the model's own language and *can carry state* +(stocks). In fact several Vensim "functions" are themselves macros under the +hood: `DELAY1`, `DELAY1I`, `DELAY3`, `DELAY3I`, `DELAYP`, `FORECAST`, `NPV`, +`NPVE`, `SMOOTH`, `SMOOTH3`, `SMOOTH3I`, and `TREND` are all "defined as Macros" +(https://www.vensim.com/documentation/macros.html). This is the key reason a +macro can introduce a hidden stock: the same mechanism that lets `SMOOTH` +introduce a hidden level is the macro mechanism. + +Why modelers use them: reuse of structure, and the ability to package a +behavior (a custom delay, a custom smoothing, a custom NPV variant) as a +callable unit. Why the Vensim docs are ambivalent about them: macros "are also +dangerous in that they can allow dynamics to 'creep into' a model," and the +documentation explicitly recommends using them "sparingly, if at all" +(https://www.vensim.com/documentation/macros.html). The use of *output +arguments* in particular is called out as "discouraged" +(https://www.vensim.com/documentation/22145.html). + +Caveat on Vensim editions: defining macros, the `$` model-variable escape, and +nested/recursive macro expansion are Pro/DSS features. PLE and PLE Plus cannot +define macros, and cannot even display the hidden variables that built-in +macro-functions create +(https://www.vensim.com/documentation/macros.html, +https://www.vensim.com/documentation/function_changes.html). + +--- + +## 2. Definition syntax + +### 2.1 The `:MACRO:` header + +A macro definition is introduced by a `:MACRO:` line and closed by a +`:END OF MACRO:` line. The header has the form +(https://www.vensim.com/documentation/22145.html): + +``` +:MACRO: macroname(inarg1, inarg2, inarg3 : outarg1, outarg2) +``` + +- **`macroname`** -- "any valid unquoted Vensim name": it must start with a + letter and may contain letters, numbers, spaces, underbars (`_`) and dollar + signs (`$`). Because Vensim names may contain spaces, a macro can be named + `EXPRESSION MACRO` or `RAMP FROM TO` (both appear in the local fixtures and + the C-LEARN model). A macro name *may shadow a built-in function name* -- the + C-LEARN model defines a macro literally named `SSHAPE`, which is also a Vensim + built-in; the engine's parser already accommodates this by accepting either a + `Symbol` or a `Function` token for the macro name + (`src/simlin-engine/src/mdl/parser.rs:521-523`). + +- **Input argument list** -- "any number" of arguments, each "any valid + unquoted name." Arguments are positional. "The arguments cannot be + subscripted" in the definition, "but you can use subscripted values when + calling the macro" (https://www.vensim.com/documentation/22145.html). Input + arguments are separated by commas. + +- **The `:` separator and output argument list** -- the `:` character (when + present) separates the *input* argument list (before the colon) from the + *output* argument list (after the colon). Output arguments "are variables + that are defined inside of the macro, in addition to the output of the macro + itself. These are optional and must be separated from input arguments by a + colon. Their use is discouraged. When no outputs are specified, omit the + colon" (https://www.vensim.com/documentation/22145.html). + + Concretely, the `add3` example from the Vensim "Using Macros" page declares + two extra outputs: + + ``` + :MACRO: add3(val1, val2, val3 : minval, maxval) + add3 = val1 + val2 + val3 + ~ val1 + ~ | + minval = min(val1, min(val2, val3)) + ~ val1 + ~ | + maxval = max(val1, max(val2, val3)) + ~ val1 + ~ | + :END OF MACRO: + ``` + + (https://www.vensim.com/documentation/22150.html -- the page's own example + has typos, repeating `val2`; the corrected intent is shown above.) + +### 2.2 The macro's own output + +Even with no output list, every macro has exactly one "output of the macro +itself": **the variable whose name equals the macro name.** "The macroname and +output arguments each must have a single equation inside of the macro +description" (https://www.vensim.com/documentation/22145.html). + +So in: + +``` +:MACRO: EXPRESSION MACRO(input, parameter) +EXPRESSION MACRO = input * parameter + ~ input + ~ tests basic macro containing no stocks and having no output + | +:END OF MACRO: +``` + +(from `test/test-models/tests/macro_expression/test_macro_expression.mdl`) the +equation `EXPRESSION MACRO = input * parameter` defines the macro's return +value. When there is no output list, the macro name *is* the output -- that is +what "When no outputs are specified, omit the colon" means: there is still an +output, it is just the macro-named variable and nothing else. + +When there *is* an output list, the macro still has its macro-named output +*plus* each named output variable. In the `add3` example above, `add3` is the +primary output and `minval`/`maxval` are additional outputs that the caller can +also retrieve (see section 4.5). + +### 2.3 Argument naming rules + +- Input and output argument names are "any valid unquoted name" + (https://www.vensim.com/documentation/22145.html). +- Argument names are **local to the macro** (see section 5.4). The Vensim docs + note you "can use, for example, `L1` in as many macros as you like" + (https://www.vensim.com/documentation/22150.html). +- Arguments are bound positionally at the call site (section 5.2). +- Argument names cannot carry subscripts in the header + (https://www.vensim.com/documentation/22145.html). + +### 2.4 Placement, ordering, and scope in a `.mdl` file + +- A macro definition is a top-level block in the `.mdl` file's equation + section, peer to ordinary variable equations and group (`****`) markers. The + engine models this directly: the MDL reader produces `MdlItem::Macro` as a + sibling of `MdlItem::Equation` and `MdlItem::Group` + (`src/simlin-engine/src/mdl/ast.rs:498-506`). + +- **Ordering rule.** "The macro definition must occur before the macro is + referenced. This is the only equation ordering rule in the Vensim modeling + language. If you do not define a macro before you use it, you will receive a + syntax error message" (https://www.vensim.com/documentation/22145.html, and + restated at https://www.vensim.com/documentation/macros.html). This is + significant: Vensim equations are otherwise order-independent, but macro + *definitions* must lexically precede their *uses*. + + The local fixture `test/test-models/tests/macro_trailing_definition/` is a + deliberate counter-example: it places the `:MACRO:` block *after* the + `macro output = EXPRESSION MACRO(...)` call that uses it. Its README still + calls it a valid test and it has an `output.tab`, which means the + *third-party* tools that produced the fixture (and the SD community's + expectations) tolerate a trailing definition even though the Vensim manual + forbids it. Treat the "definition before use" rule as Vensim's stated + contract, but be aware real-world files and other tools may not enforce it, + and the engine should decide deliberately whether to be strict or lenient. + +- **Multiple macros.** A file may define any number of macros. The fixtures + `macro_multi_macros/` (two independent macros) and `macro_cross_reference/` + (one macro calls another) both exercise this. Each `:MACRO: ... :END OF + MACRO:` is a separate block. + +- **Scope.** A macro definition introduces its own private namespace. Names + defined inside one macro do not leak into the model or into other macros (see + section 5.4). The macro *name* itself, however, becomes visible in the model + namespace so it can be called. + +### 2.5 The `:END OF MACRO:` terminator + +`:END OF MACRO:` closes the most recently opened `:MACRO:` block. There is no +nesting of `:MACRO: ... :END OF MACRO:` blocks themselves -- nesting of macros +is achieved by *calling* one macro from inside another (section 5.5), not by +lexically embedding one definition inside another. The engine treats an +unmatched `:END OF MACRO:` and an end-of-file inside an open macro as errors +(`ReaderError::UnmatchedMacroEnd`, `ReaderError::EofInsideMacro` in +`src/simlin-engine/src/mdl/reader.rs:27-30`). + +--- + +## 3. The macro body + +Between `:MACRO:` and `:END OF MACRO:` the body is a sequence of ordinary +Vensim equations, written in the normal `name = rhs ~ units ~ comment |` +format. From the Vensim docs and the local fixtures, the body may contain: + +- **Auxiliaries / intermediate variables.** "Variables can also be defined + internal to the macro description" beyond the required macro-named and + output-named equations (https://www.vensim.com/documentation/22145.html). The + XMILE spec adds that auxiliaries inside a macro are "useful to simplify the + equation into smaller, meaningful pieces" (XMILE 1.0 section 4.8.2). The + `macro_multi_expression/` fixture has a body with an `intermediate` variable; + C-LEARN's `RAMP FROM TO` macro body has six internal auxiliaries (`linear`, + `linear ramp`, `exp ramp`, `slope`, `rate`, `interval`). + +- **Constants.** A body equation can be a literal constant. + +- **Stocks (`INTEG`).** A macro body may contain `INTEG(...)` equations. The + `macro_stock/` fixture's macro is `EXPRESSION MACRO = INTEG(input, + parameter)`. C-LEARN's `SAMPLE UNTIL` macro contains + `SAMPLE UNTIL = INTEG(..., initval)`. The XMILE spec's SMOOTH1 macro example + is built from a stock and a flow (XMILE 1.0 section 4.8.2). Per-invocation + state of these stocks is the single most important semantic point and is + covered in section 5.1. + +- **Lookups / table functions.** The XMILE spec does not prohibit them, and the + body is "all of the syntax of XMILE" (XMILE 1.0 section 3.6.1) / Vensim. None + of the local fixtures exercises a lookup inside a macro, so there is no local + ground-truth output for this case -- flag it as something to test against + Vensim directly if the implementation needs to support it. + +- **Subscripted / arrayed variables.** Vensim is explicit and restrictive + here: "There is no support for Subscripts within Macro definitions. When a + Macro is called, the variables should be used with the same subscripts they + appear with normally. When the macro equation is expanded, the created + variables inherit the Subscripts from the left hand side of the equation. + Each equation created during the expansion of the Macro has the same + subscripts on the left hand side" (https://www.vensim.com/documentation/macros.html). + In other words, the macro body is written *as if scalar*; subscripts are + supplied entirely from the call-site LHS and propagated onto every expanded + equation. XMILE, by contrast, permits arrays inside macros and even shows a + recursive `FIND` macro indexing into a 1-D array argument with `A[i]` (XMILE + 1.0 section 4.8.1) -- so the two formats differ on array handling inside + macros. See section 5.6. + +- **References to simulation control.** The macro body cannot name + `TIME STEP`, `INITIAL TIME`, `FINAL TIME`, or `TIME` directly as ordinary + identifiers (those would be treated as local, undefined names). It reaches + them via the `$` escape (section 3.1). C-LEARN's `SAMPLE UNTIL` macro uses + `TIME STEP$`; `RAMP FROM TO` uses `Time$` and `TIME STEP$`; `INIT` uses + `INITIAL(x)`. + +### 3.1 Can a macro body variable reference things outside the macro? + +By default, **no** -- the macro body is a "self-contained world that can be +accessed only through the macro call itself" +(https://www.vensim.com/documentation/22145.html). There is exactly one +documented exception: + +> "The one exception to the local nature of macro variables is that you may +> specify a model variable by following its name with a dollar sign `$`. For +> example you can use `TIME STEP$` inside of a macro to refer to the model +> variable `TIME STEP`. Only unsubscripted variables may be referred to in this +> manner." (https://www.vensim.com/documentation/22145.html) + +So `Time$`, `TIME STEP$`, `INITIAL TIME$`, etc. inside a macro body refer to +the *model's* (the caller's) corresponding variable. This is a Pro/DSS-only +feature (https://www.vensim.com/documentation/function_changes.html). The `$` +escape is restricted to *unsubscripted* model variables. + +This `$`-suffixed reference is a real, load-bearing piece of syntax that the +engine's MDL lexer/parser must handle for the C-LEARN hero model -- e.g. +`SAMPLE UNTIL = INTEG( (1-STEP(1,lastTime))*(input-SAMPLE UNTIL)/TIME STEP$, +initval)`. The implementation must decide how a macro-body `$` reference maps +onto whatever representation a macro becomes (e.g. an implicit module input +wired to the caller's `time_step`). + +### 3.2 Units inside a macro body + +Units in a macro body equation may be either ordinary model units (`People`, +`$`, etc.) *or the name of an input argument*. "If the units are the name of an +input variable, the units from the input will be substituted wherever the macro +is invoked" (https://www.vensim.com/documentation/22145.html). A name like +`Time$` may also be used as a units specifier. Note in every local fixture the +macro-named equation's units are written as the *name of the first input +argument* (`~ input`), which is exactly this "units = input argument name" +convention -- the macro's output unit is whatever unit the actual first +argument had at the call site. + +--- + +## 4. Call-site / invocation syntax + +### 4.1 Basic call + +Once defined, a macro "can be used any number of times. To use it, call it just +like a function" (https://www.vensim.com/documentation/22150.html). The call +appears on the right-hand side of an ordinary equation: + +``` +macro output = EXPRESSION MACRO(macro input, macro parameter) +``` + +(from `test/test-models/tests/macro_expression/test_macro_expression.mdl`). The +syntax is `MACRONAME(arg1, arg2, ...)` -- syntactically indistinguishable from a +function call or a lookup invocation. The engine's MDL parser does not even +recognize it as a macro call at parse time: a multi-argument call on a `Symbol` +token is parsed as `Expr::App` with `CallKind::Symbol` and described in the AST +as "unknown function (could be macro or error)" +(`src/simlin-engine/src/mdl/ast.rs:97,106,127`). Resolution of "is this name a +macro?" therefore has to happen *after* parsing, against the table of collected +macro definitions. + +### 4.2 Can arguments be arbitrary expressions? + +Per the Vensim docs the call is "just like a function" and the local + C-LEARN +fixtures show: + +- **Simple identifiers** -- `EXPRESSION MACRO(macro input, macro parameter)` + (all `macro_*` fixtures). +- **Subscripted variables** -- `SMOOTH(tadum[house], 20)` in the Vensim "Using + Macros" page (https://www.vensim.com/documentation/22150.html). Vensim + explicitly says "you can use subscripted values when calling the macro" + (https://www.vensim.com/documentation/22145.html). +- **Numeric literals** -- the `20` in `SMOOTH(tadum[house], 20)` and the + literals passed to C-LEARN's built-in `DELAY`/`STEP`/`RAMP` macro-functions. +- **Arbitrary sub-expressions** -- C-LEARN's macro-function calls receive + compound expressions (e.g. `STEP(1, lastTime)` is itself nested inside the + macro body, but at the model level functions-implemented-as-macros such as + `SMOOTH`/`DELAY3` routinely receive full expressions as arguments). The MDL + grammar both in `xmutil` and in the engine parses macro-call arguments as a + general `exprlist` (`src/xmutil/.../Vensim/VYacc.y:99`, + `src/simlin-engine/src/mdl/parser.rs:528`), so *syntactically* any expression + is accepted. + +The engine's AST documentation flags the tension: the grammar "parses macro +arguments as `exprlist`, which allows arbitrary expressions. In valid macros, +these should be simple variable references" +(`src/simlin-engine/src/mdl/ast.rs:478-482`). That comment is about the +*definition header* (where args must be plain names); at the *call site*, +expression-valued arguments are normal and expected (think `SMOOTH(a + b, t)`). +This is an important asymmetry: header argument list = plain names only; +call-site argument list = arbitrary expressions. + +### 4.3 Can a macro call be nested inside a larger expression? + +Yes. The Vensim "Using Macros" page's first example is +`diddle[house] = daddle + SMOOTH(tadum[house], 20)` -- the `SMOOTH` macro call +is one operand of a `+` (https://www.vensim.com/documentation/22150.html). Since +`SMOOTH` is itself a macro, this is direct evidence that a macro invocation can +appear as a sub-expression of a larger RHS, not only as the entire RHS. + +The local fixtures, by contrast, only ever use a macro call as the *entire* +RHS of `macro output = MACRONAME(...)`. So the engine's existing fixtures do +not cover the nested-in-expression case, even though Vensim clearly supports it. + +### 4.4 Can the same macro be invoked multiple times? + +Yes -- "you can use it any number of times" +(https://www.vensim.com/documentation/22150.html). Each use is an independent +expansion (section 5.1). The local fixtures invoke each macro only once; +multiple-invocation behavior is the headline correctness concern for any +implementation and is not directly pinned by a local fixture. + +### 4.5 How are multiple outputs accessed at a call site? + +When a macro declares output arguments, the call site uses the *same* `:` +separator to bind them. From the Vensim "Using Macros" page +(https://www.vensim.com/documentation/22150.html): + +``` +total reserve = add3(water reserve lakes, water reserve rivers, + water reserve reservoir : min reserve, max reserve) + ~ m*m*m + ~ | +is water low flag = if then else(min reserve < LOW WARNING LEVEL, 1, 0) + ~ DMNL + ~ | +``` + +Here: +- The LHS variable `total reserve` receives the macro's *primary* output + (`add3`). +- The names after the `:` in the call (`min reserve`, `max reserve`) are + *bound by the caller* to the macro's output arguments (`minval`, `maxval`). + They become real model variables and can be referenced in subsequent + equations (`is water low flag = ... min reserve ...`). + +So the output-list mechanism at the call site is effectively *multiple-value +return by named binding*: the input list yields the macro-named output assigned +to the LHS, and the colon-separated output list yields additional model +variables named by the caller. + +### 4.6 Important parser gap: the `:` separator is not handled today + +Both `xmutil` and the engine's current MDL parser handle only the *no-output* +form of the macro header and call. Specifically: + +- `xmutil`'s grammar rule for a macro header is + `VPTT_macro VPTT_symbol '(' exprlist ')'` + (`src/xmutil/third_party/xmutil/Vensim/VYacc.y:99`), and `exprlist` only + permits `,` and `;` as separators (`VYacc.y:203-207`). There is no production + that consumes a `:` between an input list and an output list. `xmutil` + therefore supports only macros whose sole output is the macro-named variable. + +- The engine's MDL parser does the same: `parse_expr_list` + (`src/simlin-engine/src/mdl/parser.rs:1361-1399`) continues only on `Comma` + or `Semicolon` and stops at a `Colon`. The macro-header parse then calls + `expect(TokenKind::RParen, "')'")` + (`src/simlin-engine/src/mdl/parser.rs:530`), so a header like + `:MACRO: add3(a, b : c)` would fail with an "expected ')'" error at the `:`. + (The reader's raw-token scan tracks parentheses and *would* read through a + `:` -- `src/simlin-engine/src/mdl/reader.rs:211-227` -- but the structured + parser sub-step rejects it.) + + The engine's lexer *does* have a `Colon` token + (`src/simlin-engine/src/mdl/lexer.rs:44`), so adding output-list support is a + parser change, not a lexer change. + +Implication: macros with explicit output lists are (a) discouraged by Vensim, +(b) absent from every local fixture, and (c) unparseable by both converters +today. An implementation must decide whether to support them at all; if it +does, parser work is required on both the header and the call-site grammar. + +--- + +## 5. Semantics + +This is the section that most directly governs the implementation design. + +### 5.1 Per-invocation state (the critical question) + +**Each invocation of a macro that contains a stock gets its own independent +stock state, and that state persists for the whole simulation.** This is stated +unambiguously by the XMILE spec and demonstrated by the local `macro_stock` +fixture. + +XMILE 1.0 section 4.8.2, verbatim: + +> "Note that any stocks that are defined within a macro MUST have their own +> instances for each use of that macro and these instances MUST persist across +> the length of the simulation. That is to say, if this SMOOTH1 function is used +> five times in a model, there must also be five copies of the stock +> Smooth_of_Input, one for each use. Use of flows and auxiliaries do not require +> this..." + +And XMILE 1.0 section 3.6.1: macros with variables "are, in fact, independent +models that run to completion each time they are invoked." + +The Vensim side corroborates this: the whole point of `SMOOTH`, `DELAY3`, etc. +being macros is that every call site of `SMOOTH(...)` gets its own hidden level +-- two `SMOOTH` calls in a model do not share a smoothing stock. The +hash-delimited expanded variable names (section 6 / section 7) exist precisely +so that each call site's expanded stock is a distinct, uniquely-named model +variable. + +The local fixture `test/test-models/tests/macro_stock/` pins the runtime +behavior of a single stock-bearing macro invocation. Its macro is: + +``` +:MACRO: EXPRESSION MACRO(input, parameter) +EXPRESSION MACRO = INTEG(input, parameter) +:END OF MACRO: +``` + +invoked as `macro output = EXPRESSION MACRO(macro input, macro parameter)` with +`macro input = 5`, `macro parameter = 1.1`, `TIME STEP = 1`, time 0..10. The +expected `output.tab` shows `macro output` taking values +`1.1, 6.1, 11.1, 16.1, 21.1, ...` -- i.e. a stock initialized to `parameter` +(= 1.1) and integrating `input` (= 5) per unit time. So the macro's +`INTEG(input, parameter)` becomes, at that call site, a genuine stock with +initial value = the bound `parameter` argument and inflow = the bound `input` +argument, and `macro output` reads that stock. (Note for implementers: the +fixture's expected `macro output` at `t=1` is `6.1`, i.e. the Euler update +`1.1 + 5*1` -- the value of the macro at time `t` is the stock value at time +`t`, with the first integration step already applied at `t=1`.) + +Flows and auxiliaries inside a macro do *not* need per-instance persistence in +the same sense -- they are recomputed each step like any auxiliary -- but they +*are* still materialized per call site (each call site gets its own copy of +every internal variable; see section 7). + +### 5.2 How input arguments bind to the macro's input parameters + +- **By position.** The Nth actual argument at the call site binds to the Nth + formal parameter in the header. Vensim and XMILE both treat the parameter + list as ordered: XMILE requires "one `` property for each macro + parameter and they must appear in the expected calling order (i.e., the order + of the actual parameters)" (XMILE 1.0 section 4.8). + +- **Evaluated in the caller's context.** Because macro expansion materializes + the macro body as real model variables wired to the call-site arguments, an + argument expression is evaluated in the *caller's* namespace, on the caller's + schedule. The XMILE framing -- the macro is "an independent model" with the + arguments as its inputs -- means each argument is, in effect, an input port + fed by the caller's expression. For a stockless macro this is just inline + substitution; for a stock-bearing macro the argument feeds the macro's + internal structure each time step. + +- **Argument arity is fixed per definition.** "Variable numbers of arguments + are not supported, but the same macro MAY be defined multiple times with a + different number of arguments" (XMILE 1.0 section 3.6.1). XMILE additionally + allows `` so trailing parameters can be omitted at the + call site (XMILE 1.0 section 4.8); Vensim's `:MACRO:` syntax as documented + has no default-value mechanism. + +### 5.3 How the output value is computed and returned + +- The macro's primary output is the value of the variable whose name equals the + macro name. At a call site `lhs = MACRONAME(args)`, `lhs` takes that value. + In `xmutil`'s XMILE output the macro's `` is literally just the macro + name (`src/xmutil/.../Xmile/XMILEGenerator.cpp:60-63`), and the macro's + `` block contains the equation that actually defines that + macro-named variable -- the `` says "the output is the variable called + ``," and `` says how that variable is computed. +- For stockless macros the output is a pure function of the (possibly + expression-valued) arguments at the current time step (`macro_expression`, + `macro_multi_expression` fixtures). +- For stock-bearing macros the output is whatever the macro-named equation + computes -- which may itself be the stock (`macro_stock`: the macro-named + variable *is* the `INTEG`), or may be an auxiliary that reads an internal + stock (the XMILE `SMOOTH1` example: `Smooth_of_Input` returns the + internal stock). +- Additional named outputs (section 4.5) are returned by the caller binding + them to caller-named variables via the `:` list. + +### 5.4 Namespace / locality + +Every name defined inside a macro -- parameters, the macro-named variable, +internal auxiliaries, internal stocks, named outputs -- is **local to that +macro**. "The variable names inside of a macro relate to nothing outside the +macro or in other macros" +(https://www.vensim.com/documentation/22150.html). A model variable named +`population` and a macro-internal variable named `population` are unrelated +(https://www.vensim.com/documentation/22150.html). XMILE states the same: "the +names of any variables (including parameter identifiers) defined within a macro +are local to that macro alone and will not conflict with any names within +either the whole-model or other macros" (XMILE 1.0 section 3.6.1). + +`xmutil` implements this with an explicit separate symbol table per macro: on +`:MACRO:` it pushes a fresh `SymbolNameSpace` and on `:END OF MACRO:` it pops +back to the model's namespace; the macro *name* alone is registered into the +model's (main) namespace so it can be called +(`src/xmutil/third_party/xmutil/Vensim/VensimParse.cpp:679-694`). The only +escape from the local namespace is the `$`-suffixed model-variable reference +(section 3.1). + +### 5.5 Evaluation / initialization order, and nesting + +- Because a macro expands into real model variables, those expanded variables + participate in the model's normal dependency graph and topological sort. They + are initialized and stepped exactly like any other variable -- the macro + boundary is not a scheduling barrier once expanded. (The one definition-time + ordering rule -- "definition before use" -- is a *parse-time* rule, not a + runtime one; see section 2.4.) + +- **Nested macros.** "Macro definitions can be nested, that is the definition + of a macro can involve another macro. In this case when Vensim expands the + macro to create the detailed equations it does the expansion recursively" + (https://www.vensim.com/documentation/22145.html). The local fixture + `test/test-models/tests/macro_cross_reference/` exercises exactly this: + `EXPRESSION MACRO`'s body is `EXPRESSION MACRO = SECOND MACRO(input, + parameter)`, i.e. one macro calls another. Its `output.tab` expects + `macro output = 4.54545` for `macro input=5, macro parameter=1.1` + (= 5/1.1, since `SECOND MACRO` divides) -- confirming the nested call expands + and evaluates correctly. The version-5.8 release notes give the canonical + use: "a DELAY9 macro can be constructed from 3 DELAY3 calls" + (https://www.vensim.com/documentation/version_5_8___-___.html). Because the + body-equation calls another macro, definition order matters here too: + `SECOND MACRO` is defined before `EXPRESSION MACRO` in the cross-reference + fixture. + +### 5.6 Subscript / array behavior across the macro boundary + +Vensim and XMILE diverge here, and the implementation should be explicit about +which model it follows. + +- **Vensim.** No subscripts in the macro *definition*. At the call site you + pass normally-subscripted variables; on expansion, "the created variables + inherit the Subscripts from the left hand side of the equation" and "each + equation created during the expansion of the Macro has the same subscripts on + the left hand side" (https://www.vensim.com/documentation/macros.html). So a + call `diddle[house] = ... SMOOTH(tadum[house], 20)` expands to an internal + smoothing stock that is *also* subscripted by `house` -- the array dimension + rides in from the call-site LHS and is stamped onto every expanded equation. + The macro body is authored as if scalar. The `$`-escape, by contrast, only + works for *unsubscripted* model variables + (https://www.vensim.com/documentation/22145.html). + +- **XMILE.** Macros may declare and use arrays internally. The spec's recursive + `FIND` macro takes a 1-D array parameter `A` and indexes it as `A[i]`, uses + `SIZE(A)`, etc. (XMILE 1.0 section 4.8.1). So XMILE macros are not restricted + to scalar bodies. + +None of the local `macro_*` fixtures exercises subscripts at all -- they are +all scalar. There is therefore no local ground-truth `output.tab` for arrayed +macro expansion; this case must be validated against Vensim itself if needed. + +### 5.7 Recursion + +- **Vensim.** The Vensim `:MACRO:` documentation describes *nesting* (one macro + calling another) and recursive *expansion* of that nesting + (https://www.vensim.com/documentation/22145.html), and "macro definitions can + contain calls to other macros previously defined, or built in" + (https://www.vensim.com/documentation/macros.html). The phrase "previously + defined" plus the strict "definition before use" rule means *self-reference* + (a macro calling itself by name) is not expressible in standard Vensim + `.mdl`, because the macro's own name is not yet defined within its own body. + The documented Vensim feature is mutual reference among *distinct*, + previously-defined macros, not classical recursion. (No local fixture or + Vensim doc page demonstrates a self-recursive `:MACRO:`.) + +- **XMILE.** XMILE explicitly supports recursive macros. "Macros can be + recursive, so a slightly more complicate[d] macro would call itself: + `FACT(x): IF x <= 1 THEN 1 ELSE x*FACT(x - 1)`" (XMILE 1.0 section 3.6.1). + Recursion can even be mutual/nested: a recursive macro can call another + recursive macro (the `FACTSUM` example, XMILE 1.0 section 4.8.1). The spec + notes its recursion examples all use *tail* recursion deliberately, "because + implementers are free to map macros into any internal form, especially for + the sake of efficiency. The use of tail recursion whenever possible allows + implementers to convert the recursion into a simple loop" (XMILE 1.0 section + 4.8.1). + +- **The `recursive_macros` flag.** XMILE requires a model that uses recursive + macros to declare it. The `` tag (which itself must be listed + under `` when the file uses macros at all) has *two REQUIRED + attributes*: `recursive_macros="true|false"` ("Has macros which are recursive + (directly or indirectly)") and `option_filters="true|false"` ("Defines option + filters") (XMILE 1.0 section 2.2.1, and section 4.8: "OPTIONALLY, they can + also be recursive... In this case, the recursive_macros option must be set to + true in the `` tag"). This is the `recursive_macros` field that + the engine's XMILE serde already models: `Feature::UsesMacros { + recursive_macros: Option, option_filters: Option }` + (`src/simlin-engine/src/xmile/mod.rs:510-513`). It is purely a declaration / + capability flag in the file header -- it tells a reader "this file contains + macros that recurse, so don't assume macro expansion terminates by simple + inlining." It does not itself change macro semantics; it is a hint that naive + finite inline-expansion is unsafe. + +### 5.8 Units behavior + +See section 3.2 for the in-body rule (units may name an input argument, whose +actual unit is substituted at each call). At the call site, the LHS variable +that receives the macro output carries its own units declaration like any +equation (e.g. `total reserve = add3(...) ~ m*m*m ~ |` in the Vensim "Using +Macros" example). XMILE keeps `` on each variable inside the macro's +`` block (the `macro_stock.xmile` fixture shows `input` +on the macro's stock -- again the "units = name of an input parameter" +convention, carried through verbatim by `xmutil`). + +--- + +## 6. XMILE representation + +XMILE v1.0 *does* specify macros (despite a common belief that it does not). +The local copy of the OASIS spec covers them in sections 2.10 (pointer), 3.6 / +3.6.1 / 3.6.2 (rationale), and 4.8 / 4.8.1 / 4.8.2 / 4.8.3 (the encoding). + +### 6.1 Placement and the `` element + +> "Macros live outside of all other blocks, at the same level as the `` +> tag, and MAY be the only thing in a file other than its header." (XMILE 1.0 +> section 4.8) + +A macro is a `` element. Its **REQUIRED** properties/attributes: + +- `name="..."` -- the macro name, a valid XMILE identifier. +- `` -- a valid XMILE expression (in a `CDATA` section if needed). For a + stockless macro this is the macro's actual formula (e.g. + `LN(x)/LN(base)`); for a macro with variables this is typically + just the *name of the variable to return* (e.g. `Smooth_of_Input`). + +**OPTIONAL** properties/attributes (XMILE 1.0 section 4.8): + +- `` -- one per formal parameter, in calling order. Holds the parameter's + local name (a valid XMILE identifier). May carry a `default="..."` attribute + (a valid XMILE expression that can refer to earlier parameters); once one + parameter has a default, every later parameter must too. The spec strongly + recommends `` tags appear before ``. +- `` -- text describing the proper call format (e.g. + `LOG(, )`). +- `` -- text describing the macro's purpose, optionally HTML. +- `` -- the macro may run with *its own* simulation specs (only + ``, ``, `
`, and `method`; all but `method` may be + expressions referring to parameters). Must only appear together with a + `` block. When `` is present the macro's default DT is + 1 and default integration method is Euler. Absent ``, the macro + uses the *invoking model's* DT and method. +- `` -- a variable block, exactly as for `` (stocks, flows, + auxes, etc.). Absent for a pure-expression macro. +- `` containing exactly one `` -- only with ``, + "exists only to facilitate editing macros." +- `namespace="..."` -- a single XMILE namespace for the macro. + +XMILE also says macros MAY include submodels, and MAY be recursive (with the +`recursive_macros` option flag set; section 5.7). + +### 6.2 XMILE examples (from the spec) + +Stockless / expression macro (XMILE 1.0 section 4.8.1): + +```xml + + x + base + LN(x)/LN(base) + , )]]> + logarithm of .]]> + +``` + +Recursive macro (XMILE 1.0 section 4.8.1): + +```xml + + x + IF x <= 1 THEN 1 ELSE FACT(x - 1) + +``` + +Macro with variables -- a hand-rolled first-order smooth (XMILE 1.0 section +4.8.2): + +```xml + + input + averaging_time + initial + Smooth_of_Input + + + initial + change_in_smooth + + + (input - Smooth_of_Input)/averaging_time + + + +``` + +Macro with variables *and* simulation specs -- an iterative factorial (XMILE +1.0 section 4.8.3): + +```xml + + x + Fact + + 1 + x + + + + 1 + change_in_fact + + + Fact*TIME + + + +``` + +### 6.3 How a macro is invoked in XMILE equations + +"In equations, the macro name is used as a function" (XMILE 1.0 section 3.6.1) +-- i.e. `LOG(256, 2)`, `SMOOTH1(demand, 5)`. This matches the Vensim call +syntax and matches what `xmutil` emits: the `macro_expression.xmile` fixture's +model variable is `EXPRESSION_MACRO(macro_input, macro_parameter)`. +The XMILE spec does not define a `:`-style multiple-output call syntax; XMILE's +optional-parameter story is ``, not Vensim's output list. + +### 6.4 The `` / `` declaration + +A file that uses any macros must list `` under the header's +`` tag, and `` carries the two REQUIRED attributes +`recursive_macros` and `option_filters` (XMILE 1.0 sections 2.2.1, 4.8; see +section 5.7). XMILE also defines a standard macro *library* distribution +mechanism: vendors/organizations can publish versioned macro files (e.g. +`http://systemdynamics.org/xmile/macros/standard-1.0.xml`) and a model pulls +them in via `` inside `
` +(XMILE 1.0 sections 2.10, 2.11). "A vendor may create a common library of +macros with specific functionality used by all whole-models produced by that +vendor's software" (XMILE 1.0 section 2.10). + +### 6.5 What the engine's XMILE serde currently models + +- `xmile::Project` has `#[serde(rename = "macro")] pub macros: Vec` + (`src/simlin-engine/src/xmile/mod.rs:75-76,244`) -- so the `` elements + are collected at the project level, as the spec requires. +- `xmile::Macro` is a **stub**: the struct body is literally `// TODO` + (`src/simlin-engine/src/xmile/mod.rs:334-338`). No `name`, no ``, no + ``, no ``. So XMILE macro contents are currently *parsed into + an empty struct and effectively dropped*, even though the count of macros is + preserved. +- `Feature::UsesMacros { recursive_macros: Option, option_filters: + Option }` (`src/simlin-engine/src/xmile/mod.rs:510-513`) models the + header `` declaration faithfully. + +So on the XMILE side, implementing macros means (at minimum) fleshing out +`xmile::Macro` to carry `name`, `parm`s, `eqn`, `variables`, and optionally +`sim_specs`/`views`/`namespace`, and then giving it meaning in the +datamodel/compiler. + +--- + +## 7. xmutil's mapping (Vensim `:MACRO:` -> XMILE ``) + +`xmutil` is the bundled C++ Vensim-to-XMILE converter +(`src/xmutil/third_party/xmutil/`). It is the tool that produced the `.xmile` +and `.stmx` files in the local fixtures, so its mapping is the de facto +"expected" Vensim->XMILE translation the engine's own MDL pipeline is measured +against. Reading its source, the mapping is: + +### 7.1 Parse-time (Vensim side) + +- The Vensim lexer recognizes `:MACRO:` and `:END OF MACRO:` as dedicated + tokens `VPTT_macro` / `VPTT_end_of_macro` + (`src/xmutil/third_party/xmutil/Vensim/VensimLex.cpp:427-438`). +- The grammar rule is + `macrostart: VPTT_macro { vpyy_macro_start(); } VPTT_symbol '(' exprlist ')' + { vpyy_macro_expression($3, $5); }` and + `macroend: VPTT_end_of_macro { vpyy_macro_end(); }` + (`src/xmutil/third_party/xmutil/Vensim/VYacc.y:98-104`). Note again: the + header parses `(' exprlist ')'` with **no `:` output-list production** -- so + `xmutil` supports only the macro-name-is-the-output form. +- `VensimParse::MacroStart()` pushes a *new local `SymbolNameSpace`* for the + macro's interior; `VensimParse::MacroExpression(name, margs)` constructs a + `MacroFunction` registered against the *main* (model) namespace -- so the + macro name is callable from the model -- while its body variables live in the + local namespace; `VensimParse::MacroEnd()` restores the model namespace + (`src/xmutil/third_party/xmutil/Vensim/VensimParse.cpp:679-694`). +- A `MacroFunction` (subclass of `Function`) holds: the macro name, an + `ExpressionList* mArgs` (the formal parameters), a private + `SymbolNameSpace* pSymbolNameSpace` (the local namespace), and a vector of + `EqUnitPair` (each body equation + its units) + (`src/xmutil/third_party/xmutil/Function/Function.h:106-135`). Body equations + encountered between `:MACRO:` and `:END OF MACRO:` are added to the active + macro rather than to a model group -- `AddFullEq` checks `!mInMacro` before + assigning a variable to a group + (`src/xmutil/third_party/xmutil/Vensim/VensimParse.cpp:181`). The completed + list of `MacroFunction`s is handed to the `Model` + (`src/xmutil/third_party/xmutil/Vensim/VensimParse.cpp:387`, + `Model.h:58-62,127`). +- Because a `MacroFunction` is a `Function`, a call to it inside an equation is + parsed like any function call -- there is no special call-site syntax. + +### 7.2 Generate-time (XMILE side) + +The whole-model translation runs first, then "macros are presented as separate +models." For each `MacroFunction` +(`src/xmutil/third_party/xmutil/Xmile/XMILEGenerator.cpp:55-78`): + +1. Create a `` element with `name=""` (original Vensim + casing, spaces preserved -- e.g. `name="EXPRESSION MACRO"`). +2. Emit an `` whose text is **just the macro name**. The source comment is + explicit: "in vensim the equation is always just the name of the macro" + (`XMILEGenerator.cpp:60-63`). This is XMILE's "return the variable named + ``" convention -- and it works because the macro body always + contains an equation that defines a variable with the macro's name. +3. For each formal parameter in `mArgs`, emit a `` whose text is the + parameter name (`XMILEGenerator.cpp:64-74`). Parameter order is preserved. +4. Emit the macro body by calling `generateModelAsSectors(macro, ..., mf-> + NameSpace(), false)` -- i.e. the macro's local namespace is rendered as a + `` block (plus a ``) *inside* the `` element, using + the same machinery that renders the main model + (`XMILEGenerator.cpp:76`). The comment notes it is "not really a sector -- + only a root module here." +5. `` elements are appended to the document root, as siblings of + `` (`XMILEGenerator.cpp:77`). + +`MacroFunction::ComputableName()` returns `SpaceToUnderBar(name)` +(`src/xmutil/third_party/xmutil/Function/Function.cpp:21-23`), so when the macro +is *called* in a model equation, `xmutil` emits the underscored name -- e.g. +the Vensim call `EXPRESSION MACRO(macro input, macro parameter)` becomes the +XMILE equation `EXPRESSION_MACRO(macro_input, macro_parameter)` (exactly what +`test_macro_expression.xmile` contains). The `` attribute +keeps the spaced name, but call sites use the underscored form. + +### 7.3 Concretely: the local fixtures' Vensim -> XMILE mapping + +`test_macro_expression.mdl` -> +`test_macro_expression.xmile` (verified by reading both files): + +``` +:MACRO: EXPRESSION MACRO(input, parameter) +EXPRESSION MACRO = input * parameter + ~ input + ~ tests basic macro containing no stocks and having no output + | +:END OF MACRO: +``` + +becomes + +```xml + + EXPRESSION MACRO + input + parameter + + + tests basic macro containing no stocks and having no output + input*parameter + input + + + ... + +``` + +and the model-level call `macro output = EXPRESSION MACRO(macro input, macro +parameter)` becomes `EXPRESSION_MACRO(macro_input, +macro_parameter)`. + +For the stock-bearing `test_macro_stock.mdl`, the macro body +`EXPRESSION MACRO = INTEG(input, parameter)` becomes a `` plus a +synthetic `` inside the macro's ``: + +```xml + + EXPRESSION MACRO + input + parameter + + + + tests basic macro containing a stock but no output + input + parameter + input + + + ... + +``` + +Note `xmutil`'s `INTEG(input, parameter)` -> stock translation reuses the *first +INTEG argument's name* (`input`) as the inflow name -- here `input` is also a +parameter name, so the macro ends up with a `` shadowing the +`input`. That is a quirk of `xmutil`'s INTEG handling, not a +property of macros per se, but it is what the fixture contains and an +implementation reading these `.xmile` files must cope with it. + +Multiple macros (`test_macro_multi_macros.mdl`) produce multiple sibling +`` elements. Cross-referencing macros (`macro_cross_reference`) produce +two `` elements where one macro's `` equation calls the other +by its underscored name. + +### 7.4 What `xmutil` does *not* do + +- It does **not** expand/inline macros into the model. It carries the macro + through to XMILE as a `` element and leaves call sites as + `MACRONAME(args)` function calls. Expansion/instantiation is left to whatever + consumes the XMILE. +- It does **not** support the `:`-separated output list (section 4.6 / 7.1). +- It does **not** carry `` on the macro (Vensim `:MACRO:` syntax has + no per-macro sim specs to begin with; that is an XMILE-only feature). + +### 7.5 What the engine's *native* MDL parser does today + +The engine's pure-Rust MDL parser (`src/simlin-engine/src/mdl/`) -- which is +replacing `xmutil` -- already *parses* macros into a `MacroDef { name, args: +Vec, equations: Vec, loc }` +(`src/simlin-engine/src/mdl/ast.rs:483-493`), assembled by the reader's +`MacroState` machine (`src/simlin-engine/src/mdl/reader.rs:59-70,300-330`). But +the AST-to-datamodel conversion **discards** it: `MdlItem::Macro(_)` is matched +and ignored (`src/simlin-engine/src/mdl/convert/mod.rs:248`, with a test +`test_mdl_group_variables_after_macro` at `convert/mod.rs:616` that only checks +the macro doesn't corrupt *group* membership). The engine's own MDL parser +CLAUDE.md lists this as a known gap: "Macro expansion/inlining (parsing +complete, conversion not implemented). C-LEARN model requires this to +simulate" (`src/simlin-engine/src/mdl/CLAUDE.md`). So the implementation task, +on the Vensim-import side, is *conversion*, not parsing. + +--- + +## 8. Implications for implementation + +This section lays out -- *neutrally* -- the evidence bearing on one candidate +representation: **modeling a Vensim macro as a reusable sub-model (module), +instantiated once per call site, with the macro's input arguments wired as +module inputs and its output(s) read by auxiliary variables.** It does not pick +a design; it catalogs which facts make that mapping clean and which make it +hard. + +### 8.1 Facts that fit a "module instantiated per call site" mapping well + +- **The macro body already *is* a little model.** XMILE says so directly: + macros with variables "are, in fact, independent models that run to + completion each time they are invoked" (XMILE 1.0 section 3.6.1), and + `xmutil` literally renders the macro body with the *same code path* it uses + for the main model (`generateModelAsSectors`, + `XMILEGenerator.cpp:76`). A module/sub-model is the natural home for "a + variable block that looks like a model." + +- **Per-invocation state is exactly module-instance semantics.** The XMILE + requirement that "any stocks that are defined within a macro MUST have their + own instances for each use of that macro and these instances MUST persist + across the length of the simulation" (XMILE 1.0 section 4.8.2) is precisely + what a module instance gives you: each instantiation has its own stock + storage that persists for the run. The `macro_stock` fixture's expected + trajectory confirms the runtime behavior a module instance would have to + reproduce. + +- **Locality maps onto a module namespace.** Macro-internal names are local and + cannot conflict with the model or other macros + (https://www.vensim.com/documentation/22150.html, XMILE 1.0 section 3.6.1) -- + the same isolation a module/sub-model namespace provides. `xmutil` already + enforces this with a per-macro symbol table + (`VensimParse.cpp:679-694`). + +- **Positional input binding maps onto module inputs.** Arguments bind by + position (XMILE 1.0 section 4.8); a module with an ordered input port list is + the same shape. The macro's primary output (the macro-named variable) is a + designated output of the module that the call-site LHS reads. + +- **Definition/parsing is done.** Both `xmutil` and the engine's native parser + already capture the macro's name, ordered parameter list, and body equations + (`MacroDef` / `MacroFunction`). The XMILE serde already collects `` + elements into `project.macros`. The hard part left is *instantiation + + wiring*, not lexing. + +- **The `recursive_macros` flag already has a home.** The engine's XMILE serde + models `Feature::UsesMacros { recursive_macros, option_filters }` + (`xmile/mod.rs:510-513`), so a design can detect "this file claims recursive + macros" up front and choose a strategy. + +### 8.2 Facts that make the mapping hard or that need explicit decisions + +- **Multiple call sites of the same macro.** A module typically has a single + declared instance with a name; a macro can be called arbitrarily many times + (https://www.vensim.com/documentation/22150.html), each needing its *own* + instance with its *own* stock storage and its *own* expanded variable names. + Vensim's own answer is name-mangling: expanded variables are wrapped in + `#...#` and prefixed by the call-site LHS variable name -- the post-5.8 form + is `#lhs>macroname>macrovar#` (e.g. `#smoothed income>smooth#`) + (https://www.vensim.com/documentation/macros.html, + https://www.vensim.com/documentation/version_5_8___-___.html). Any + module-instantiation design has to synthesize one instance (and a unique + instance name) per call site, and decide how those instances are named and + surfaced. + +- **Macros nested inside larger expressions.** Vensim allows + `diddle = daddle + SMOOTH(tadum, 20)` -- the macro call is a *sub-expression* + (https://www.vensim.com/documentation/22150.html). A module instance produces + a *variable*, not an expression value, so a nested call has to be lifted: the + call site must be rewritten to introduce a synthesized variable that reads + the instance's output, and the original expression must reference that + synthesized variable. (This is the same shape as the engine's existing + builtins handling, e.g. `PREVIOUS`/`INIT` desugaring through synthesized + helper auxes -- see `simlin-engine`'s `builtins_visitor.rs` -- so there is + precedent, but it is non-trivial work.) The local fixtures never exercise + the nested case, so there is no ground-truth output for it. + +- **Expression-valued arguments.** Call-site arguments can be arbitrary + expressions (`SMOOTH(a + b, t)`; section 4.2). A module input port is fed by + *a variable* or an expression-input; the design must decide whether to (a) + pass an expression directly as a module input, or (b) synthesize a helper aux + per non-trivial argument and wire that. Either is workable; it must be + chosen. Note the asymmetry: *definition*-header parameters are plain names, + but *call-site* arguments are full expressions. + +- **Multiple outputs (the `:` output list).** Vensim's discouraged-but-legal + output list (`add3(... : minval, maxval)`) returns extra named variables to + the caller (section 4.5). Neither converter parses it today (section 4.6). A + module can have multiple outputs, so the *representation* is fine, but: the + parser must be extended (header *and* call site), and the call-site binding + semantics ("the caller names these; they become model variables") must be + implemented. Given Vensim discourages it and no fixture uses it, an + implementation could legitimately defer or reject this -- but that is a + decision to make explicitly. + +- **Per-instance stock state vs. how the engine instantiates modules.** The + design has to confirm that the engine's module mechanism actually gives each + instance independent, persistent stock storage (the XMILE MUST in section + 4.8.2) and independent initialization. If module instances currently share + any storage or are deduplicated, that breaks macros with stocks. + +- **The `$` model-variable escape.** Macro bodies reach `Time$`, `TIME STEP$`, + etc. -- references *out* of the macro to the caller's control variables + (section 3.1), and this is load-bearing for the C-LEARN hero model. A module + is normally a closed namespace fed only through its input ports. The design + must decide how a `$` reference becomes an (implicit) module input wired to + the caller's `time`/`time_step`/etc. -- and remember it is restricted to + *unsubscripted* model variables. + +- **Subscript inheritance from the call-site LHS.** Vensim macro bodies are + authored as scalar; on expansion every created variable inherits the + subscripts of the call-site LHS + (https://www.vensim.com/documentation/macros.html). A module instantiation + design must replicate "stamp the call-site LHS's dimensions onto the whole + instance" -- which is a different operation from the usual "module has its + own fixed dimensions." (XMILE diverges here -- it allows arrays *in* the + macro body -- so the design must also decide which semantics to honor for + XMILE-sourced vs. Vensim-sourced macros.) No local fixture covers arrayed + macros, so this path is unverified by the test corpus. + +- **Recursion.** XMILE permits self-recursive and mutually-recursive macros + (section 5.7); a per-call-site *inline instantiation* strategy does not + terminate for a genuinely recursive macro. The `recursive_macros` flag is the + warning sign. Vensim's standard `:MACRO:` syntax cannot express direct + self-recursion ("definition before use" + the macro name not being defined in + its own body), so for the *Vensim-import* path this may be a non-issue in + practice -- but an XMILE-import path, or a strict reading, has to decide what + to do (support bounded recursion, reject, etc.). XMILE's own hint is that + *tail*-recursive macros can be turned into loops (section 4.8.1). + +- **Definition-order rule.** Vensim's "definition must precede use" is the only + ordering rule in the language (https://www.vensim.com/documentation/22145.html), + yet the local `macro_trailing_definition` fixture deliberately violates it and + is still treated as a valid, simulating model. The implementation must decide + whether to enforce Vensim's stated rule (and error on trailing definitions) + or be lenient (collect all macro definitions before resolving any call, + regardless of order). The engine's parser already collects all top-level + items before conversion, so leniency is the lower-effort path -- but it is a + conscious deviation from Vensim's documented contract. + +- **Mismatch between XMILE `` and a module.** An XMILE `` can + carry its *own* `` (its own `start`/`stop`/`dt`/`method`, possibly + parameterized by arguments) and "run to completion each time it is invoked" + (XMILE 1.0 sections 3.6.1, 4.8, 4.8.3). That is *not* how a normal sub-model/ + module behaves -- a module steps in lockstep with its parent. A macro with + its own sim specs is closer to "call a whole nested simulation per time + step." The local Vensim fixtures never hit this (Vensim `:MACRO:` has no + per-macro sim specs), but an XMILE-import path or a faithful XMILE-export + would have to confront it. For the *Vensim* hero use case this can likely be + ignored; for full XMILE-macro support it cannot. + +### 8.3 Summary of where the corpus does and does not give ground truth + +| Macro feature | Pinned by a local fixture? | +| --- | --- | +| Stockless macro, single call, scalar | Yes -- `macro_expression`, `macro_multi_expression` | +| Stock-bearing macro, single call, scalar | Yes -- `macro_stock` (full 11-step trajectory) | +| Multiple distinct macros in one file | Yes -- `macro_multi_macros`, `macro_cross_reference` | +| One macro calling another (nesting) | Yes -- `macro_cross_reference` | +| Macro defined *after* use | Yes -- `macro_trailing_definition` (and treated as valid) | +| Same macro invoked at multiple call sites | No | +| Macro call nested inside a larger expression | No | +| Expression-valued call arguments | No (fixtures pass only plain identifiers) | +| `:`-separated output list (multiple outputs) | No (and unparseable today) | +| Subscripted / arrayed macros | No | +| `$` model-variable escape (`Time$`, `TIME STEP$`) | Not in `macro_*` fixtures, but used by the C-LEARN hero model | +| Recursive macro | No | +| Per-macro `` (XMILE) | No | + +The C-LEARN hero model (`test/xmutil_test_models/C-LEARN v77 for Vensim.mdl`) +defines four macros -- `SAMPLE UNTIL` (contains a stock and uses `TIME STEP$`), +`SSHAPE` (stockless, two body equations, *shadows a built-in name*), +`RAMP FROM TO` (stockless, five parameters, six internal auxes, uses `Time$` +and `TIME STEP$`), and `INIT` (stockless, wraps `INITIAL`) -- so it stresses +multi-equation bodies, the `$` escape, a stock-in-macro, and a builtin-shadowing +name, but (as written) it invokes each macro in a relatively simple way. It is +the realistic target; the table above shows which of its features have +*isolated* fixture coverage and which do not. + +--- + +## 9. Open questions / uncertainties not resolved from authoritative sources + +- **Lookups inside a macro body.** Neither the Vensim macro pages nor the local + fixtures explicitly demonstrate a graphical-function/lookup defined inside a + `:MACRO:` body. XMILE's "all of the syntax of XMILE" implies it is allowed, + but there is no ground-truth output. Should be tested against Vensim directly + if needed. + +- **Exact Vensim behavior on a trailing macro definition.** The Vensim manual + says it is a syntax error; the `macro_trailing_definition` fixture (produced + with "Vensim DSS 6.3E for Mac") nonetheless ships an expected `output.tab`. + Whether that fixture's `.mdl` actually loaded cleanly in that Vensim build, or + was hand-constructed, is not determinable from the files alone. + +- **Whether direct self-recursion is *ever* accepted by Vensim DSS.** The docs + describe nesting of *previously defined* macros and recursive *expansion of + that nesting*, and the strict ordering rule makes literal self-reference + inexpressible -- but the Vensim documentation never says "self-recursive + macros are rejected" in so many words. XMILE explicitly allows recursion; + Vensim's position is, at best, implied. + +- **How Vensim resolves a macro name that shadows a built-in at a *call site*.** + C-LEARN names a macro `SSHAPE`, which is also a Vensim built-in. The engine's + parser disambiguates the *definition header* (accepts a `Function` token as + the macro name). What is not pinned by an authoritative source is the + precedence rule at the *call site* once such a macro is in scope -- does the + user macro shadow the built-in for the rest of the file? The "definition + before use" rule and the per-file macro table strongly imply yes, but it is + not stated outright. + +- **Argument-evaluation timing for stock-bearing macros across DT.** The + XMILE/Vensim model ("the macro is an independent model fed by the + arguments") and the `macro_stock` fixture together imply the argument + expressions are evaluated in the caller's context every step and fed into the + macro's internal integration. The exact ordering relative to the caller's own + stock updates within a single Euler/RK step is not spelled out in the macro + documentation pages; it follows from the general XMILE/Vensim integration + semantics, but a careful implementation should verify it against the + `macro_stock` numbers and, ideally, a multi-step RK fixture. + +- **XMILE `` with its own `` -- runtime semantics in + practice.** The spec defines the *encoding* (sections 4.8, 4.8.3) and says + such a macro "runs to completion each time it is invoked," but real-world + XMILE files exercising this are scarce, and the local corpus has none. diff --git a/src/simlin-engine/tests/vdf_structural_invariants.rs b/src/simlin-engine/tests/vdf_structural_invariants.rs index 455669d21..02d486388 100644 --- a/src/simlin-engine/tests/vdf_structural_invariants.rs +++ b/src/simlin-engine/tests/vdf_structural_invariants.rs @@ -293,7 +293,10 @@ fn test_block1_word10_high_equals_word11_across_corpus() { /// slot count that matches `block1[7]`; the Rust scanner uses a stricter /// `min_stride >= 4` rule and misses a chunk of entries on these /// specific files. The Python-observed delta (per the memory-regions -/// audit) is 0 on risk2 and 1 on SCEN01. The Rust under-count is +/// audit) is 0 on risk2 and 1 on SCEN01; the metasd +/// `social-network-valuation/optimistic.vdf` and `pessimistic.vdf` +/// fixtures show the same class of Rust under-count at a much larger +/// magnitude (delta -23), tracked in GH #549. The Rust under-count is /// orthogonal to the format invariant tested here, so we explicitly /// exempt those fixtures and track the parser gap separately. fn rust_slot_table_undercount_known(path: &Path) -> bool { @@ -305,7 +308,10 @@ fn rust_slot_table_undercount_known(path: &Path) -> bool { .unwrap_or(""); matches!( (parent, file_name), - ("econ", "risk2.vdf") | ("WRLD3-03", "SCEN01.VDF") + ("econ", "risk2.vdf") + | ("WRLD3-03", "SCEN01.VDF") + | ("social-network-valuation", "optimistic.vdf") + | ("social-network-valuation", "pessimistic.vdf") ) } @@ -330,9 +336,13 @@ fn rust_slot_table_undercount_known(path: &Path) -> bool { /// scanner is known to return a short count on `econ/risk2.vdf` and /// `WRLD3-03/SCEN01.VDF` because its `min_stride >= 4` rule rejects /// valid leading-extra-slot layouts that the Python `vdf_xray` parser -/// accepts. On those fixtures the format-level invariant still holds -/// (block1[7] matches the true slot count); we flag the Rust parser -/// discrepancy separately rather than hide it behind a relaxed bound. +/// accepts; on those two the format-level invariant still holds +/// (block1[7] matches the Python-observed slot count). The metasd +/// `social-network-valuation` `optimistic.vdf` / `pessimistic.vdf` pair +/// is exempted for the same class of Rust under-count at a larger +/// magnitude (delta -23), tracked in GH #549. We flag these Rust parser +/// discrepancies separately rather than hide them behind a relaxed +/// bound. #[test] fn test_block1_word7_matches_slot_count_within_small_delta() { const ROOTS: &[&str] = &[ diff --git a/test/metasd/FREE/FREE6/FREE6-corrected/all_data.mdl b/test/metasd/FREE/FREE6/FREE6-corrected/all_data.mdl new file mode 100644 index 000000000..0f316b3bc --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-corrected/all_data.mdl @@ -0,0 +1,483 @@ +Nonenergy Carbon Emissions + ~ TonC/year + ~ Nonenergy carbon emissions. + | + +World Bank Population:= + World Population*1e+006 + ~ people + ~ Population data (World Bank). + | + +World Population + ~ + ~ | + +******************************************************** + .Data +********************************************************~ + | + +Oil EIA + ~ + ~ | + +Primary Trabalka + ~ + ~ ~ :SUPPLEMENTARY + | + +OilGas EIA:= + Oil EIA+Gas EIA + ~ + ~ ~ :SUPPLEMENTARY + | + +Primary WEC + ~ + ~ ~ :SUPPLEMENTARY + | + +Primary EIA + ~ + ~ ~ :SUPPLEMENTARY + | + +Coal EIA + ~ + ~ ~ :SUPPLEMENTARY + | + +Gas EIA + ~ + ~ | + +Share Data[source] := Production Data[source]/Total Production Data + ~ dmnl + ~ Energy production share data by source. + ~ :SUPPLEMENTARY + | + +Total Production Data := SUM(Production Data[source!]) + ~ + ~ Total energy production data (physical terms). + | + +Production Data[Coal] := Coal Production ~~| +Production Data[OilGas] := Oil Production+Gas Production ~~| +Production Data[HN] := Hydro Electricity+Nuclear Electricity ~~| +Production Data[New] := Other Electricity + ~ GJ/year + ~ Production data array for all sources. + | + +Price Data[Coal] := World Coal Price ~~| +Price Data[OilGas] := (World Crude Price*Oil Production+World Gas Price*Gas Production +)/(Oil Production+Gas Production) ~~| +Price Data[HN] := Elect Price ~~| +Price Data[New] := 10*Elect Price + ~ $/GJ + ~ Price data array for all sources. + | + +Average Energy Price = (Average Thermal Price*(Coal Production+Gas Production+Oil Production +) ++Elect Price*Primary Electricity) +/(Coal Production+Gas Production+Oil Production+Primary Electricity) + ~ $/GJ + ~ Average price of energy in physical terms, from data. Electricity in \ + primary equivalent units. + ~ :SUPPLEMENTARY + | + +Average Thermal Price = (Oil Production*World Crude Price+Coal Production*World Coal Price ++Gas Production*World Gas Price)/(Coal Production+Gas Production+Oil Production) + ~ + ~ Average price of thermal fuels from data. + | + +Coal Production + ~ + ~ Coal production data. + | + +Commercial Energy + ~ + ~ Commercial energy data. + ~ :SUPPLEMENTARY + | + +Cons Frac GDP + ~ + ~ Consumption as a fraction of GDP (data). + ~ :SUPPLEMENTARY + | + +Elect Price + ~ + ~ Electricity price data. + | + +Gas Production + ~ + ~ Gas production data. + | + +GDP := World GDP*1e+009 + ~ + ~ GDP data. + ~ :SUPPLEMENTARY + | + +GDP Deflator + ~ + ~ GDP deflator data. + ~ :SUPPLEMENTARY + | + +Hydro Electricity + ~ + ~ Hydro electricity data (primary equivalent units). + | + +Invest Frac GDP + ~ + ~ Investment as a fraction of GDP data. + | + +Nuclear Electricity + ~ + ~ Nuclear electricity production data (primary equivalent units). + | + +Oil Production + ~ + ~ Oil production data. + | + +Other Electricity + ~ + ~ Other electricity production data (primary equivalent units). + | + +Primary Electricity = Hydro Electricity+Nuclear Electricity+Other Electricity + ~ + ~ Primary electricity production data (primary equivalent units). + | + +Primary Energy + ~ + ~ Total primary energy production data. + ~ :SUPPLEMENTARY + | + +Thermal Electricity + ~ + ~ Thermal electricity production data (primary equivalent units). + ~ :SUPPLEMENTARY + | + +Total Electricity + ~ + ~ Total electricity production data (primary equivalent units). + ~ :SUPPLEMENTARY + | + +Traditional Energy + ~ + ~ Traditional energy production data. + ~ :SUPPLEMENTARY + | + +World Coal Price + ~ + ~ Coal price data. + | + +World Crude Price + ~ + ~ Oil price data. + | + +World Gas Price + ~ + ~ Gas price data. + | + +World GDP + ~ + ~ GDP data. + | + +World Investment = World GDP*Invest Frac GDP*1e+009 + ~ + ~ Investment data. + | + +World Pop Growth Rt + ~ + ~ Population growth rate data. + ~ :SUPPLEMENTARY + | + +DICE IPCC CO2 Rad Forcing + ~ + ~ ~ :SUPPLEMENTARY + | + +DICE IPCC Other Rad Forcing + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions A + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions B + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions C + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions D + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions E + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions A + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions B + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions C + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions D + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration A + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration B + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration C + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration D + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration E + ~ + ~ ~ :SUPPLEMENTARY + | + +EMF Population + ~ + ~ ~ :SUPPLEMENTARY + | + +EMF GDP + ~ + ~ ~ :SUPPLEMENTARY + | + +******************************************************** + .Energy.Sources +********************************************************~ + | + +nonrenewable : Coal,OilGas + ~ dmnl + ~ Nonrenewable energy sources. + | + +Renewable : HN,New + ~ dmnl + ~ Renewable energy sources. + | + +source : Coal,OilGas,HN,New + ~ dmnl + ~ Energy sources. Coal represents coal and similar solid fuels. OilGas + represents oil, gas, and natural gas liquids. HN = hydro/nuclear aggregate; + New = new renewables (solar, wind, biomass, etc.). + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 2300 + ~ year + ~ The final time for the simulation. + | + +INITIAL TIME = 1960 + ~ year + ~ The initial time for the simulation. + | + +SAVEPER = 1 + ~ year + ~ The frequency with which output is stored. + | + +TIME STEP = 0.125 + ~ year + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*Data +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,World Crude Price,79,49,47,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +|1,Oil Production,78,134,38,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,World Gas Price,78,75,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,World Coal Price,91,103,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Elect Price,405,120,28,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Primary Energy,89,246,40,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,Traditional Energy,90,271,47,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Commercial Energy,90,296,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Gas Production,81,167,40,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Coal Production,78,201,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Total Electricity,407,277,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Thermal Electricity,404,250,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Hydro Electricity,406,169,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Nuclear Electricity,408,193,47,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,Other Electricity,409,220,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|15,GDP Deflator,544,48,36,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|16,World GDP,545,75,31,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|17,Invest Frac GDP,546,104,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Cons Frac GDP,548,132,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +-19 +|20,World Pop Growth Rt,549,182,57,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|21,World Investment,678,88,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|22,Average Thermal Price,216,75,57,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|23,Primary Electricity,266,196,48,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|24,Average Energy Price,262,120,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|25,GDP,667,58,15,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +-26 +|27,World Bank Population,548,158,59,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|28,World Population,685,159,52,8,0,1,0,1,-1,0,128-128-128,128-128-128 +>28,27,0,0,0,0,0,-1--1--1,1|(626,158)| +>16,25,0,0,0,0,0,-1--1--1,1|(607,66)| +>14,23,0,0,0,0,0,-1--1--1,1|(346,209)| +>13,23,0,0,0,0,0,-1--1--1,1|(344,193)| +>12,23,0,0,0,0,0,-1--1--1,1|(342,181)| +>9,24,0,0,0,0,0,-1--1--1,1|(163,163)| +>8,24,0,0,0,0,0,-1--1--1,1|(164,145)| +>1,24,0,0,0,0,0,-1--1--1,1|(155,128)| +>22,24,0,0,0,0,0,-1--1--1,1|(233,92)| +>4,24,0,0,0,0,0,-1--1--1,1|(353,120)| +>23,24,0,0,0,0,0,-1--1--1,1|(264,164)| +>9,22,0,0,0,0,0,-1--1--1,1|(141,142)| +>8,22,0,0,0,0,0,-1--1--1,1|(142,124)| +>1,22,0,0,0,0,0,-1--1--1,1|(140,107)| +>3,22,0,0,0,0,0,-1--1--1,1|(146,90)| +>2,22,0,0,0,0,0,-1--1--1,1|(132,75)| +>0,22,0,0,0,0,0,-1--1--1,1|(140,60)| +>17,21,0,0,0,0,0,-1--1--1,1|(603,96)| +>16,21,0,0,0,0,0,-1--1--1,1|(597,79)| +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*Data 2 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Price Data,413,159,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Production Data,408,320,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Elect Price,258,208,36,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|3,World Coal Price,256,178,53,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|4,World Crude Price,254,145,57,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|5,World Gas Price,250,117,52,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|6,Coal Production,257,325,50,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|7,Gas Production,249,355,48,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|8,Hydro Electricity,253,389,53,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|9,Oil Production,263,264,46,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|10,Share Data,530,320,30,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Nuclear Electricity,259,297,56,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|12,Other Electricity,259,428,51,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|13,Total Production Data,529,381,59,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +|14,Gas Production,538,137,48,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|15,Oil Production,542,176,46,8,0,1,0,1,-1,0,128-128-128,128-128-128 +>1,10,0,0,0,0,0,-1--1--1,1|(468,320)| +>9,1,0,0,0,0,0,-1--1--1,1|(328,289)| +>8,1,0,0,0,0,0,-1--1--1,1|(323,357)| +>7,1,0,0,0,0,0,-1--1--1,1|(321,339)| +>6,1,0,0,0,0,0,-1--1--1,1|(329,322)| +>5,0,0,0,0,0,0,-1--1--1,1|(325,136)| +>4,0,0,0,0,0,0,-1--1--1,1|(340,152)| +>3,0,0,0,0,0,0,-1--1--1,1|(339,167)| +>2,0,0,0,0,0,0,-1--1--1,1|(328,186)| +>11,1,0,0,0,0,0,-1--1--1,1|(330,307)| +>12,1,0,0,0,0,0,-1--1--1,1|(327,378)| +>13,10,0,0,0,0,0,-1--1--1,1|(529,357)| +>1,13,0,0,0,0,0,-1--1--1,1|(461,347)| +>14,0,0,0,0,0,0,-1--1--1,1|(474,147)| +>15,0,0,0,0,0,0,-1--1--1,1|(475,167)| +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*IPCC/EMF Data +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,CO2 Concentration A,185,91,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,CO2 Concentration B,172,122,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,CO2 Concentration C,169,149,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,CO2 Concentration D,167,182,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,CO2 Concentration E,175,218,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,CO2 Emissions A,382,87,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,CO2 Emissions B,375,121,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,CO2 Emissions C,370,150,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,CO2 Emissions D,372,181,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,CO2 Emissions E,365,213,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Energy CO2 Emissions A,561,86,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Energy CO2 Emissions B,555,120,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Energy CO2 Emissions C,552,150,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Energy CO2 Emissions D,553,189,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,DICE IPCC CO2 Rad Forcing,176,298,75,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|15,DICE IPCC Other Rad Forcing,165,330,77,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|16,EMF Population,426,299,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|17,EMF GDP,421,334,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Nonenergy Carbon Emissions,168,364,74,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*Forecast Data +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Primary WEC,129,107,36,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Primary EIA,122,148,33,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Primary Trabalka,120,184,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Oil EIA,123,222,21,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Gas EIA,117,257,23,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Coal EIA,123,290,25,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,OilGas EIA,231,239,31,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +>3,6,0,0,0,0,0,-1--1--1,1|(165,228)| +>4,6,0,0,0,0,0,-1--1--1,1|(163,249)| diff --git a/test/metasd/FREE/FREE6/FREE6-corrected/all_data2.vdf b/test/metasd/FREE/FREE6/FREE6-corrected/all_data2.vdf new file mode 100644 index 0000000000000000000000000000000000000000..688aa15c89e3fb0a00d2eb2c3089e0d3ca86bda9 GIT binary patch literal 9616 zcmeHLcUV-%`W}h~ktm{3RL~WSq7non*7eK~cGm*So;lRm=meCypdeV*tB4|sf>%)y zFkpqCQKP5?iQUA4CDur=#YT*=AW^*BZ&ncGvb*^`_j!JQ-FcpO=gjwh@09OM+cWP~ zHz)t_aNi*RIR7Db@GA<8ikum&j0+AD#YKsjIW{;>6cs7*28+{-uSB2QiyVfIavV8o z=y1^xdwY9h)I0?vTRm1z>-r&@`;2TTH0I4Y_8i*MfRNtC;jV{f8z97R5_okZkk1C# zH~2?F9svjkL;3f1*lfE}_tPhQ;HGMB2HR(SE&Z1Ead29MU zTJ(c}v(};SuSM?w+&~?A8!h_bz_B_SQ)~UV1X9!Z*#sHUD2BW>y_FWd47lc#tTjCw zpQiR*fMazurq=W<#+vjLIC-NO^49dWTJ&DPdFaryd8(;>wy#anp*Po}pA1}p4n3RW zn%egTE=-4>%}-7GK;YOO-I!X7-={!o(zEj;zEKQ$Yx;g#^lVRCnS5s8P@Qo~c7`s71dJxOF=8ET)?J&-UPrI`nO|=+lAQszcBAcTMfD z0&a&6y^$9ETHyBT(6cjIQ~No+)*8Rc1~()zYw_7I`pPm^t*w(s6%h2 zMbBb)U5CE27X3lsZt2i>(V{;L+yfnYc0Oy0-znh!(4p_DMPC72jShV`E&40Kz15*N z(W3taI77BUHKf+|KX%8{H2&Mbwb!9%cO*^v`@os$(2KO_tAXpTL*G}6{!idUI`jjy z=wAWXUx%LE4>gUy4mdj<`W{;J?4s|eLvNu)-v+c|9s19-=-YwTS%=Va3>YCTf0o2lD(XJ-)`Wy^QcoPRe%KJ+j~Qn^etR>G_6XU}|8^o($IkiZ1*TiP%gpz;rgqKRWe z(!{Z$Y2w%r*%;r=o~WQ1f$U9z4c=2!L_{!5G&W(?-C?fa`)>9$a|IilE4=bU+xt25 zUJUC(=^qrvTKJ$+)_!EHNT&1;Y={b*PY@rGBsc`Z5(R$;%+PrFs1_U7+^a*wJbxES z*5`L?0ir1ytBi_|3l#}*>OQ}>zmKxH{(3$2fd2RMzX)iI06T9)z%rx&So;5*HmrU2 zKZ}8#cP$g++klaQ@vB7$@o+H?0K@?n0kQzw0jB{^0H*NaVhF$kFb(h&kO7y`zHp)P z0xSmT!^b&WfEOSEuntfPs06$KBwD~Z4IiK;0;&NWdcipjPy#IA!^Si~HeeUP0{S!z zFb=S=4?-6JhE@pW03_B3T?T~qMd&qvC4B$^7syoCol*G!Niz#N0lQg^a|?^=QFDvx zs54TX{lHQNmYuUI0JceJP)PcQfDQ5%Kd5Md8DI zg{ZVlF=OGc3a>r}ynj;n79OBc4F2JuVt3X>#lyF26h}7jil#bPE6js2bFSMerdAA5 z9DE{b;W5115(V@@k-TKGT7SK^hr&SJQ=~FL;d#gCw^mo^!%rSi2NrWwa-i7I;$IkG-f-ycfMwVciQchS(Xxq)Xzi)R^vakew9CQebeUB;jW=9Puh(s$qt0)nJ8x~G zcayf!D5ota>C$XrOz=`95O*iUHZYA0Ct875rjIl-SBC!pi*LRTkG z;lwL1Azv>@$e$W6;JGt}jEK2{aqeuvZB(ML=uCpJ^0(On>Ag@GE?F#GvtKGa$XFq` zruz?c z*jT7@_KY2SVWFfKHbzFK1nDhIKn2m?a|0$Tu6B7d+K@c z5^>pCNjfNQ5c6G?$Z~LtiC3q zq@(2g36xFJM`B-gF=9*o#zFv#9+UUXRDagF6_)GtvE!HaYNc(jgtj|34I%VsXt<|QL=qKAjH=Qh}X^+o0 zTZwOr{=u)cOyhTqS@a=7JR&h~g3%D(_QaBU+rCjWl z4DNc-I#qe9F6eWR|6#X_;DiZ8|Q<#Uu@XvoDQFK|S$(`m(%|ww2$cGb?UWgDX{Z z(cH&$ss3ZSV$C0P)uw0E_Fsm=n(8(}Q#4kQRF?^h^IR-G+T+qI_KeFDgL^J!^O5U| zz9z0HaFF~GN|v9zlOxYLoi87lxLLlp|2BEq)9rH8m&Nje>AU4mHh(Aozwe1n@#|S} zOz8NJD?vjujEfutIN;0zaj|JK4ix4_+f)##<}>;}UaL)5wGl8_wO(Y+~FZa+El7rvJB zGZy;tY^|^zZ$;_~{)?Dge$dZfP|uO>v>?-qy88RWy&#kp>c!FZbu%f0Of!x z0IC5VKmdLK6(A2#4yXd4SHJ@Zzz?7Toj%V=ogY$U9DTVx-h5O;uIK@-> zb^d&p`P9&2E$!gAf$mQzpj+N=n=SZ7cn&`1xeZI77UEr<^6>1AnOHAn1(t+m;_BBMuzcedOc#8EE1qq|tFG11J|6VL zk2s*V0w>EvfwS1YR3dg{3c# z-g`L(_nfc7`;6z}(OaYO{qECo;G96bVDl8XS4_au=Z?Ucw+CaV1EF|Br@5s8Be+i)kfbiXNcv$%QaqNDYU)DmqxAzEg&N%3?&sMy+~9}TXM|6jznD?LmurCk+d??W<5fFhoq?DgcK!Q zkfP|DQe<8&MWMA&Hjp8ob~0qqNrn=-%g_js4B7XSp)5NYG9M*F55zKLDv_bnav3V| zlA&y08R{Df{^2rI6(vJgqh-h_L59NT%TRH$3>{x0L)({w|0)@(Tq{F%8=&4C8A{BP zp{e;Yh*1^Hv3UqpNPNTxOO}ZpjEcl2ncKvP!wS{N`D2T^%$ml1a68H@d3bn1wPYZ{YJyO zodIh&5k9ERlcJLOU|#^fi@?4Zbg2;MWf0?ZDSEI{ihNc{QPpawb1m4jrRZc1_-%wb T3#7QC1Puw?q1GY#b0,4,0,0,0,0,0,-1--1--1,1|(266,203)| +>3,4,0,0,0,0,0,-1--1--1,1|(312,221)| +>2,4,0,0,0,0,0,-1--1--1,1|(410,176)| +>1,5,0,0,0,0,0,-1--1--1,1|(480,273)| +>5,6,0,0,0,0,0,-1--1--1,1|(306,275)| +>7,5,0,0,0,0,0,-1--1--1,1|(409,251)| +>4,8,0,0,0,0,0,-1--1--1,1|(425,202)| +>8,7,0,0,0,0,0,-1--1--1,1|(467,215)| +>3,5,0,0,0,0,0,-1--1--1,1|(316,253)| +>8,9,0,0,0,0,0,-1--1--1,1|(520,214)| +>9,7,0,0,0,0,0,-1--1--1,1|(506,234)| +>4,10,0,0,0,0,0,-1--1--1,1|(466,180)| +>7,10,0,0,0,0,0,-1--1--1,1|(501,199)| +>10,11,0,0,0,0,0,-1--1--1,1|(601,168)| diff --git a/test/metasd/FREE/FREE6/FREE6-corrected/conversion2.mdl b/test/metasd/FREE/FREE6/FREE6-corrected/conversion2.mdl new file mode 100644 index 000000000..6e0261915 --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-corrected/conversion2.mdl @@ -0,0 +1,161 @@ +Secondary Weighted Price[Source,Carrier]= + Secondary Price[Source,Carrier]*Secondary Share[Source,Carrier] + ~ $/GJ + ~ | + +Price Coeff[Source,Carrier]= + (Secondary Price[Source,Carrier]/Reference Price)^(Subst Elast-1) + ~ dmnl + ~ | + +Subst Elast= + 2 + ~ dmnl + ~ | + +Reference Price= + 1 + ~ $/GJ + ~ | + +Aggr Secondary Price[Carrier]= + SUM(Secondary Weighted Price[Source!,Carrier]) + ~ $/GJ + ~ | + +Carrier: + Thermal,Liquid,Electric + ~ dmnl + ~ | + +Conversion Cost[Coal,Carrier]=0,6,12 ~~| +Conversion Cost[OilGas,Carrier]=0,3,12 ~~| +Conversion Cost[NewT,Carrier]=0,6,12 ~~| +Conversion Cost[HN,Carrier]=0,12,0 ~~| +Conversion Cost[NewE,Carrier]=0,12,0 + ~ $/GJ + ~ | + +Conversion Efficiency[Coal,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[OilGas,Carrier]=1,0.95,0.4 ~~| +Conversion Efficiency[NewT,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[HN,Carrier]=1,0.5,1 ~~| +Conversion Efficiency[NewE,Carrier]=1,0.5,1 + ~ dmnl + ~ | + +NonRenewable: + Coal,OilGas + ~ + ~ | + +Primary Demand[Source,Carrier]= + Secondary Demand[Carrier]*Secondary Share[Source,Carrier]/Conversion Efficiency[Source +,Carrier] + ~ GJ/year + ~ | + +Primary Price[NonRenewable]=1.2,1.3 ~~| +Primary Price[Renewable]=6,18,60 + ~ $/GJ + ~ | + +Renewable: + NewT,HN,NewE + ~ + ~ | + +Secondary Demand[Carrier]= + 1 + ~ GJ/year + ~ | + +Secondary Price[Source,Carrier]= + (Primary Price[Source]+Conversion Cost[Source,Carrier])/Conversion Efficiency[Source +,Carrier] + ~ $/GJ + ~ | + +Secondary Share[Source,Carrier]= + (Price Coeff[Source,Carrier]/Total Price Coeff[Carrier])^(Subst Elast/(Subst Elast-1 +)) + ~ dmnl + ~ | + +Source: + Coal,OilGas,NewT,HN,NewE + ~ dmnl + ~ | + +Total Price Coeff[Carrier]= + SUM(Price Coeff[Source!,Carrier]) + ~ dmnl + ~ | + +Total Primary Demand[Source]= + SUM(Primary Demand[Source,Carrier!]) + ~ GJ/year + ~ | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 100 + ~ Month + ~ The final time for the simulation. + | + +INITIAL TIME = 0 + ~ Month + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Month + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Month + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Primary Price,187,201,35,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Secondary Demand,581,273,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Conversion Cost,295,147,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Conversion Efficiency,274,237,56,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Secondary Price,365,202,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Primary Demand,373,275,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,Total Primary Demand,211,278,58,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Secondary Share,435,236,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Price Coeff,488,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Total Price Coeff,566,233,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Secondary Weighted Price,568,130,65,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Aggr Secondary Price,669,165,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Subst Elast,605,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Reference Price,403,111,39,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +>0,4,0,0,0,0,0,-1--1--1,1|(266,201)| +>3,4,0,0,0,0,0,-1--1--1,1|(312,221)| +>2,4,0,0,0,0,0,-1--1--1,1|(324,170)| +>1,5,0,0,0,0,0,-1--1--1,1|(480,273)| +>5,6,0,0,0,0,0,-1--1--1,1|(306,275)| +>7,5,0,0,0,0,0,-1--1--1,1|(409,251)| +>4,8,0,0,0,0,0,-1--1--1,1|(425,202)| +>8,7,0,0,0,0,0,-1--1--1,1|(467,215)| +>3,5,0,0,0,0,0,-1--1--1,1|(316,253)| +>8,9,0,0,0,0,0,-1--1--1,1|(520,214)| +>9,7,0,0,0,0,0,-1--1--1,1|(506,234)| +>10,11,0,0,0,0,0,-1--1--1,1|(611,145)| +>12,8,0,0,0,0,0,-1--1--1,1|(553,202)| +>12,7,0,0,0,0,0,-1--1--1,1|(532,216)| +>13,8,0,0,0,0,0,-1--1--1,1|(440,151)| +>7,10,0,0,0,0,0,-1--1--1,1|(495,187)| +>4,10,0,0,0,0,0,-1--1--1,1|(459,168)| diff --git a/test/metasd/FREE/FREE6/FREE6-corrected/conversion3.mdl b/test/metasd/FREE/FREE6/FREE6-corrected/conversion3.mdl new file mode 100644 index 000000000..3036cda50 --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-corrected/conversion3.mdl @@ -0,0 +1,256 @@ +production data[source] + ~ + ~ | + +Total Electricity + ~ + ~ Total electricity production data (primary equivalent units). + | + +Thermal Electricity + ~ + ~ Thermal electricity production data (primary equivalent units). + | + +energy production[source] + ~ + ~ | + +Secondary Demand[Thermal]= + production data[Coal] ~~| +Secondary Demand[Liquid]= + production data[OilGas] ~~| +Secondary Demand[Electric]= + Total Electricity/3 + ~ GJ/year + ~ | + +Primary Expenditure[source2,Carrier]= + Primary Demand[source2,Carrier]*Secondary Price[source2,Carrier] + ~ + ~ | + +final energy price[source] + ~ + ~ | + +Primary Price[source2]= + Price Sim[source2] + ~ $/GJ + ~ | + +Total Primary Expenditure[source2]= + SUM(Primary Expenditure[source2,Carrier!]) + ~ + ~ | + +Price Sim[Coal2]= + final energy price[Coal] ~~| +Price Sim[OilGas2]= + final energy price[OilGas] ~~| +Price Sim[NewT]= + 10 ~~| +Price Sim[HN2]= + final energy price[HN]*3 ~~| +Price Sim[NewE]= + final energy price[new]*2 + ~ + ~ | + +Secondary Weighted Price[source2,Carrier]= + Secondary Price[source2,Carrier]*Secondary Share[source2,Carrier] + ~ $/GJ + ~ | + +Price Coeff[source2,Carrier]= + (Secondary Price[source2,Carrier]/Reference Price)^(Subst Elast-1) + ~ dmnl + ~ | + +Subst Elast= + -2 + ~ dmnl + ~ | + +Reference Price= + 1 + ~ $/GJ + ~ | + +Aggr Secondary Price[Carrier]= + SUM(Secondary Weighted Price[source2!,Carrier]) + ~ $/GJ + ~ ~ :SUPPLEMENTARY + | + +Carrier: + Thermal,Liquid,Electric + ~ dmnl + ~ | + +Conversion Cost[Coal2,Carrier]= + 0,9,4 ~~| +Conversion Cost[OilGas2,Carrier]= + 0,3,4 ~~| +Conversion Cost[NewT,Carrier]= + 0,6,4 ~~| +Conversion Cost[HN2,Carrier]=0,12,0 ~~| +Conversion Cost[NewE,Carrier]=0,12,0 + ~ $/GJ + ~ | + +Conversion Efficiency[Coal2,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[OilGas2,Carrier]=1,0.95,0.4 ~~| +Conversion Efficiency[NewT,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[HN2,Carrier]=1,0.5,1 ~~| +Conversion Efficiency[NewE,Carrier]=1,0.5,1 + ~ dmnl + ~ | + +NonRenewable: + Coal2,OilGas2 + ~ + ~ | + +Primary Demand[source2,Carrier]= + Secondary Demand[Carrier]*Secondary Share[source2,Carrier]/Conversion Efficiency[source2 +,Carrier] + ~ GJ/year + ~ | + +Renewable: + NewT,HN2,NewE + ~ + ~ | + +source : Coal,OilGas,HN,new + ~ + ~ | + +Secondary Price[source2,Carrier]= + (Primary Price[source2]+Conversion Cost[source2,Carrier])/Conversion Efficiency[source2 +,Carrier] + ~ $/GJ + ~ | + +Secondary Share[source2,Carrier]= + (Price Coeff[source2,Carrier]/Total Price Coeff[Carrier])^(Subst Elast/(Subst Elast- +1 +)) + ~ dmnl + ~ | + +source2: + Coal2,OilGas2,NewT,HN2,NewE + ~ dmnl + ~ | + +Total Price Coeff[Carrier]= + SUM(Price Coeff[source2!,Carrier]) + ~ dmnl + ~ | + +Total Primary Demand[source2]= + SUM(Primary Demand[source2,Carrier!]) + ~ GJ/year + ~ ~ :SUPPLEMENTARY + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 2100 + ~ year + ~ The final time for the simulation. + | + +INITIAL TIME = 1960 + ~ year + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ year + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ year + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Primary Price,187,201,35,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Secondary Demand,581,273,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Conversion Cost,295,147,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Conversion Efficiency,274,237,56,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Secondary Price,365,202,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Primary Demand,373,275,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,Total Primary Demand,211,278,58,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Secondary Share,435,236,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Price Coeff,488,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Total Price Coeff,566,233,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Secondary Weighted Price,568,130,65,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Aggr Secondary Price,669,165,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Subst Elast,605,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Reference Price,403,111,39,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,energy production,582,325,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|15,Price Sim,78,133,25,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +|16,final energy price,79,68,51,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|17,Primary Expenditure,377,326,52,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Total Primary Expenditure,209,325,67,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|19,Total Electricity,722,272,49,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|20,production data,720,301,47,8,0,1,0,1,-1,0,128-128-128,128-128-128 +>0,4,0,0,0,0,0,-1--1--1,1|(266,201)| +>3,4,0,0,0,0,0,-1--1--1,1|(312,221)| +>2,4,0,0,0,0,0,-1--1--1,1|(324,170)| +>1,5,0,0,0,0,0,-1--1--1,1|(480,273)| +>5,6,0,0,0,0,0,-1--1--1,1|(306,275)| +>7,5,0,0,0,0,0,-1--1--1,1|(409,251)| +>4,8,0,0,0,0,0,-1--1--1,1|(425,202)| +>8,7,0,0,0,0,0,-1--1--1,1|(467,215)| +>3,5,0,0,0,0,0,-1--1--1,1|(316,253)| +>8,9,0,0,0,0,0,-1--1--1,1|(520,214)| +>9,7,0,0,0,0,0,-1--1--1,1|(506,234)| +>10,11,0,0,0,0,0,-1--1--1,1|(611,145)| +>12,8,0,0,0,0,0,-1--1--1,1|(553,202)| +>12,7,0,0,0,0,0,-1--1--1,1|(532,216)| +>13,8,0,0,0,0,0,-1--1--1,1|(440,151)| +>7,10,0,0,0,0,0,-1--1--1,1|(495,187)| +>4,10,0,0,0,0,0,-1--1--1,1|(459,168)| +>15,0,0,0,0,0,0,-1--1--1,1|(126,163)| +>16,15,0,0,0,0,0,-1--1--1,1|(78,93)| +>5,17,0,0,0,0,0,-1--1--1,1|(373,293)| +>17,18,0,0,0,0,0,-1--1--1,1|(307,325)| +>4,17,0,0,0,0,0,-1--1--1,1|(369,257)| +>19,1,0,0,0,0,0,-1--1--1,1|(658,272)| +>20,1,0,0,0,0,0,-1--1--1,1|(657,288)| +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 2 +$Times New Roman|10||0-0-0|0-0-0|0-0-0 +-0 +-1 +-2 +-3 +-4 +-5 +-6 +-7 +-8 +-9 +-10 +-11 +-12 +-13 +-14 +-15 +|16,Total Electricity,407,277,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|17,Thermal Electricity,404,250,50,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 diff --git a/test/metasd/FREE/FREE6/FREE6-corrected/energy_pos_loop.mdl b/test/metasd/FREE/FREE6/FREE6-corrected/energy_pos_loop.mdl new file mode 100644 index 000000000..e1a06a4b3 --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-corrected/energy_pos_loop.mdl @@ -0,0 +1,298 @@ +Capacity Utilization = A FUNCTION OF( Capital,Production) + ~ + ~ | + +Capital = A FUNCTION OF( Investment,-Discards) + ~ + ~ | + +Carbon Depletion = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Demand = A FUNCTION OF( Carbon Energy Share) + ~ + ~ | + +Carbon Energy Investment = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Price = A FUNCTION OF( Carbon Depletion,Carbon Energy Technology,Carbon Tax +) + ~ + ~ | + +Carbon Energy Production = A FUNCTION OF( Carbon Energy Demand) + ~ + ~ | + +Carbon Energy Share = A FUNCTION OF( Carbon Energy Price) + ~ + ~ | + +Carbon Energy Technology = A FUNCTION OF( Carbon Energy Investment) + ~ + ~ | + +Carbon Tax = A FUNCTION OF( ) + ~ + ~ | + +Complementary Infrastructure = A FUNCTION OF( Infrastructure Investment,-Infrastructure Discards +) + ~ + ~ | + +Consumption = A FUNCTION OF( Production) + ~ + ~ | + +Cumulative End Use Experience = A FUNCTION OF( Consumption) + ~ + ~ | + +Cumulative Production Experience = A FUNCTION OF( Production) + ~ + ~ | + +Cumulative R and D Investment = A FUNCTION OF( R and D Investment) + ~ + ~ | + +Demand = A FUNCTION OF( End Use Productivity,Price,Marketing) + ~ + ~ | + +Discards = A FUNCTION OF( Capital) + ~ + ~ | + +Economies of Scale = A FUNCTION OF( Capital) + ~ + ~ | + +Embodied Energy Requirements = A FUNCTION OF( Energy Requirements Investment,-Energy Requirement Discards +) + ~ + ~ | + +End Use Productivity = A FUNCTION OF( Cumulative End Use Experience,Embodied Energy Requirements +,Complementary Infrastructure) + ~ + ~ | + +Energy Requirement Discards = A FUNCTION OF( Embodied Energy Requirements) + ~ + ~ | + +Energy Requirements Investment = A FUNCTION OF( End Use Productivity,Price) + ~ + ~ | + +Infrastructure Discards = A FUNCTION OF( Complementary Infrastructure) + ~ + ~ | + +Infrastructure Investment = A FUNCTION OF( Embodied Energy Requirements) + ~ + ~ | + +Investment = A FUNCTION OF( Production,Capacity Utilization) + ~ + ~ | + +Marketing = A FUNCTION OF( Revenue) + ~ + ~ | + +Price = A FUNCTION OF( Productivity) + ~ + ~ | + +Production = A FUNCTION OF( Demand) + ~ + ~ | + +Productivity = A FUNCTION OF( Cumulative Production Experience,Economies of Scale,Technology +,Capacity Utilization) + ~ + ~ | + +R and D Investment = A FUNCTION OF( Investment) + ~ + ~ | + +Revenue = A FUNCTION OF( Price,Production) + ~ + ~ | + +Technology = A FUNCTION OF( Cumulative R and D Investment) + ~ + ~ | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 100 + ~ Month + ~ The final time for the simulation. + | + +INITIAL TIME = 0 + ~ Month + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Month + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Month + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Capital,337,136,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|1,48,172,139,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|2,2,238,139,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|3,Investment,238,155,29,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|4,48,504,135,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|5,2,453,137,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|6,Discards,453,153,23,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|7,Productivity,539,314,33,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Price,483,423,14,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Demand,227,415,22,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Revenue,368,333,23,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Cumulative Production Experience,255,297,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|12," +B +,398,159,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|13,Technology,584,154,31,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,48,110,296,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|15,2,160,296,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|16,Production,160,312,29,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|17,Economies of Scale,481,214,48,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Capacity Utilization,329,231,52,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|19,End Use Productivity,375,476,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|20,Complementary Infrastructure,306,659,45,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|21,48,515,662,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|22,2,440,662,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|23,Infrastructure Investment,440,678,64,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|24,48,117,662,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|25,2,186,661,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|26,Infrastructure Discards,186,677,58,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|27,Cumulative End Use Experience,198,498,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|28,48,53,497,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|29,2,103,497,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|30,Consumption,103,513,35,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|31,Embodied Energy Requirements,511,582,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|32,48,671,585,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|33,2,617,584,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|34,Energy Requirements Investment,617,614,56,22,40,0,0,0,0,0,-1--1--1,-1--1--1 +|35,48,325,580,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|36,2,392,580,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|37,Energy Requirement Discards,392,605,58,17,40,0,0,0,0,0,-1--1--1,-1--1--1 +|38,Marketing,317,381,27,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|39,Cumulative R and D Investment,463,49,41,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|40,48,295,48,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|41,2,363,48,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|42,R and D Investment,363,64,51,8,32,0,0,0,-1,0,-1--1--1,-1--1--1 +|43," +B +,456,610,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|44," +B +,247,701,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|45," +B +,298,185,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|46," +R1 +,447,97,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|47," +R3 +,468,241,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|48," +R4 +,495,354,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|49," +R5 +,238,363,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|50," +B +,351,267,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|51," +R6 +,159,434,15,15,5,3,0,0,0,0,-1--1--1,-1--1--1 +|52," +R7 +,475,521,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|53," +R2 +,212,221,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|54," +R8 +,366,542,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|55," +B +,493,457,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|56," +B +,394,386,12,12,5,3,0,0,0,0,-1--1--1,-1--1--1 +>31,37,1,0,43,0,0,-1--1--1,1|(432,630)| +>36,31,100,0,0,22,0,-1--1--1,1|(434,580)| +>36,35,4,0,0,22,0,-1--1--1,1|(359,580)| +>33,32,100,0,0,22,0,-1--1--1,1|(643,584)| +>33,31,4,0,32,22,0,-1--1--1,1|(581,584)| +>29,28,100,0,0,22,0,-1--1--1,1|(79,497)| +>29,27,4,0,32,22,0,-1--1--1,1|(133,497)| +>25,20,100,0,0,22,0,-1--1--1,1|(226,661)| +>25,24,4,0,0,22,0,-1--1--1,1|(152,661)| +>22,21,100,0,0,22,0,-1--1--1,1|(476,662)| +>22,20,4,0,43,22,0,-1--1--1,1|(392,662)| +>2,0,4,0,32,22,0,-1--1--1,1|(270,139)| +>2,1,100,0,0,22,0,-1--1--1,1|(206,139)| +>5,4,4,0,0,22,0,-1--1--1,1|(477,137)| +>5,0,100,0,0,22,0,-1--1--1,1|(412,137)| +>15,11,4,0,32,22,0,-1--1--1,1|(190,296)| +>15,14,100,0,0,22,0,-1--1--1,1|(136,296)| +>0,17,1,0,43,0,0,-1--1--1,1|(409,211)| +>17,7,1,0,43,0,0,-1--1--1,1|(531,287)| +>13,7,1,0,43,0,0,-1--1--1,1|(557,293)| +>11,7,1,0,43,0,0,-1--1--1,1|(494,308)| +>0,18,1,0,45,0,0,-1--1--1,1|(346,207)| +>15,18,1,0,43,0,0,-1--1--1,1|(208,257)| +>18,7,1,0,45,0,0,-1--1--1,1|(506,289)| +>7,8,1,0,45,0,0,-1--1--1,1|(518,402)| +>8,9,1,0,45,0,0,-1--1--1,1|(277,422)| +>0,6,1,0,43,0,0,-1--1--1,1|(429,175)| +>9,16,1,0,43,0,0,-1--1--1,1|(164,336)| +>16,29,1,0,43,0,0,-1--1--1,1|(98,469)| +>27,19,1,0,43,0,0,-1--1--1,1|(309,491)| +>19,9,1,0,43,0,0,-1--1--1,1|(248,437)| +>20,26,1,0,43,0,0,-1--1--1,1|(198,704)| +>31,19,1,0,43,0,0,-1--1--1,1|(392,504)| +>19,33,1,0,43,0,0,-1--1--1,1|(593,555)| +>8,33,1,0,45,0,0,-1--1--1,1|(613,546)| +>31,22,1,0,43,0,0,-1--1--1,1|(468,649)| +>20,19,1,0,43,0,0,-1--1--1,1|(341,497)| +>15,3,1,0,43,0,0,-1--1--1,1|(211,175)| +>18,3,1,0,43,0,0,-1--1--1,1|(239,181)| +>8,10,1,0,43,0,0,-1--1--1,1|(411,338)| +>16,10,1,0,43,0,0,-1--1--1,1|(324,334)| +>10,38,1,0,43,0,0,-1--1--1,1|(345,366)| +>38,9,1,0,43,0,0,-1--1--1,1|(265,407)| +>2,42,1,0,43,0,0,-1--1--1,1|(297,80)| +>41,39,4,0,32,22,0,-1--1--1,1|(395,48)| +>41,40,100,0,0,22,0,-1--1--1,1|(330,48)| +>39,13,1,0,43,0,0,-1--1--1,1|(572,129)| diff --git a/test/metasd/FREE/FREE6/FREE6-corrected/energy_tech_cld.mdl b/test/metasd/FREE/FREE6/FREE6-corrected/energy_tech_cld.mdl new file mode 100644 index 000000000..bfa2f837d --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-corrected/energy_tech_cld.mdl @@ -0,0 +1,145 @@ +Aggregate Energy Price = A FUNCTION OF( Carbon Energy Price,NonCarbon Energy Price) + ~ + ~ | + +Carbon Depletion = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Demand = A FUNCTION OF( Carbon Energy Share,Energy Demand) + ~ + ~ | + +Carbon Energy Investment = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Price = A FUNCTION OF( Carbon Depletion,Carbon Energy Technology,Carbon Tax +) + ~ + ~ | + +Carbon Energy Production = A FUNCTION OF( Carbon Energy Demand) + ~ + ~ | + +Carbon Energy Share = A FUNCTION OF( Carbon Energy Price,NonCarbon Energy Price) + ~ + ~ | + +Carbon Energy Technology = A FUNCTION OF( Carbon Energy Investment) + ~ + ~ | + +Carbon Tax = A FUNCTION OF( ) + ~ + ~ | + +Energy Demand = A FUNCTION OF( Aggregate Energy Price) + ~ + ~ | + +NonCarbon Energy Demand = A FUNCTION OF( Carbon Energy Share,Energy Demand) + ~ + ~ | + +NonCarbon Energy Investment = A FUNCTION OF( NonCarbon Energy Production) + ~ + ~ | + +NonCarbon Energy Price = A FUNCTION OF( NonCarbon Energy Technology) + ~ + ~ | + +NonCarbon Energy Production = A FUNCTION OF( NonCarbon Energy Demand) + ~ + ~ | + +NonCarbon Energy Technology = A FUNCTION OF( NonCarbon Energy Investment) + ~ + ~ | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 100 + ~ Month + ~ The final time for the simulation. + | + +INITIAL TIME = 0 + ~ Month + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Month + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Month + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Carbon Energy Share,406,218,53,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Carbon Energy Production,232,81,66,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Carbon Energy Investment,371,34,67,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Carbon Depletion,446,102,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Carbon Energy Price,586,170,52,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Aggregate Energy Price,693,220,58,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,NonCarbon Energy Technology,534,336,79,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Carbon Energy Technology,560,73,68,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,NonCarbon Energy Price,589,275,62,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,NonCarbon Energy Production,236,334,77,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Energy Demand,59,216,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Carbon Energy Demand,226,164,60,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,NonCarbon Energy Demand,225,267,70,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,NonCarbon Energy Investment,388,384,77,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14," +R1 +,450,66,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|15," +R2 +,389,299,16,16,5,3,0,0,0,0,-1--1--1,-1--1--1 +|16," +B1 +,372,153,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|17," +R3 +,379,439,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|18," +R4 +,196,216,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|19,Carbon Tax,678,103,30,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|20," +B2 +,590,218,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +>1,2,1,0,43,0,0,-1--1--1,1|(286,39)| +>2,7,1,0,43,0,0,-1--1--1,1|(525,52)| +>7,4,1,0,45,0,0,-1--1--1,1|(594,142)| +>3,4,1,0,43,0,0,-1--1--1,1|(561,145)| +>1,3,1,0,43,0,0,-1--1--1,1|(342,82)| +>4,0,1,0,45,0,0,-1--1--1,1|(485,212)| +>4,5,1,0,43,0,0,-1--1--1,1|(666,196)| +>0,11,1,0,43,0,0,-1--1--1,1|(255,186)| +>11,1,1,0,43,0,0,-1--1--1,1|(215,126)| +>0,12,1,0,45,0,0,-1--1--1,1|(259,245)| +>10,12,1,0,43,0,0,-1--1--1,1|(130,259)| +>10,11,1,0,43,0,0,-1--1--1,1|(146,172)| +>5,10,1,0,45,0,0,-1--1--1,1|(65,245)| +>8,5,1,0,43,0,0,-1--1--1,1|(666,244)| +>6,8,1,0,45,0,0,-1--1--1,1|(577,296)| +>8,0,1,0,43,0,0,-1--1--1,1|(486,225)| +>12,9,1,0,43,0,0,-1--1--1,1|(223,313)| +>9,13,1,0,43,0,0,-1--1--1,1|(284,374)| +>13,6,1,0,43,0,0,-1--1--1,1|(509,359)| +>19,4,1,0,43,0,0,-1--1--1,1|(621,152)| diff --git a/test/metasd/FREE/FREE6/FREE6-corrected/tech_data.mdl b/test/metasd/FREE/FREE6/FREE6-corrected/tech_data.mdl new file mode 100644 index 000000000..1849455ee --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-corrected/tech_data.mdl @@ -0,0 +1,52 @@ +Energy Technology[source] + ~ dmnl + ~ Energy technology level, extracted from a simulation run of full model. + | + +source: + Coal,OilGas,HN,New + ~ dmnl + ~ Energy sources. + | + +Technology Data[source]= + Energy Technology[source] + ~ dmnl + ~ Technology data, for input as data driver to full model. + ~ :SUPPLEMENTARY + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 2300 + ~ Year + ~ The final time for the simulation. + | + +INITIAL TIME = 1960 + ~ Year + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Year + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Year + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Energy Technology,362,216,49,8,0,0,0,0,0,0,-1--1--1,-1--1--1 +|1,Technology Data,189,216,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +>0,1,0,0,0,0,0,-1--1--1,1|(280,216)| diff --git a/test/metasd/FREE/FREE6/FREE6-original/all_data.mdl b/test/metasd/FREE/FREE6/FREE6-original/all_data.mdl new file mode 100644 index 000000000..0f316b3bc --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-original/all_data.mdl @@ -0,0 +1,483 @@ +Nonenergy Carbon Emissions + ~ TonC/year + ~ Nonenergy carbon emissions. + | + +World Bank Population:= + World Population*1e+006 + ~ people + ~ Population data (World Bank). + | + +World Population + ~ + ~ | + +******************************************************** + .Data +********************************************************~ + | + +Oil EIA + ~ + ~ | + +Primary Trabalka + ~ + ~ ~ :SUPPLEMENTARY + | + +OilGas EIA:= + Oil EIA+Gas EIA + ~ + ~ ~ :SUPPLEMENTARY + | + +Primary WEC + ~ + ~ ~ :SUPPLEMENTARY + | + +Primary EIA + ~ + ~ ~ :SUPPLEMENTARY + | + +Coal EIA + ~ + ~ ~ :SUPPLEMENTARY + | + +Gas EIA + ~ + ~ | + +Share Data[source] := Production Data[source]/Total Production Data + ~ dmnl + ~ Energy production share data by source. + ~ :SUPPLEMENTARY + | + +Total Production Data := SUM(Production Data[source!]) + ~ + ~ Total energy production data (physical terms). + | + +Production Data[Coal] := Coal Production ~~| +Production Data[OilGas] := Oil Production+Gas Production ~~| +Production Data[HN] := Hydro Electricity+Nuclear Electricity ~~| +Production Data[New] := Other Electricity + ~ GJ/year + ~ Production data array for all sources. + | + +Price Data[Coal] := World Coal Price ~~| +Price Data[OilGas] := (World Crude Price*Oil Production+World Gas Price*Gas Production +)/(Oil Production+Gas Production) ~~| +Price Data[HN] := Elect Price ~~| +Price Data[New] := 10*Elect Price + ~ $/GJ + ~ Price data array for all sources. + | + +Average Energy Price = (Average Thermal Price*(Coal Production+Gas Production+Oil Production +) ++Elect Price*Primary Electricity) +/(Coal Production+Gas Production+Oil Production+Primary Electricity) + ~ $/GJ + ~ Average price of energy in physical terms, from data. Electricity in \ + primary equivalent units. + ~ :SUPPLEMENTARY + | + +Average Thermal Price = (Oil Production*World Crude Price+Coal Production*World Coal Price ++Gas Production*World Gas Price)/(Coal Production+Gas Production+Oil Production) + ~ + ~ Average price of thermal fuels from data. + | + +Coal Production + ~ + ~ Coal production data. + | + +Commercial Energy + ~ + ~ Commercial energy data. + ~ :SUPPLEMENTARY + | + +Cons Frac GDP + ~ + ~ Consumption as a fraction of GDP (data). + ~ :SUPPLEMENTARY + | + +Elect Price + ~ + ~ Electricity price data. + | + +Gas Production + ~ + ~ Gas production data. + | + +GDP := World GDP*1e+009 + ~ + ~ GDP data. + ~ :SUPPLEMENTARY + | + +GDP Deflator + ~ + ~ GDP deflator data. + ~ :SUPPLEMENTARY + | + +Hydro Electricity + ~ + ~ Hydro electricity data (primary equivalent units). + | + +Invest Frac GDP + ~ + ~ Investment as a fraction of GDP data. + | + +Nuclear Electricity + ~ + ~ Nuclear electricity production data (primary equivalent units). + | + +Oil Production + ~ + ~ Oil production data. + | + +Other Electricity + ~ + ~ Other electricity production data (primary equivalent units). + | + +Primary Electricity = Hydro Electricity+Nuclear Electricity+Other Electricity + ~ + ~ Primary electricity production data (primary equivalent units). + | + +Primary Energy + ~ + ~ Total primary energy production data. + ~ :SUPPLEMENTARY + | + +Thermal Electricity + ~ + ~ Thermal electricity production data (primary equivalent units). + ~ :SUPPLEMENTARY + | + +Total Electricity + ~ + ~ Total electricity production data (primary equivalent units). + ~ :SUPPLEMENTARY + | + +Traditional Energy + ~ + ~ Traditional energy production data. + ~ :SUPPLEMENTARY + | + +World Coal Price + ~ + ~ Coal price data. + | + +World Crude Price + ~ + ~ Oil price data. + | + +World Gas Price + ~ + ~ Gas price data. + | + +World GDP + ~ + ~ GDP data. + | + +World Investment = World GDP*Invest Frac GDP*1e+009 + ~ + ~ Investment data. + | + +World Pop Growth Rt + ~ + ~ Population growth rate data. + ~ :SUPPLEMENTARY + | + +DICE IPCC CO2 Rad Forcing + ~ + ~ ~ :SUPPLEMENTARY + | + +DICE IPCC Other Rad Forcing + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions A + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions B + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions C + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions D + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Emissions E + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions A + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions B + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions C + ~ + ~ ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions D + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration A + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration B + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration C + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration D + ~ + ~ ~ :SUPPLEMENTARY + | + +CO2 Concentration E + ~ + ~ ~ :SUPPLEMENTARY + | + +EMF Population + ~ + ~ ~ :SUPPLEMENTARY + | + +EMF GDP + ~ + ~ ~ :SUPPLEMENTARY + | + +******************************************************** + .Energy.Sources +********************************************************~ + | + +nonrenewable : Coal,OilGas + ~ dmnl + ~ Nonrenewable energy sources. + | + +Renewable : HN,New + ~ dmnl + ~ Renewable energy sources. + | + +source : Coal,OilGas,HN,New + ~ dmnl + ~ Energy sources. Coal represents coal and similar solid fuels. OilGas + represents oil, gas, and natural gas liquids. HN = hydro/nuclear aggregate; + New = new renewables (solar, wind, biomass, etc.). + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 2300 + ~ year + ~ The final time for the simulation. + | + +INITIAL TIME = 1960 + ~ year + ~ The initial time for the simulation. + | + +SAVEPER = 1 + ~ year + ~ The frequency with which output is stored. + | + +TIME STEP = 0.125 + ~ year + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*Data +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,World Crude Price,79,49,47,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +|1,Oil Production,78,134,38,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,World Gas Price,78,75,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,World Coal Price,91,103,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Elect Price,405,120,28,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Primary Energy,89,246,40,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,Traditional Energy,90,271,47,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Commercial Energy,90,296,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Gas Production,81,167,40,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Coal Production,78,201,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Total Electricity,407,277,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Thermal Electricity,404,250,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Hydro Electricity,406,169,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Nuclear Electricity,408,193,47,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,Other Electricity,409,220,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|15,GDP Deflator,544,48,36,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|16,World GDP,545,75,31,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|17,Invest Frac GDP,546,104,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Cons Frac GDP,548,132,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +-19 +|20,World Pop Growth Rt,549,182,57,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|21,World Investment,678,88,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|22,Average Thermal Price,216,75,57,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|23,Primary Electricity,266,196,48,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|24,Average Energy Price,262,120,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|25,GDP,667,58,15,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +-26 +|27,World Bank Population,548,158,59,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|28,World Population,685,159,52,8,0,1,0,1,-1,0,128-128-128,128-128-128 +>28,27,0,0,0,0,0,-1--1--1,1|(626,158)| +>16,25,0,0,0,0,0,-1--1--1,1|(607,66)| +>14,23,0,0,0,0,0,-1--1--1,1|(346,209)| +>13,23,0,0,0,0,0,-1--1--1,1|(344,193)| +>12,23,0,0,0,0,0,-1--1--1,1|(342,181)| +>9,24,0,0,0,0,0,-1--1--1,1|(163,163)| +>8,24,0,0,0,0,0,-1--1--1,1|(164,145)| +>1,24,0,0,0,0,0,-1--1--1,1|(155,128)| +>22,24,0,0,0,0,0,-1--1--1,1|(233,92)| +>4,24,0,0,0,0,0,-1--1--1,1|(353,120)| +>23,24,0,0,0,0,0,-1--1--1,1|(264,164)| +>9,22,0,0,0,0,0,-1--1--1,1|(141,142)| +>8,22,0,0,0,0,0,-1--1--1,1|(142,124)| +>1,22,0,0,0,0,0,-1--1--1,1|(140,107)| +>3,22,0,0,0,0,0,-1--1--1,1|(146,90)| +>2,22,0,0,0,0,0,-1--1--1,1|(132,75)| +>0,22,0,0,0,0,0,-1--1--1,1|(140,60)| +>17,21,0,0,0,0,0,-1--1--1,1|(603,96)| +>16,21,0,0,0,0,0,-1--1--1,1|(597,79)| +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*Data 2 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Price Data,413,159,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Production Data,408,320,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Elect Price,258,208,36,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|3,World Coal Price,256,178,53,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|4,World Crude Price,254,145,57,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|5,World Gas Price,250,117,52,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|6,Coal Production,257,325,50,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|7,Gas Production,249,355,48,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|8,Hydro Electricity,253,389,53,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|9,Oil Production,263,264,46,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|10,Share Data,530,320,30,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Nuclear Electricity,259,297,56,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|12,Other Electricity,259,428,51,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|13,Total Production Data,529,381,59,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +|14,Gas Production,538,137,48,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|15,Oil Production,542,176,46,8,0,1,0,1,-1,0,128-128-128,128-128-128 +>1,10,0,0,0,0,0,-1--1--1,1|(468,320)| +>9,1,0,0,0,0,0,-1--1--1,1|(328,289)| +>8,1,0,0,0,0,0,-1--1--1,1|(323,357)| +>7,1,0,0,0,0,0,-1--1--1,1|(321,339)| +>6,1,0,0,0,0,0,-1--1--1,1|(329,322)| +>5,0,0,0,0,0,0,-1--1--1,1|(325,136)| +>4,0,0,0,0,0,0,-1--1--1,1|(340,152)| +>3,0,0,0,0,0,0,-1--1--1,1|(339,167)| +>2,0,0,0,0,0,0,-1--1--1,1|(328,186)| +>11,1,0,0,0,0,0,-1--1--1,1|(330,307)| +>12,1,0,0,0,0,0,-1--1--1,1|(327,378)| +>13,10,0,0,0,0,0,-1--1--1,1|(529,357)| +>1,13,0,0,0,0,0,-1--1--1,1|(461,347)| +>14,0,0,0,0,0,0,-1--1--1,1|(474,147)| +>15,0,0,0,0,0,0,-1--1--1,1|(475,167)| +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*IPCC/EMF Data +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,CO2 Concentration A,185,91,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,CO2 Concentration B,172,122,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,CO2 Concentration C,169,149,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,CO2 Concentration D,167,182,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,CO2 Concentration E,175,218,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,CO2 Emissions A,382,87,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,CO2 Emissions B,375,121,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,CO2 Emissions C,370,150,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,CO2 Emissions D,372,181,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,CO2 Emissions E,365,213,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Energy CO2 Emissions A,561,86,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Energy CO2 Emissions B,555,120,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Energy CO2 Emissions C,552,150,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Energy CO2 Emissions D,553,189,64,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,DICE IPCC CO2 Rad Forcing,176,298,75,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|15,DICE IPCC Other Rad Forcing,165,330,77,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|16,EMF Population,426,299,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|17,EMF GDP,421,334,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Nonenergy Carbon Emissions,168,364,74,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*Forecast Data +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Primary WEC,129,107,36,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Primary EIA,122,148,33,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Primary Trabalka,120,184,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Oil EIA,123,222,21,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Gas EIA,117,257,23,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Coal EIA,123,290,25,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,OilGas EIA,231,239,31,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +>3,6,0,0,0,0,0,-1--1--1,1|(165,228)| +>4,6,0,0,0,0,0,-1--1--1,1|(163,249)| diff --git a/test/metasd/FREE/FREE6/FREE6-original/all_data2.vdf b/test/metasd/FREE/FREE6/FREE6-original/all_data2.vdf new file mode 100644 index 0000000000000000000000000000000000000000..688aa15c89e3fb0a00d2eb2c3089e0d3ca86bda9 GIT binary patch literal 9616 zcmeHLcUV-%`W}h~ktm{3RL~WSq7non*7eK~cGm*So;lRm=meCypdeV*tB4|sf>%)y zFkpqCQKP5?iQUA4CDur=#YT*=AW^*BZ&ncGvb*^`_j!JQ-FcpO=gjwh@09OM+cWP~ zHz)t_aNi*RIR7Db@GA<8ikum&j0+AD#YKsjIW{;>6cs7*28+{-uSB2QiyVfIavV8o z=y1^xdwY9h)I0?vTRm1z>-r&@`;2TTH0I4Y_8i*MfRNtC;jV{f8z97R5_okZkk1C# zH~2?F9svjkL;3f1*lfE}_tPhQ;HGMB2HR(SE&Z1Ead29MU zTJ(c}v(};SuSM?w+&~?A8!h_bz_B_SQ)~UV1X9!Z*#sHUD2BW>y_FWd47lc#tTjCw zpQiR*fMazurq=W<#+vjLIC-NO^49dWTJ&DPdFaryd8(;>wy#anp*Po}pA1}p4n3RW zn%egTE=-4>%}-7GK;YOO-I!X7-={!o(zEj;zEKQ$Yx;g#^lVRCnS5s8P@Qo~c7`s71dJxOF=8ET)?J&-UPrI`nO|=+lAQszcBAcTMfD z0&a&6y^$9ETHyBT(6cjIQ~No+)*8Rc1~()zYw_7I`pPm^t*w(s6%h2 zMbBb)U5CE27X3lsZt2i>(V{;L+yfnYc0Oy0-znh!(4p_DMPC72jShV`E&40Kz15*N z(W3taI77BUHKf+|KX%8{H2&Mbwb!9%cO*^v`@os$(2KO_tAXpTL*G}6{!idUI`jjy z=wAWXUx%LE4>gUy4mdj<`W{;J?4s|eLvNu)-v+c|9s19-=-YwTS%=Va3>YCTf0o2lD(XJ-)`Wy^QcoPRe%KJ+j~Qn^etR>G_6XU}|8^o($IkiZ1*TiP%gpz;rgqKRWe z(!{Z$Y2w%r*%;r=o~WQ1f$U9z4c=2!L_{!5G&W(?-C?fa`)>9$a|IilE4=bU+xt25 zUJUC(=^qrvTKJ$+)_!EHNT&1;Y={b*PY@rGBsc`Z5(R$;%+PrFs1_U7+^a*wJbxES z*5`L?0ir1ytBi_|3l#}*>OQ}>zmKxH{(3$2fd2RMzX)iI06T9)z%rx&So;5*HmrU2 zKZ}8#cP$g++klaQ@vB7$@o+H?0K@?n0kQzw0jB{^0H*NaVhF$kFb(h&kO7y`zHp)P z0xSmT!^b&WfEOSEuntfPs06$KBwD~Z4IiK;0;&NWdcipjPy#IA!^Si~HeeUP0{S!z zFb=S=4?-6JhE@pW03_B3T?T~qMd&qvC4B$^7syoCol*G!Niz#N0lQg^a|?^=QFDvx zs54TX{lHQNmYuUI0JceJP)PcQfDQ5%Kd5Md8DI zg{ZVlF=OGc3a>r}ynj;n79OBc4F2JuVt3X>#lyF26h}7jil#bPE6js2bFSMerdAA5 z9DE{b;W5115(V@@k-TKGT7SK^hr&SJQ=~FL;d#gCw^mo^!%rSi2NrWwa-i7I;$IkG-f-ycfMwVciQchS(Xxq)Xzi)R^vakew9CQebeUB;jW=9Puh(s$qt0)nJ8x~G zcayf!D5ota>C$XrOz=`95O*iUHZYA0Ct875rjIl-SBC!pi*LRTkG z;lwL1Azv>@$e$W6;JGt}jEK2{aqeuvZB(ML=uCpJ^0(On>Ag@GE?F#GvtKGa$XFq` zruz?c z*jT7@_KY2SVWFfKHbzFK1nDhIKn2m?a|0$Tu6B7d+K@c z5^>pCNjfNQ5c6G?$Z~LtiC3q zq@(2g36xFJM`B-gF=9*o#zFv#9+UUXRDagF6_)GtvE!HaYNc(jgtj|34I%VsXt<|QL=qKAjH=Qh}X^+o0 zTZwOr{=u)cOyhTqS@a=7JR&h~g3%D(_QaBU+rCjWl z4DNc-I#qe9F6eWR|6#X_;DiZ8|Q<#Uu@XvoDQFK|S$(`m(%|ww2$cGb?UWgDX{Z z(cH&$ss3ZSV$C0P)uw0E_Fsm=n(8(}Q#4kQRF?^h^IR-G+T+qI_KeFDgL^J!^O5U| zz9z0HaFF~GN|v9zlOxYLoi87lxLLlp|2BEq)9rH8m&Nje>AU4mHh(Aozwe1n@#|S} zOz8NJD?vjujEfutIN;0zaj|JK4ix4_+f)##<}>;}UaL)5wGl8_wO(Y+~FZa+El7rvJB zGZy;tY^|^zZ$;_~{)?Dge$dZfP|uO>v>?-qy88RWy&#kp>c!FZbu%f0Of!x z0IC5VKmdLK6(A2#4yXd4SHJ@Zzz?7Toj%V=ogY$U9DTVx-h5O;uIK@-> zb^d&p`P9&2E$!gAf$mQzpj+N=n=SZ7cn&`1xeZI77UEr<^6>1AnOHAn1(t+m;_BBMuzcedOc#8EE1qq|tFG11J|6VL zk2s*V0w>EvfwS1YR3dg{3c# z-g`L(_nfc7`;6z}(OaYO{qECo;G96bVDl8XS4_au=Z?Ucw+CaV1EF|Br@5s8Be+i)kfbiXNcv$%QaqNDYU)DmqxAzEg&N%3?&sMy+~9}TXM|6jznD?LmurCk+d??W<5fFhoq?DgcK!Q zkfP|DQe<8&MWMA&Hjp8ob~0qqNrn=-%g_js4B7XSp)5NYG9M*F55zKLDv_bnav3V| zlA&y08R{Df{^2rI6(vJgqh-h_L59NT%TRH$3>{x0L)({w|0)@(Tq{F%8=&4C8A{BP zp{e;Yh*1^Hv3UqpNPNTxOO}ZpjEcl2ncKvP!wS{N`D2T^%$ml1a68H@d3bn1wPYZ{YJyO zodIh&5k9ERlcJLOU|#^fi@?4Zbg2;MWf0?ZDSEI{ihNc{QPpawb1m4jrRZc1_-%wb T3#7QC1Puw?q1GY#b0,4,0,0,0,0,0,-1--1--1,1|(266,203)| +>3,4,0,0,0,0,0,-1--1--1,1|(312,221)| +>2,4,0,0,0,0,0,-1--1--1,1|(410,176)| +>1,5,0,0,0,0,0,-1--1--1,1|(480,273)| +>5,6,0,0,0,0,0,-1--1--1,1|(306,275)| +>7,5,0,0,0,0,0,-1--1--1,1|(409,251)| +>4,8,0,0,0,0,0,-1--1--1,1|(425,202)| +>8,7,0,0,0,0,0,-1--1--1,1|(467,215)| +>3,5,0,0,0,0,0,-1--1--1,1|(316,253)| +>8,9,0,0,0,0,0,-1--1--1,1|(520,214)| +>9,7,0,0,0,0,0,-1--1--1,1|(506,234)| +>4,10,0,0,0,0,0,-1--1--1,1|(466,180)| +>7,10,0,0,0,0,0,-1--1--1,1|(501,199)| +>10,11,0,0,0,0,0,-1--1--1,1|(601,168)| diff --git a/test/metasd/FREE/FREE6/FREE6-original/conversion2.mdl b/test/metasd/FREE/FREE6/FREE6-original/conversion2.mdl new file mode 100644 index 000000000..6e0261915 --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-original/conversion2.mdl @@ -0,0 +1,161 @@ +Secondary Weighted Price[Source,Carrier]= + Secondary Price[Source,Carrier]*Secondary Share[Source,Carrier] + ~ $/GJ + ~ | + +Price Coeff[Source,Carrier]= + (Secondary Price[Source,Carrier]/Reference Price)^(Subst Elast-1) + ~ dmnl + ~ | + +Subst Elast= + 2 + ~ dmnl + ~ | + +Reference Price= + 1 + ~ $/GJ + ~ | + +Aggr Secondary Price[Carrier]= + SUM(Secondary Weighted Price[Source!,Carrier]) + ~ $/GJ + ~ | + +Carrier: + Thermal,Liquid,Electric + ~ dmnl + ~ | + +Conversion Cost[Coal,Carrier]=0,6,12 ~~| +Conversion Cost[OilGas,Carrier]=0,3,12 ~~| +Conversion Cost[NewT,Carrier]=0,6,12 ~~| +Conversion Cost[HN,Carrier]=0,12,0 ~~| +Conversion Cost[NewE,Carrier]=0,12,0 + ~ $/GJ + ~ | + +Conversion Efficiency[Coal,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[OilGas,Carrier]=1,0.95,0.4 ~~| +Conversion Efficiency[NewT,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[HN,Carrier]=1,0.5,1 ~~| +Conversion Efficiency[NewE,Carrier]=1,0.5,1 + ~ dmnl + ~ | + +NonRenewable: + Coal,OilGas + ~ + ~ | + +Primary Demand[Source,Carrier]= + Secondary Demand[Carrier]*Secondary Share[Source,Carrier]/Conversion Efficiency[Source +,Carrier] + ~ GJ/year + ~ | + +Primary Price[NonRenewable]=1.2,1.3 ~~| +Primary Price[Renewable]=6,18,60 + ~ $/GJ + ~ | + +Renewable: + NewT,HN,NewE + ~ + ~ | + +Secondary Demand[Carrier]= + 1 + ~ GJ/year + ~ | + +Secondary Price[Source,Carrier]= + (Primary Price[Source]+Conversion Cost[Source,Carrier])/Conversion Efficiency[Source +,Carrier] + ~ $/GJ + ~ | + +Secondary Share[Source,Carrier]= + (Price Coeff[Source,Carrier]/Total Price Coeff[Carrier])^(Subst Elast/(Subst Elast-1 +)) + ~ dmnl + ~ | + +Source: + Coal,OilGas,NewT,HN,NewE + ~ dmnl + ~ | + +Total Price Coeff[Carrier]= + SUM(Price Coeff[Source!,Carrier]) + ~ dmnl + ~ | + +Total Primary Demand[Source]= + SUM(Primary Demand[Source,Carrier!]) + ~ GJ/year + ~ | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 100 + ~ Month + ~ The final time for the simulation. + | + +INITIAL TIME = 0 + ~ Month + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Month + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Month + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Primary Price,187,201,35,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Secondary Demand,581,273,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Conversion Cost,295,147,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Conversion Efficiency,274,237,56,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Secondary Price,365,202,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Primary Demand,373,275,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,Total Primary Demand,211,278,58,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Secondary Share,435,236,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Price Coeff,488,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Total Price Coeff,566,233,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Secondary Weighted Price,568,130,65,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Aggr Secondary Price,669,165,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Subst Elast,605,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Reference Price,403,111,39,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +>0,4,0,0,0,0,0,-1--1--1,1|(266,201)| +>3,4,0,0,0,0,0,-1--1--1,1|(312,221)| +>2,4,0,0,0,0,0,-1--1--1,1|(324,170)| +>1,5,0,0,0,0,0,-1--1--1,1|(480,273)| +>5,6,0,0,0,0,0,-1--1--1,1|(306,275)| +>7,5,0,0,0,0,0,-1--1--1,1|(409,251)| +>4,8,0,0,0,0,0,-1--1--1,1|(425,202)| +>8,7,0,0,0,0,0,-1--1--1,1|(467,215)| +>3,5,0,0,0,0,0,-1--1--1,1|(316,253)| +>8,9,0,0,0,0,0,-1--1--1,1|(520,214)| +>9,7,0,0,0,0,0,-1--1--1,1|(506,234)| +>10,11,0,0,0,0,0,-1--1--1,1|(611,145)| +>12,8,0,0,0,0,0,-1--1--1,1|(553,202)| +>12,7,0,0,0,0,0,-1--1--1,1|(532,216)| +>13,8,0,0,0,0,0,-1--1--1,1|(440,151)| +>7,10,0,0,0,0,0,-1--1--1,1|(495,187)| +>4,10,0,0,0,0,0,-1--1--1,1|(459,168)| diff --git a/test/metasd/FREE/FREE6/FREE6-original/conversion3.mdl b/test/metasd/FREE/FREE6/FREE6-original/conversion3.mdl new file mode 100644 index 000000000..3036cda50 --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-original/conversion3.mdl @@ -0,0 +1,256 @@ +production data[source] + ~ + ~ | + +Total Electricity + ~ + ~ Total electricity production data (primary equivalent units). + | + +Thermal Electricity + ~ + ~ Thermal electricity production data (primary equivalent units). + | + +energy production[source] + ~ + ~ | + +Secondary Demand[Thermal]= + production data[Coal] ~~| +Secondary Demand[Liquid]= + production data[OilGas] ~~| +Secondary Demand[Electric]= + Total Electricity/3 + ~ GJ/year + ~ | + +Primary Expenditure[source2,Carrier]= + Primary Demand[source2,Carrier]*Secondary Price[source2,Carrier] + ~ + ~ | + +final energy price[source] + ~ + ~ | + +Primary Price[source2]= + Price Sim[source2] + ~ $/GJ + ~ | + +Total Primary Expenditure[source2]= + SUM(Primary Expenditure[source2,Carrier!]) + ~ + ~ | + +Price Sim[Coal2]= + final energy price[Coal] ~~| +Price Sim[OilGas2]= + final energy price[OilGas] ~~| +Price Sim[NewT]= + 10 ~~| +Price Sim[HN2]= + final energy price[HN]*3 ~~| +Price Sim[NewE]= + final energy price[new]*2 + ~ + ~ | + +Secondary Weighted Price[source2,Carrier]= + Secondary Price[source2,Carrier]*Secondary Share[source2,Carrier] + ~ $/GJ + ~ | + +Price Coeff[source2,Carrier]= + (Secondary Price[source2,Carrier]/Reference Price)^(Subst Elast-1) + ~ dmnl + ~ | + +Subst Elast= + -2 + ~ dmnl + ~ | + +Reference Price= + 1 + ~ $/GJ + ~ | + +Aggr Secondary Price[Carrier]= + SUM(Secondary Weighted Price[source2!,Carrier]) + ~ $/GJ + ~ ~ :SUPPLEMENTARY + | + +Carrier: + Thermal,Liquid,Electric + ~ dmnl + ~ | + +Conversion Cost[Coal2,Carrier]= + 0,9,4 ~~| +Conversion Cost[OilGas2,Carrier]= + 0,3,4 ~~| +Conversion Cost[NewT,Carrier]= + 0,6,4 ~~| +Conversion Cost[HN2,Carrier]=0,12,0 ~~| +Conversion Cost[NewE,Carrier]=0,12,0 + ~ $/GJ + ~ | + +Conversion Efficiency[Coal2,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[OilGas2,Carrier]=1,0.95,0.4 ~~| +Conversion Efficiency[NewT,Carrier]=1,0.85,0.4 ~~| +Conversion Efficiency[HN2,Carrier]=1,0.5,1 ~~| +Conversion Efficiency[NewE,Carrier]=1,0.5,1 + ~ dmnl + ~ | + +NonRenewable: + Coal2,OilGas2 + ~ + ~ | + +Primary Demand[source2,Carrier]= + Secondary Demand[Carrier]*Secondary Share[source2,Carrier]/Conversion Efficiency[source2 +,Carrier] + ~ GJ/year + ~ | + +Renewable: + NewT,HN2,NewE + ~ + ~ | + +source : Coal,OilGas,HN,new + ~ + ~ | + +Secondary Price[source2,Carrier]= + (Primary Price[source2]+Conversion Cost[source2,Carrier])/Conversion Efficiency[source2 +,Carrier] + ~ $/GJ + ~ | + +Secondary Share[source2,Carrier]= + (Price Coeff[source2,Carrier]/Total Price Coeff[Carrier])^(Subst Elast/(Subst Elast- +1 +)) + ~ dmnl + ~ | + +source2: + Coal2,OilGas2,NewT,HN2,NewE + ~ dmnl + ~ | + +Total Price Coeff[Carrier]= + SUM(Price Coeff[source2!,Carrier]) + ~ dmnl + ~ | + +Total Primary Demand[source2]= + SUM(Primary Demand[source2,Carrier!]) + ~ GJ/year + ~ ~ :SUPPLEMENTARY + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 2100 + ~ year + ~ The final time for the simulation. + | + +INITIAL TIME = 1960 + ~ year + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ year + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ year + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Primary Price,187,201,35,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Secondary Demand,581,273,49,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Conversion Cost,295,147,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Conversion Efficiency,274,237,56,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Secondary Price,365,202,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Primary Demand,373,275,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,Total Primary Demand,211,278,58,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Secondary Share,435,236,42,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Price Coeff,488,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Total Price Coeff,566,233,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Secondary Weighted Price,568,130,65,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Aggr Secondary Price,669,165,54,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,Subst Elast,605,202,29,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,Reference Price,403,111,39,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,energy production,582,325,46,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|15,Price Sim,78,133,25,8,0,0,0,0,-1,0,-1--1--1,128-128-128 +|16,final energy price,79,68,51,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|17,Primary Expenditure,377,326,52,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Total Primary Expenditure,209,325,67,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|19,Total Electricity,722,272,49,8,0,1,0,1,-1,0,128-128-128,128-128-128 +|20,production data,720,301,47,8,0,1,0,1,-1,0,128-128-128,128-128-128 +>0,4,0,0,0,0,0,-1--1--1,1|(266,201)| +>3,4,0,0,0,0,0,-1--1--1,1|(312,221)| +>2,4,0,0,0,0,0,-1--1--1,1|(324,170)| +>1,5,0,0,0,0,0,-1--1--1,1|(480,273)| +>5,6,0,0,0,0,0,-1--1--1,1|(306,275)| +>7,5,0,0,0,0,0,-1--1--1,1|(409,251)| +>4,8,0,0,0,0,0,-1--1--1,1|(425,202)| +>8,7,0,0,0,0,0,-1--1--1,1|(467,215)| +>3,5,0,0,0,0,0,-1--1--1,1|(316,253)| +>8,9,0,0,0,0,0,-1--1--1,1|(520,214)| +>9,7,0,0,0,0,0,-1--1--1,1|(506,234)| +>10,11,0,0,0,0,0,-1--1--1,1|(611,145)| +>12,8,0,0,0,0,0,-1--1--1,1|(553,202)| +>12,7,0,0,0,0,0,-1--1--1,1|(532,216)| +>13,8,0,0,0,0,0,-1--1--1,1|(440,151)| +>7,10,0,0,0,0,0,-1--1--1,1|(495,187)| +>4,10,0,0,0,0,0,-1--1--1,1|(459,168)| +>15,0,0,0,0,0,0,-1--1--1,1|(126,163)| +>16,15,0,0,0,0,0,-1--1--1,1|(78,93)| +>5,17,0,0,0,0,0,-1--1--1,1|(373,293)| +>17,18,0,0,0,0,0,-1--1--1,1|(307,325)| +>4,17,0,0,0,0,0,-1--1--1,1|(369,257)| +>19,1,0,0,0,0,0,-1--1--1,1|(658,272)| +>20,1,0,0,0,0,0,-1--1--1,1|(657,288)| +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 2 +$Times New Roman|10||0-0-0|0-0-0|0-0-0 +-0 +-1 +-2 +-3 +-4 +-5 +-6 +-7 +-8 +-9 +-10 +-11 +-12 +-13 +-14 +-15 +|16,Total Electricity,407,277,43,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|17,Thermal Electricity,404,250,50,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 diff --git a/test/metasd/FREE/FREE6/FREE6-original/energy_pos_loop.mdl b/test/metasd/FREE/FREE6/FREE6-original/energy_pos_loop.mdl new file mode 100644 index 000000000..e1a06a4b3 --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-original/energy_pos_loop.mdl @@ -0,0 +1,298 @@ +Capacity Utilization = A FUNCTION OF( Capital,Production) + ~ + ~ | + +Capital = A FUNCTION OF( Investment,-Discards) + ~ + ~ | + +Carbon Depletion = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Demand = A FUNCTION OF( Carbon Energy Share) + ~ + ~ | + +Carbon Energy Investment = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Price = A FUNCTION OF( Carbon Depletion,Carbon Energy Technology,Carbon Tax +) + ~ + ~ | + +Carbon Energy Production = A FUNCTION OF( Carbon Energy Demand) + ~ + ~ | + +Carbon Energy Share = A FUNCTION OF( Carbon Energy Price) + ~ + ~ | + +Carbon Energy Technology = A FUNCTION OF( Carbon Energy Investment) + ~ + ~ | + +Carbon Tax = A FUNCTION OF( ) + ~ + ~ | + +Complementary Infrastructure = A FUNCTION OF( Infrastructure Investment,-Infrastructure Discards +) + ~ + ~ | + +Consumption = A FUNCTION OF( Production) + ~ + ~ | + +Cumulative End Use Experience = A FUNCTION OF( Consumption) + ~ + ~ | + +Cumulative Production Experience = A FUNCTION OF( Production) + ~ + ~ | + +Cumulative R and D Investment = A FUNCTION OF( R and D Investment) + ~ + ~ | + +Demand = A FUNCTION OF( End Use Productivity,Price,Marketing) + ~ + ~ | + +Discards = A FUNCTION OF( Capital) + ~ + ~ | + +Economies of Scale = A FUNCTION OF( Capital) + ~ + ~ | + +Embodied Energy Requirements = A FUNCTION OF( Energy Requirements Investment,-Energy Requirement Discards +) + ~ + ~ | + +End Use Productivity = A FUNCTION OF( Cumulative End Use Experience,Embodied Energy Requirements +,Complementary Infrastructure) + ~ + ~ | + +Energy Requirement Discards = A FUNCTION OF( Embodied Energy Requirements) + ~ + ~ | + +Energy Requirements Investment = A FUNCTION OF( End Use Productivity,Price) + ~ + ~ | + +Infrastructure Discards = A FUNCTION OF( Complementary Infrastructure) + ~ + ~ | + +Infrastructure Investment = A FUNCTION OF( Embodied Energy Requirements) + ~ + ~ | + +Investment = A FUNCTION OF( Production,Capacity Utilization) + ~ + ~ | + +Marketing = A FUNCTION OF( Revenue) + ~ + ~ | + +Price = A FUNCTION OF( Productivity) + ~ + ~ | + +Production = A FUNCTION OF( Demand) + ~ + ~ | + +Productivity = A FUNCTION OF( Cumulative Production Experience,Economies of Scale,Technology +,Capacity Utilization) + ~ + ~ | + +R and D Investment = A FUNCTION OF( Investment) + ~ + ~ | + +Revenue = A FUNCTION OF( Price,Production) + ~ + ~ | + +Technology = A FUNCTION OF( Cumulative R and D Investment) + ~ + ~ | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 100 + ~ Month + ~ The final time for the simulation. + | + +INITIAL TIME = 0 + ~ Month + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Month + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Month + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Capital,337,136,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|1,48,172,139,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|2,2,238,139,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|3,Investment,238,155,29,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|4,48,504,135,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|5,2,453,137,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|6,Discards,453,153,23,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|7,Productivity,539,314,33,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,Price,483,423,14,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,Demand,227,415,22,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Revenue,368,333,23,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Cumulative Production Experience,255,297,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|12," +B +,398,159,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|13,Technology,584,154,31,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14,48,110,296,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|15,2,160,296,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|16,Production,160,312,29,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|17,Economies of Scale,481,214,48,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|18,Capacity Utilization,329,231,52,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|19,End Use Productivity,375,476,55,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|20,Complementary Infrastructure,306,659,45,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|21,48,515,662,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|22,2,440,662,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|23,Infrastructure Investment,440,678,64,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|24,48,117,662,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|25,2,186,661,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|26,Infrastructure Discards,186,677,58,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|27,Cumulative End Use Experience,198,498,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|28,48,53,497,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|29,2,103,497,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|30,Consumption,103,513,35,8,32,0,0,0,0,0,-1--1--1,-1--1--1 +|31,Embodied Energy Requirements,511,582,40,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|32,48,671,585,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|33,2,617,584,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|34,Energy Requirements Investment,617,614,56,22,40,0,0,0,0,0,-1--1--1,-1--1--1 +|35,48,325,580,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|36,2,392,580,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|37,Energy Requirement Discards,392,605,58,17,40,0,0,0,0,0,-1--1--1,-1--1--1 +|38,Marketing,317,381,27,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|39,Cumulative R and D Investment,463,49,41,20,3,0,0,0,0,0,-1--1--1,-1--1--1 +|40,48,295,48,8,8,0,132,0,0,-1,0,-1--1--1,-1--1--1 +|41,2,363,48,6,8,39,131,0,0,-1,0,1-1--1--1,-1--1--1 +|42,R and D Investment,363,64,51,8,32,0,0,0,-1,0,-1--1--1,-1--1--1 +|43," +B +,456,610,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|44," +B +,247,701,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|45," +B +,298,185,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|46," +R1 +,447,97,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|47," +R3 +,468,241,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|48," +R4 +,495,354,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|49," +R5 +,238,363,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|50," +B +,351,267,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|51," +R6 +,159,434,15,15,5,3,0,0,0,0,-1--1--1,-1--1--1 +|52," +R7 +,475,521,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|53," +R2 +,212,221,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|54," +R8 +,366,542,15,15,4,3,0,0,0,0,-1--1--1,-1--1--1 +|55," +B +,493,457,12,12,4,3,0,0,0,0,-1--1--1,-1--1--1 +|56," +B +,394,386,12,12,5,3,0,0,0,0,-1--1--1,-1--1--1 +>31,37,1,0,43,0,0,-1--1--1,1|(432,630)| +>36,31,100,0,0,22,0,-1--1--1,1|(434,580)| +>36,35,4,0,0,22,0,-1--1--1,1|(359,580)| +>33,32,100,0,0,22,0,-1--1--1,1|(643,584)| +>33,31,4,0,32,22,0,-1--1--1,1|(581,584)| +>29,28,100,0,0,22,0,-1--1--1,1|(79,497)| +>29,27,4,0,32,22,0,-1--1--1,1|(133,497)| +>25,20,100,0,0,22,0,-1--1--1,1|(226,661)| +>25,24,4,0,0,22,0,-1--1--1,1|(152,661)| +>22,21,100,0,0,22,0,-1--1--1,1|(476,662)| +>22,20,4,0,43,22,0,-1--1--1,1|(392,662)| +>2,0,4,0,32,22,0,-1--1--1,1|(270,139)| +>2,1,100,0,0,22,0,-1--1--1,1|(206,139)| +>5,4,4,0,0,22,0,-1--1--1,1|(477,137)| +>5,0,100,0,0,22,0,-1--1--1,1|(412,137)| +>15,11,4,0,32,22,0,-1--1--1,1|(190,296)| +>15,14,100,0,0,22,0,-1--1--1,1|(136,296)| +>0,17,1,0,43,0,0,-1--1--1,1|(409,211)| +>17,7,1,0,43,0,0,-1--1--1,1|(531,287)| +>13,7,1,0,43,0,0,-1--1--1,1|(557,293)| +>11,7,1,0,43,0,0,-1--1--1,1|(494,308)| +>0,18,1,0,45,0,0,-1--1--1,1|(346,207)| +>15,18,1,0,43,0,0,-1--1--1,1|(208,257)| +>18,7,1,0,45,0,0,-1--1--1,1|(506,289)| +>7,8,1,0,45,0,0,-1--1--1,1|(518,402)| +>8,9,1,0,45,0,0,-1--1--1,1|(277,422)| +>0,6,1,0,43,0,0,-1--1--1,1|(429,175)| +>9,16,1,0,43,0,0,-1--1--1,1|(164,336)| +>16,29,1,0,43,0,0,-1--1--1,1|(98,469)| +>27,19,1,0,43,0,0,-1--1--1,1|(309,491)| +>19,9,1,0,43,0,0,-1--1--1,1|(248,437)| +>20,26,1,0,43,0,0,-1--1--1,1|(198,704)| +>31,19,1,0,43,0,0,-1--1--1,1|(392,504)| +>19,33,1,0,43,0,0,-1--1--1,1|(593,555)| +>8,33,1,0,45,0,0,-1--1--1,1|(613,546)| +>31,22,1,0,43,0,0,-1--1--1,1|(468,649)| +>20,19,1,0,43,0,0,-1--1--1,1|(341,497)| +>15,3,1,0,43,0,0,-1--1--1,1|(211,175)| +>18,3,1,0,43,0,0,-1--1--1,1|(239,181)| +>8,10,1,0,43,0,0,-1--1--1,1|(411,338)| +>16,10,1,0,43,0,0,-1--1--1,1|(324,334)| +>10,38,1,0,43,0,0,-1--1--1,1|(345,366)| +>38,9,1,0,43,0,0,-1--1--1,1|(265,407)| +>2,42,1,0,43,0,0,-1--1--1,1|(297,80)| +>41,39,4,0,32,22,0,-1--1--1,1|(395,48)| +>41,40,100,0,0,22,0,-1--1--1,1|(330,48)| +>39,13,1,0,43,0,0,-1--1--1,1|(572,129)| diff --git a/test/metasd/FREE/FREE6/FREE6-original/energy_tech_cld.mdl b/test/metasd/FREE/FREE6/FREE6-original/energy_tech_cld.mdl new file mode 100644 index 000000000..bfa2f837d --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-original/energy_tech_cld.mdl @@ -0,0 +1,145 @@ +Aggregate Energy Price = A FUNCTION OF( Carbon Energy Price,NonCarbon Energy Price) + ~ + ~ | + +Carbon Depletion = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Demand = A FUNCTION OF( Carbon Energy Share,Energy Demand) + ~ + ~ | + +Carbon Energy Investment = A FUNCTION OF( Carbon Energy Production) + ~ + ~ | + +Carbon Energy Price = A FUNCTION OF( Carbon Depletion,Carbon Energy Technology,Carbon Tax +) + ~ + ~ | + +Carbon Energy Production = A FUNCTION OF( Carbon Energy Demand) + ~ + ~ | + +Carbon Energy Share = A FUNCTION OF( Carbon Energy Price,NonCarbon Energy Price) + ~ + ~ | + +Carbon Energy Technology = A FUNCTION OF( Carbon Energy Investment) + ~ + ~ | + +Carbon Tax = A FUNCTION OF( ) + ~ + ~ | + +Energy Demand = A FUNCTION OF( Aggregate Energy Price) + ~ + ~ | + +NonCarbon Energy Demand = A FUNCTION OF( Carbon Energy Share,Energy Demand) + ~ + ~ | + +NonCarbon Energy Investment = A FUNCTION OF( NonCarbon Energy Production) + ~ + ~ | + +NonCarbon Energy Price = A FUNCTION OF( NonCarbon Energy Technology) + ~ + ~ | + +NonCarbon Energy Production = A FUNCTION OF( NonCarbon Energy Demand) + ~ + ~ | + +NonCarbon Energy Technology = A FUNCTION OF( NonCarbon Energy Investment) + ~ + ~ | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 100 + ~ Month + ~ The final time for the simulation. + | + +INITIAL TIME = 0 + ~ Month + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Month + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Month + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Carbon Energy Share,406,218,53,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|1,Carbon Energy Production,232,81,66,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|2,Carbon Energy Investment,371,34,67,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|3,Carbon Depletion,446,102,45,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|4,Carbon Energy Price,586,170,52,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|5,Aggregate Energy Price,693,220,58,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|6,NonCarbon Energy Technology,534,336,79,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|7,Carbon Energy Technology,560,73,68,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|8,NonCarbon Energy Price,589,275,62,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|9,NonCarbon Energy Production,236,334,77,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|10,Energy Demand,59,216,41,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|11,Carbon Energy Demand,226,164,60,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|12,NonCarbon Energy Demand,225,267,70,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|13,NonCarbon Energy Investment,388,384,77,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|14," +R1 +,450,66,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|15," +R2 +,389,299,16,16,5,3,0,0,0,0,-1--1--1,-1--1--1 +|16," +B1 +,372,153,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|17," +R3 +,379,439,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|18," +R4 +,196,216,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +|19,Carbon Tax,678,103,30,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +|20," +B2 +,590,218,16,16,4,3,0,0,0,0,-1--1--1,-1--1--1 +>1,2,1,0,43,0,0,-1--1--1,1|(286,39)| +>2,7,1,0,43,0,0,-1--1--1,1|(525,52)| +>7,4,1,0,45,0,0,-1--1--1,1|(594,142)| +>3,4,1,0,43,0,0,-1--1--1,1|(561,145)| +>1,3,1,0,43,0,0,-1--1--1,1|(342,82)| +>4,0,1,0,45,0,0,-1--1--1,1|(485,212)| +>4,5,1,0,43,0,0,-1--1--1,1|(666,196)| +>0,11,1,0,43,0,0,-1--1--1,1|(255,186)| +>11,1,1,0,43,0,0,-1--1--1,1|(215,126)| +>0,12,1,0,45,0,0,-1--1--1,1|(259,245)| +>10,12,1,0,43,0,0,-1--1--1,1|(130,259)| +>10,11,1,0,43,0,0,-1--1--1,1|(146,172)| +>5,10,1,0,45,0,0,-1--1--1,1|(65,245)| +>8,5,1,0,43,0,0,-1--1--1,1|(666,244)| +>6,8,1,0,45,0,0,-1--1--1,1|(577,296)| +>8,0,1,0,43,0,0,-1--1--1,1|(486,225)| +>12,9,1,0,43,0,0,-1--1--1,1|(223,313)| +>9,13,1,0,43,0,0,-1--1--1,1|(284,374)| +>13,6,1,0,43,0,0,-1--1--1,1|(509,359)| +>19,4,1,0,43,0,0,-1--1--1,1|(621,152)| diff --git a/test/metasd/FREE/FREE6/FREE6-original/free 6.mdl b/test/metasd/FREE/FREE6/FREE6-original/free 6.mdl new file mode 100644 index 000000000..1017c93d5 --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-original/free 6.mdl @@ -0,0 +1,5109 @@ +:MACRO: INIT(input) +INIT = INITIAL(input) + ~ input + ~ Same as INITIAL function, but useable anywhere in an expression. + | + +:END OF MACRO: +******************************************************** + .Welfare.Constrained +********************************************************~ + Calculation of discounted utility, modified for inclusion of + a hard constraint on atmospheric CO2. + | + +Net Discounted Utility= + Discounted Utility-Constraint Violation Penalty + ~ utiles/year + ~ Discounted utility, net of cost of constraint violation. + ~ :SUPPLEMENTARY + | + +Constraint Violation Penalty= + Constraint Violation Cost*max(0,Effective CO2 in Atmosphere-CO2 Constraint) + ~ utiles/year + ~ Total cost of violation of CO2 constraint. + | + +CO2 Constraint= INITIAL ( + Preindustrial CO2*CO2 Constraint Factor) + ~ TonC + ~ Constraint on CO2 content of atmosphere. + | + +CO2 Constraint Factor= + 2 + ~ dmnl + ~ CO2 constraint, expressed as a multiple of the preindustrial CO2 \ + concentration. + | + +Constraint Violation Cost= + 0 + ~ utiles/year/TonC + ~ Unit cost of violating CO2 constraint. For constrained scenarios, set to a \ + very high value in order to ensure a hard constraint. + | + +******************************************************** + .Policy.Depletion +********************************************************~ + Near-optimal taxation of resource depletion in order to restore + intertemporal efficiency in oil and gas production. Note that this + structure is intended to allow testing of a + scenario of efficient resource allocation, + not as a plausible representation of behavior. + | + +Indicated Depletion Rent[OilGas]= + exp(-Depletion Planning Horizon*Interest Rate) + *(Target Final Rent-Marginal Resource Eff on Cost[OilGas] + *(exp(Interest Rate*Depletion Planning Horizon) + -exp(Cost Trend[OilGas]*Depletion Planning Horizon)) + /(Interest Rate-Cost Trend[OilGas])) + ~ $/GJ + ~ Indicated depletion rent, based on extrapolation of current rate of + resource cost increase, to adjust depletion rent to target level at + end of planning horizon. + | + +Depletion Rent[nonrenewable]= + Frac Depletion Recovered*max(0,Desired Depletion Rent[nonrenewable]) + ~ $/GJ + ~ Energy tax for depletion. + | + +Initial Cost Trend= + 0.04 + ~ 1/year + ~ Initial trend in resource extraction cost. + | + +Depletion Rent Correction[OilGas]= + (1-Exog Energy Price Switch[OilGas]) + *(Indicated Depletion Rent[OilGas]-Desired Depletion Rent[OilGas])/Time to Correct Rent + ~ $/GJ/year + ~ Correction to depletion rent; applied over the Time to Correct Rent, but + active only while energy prices are endogenous. + | + +Cost Trend[OilGas]= + LN(Marginal Resource Eff on Cost[OilGas] + /SMOOTHI(Marginal Resource Eff on Cost[OilGas],Trend Time, + Marginal Resource Eff on Cost[OilGas] + *exp(-Trend Time*Initial Cost Trend)))/Trend Time + ~ 1/year + ~ Fractional rate of change of the marginal effect of resource + availability on extraction costs. + | + +Depletion Planning Horizon= + FINAL TIME-Time + ~ year + ~ Planning horizon for depletion decision. + | + +Trend Time= + 20 + ~ year + ~ Time to establish trend in extraction costs. + | + +Target Final Rent= + 0 + ~ $/GJ + ~ Target depletion rent at final time. + | + +Time to Correct Rent= + 20 + ~ year + ~ Time to make extrapolative corrections to depletion rent. + | + +Chg Depletion Rent[OilGas]= + Desired Depletion Rent[OilGas]*Interest Rate + +Marginal Resource Eff on Cost[OilGas]+Depletion Rent Correction[OilGas] + ~ $/GJ/year + ~ Rate of change of depletion rent. + | + +Final Depletion Rent= + IF THEN ELSE(Time = FINAL TIME,ABS(Desired Depletion Rent[OilGas]),0) + ~ $/GJ + ~ Depletion rent in final time step (for calibration purposes) + ~ :SUPPLEMENTARY + | + +LR Marginal Cost of Energy Prod[OilGas]= + (Energy Capital[OilGas]*Energy Capital Cost[OilGas]+Normal Variable Cost[OilGas]) + /Normal Effective Energy Capital Ratio[OilGas] + ~ $/year + ~ Long run marginal cost of energy production. + | + +Marginal Resource Eff Energy Capital Ratio[OilGas]= + (((Scheduled Production[OilGas]/Initial Production[OilGas]) + ^Saturation Coeff[OilGas]-Resource Share[OilGas]*Resource Ratio[OilGas] + ^Saturation Coeff[OilGas])/(1-Resource Share[OilGas])) + ^(1/Saturation Coeff[OilGas]-1) + *Resource Ratio[OilGas] + ^(Saturation Coeff[OilGas]-1) + *(-Resource Share[OilGas])/(1-Resource Share[OilGas]) + /Init Resource Remaining[OilGas] + ~ 1/GJ + ~ Marginal increase in capital-variable aggregate per unit increase in \ + production. + | + +Marginal Resource Eff on Cost[OilGas]= + LR Marginal Cost of Energy Prod[OilGas]*Marginal Resource Eff Energy Capital Ratio[OilGas +] + ~ $/GJ/year + ~ Marginal effect of resource depletion on extraction cost. + | + +Initial Depletion Tax[OilGas]= + 0.3 + ~ $/GJ + ~ Initial depletion rent + | + +Desired Depletion Rent[OilGas]= INTEG ( + Chg Depletion Rent[OilGas], + Initial Depletion Tax[OilGas]) ~~| +Desired Depletion Rent[Coal]= + 0 + ~ $/GJ + ~ Desired depletion rent. + | + +Frac Depletion Recovered= + 0 + ~ dmnl + ~ Fraction of desired depletion rent actually collected by resource managers. + | + +******************************************************** + .Economy.Retrofit +********************************************************~ + | + +Retrofit Rate= + 0 + ~ 1/year + ~ Fractional rate of retrofit to existing capital. + | + +Energy Req Retrofit Rate[source]= + Capital*Retrofit Rate*Planned Energy Intensity[source]-Energy Requirement[source]*Retrofit Rate + ~ GJ/year/year + ~ Rate of change of embodied energy requirements due to retrofits on \ + existing capital. + | + +******************************************************** + .Economy.EnergyInput +********************************************************~ + | + +Energy Order Adj Coeff= + 0.1 + ~ dmnl + ~ Coefficient of energy input adjustment in response to price/productivity + imbalance. Really a behavioral parameter, but should be roughly equal to \ + the short run own-price elasticity if agents know the slope of the short \ + run production function. + | + +Indicated Energy Order Rate[source]= + Energy Delivery[source] + *(SR Marg Prod Energy[source]/SR Expected Energy Price[source])^Energy Order Adj Coeff + ~ GJ/year + ~ Decision makers anchor on current energy consumption rate + and adjust for relative price and marginal productivity. + There is a very small error in energy ordering, as there is no + trend extrapolation to compensate for the delivery delay. + | + +SR Marg Aggr Energy per Energy[source]= + Normal Aggr Energy Requirement/Energy Requirement[source] + *SR Total Aggr Energy Input^(1/SR Energy Subst Coeff-1) + *(Energy Delivery[source]/Energy Requirement[source]) + ^(SR Energy Subst Coeff-1)*SR Energy Value Share[source] + ~ GJequiv/GJ + ~ Marginal output of the aggregate energy good per unit of physical energy \ + input. + | + +SR Aggr Energy = Normal Aggr Energy Requirement*SR Total Aggr Energy Input^(1/SR Energy Subst Coeff +) + ~ GJequiv/year + ~ Output of the aggregate energy good. + | + +SR Total Aggr Energy Input = SUM(SR Aggr Energy Input[source!]) + ~ dmnl + ~ Total contribution of CES terms for each energy source. + | + +SR Aggr Energy Input[source] = SR Energy Value Share[source]* + (Energy Delivery[source]/Energy Requirement[source])^SR Energy Subst Coeff + ~ dmnl + ~ CES term for contribution of individual energy source to aggregate energy \ + good. + | + +SR Marg Prod Energy[source] = SR Marg Aggr Energy per Energy[source]*SR Marg Prod Aggr Energy + ~ $/GJ + ~ Short run marginal productivity of energy, by source. + | + +Operating Coeff= + (1-SR Aggr Energy Value Share) + SR Aggr Energy Value Share*(SR Aggr Energy + /Normal Aggr Energy Requirement)^SR Elast Coeff + ~ dmnl + ~ Coefficient of energy production capacity utilization, based on energy \ + input relative to energy requirements. + | + +SR Aggr Energy Value Share = Marg Capital'Energy per Aggr Energy*Normal Aggr Energy Requirement +/Normal Capital'Energy Aggr + ~ dmnl + ~ Value share of each energy source in the short run CES aggregate energy \ + good. + | + +SR Marg Prod Aggr Energy = Marg Prod Oper Capital*Normal Capital'Energy Aggr/Normal Aggr Energy Requirement + *SR Aggr Energy Value Share*Operating Coeff^(1/SR Elast Coeff-1) + *(SR Aggr Energy/Normal Aggr Energy Requirement)^(SR Elast Coeff-1) + *Reference Operating Capital/Reference Capital'Energy Aggr + ~ $/GJequiv + ~ Short run marginal productivity of aggregate energy good. + | + +SR Elast Coeff = INITIAL((SR Elasticity-1)/SR Elasticity) + ~ dmnl + ~ Short run CES coefficient of substitution between fixed capital and \ + aggregate energy good. + | + +SR Energy Subst Coeff = INITIAL((SR Energy Subst Elast-1)/SR Energy Subst Elast) + ~ dmnl + ~ CES coefficient of subsitution among energy sources. + | + +SR Energy Subst Elast= + 0.2 + ~ dmnl + ~ CES elasticity of substitution among energy sources. + | + +******************************************************** + .Energy.Indicators +********************************************************~ + | + +Total Energy Cost= + Indicated Total Cost Energy Production*Fraction of Energy Goods Avail + +Energy Invest Req*Fraction of Invest Goods Avail + ~ $/year + ~ Total outlays for variable costs of energy production and investment in \ + energy capital. + ~ :SUPPLEMENTARY + | + +Avg Energy Price = Total Energy Expenditure/Total Energy Production + ~ $/GJ + ~ Average energy price, weighted by physical energy production rates. + ~ :SUPPLEMENTARY + | + +Total Energy Expenditure = SUM(Source Expenditure[source!]) + ~ $/year + ~ Total expenditure on energy, calculated in monetary terms (price x \ + quantity). + | + +Primary Energy Order Rate = SUM(Energy Order Rate[source!]) + ~ GJ/year + ~ Order rate of primary energy in physical terms. + ~ :SUPPLEMENTARY + | + +Availability[source] = Energy Production[source]/Energy Order Rate[source] + ~ dmnl + ~ Relative availability of energy sources, expressed as a fraction of orders. + ~ :SUPPLEMENTARY + | + +Production Share[source] = Energy Production[source]/Total Energy Production + ~ dmnl + ~ Share of energy sources in total production (in physical terms). + ~ :SUPPLEMENTARY + | + +Total Energy Investment = SUM(Energy Capital Completion Rate[source!]) + ~ $/year + ~ Total investment in all energy producing capital. + | + +Total Energy Capital = SUM(Energy Capital[source!]) + ~ $ + ~ Total energy capital for all sources. + | + +******************************************************** + .Economy.Indicators +********************************************************~ + | + +Total Investment= + Investment Rate+Total Energy Investment + ~ $/year + ~ Investment in all sectors. + | + +Growth Trend Time= + 1 + ~ year + ~ Time for measuring consumption and output growth trends. + | + +Consumption Growth Rate= + TREND(Consumption,Growth Trend Time,Hist Output Growth Rate) + ~ 1/year + ~ Fractional rate of change of consumption. + ~ :SUPPLEMENTARY + | + +Output Growth Rate= + TREND(Gross Output,Growth Trend Time,Hist Output Growth Rate) + ~ 1/year + ~ Fractional rate of change of gross output. + ~ :SUPPLEMENTARY + | + +Savings Rate = Total Investment/Gross Output + ~ dmnl + ~ Fraction of output invested. + ~ :SUPPLEMENTARY + | + +Total Capital = Capital+Total Energy Capital + ~ $ + ~ Total capital in all sectors. + ~ :SUPPLEMENTARY + | + +******************************************************** + .Welfare +********************************************************~ + | + +Marginal Util Equiv Cons= + Ref Utility*(Equiv Consumption Index)^(-Rate of Inequal Aversion) + ~ utiles/person/year + ~ Marginal utility per unit change in equivalent consumption index. + | + +Marginal Utility= + Marginal Equiv Consumption*Marginal Util Equiv Cons + ~ utiles/$ + ~ Marginal utility of a unit of consumption. + | + +Equiv Consumption Index= + (Consumption per Cap/Ref Cons per Cap)^Share of Consumption + *(Environmental Services per Cap/Ref Envir Services per Cap)^(1-Share of Consumption +) + ~ dmnl + ~ Index of equivalent consumption; equals the consumption equivalent of tangible goods + (consumption) and intangibles (environmental services). Assumes unit elasticity of + substitution between tangibles and intangibles. + | + +Ref Envir Services per Cap= + 1 + ~ dmnl + ~ Reference level of environmental services per capita. + | + +Marginal Equiv Consumption= + Share of Consumption*Equiv Consumption Index/Consumption per Cap + ~ person*year/$ + ~ Marginal change in equivalent consumption index per unit change in \ + consumption per capita. + | + +Share of Consumption= + 1 + ~ dmnl + ~ Value share of consumption in equivalent consumption index. + The default value of 1 means intangible (environmental) services have zero \ + importance. + | + +Environmental Services per Cap= + Ref Envir Services per Cap*Climate Damage Effect[Intangible] + ~ dmnl + ~ Level of environmental services per capita. Note that the environment is assumed to \ + provide + the same level of services per capita regardless of the population. Thus there are \ + no crowding + or degradation effects (other than climate change damages). + | + +Utility= + Ref Utility* + IF THEN ELSE(Rate of Inequal Aversion=1, + LN(Equiv Consumption Index), + (Equiv Consumption Index^(1-Rate of Inequal Aversion)-1) + /(1-Rate of Inequal Aversion)) + ~ utiles/person/year + ~ Utility of a representative individual. + Reduces to logarithmic utility function: + LN(Consumption_per_Cap) + when the Rate of Inequality Aversion -> 1 + | + +Total Utility= + Population*Utility + ~ utiles/year + ~ Flow of utility, weighted by population; i.e. total utility of all \ + individuals. + | + +Discounted Marginal Utility= + Marginal Utility*Discount Factor + ~ utiles/$ + ~ Marginal utility of consumption, discounted to the base year. + | + +Log Discounted Marginal Utility= + LN(Discounted Marginal Utility/INIT(Discounted Marginal Utility)) + ~ dmnl + ~ Logarithm of discounted marginal utility (relative to initial value). + ~ :SUPPLEMENTARY + | + +Discounted Utility= + Total Utility*Discount Factor + ~ utiles/year + ~ The flow of utility, discounted to the base year. + | + +Ref Cons per Cap = 1502 + ~ $/person/year + ~ Reference rate of consumption per capita. + | + +Base Year = 1990 + ~ year + ~ Base Year for Discounting + Model is denominated in 1990 dollars, and discounting is performed \ + relative to 1990. + | + +Consumption per Cap = Consumption/Population + ~ $/person/year + ~ Per capita goods consumption. + | + +Cum Disc Utility = INTEG(Discounted Utility, 0) + ~ utiles + ~ Cumulative Discounted Utility + ~ :SUPPLEMENTARY + | + +Discount Factor = exp(-Rate of Time Pref*(Time-Base Year)) + ~ dmnl + ~ Discount applied to utility from pure time preference (impatience). + | + +Rate of Inequal Aversion= + 2.5 + ~ dmnl + ~ Rate of Inequality Aversion in utility calculation. + | + +Rate of Time Pref= + 0 + ~ 1/year + ~ Pure Rate of Social Time Preference in utility calculation. + | + +Ref Utility = 1 + ~ utiles/person/year + ~ Reference Rate of Utility Generation. + | + +******************************************************** + .Impact +********************************************************~ + Impacts are drawn from Nordhaus' DICE model, with a modification for intangibles + in the spirit of Tol. See: Nordhaus, W. D. 1994. Managing the Global Commons. \ + Cambridge, MA: MIT Press. + Tol, R. S. J. 1994. The Damage Costs of Climate Change: a Note on \ + Tangibles and Intangibles, Applied to DICE. Energy Policy 22(5): 436-438. + | + +Consumption Equiv Loss= + Consumption*(Climate Damage Effect[Intangible] + ^((Share of Consumption-1)/Share of Consumption)-1) + ~ $/year + ~ Intangible climate damages, expressed as their consumption equivalent + (i.e. the additional consumption needed to produce equal welfare). + ~ :SUPPLEMENTARY + | + +Damage: + Tangible,Intangible + ~ dmnl + ~ Type of climate damage (tangible or intangible). + | + +Adaptation Rate[Damage]= + (Atmos UOcean Temp-Adapted Temperature[Damage])*Fractional Adaptation Rate[Damage] + ~ DegreesC/year + ~ Rate of adaptation to altered climatic conditions. + | + +Adapted Temperature[Damage]= INTEG ( + Adaptation Rate[Damage], + 0) + ~ DegreesC + ~ Temperature to which the economy or biosphere is adapted. + | + +Climate Damage Effect[Damage]= + 1/(1+Climate Damage Scale[Damage] + *((Atmos UOcean Temp-Adapted Temperature[Damage])/Reference Temperature) + ^Climate Damage Nonlinearity[Damage]) + ~ dmnl + ~ Multiplier for climate damage effect on output (tangible) or environmental \ + services (intangible). + | + +Fractional Adaptation Rate[Damage]= + 0 + ~ 1/year + ~ Fractional rate of adaptation to altered climatic conditions; + inverse of the time constant for adaptation. 0 implies that + damages depend on the absolute temperature deviation from + preindustrial levels. + | + +Output Loss= + Gross Output*(1-Climate Damage Effect[Tangible])/Climate Damage Effect[Tangible] + ~ $/year + ~ Tangible climate damages, expressed as their output equivalent + (i.e. the additional output that could be produced with no climate \ + effects). + ~ :SUPPLEMENTARY + | + +Climate Damage Nonlinearity[Damage]= + 2 + ~ dmnl + ~ Nonlinearity of Climate Damage Cost Fraction. + | + +Climate Damage Scale[Damage]= + 0.013 + ~ dmnl + ~ Climate damage scale, expressed as the fractional loss at the reference \ + temperature deviation. + | + +Reference Temperature = 3 + ~ DegreesC + ~ Reference temperature deviation (from adapted level) for calculation of \ + climate damages. + | + +******************************************************** + .Economy.AEEI +********************************************************~ + | + +Asymptotic AEEI= + 0.1 + ~ dmnl + ~ Ultimate possible energy efficiency improvement level. + | + +LR Energy Share= + Average AEEI*Ref Total Expenditure/((1-Value Share of Labor)*Reference Output) + ~ dmnl + ~ CES value share of aggregate energy good in capital-energy aggregate. + | + +Auton Energy Eff Improvement= + (Auton Energy Eff Index-Asymptotic AEEI)*Frac Auton Energy Eff Improvement Rate + ~ 1/year + ~ Rate of autonomous energy efficiency improvement of new capital. + | + +AEEI Retrofit Rate= + Capital*Retrofit Rate*Auton Energy Eff Index-Embodied AEEI*Retrofit Rate + ~ $/year + ~ Rate of change of embodied energy efficiency technology due to retrofits. + | + +AEEI Discard Rate= + Embodied AEEI/Capital Lifetime + ~ $/year + ~ Embodied energy efficiency technology of discarded capital. + | + +AEEI Install Rate= + Investment Rate*Auton Energy Eff Index + ~ $/year + ~ Rate of embodiment of autonomous energy efficiency technology from \ + investment in new capital. + | + +Embodied AEEI= INTEG ( + AEEI Install Rate+AEEI Retrofit Rate-AEEI Discard Rate, + Auton Energy Eff Index*Capital) + ~ $ + ~ Autonomous energy efficiency improvements embodied in capital. + | + +Auton Energy Eff Index = INTEG(-Auton Energy Eff Improvement,1) + ~ dmnl + ~ Index of autonomous energy efficiency technology for new capital. + | + +Average AEEI = Embodied AEEI/Capital + ~ dmnl + ~ Average autonomous energy efficiency index of capital. + | + +Capital Lifetime = 15 + ~ year + ~ Lifetime of goods producing capital. + | + +Frac Auton Energy Eff Improvement Rate= + 0.005 + ~ 1/year + ~ Fractional autonomous energy efficiency improvement rate. + | + +******************************************************** + .Economy.EnergyRequirement +********************************************************~ + | + +Energy Intensity Adjustment Time= + 4 + ~ years + ~ Time required (for R&D, retooling, etc.) to adjust energy intensity of new \ + capital + | + +Initial Energy Requirement[source] = 5.67e+010,6.28e+010,6.4e+009,2.36e+007 + ~ GJ/year + ~ Initial embodied energy requirements, by source. Oil, Gas: \ + 4.53e+010,1.75e+010 + | + +Normal Energy Expenditure[source]= + LR Expected Energy Price[source]*Energy Requirement[source] + ~ $/year + ~ Expected expenditures for energy, by source, with normal capacity \ + utilization. + | + +Aggr Energy Intensity Effect= + (LR Marginal Productivity of Aggr Energy/Normal Aggr Energy Price)^Aggr Intensity Adj Coeff + ~ dmnl + ~ Effect of aggregate energy intensity on desired energy intensity of new \ + capital. + | + +Desired Energy Intensity[source]= + Total Energy Intensity*Aggr Energy Intensity Effect*Desired Share[source] + ~ GJ/year/$ + ~ Desired intensity of energy use for new capital, by source. Reflects rebalancing of + aggregate energy intensity and fuel switching. + | + +Desired Share[source]= + Adj Energy Intensity[source]/Total Adj Energy Intensity + ~ dmnl + ~ Desired share of energy sources in total energy intensity of capital. + | + +Planned Energy Intensity[source]= + SMOOTH(Desired Energy Intensity[source],Energy Intensity Adjustment Time) + ~ GJ/year/$ + ~ Energy intensity of new capital; lags desired energy intensity due to lead time \ + needed for R&D, + retooling, etc. + | + +Total Normal Energy Expenditure= + SUM(Normal Energy Expenditure[source!]) + ~ $/year + ~ Total expected energy expenditures, with normal capacity utilization. + | + +Total Adj Energy Intensity= + SUM(Adj Energy Intensity[source!]) + ~ GJ/year/$ + ~ Sum of adjusted energy intensities for individual sources. + | + +Normal Aggr Energy Price= + Total Normal Energy Expenditure/Normal Aggr Energy Requirement + ~ $/GJequiv + ~ Expected price of aggregate energy good, with normal capacity utilization. + | + +Energy Req Install Rate[source]= + Planned Energy Intensity[source]*Investment Rate + ~ GJ/year/year + ~ Energy requirements of installed capital. Co-flow with investment. + | + +Energy Req Discard Rate[source]= + Energy Requirement[source]/Capital Lifetime + ~ GJ/year/year + ~ Energy requirements of discarded capital. Co-flow with capital discards. + | + +Energy Requirement[source]= INTEG ( + Energy Req Install Rate[source]+Energy Req Retrofit Rate[source]-Energy Req Discard Rate + [source], + Initial Energy Requirement[source]) + ~ GJ/year + ~ Energy requirements embodied in capital stock. + | + +Aggr Energy Input[source] = Ref Energy Value Share[source] +*(Energy Requirement[source]/Reference Production[source])^Energy Subst Coeff + ~ dmnl + ~ CES term for contribution of energy sources to aggregate energy good. + | + +Normal Aggr Energy Requirement = Ref Aggr Energy Production*Total Aggr Energy Input +^(1/Energy Subst Coeff) + ~ GJequiv/year + ~ Input of aggregate energy good, with normal capacity utilization. + | + +Marginal Aggr Energy per Energy[source] = Ref Aggr Energy Production/Reference Production +[source] +*Total Aggr Energy Input^(1/Energy Subst Coeff-1) +*(Energy Requirement[source]/Reference Production[source])^(Energy Subst Coeff-1) +*Ref Energy Value Share[source] + ~ GJequiv/GJ + ~ Marginal output of aggregate energy good per unit of physical energy input. + | + +Total Aggr Energy Input = SUM(Aggr Energy Input[source!]) + ~ dmnl + ~ Sum of CES terms for contribution of energy sources to aggregate energy \ + good. + | + +Energy Adj Coeff= + 0.33 + ~ dmnl + ~ Ratio of actual adjustment in energy intensity to optimal adjustment. If value is 1, + agents know the local slope of the long-run capital-energy and inter-energy \ + production functions, + and adjust desired energy intensities fully and immediately. If value is less than 1, + adjustment is only partial, for behavioral or structural reasons. + | + +Aggr Intensity Adj Coeff= INITIAL (Capital Energy Subst Elast*Energy Adj Coeff) + ~ dmnl + ~ Coefficient of adjustment of aggregate energy intensity. + | + +Energy Intensity Adj Coeff= INITIAL ( + Energy Subst Elast*Energy Adj Coeff) + ~ dmnl + ~ Coefficient of adjustment of fuel shares. + | + +Adj Energy Intensity[source] = Energy Intensity of Capital[source] +*(LR Marginal Prod of Energy[source]/LR Expected Energy Price[source])^Energy Intensity Adj Coeff + ~ GJ/year/$ + ~ Desired energy intensity of new capital for fuel switching. Adjusted from \ + current energy intensity of new capital according to perceived \ + price/productivity gradient. + | + +Total Energy Requirement = SUM(Energy Requirement[source!]) + ~ GJ/year + ~ Total energy requirements embodied in capital (in physical terms). + | + +Total Energy Intensity = Total Energy Requirement/Capital + ~ GJ/year/$ + ~ Total energy intensity of capital (in physical terms). + | + +Energy Intensity of Capital[source] = Energy Requirement[source]/Capital + ~ GJ/year/$ + ~ Energy intensity of capital, by source. + | + +LR Marginal Prod of Energy[source] = LR Marginal Productivity of Aggr Energy +*Marginal Aggr Energy per Energy[source] + ~ $/GJ + ~ Long-run marginal productivity of energy, by source. + | + +LR Marginal Productivity of Aggr Energy = LR Marginal Prod of Eff Capital*Marg Capital'Energy per Aggr Energy + ~ $/GJequiv + ~ Long-run marginal productivity of aggregate energy good in capital-energy \ + aggregate. + | + +Reference Capital'Energy Aggr = INITIAL(Reference Capital*Reference Productivity) + ~ Eff$ + ~ Reference output of aggregate capital-energy good. (long-run CES \ + capital-energy aggregate). + | + +Reference Capital = 1.22e+013 + ~ $ + ~ Reference capital stock, assuming 15 year lifetime. + Alternate value: 1.5e13 with capital lifetime of 20 years + | + +LR Capital Share= + 1-LR Energy Share + ~ dmnl + ~ CES value share of capital in capital-energy aggregate. + | + +Capital Energy Subst Coeff = INITIAL((Capital Energy Subst Elast-1)/Capital Energy Subst Elast +) + ~ dmnl + ~ CES coefficient of substitution in capital-energy aggregate. + | + +Capital Energy Subst Elast = 0.75 + ~ dmnl + ~ Elasticity of substitution between capital and aggregate energy good in \ + capital-energy aggregate. + | + +Reference Productivity = 1 + ~ Eff$/$ + ~ Reference productivity of capital (normal output of capital-energy \ + aggregate per unit of capital input). + | + +LR Marginal Prod of Eff Capital = Marg Prod Oper Capital*Reference Operating Capital/ +Reference Capital'Energy Aggr + ~ $/year/Eff$ + ~ Long run marginal productivity of capital-energy aggregate good; equals marginal \ + productivity of operating + capital multiplied by the ratio of operating to effective capital (i.e. \ + utilization). + Here the normal ratio of operating capital to the capital-energy aggregate \ + is used, rather + than the actual, since in the long run utilization can be expected to be \ + normal. + | + +Energy Subst Coeff = INITIAL((Energy Subst Elast-1)/Energy Subst Elast) + ~ dmnl + ~ Long-run CES coefficient of subsitution among energy sources. + | + +Energy Subst Elast= + 2 + ~ dmnl + ~ Long-run CES elasticity of substitution among energy sources. + | + +Reference Production[source] = 5.67e+010,6.28e+010,6.4e+009,2.36e+007 + ~ GJ/year + ~ Reference production of energy by source. Oil, gas: 4.53e+010,1.75e+010 + | + +******************************************************** + .Economy.Allocation +********************************************************~ + Allocation of goods among climate impacts, energy production, investment, and \ + consumption. + Taxes do not appear here, as revenues are assumed to be recycled. + | + +Total Invest Req= + Desired Investment+Energy Invest Req + ~ $/year + ~ Total investment required for goods and energy producing sectors. + | + +Consumption = max(0,Output Net of Energy-Total Invest Req) + ~ $/year + ~ Goods consumption. + | + +Output Net of Energy = max(0,Gross Output-Indicated Total Cost Energy Production +) + ~ $/year + ~ Goods production less climate damages and energy production/distribution expenses. \ + Available for + consumption and investment. + | + +Energy Invest Req = SUM(Indicated Energy Capital Completion Rate[source!]) + ~ $/year + ~ Total goods required for energy investment. + | + +Indicated Total Energy Dist Cost = SUM(Indicated Energy Distribution Cost[source!]) + ~ $/year + ~ Total goods required for energy distribution. + | + +Indicated Energy Distribution Cost[source] = Init Unit Distribution Cost[source]*Scheduled Production +[source +] + ~ $/year + ~ Goods required for energy distribution, by source. + | + +Fraction of Energy Goods Avail = MIN(1,Gross Output/Indicated Total Cost Energy Production +) + ~ dmnl + ~ Availability of goods for energy sector investment and production. + | + +Fraction of Invest Goods Avail = MIN(1,Output Net of Energy/Total Invest Req) + ~ dmnl + ~ Fraction of desired investment goods available. + | + +Indicated Total Energy Variable Cost = SUM(Desired Variable Input[source!]) + ~ $/year + ~ Total goods required for variable costs of energy production. + | + +Indicated Total Cost Energy Production = Indicated Total Energy Dist Cost+Indicated Total Energy Variable Cost + ~ $/year + ~ Total goods required for energy production and distribution. + | + +******************************************************** + .Carbon.Control +********************************************************~ + | + +Effective CO2 in Atmosphere= + IF THEN ELSE(Carbon Cycle Switch=0, + CO2 in Atmos,CO2 in Atmosphere) + ~ TonC + ~ Switches between simple (DICE) and complex carbon cycles. + | + +Carbon Cycle Switch= + 1 + ~ dmnl + ~ 0 = simple (Nordhaus' DICE), 1 = complex. + | + +******************************************************** + .Carbon.FREE +********************************************************~ + | + +Init CO2 in Biomass= + 6.566e+011 + ~ TonC + ~ Initial carbon in biomass. From simulations with historical emissions, \ + starting at equilibrium in 1775. + | + +Init CO2 in Deep Ocean[layers]= + 2.054e+012,2.051e+012,2.05e+012,2.049e+012,2.048e+012,5.734e+012,5.733e+012,5.733e+012 +,5.733e+012,5.733e+012 + ~ TonC + ~ Initial carbon in deep ocean layers. From simulations with historical \ + emissions, starting at equilibrium in 1775. + | + +Init CO2 in Humus= + 7.259e+011 + ~ TonC + ~ Inital carbon in humus. From simulations with historical emissions, \ + starting at equilibrium in 1775. + | + +Init CO2 in Mixed Ocean= + 7.712e+011 + ~ TonC + ~ Initial carbon in mixed ocean layer. From simulations with historical \ + emissions, starting at equilibrium in 1775. + | + +init co2 in atm= + 6.576e+011 + ~ TonC + ~ Initial carbon in atmosphere. From simulations with historical emissions, \ + starting at equilibrium in 1775. + | + +CO2 in Deep Ocean[upper]= INTEG ( + Diffusion Flux[upper]-Diffusion Flux[lower], + Init CO2 in Deep Ocean + [upper]) ~~| +CO2 in Deep Ocean[layer10] = INTEG(Diffusion Flux[layer10],Init CO2 in Deep Ocean +[layer10]) + ~ TonC + ~ Carbon in deep ocean. + | + +Atmospheric Retention= + ZIDZ(Total Carbon Emissions-Flux Atm to Ocean-Flux Atm to Biomass+Flux Biomass to Atmosphere ++Flux Humus to Atmosphere + ,Total Carbon Emissions + ) + ~ dmnl + ~ Atmospheric retention of emissions. + ~ :SUPPLEMENTARY + | + +Flux Humus to Atmosphere= + CO2 in Humus/Humus Res Time + ~ TonC/year + ~ Carbon flux from humus to atmosphere. + | + +Biomass Res Time= + 10.6 + ~ year + ~ Average residence time of carbon in biomass. + | + +Biostim Coeff= + 0.4 + ~ dmnl + ~ Coefficient for response of primary production to CO2 concentration. + | + +Buff CO2 Coeff = 4.05 + ~ dmnl + ~ Coefficient of CO2 concentration influence on buffer factor. + | + +Buffer Factor= + Ref Buffer Factor + Buff CO2 Coeff*LN(CO2 in Atmosphere/Ref Buff CO2) + ~ dmnl + ~ Buffer factor for atmosphere/mixed ocean carbon equilibration. + | + +CO2 in Atmosphere= INTEG ( + Total Carbon Emissions-Flux Atm to Ocean-Flux Atm to Biomass+Flux Biomass to Atmosphere + +Flux Humus to Atmosphere, + init co2 in atm) + ~ TonC + ~ Carbon in atmosphere + | + +CO2 in Biomass= INTEG ( + Flux Atm to Biomass-Flux Biomass to Atmosphere-Flux Biomass to Humus, + Init CO2 in Biomass) + ~ TonC + ~ Carbon in biosphere (biomass, litter, and humus) + | + +CO2 in Humus= INTEG ( + Flux Biomass to Humus-Flux Humus to Atmosphere, + Init CO2 in Humus) + ~ TonC + ~ Carbon in humus. + | + +CO2 in Mixed Layer= INTEG ( + Flux Atm to Ocean-Diffusion Flux[layer1], + Init CO2 in Mixed Ocean) + ~ TonC + ~ Carbon in mixed layer. + | + +Concentration[layers] = CO2 in Deep Ocean[layers]/Thickness[layers] + ~ TonC/meter + ~ Concentration of carbon in ocean layers. + | + +Mixing Time = 9.5 + ~ year + ~ Atmosphere - mixed ocean layer mixing time. + | + +Diffusion Flux[layer1] = (CO2 in Mixed Layer/Mixed Depth-Concentration[layer1 +])*Eddy Diff Coeff +*2/(Mixed Depth+Thickness[layer1]) ~~| +Diffusion Flux[lower] = (Concentration[upper]-Concentration[lower])*Eddy Diff Coeff +*2/(Thickness +[upper]+Thickness[lower]) + ~ TonC/year + ~ Diffusion flux between ocean layers. + | + +Eddy Diff Coeff = 4000 + ~ meter*meter/year + ~ Eddy diffusion coefficient. + | + +Humus Res Time= + 27.8 + ~ year + ~ Average carbon residence time in humus. + | + +Flux Biomass to Humus= + CO2 in Biomass/Biomass Res Time*Humification Fraction + ~ TonC/year + ~ Carbon flux from biomass to humus. + | + +Equil CO2 in Mixed Layer= + Preind CO2 in Mixed Layer * (CO2 in Atmosphere/Preindustrial CO2) + ^(1/Buffer Factor) + ~ TonC + ~ Equilibrium carbon content of mixed layer. + | + +Flux Atm to Biomass= + Init NPP*(1+Biostim Coeff*LN(CO2 in Atmosphere/Preindustrial CO2)) + ~ TonC/year + ~ Carbon flux from atmosphere to biosphere (from primary production) + | + +Flux Atm to Ocean = (Equil CO2 in Mixed Layer-CO2 in Mixed Layer)/Mixing Time + ~ TonC/year + ~ Carbon flux from atmosphere to mixed ocean layer. + | + +Flux Biomass to Atmosphere= + CO2 in Biomass/Biomass Res Time*(1-Humification Fraction) + ~ TonC/year + ~ Carbon flux from biomass to atmosphere. + | + +Mixed Depth = 75 + ~ meter + ~ Mixed ocean layer depth. + | + +Humification Fraction= + 0.428 + ~ dmnl + ~ Fraction of carbon outflow from biomass that enters humus stock. + | + +Ref Buffer Factor = 10 + ~ dmnl + ~ Normal buffer factor. + | + +Thickness[top5] = 200 ~~| +Thickness[bottom5] = 560 + ~ meter + ~ Deep ocean layer thicknesses. + | + +Preind CO2 in Mixed Layer= + 7.678e+011 + ~ TonC + ~ Initial carbon content of mixed ocean layer. + | + +Init NPP = 6e+010 + ~ TonC/year + ~ Initial net primary production. + | + +Ref Buff CO2 = 7.6e+011 + ~ TonC + ~ CO2 in atmosphere at normal buffer factor. + | + +bottom5 : (layer6-layer10) + ~ dmnl + ~ Bottom 5 (thick) ocean layers. + | + +layers : (layer1-layer10) + ~ dmnl + ~ Deep ocean layers. + | + +lower : (layer2-layer10) -> upper + ~ dmnl + ~ Lower 9 deep ocean layers. + | + +top5 : (layer1-layer5) + ~ dmnl + ~ Top 5 (thin) ocean layers. + | + +upper : (layer1-layer9) -> lower + ~ dmnl + ~ Upper 9 deep ocean layers. + | + +******************************************************** + .Carbon.Nordhaus +********************************************************~ + Drawn exactly from Nordhaus' DICE model. + See: Nordhaus, W. D. 1994. Managing the Global Commons. Cambridge, MA: MIT \ + Press. + | + +Average Atmos Retention = (CO2 Net Emiss-CO2 Storage)/Total Carbon Emissions + ~ dmnl + ~ Average atmospheric retention. + ~ :SUPPLEMENTARY + | + +Marginal Atmos Retention = 0.64 + ~ dmnl + ~ Marginal Atmospheric Retention Fraction. + Fraction of Greenhouse Gas Emissions which accumulate in the atmosphere. + | + +CO2 in Atmos = INTEG(CO2 Net Emiss - CO2 Storage, 6.77e+011) + ~ TonC + ~ CO2 in atmosphere. + | + +CO2 Net Emiss = Marginal Atmos Retention*Total Carbon Emissions + ~ TonC/year + ~ CO2 emissions less short-run uptake (to mixed ocean layer). + | + +CO2 Storage = (CO2 in Atmos-Preindustrial CO2)*Rate of CO2 Transfer + ~ TonC/year + ~ CO2 removal from the atmosphere and storage by long-term processes. + | + +Rate of CO2 Transfer = 0.008333 + ~ 1/year + ~ Fractional rate of CO2 storage (corresponds to 120 year residence time) + | + +******************************************************** + .Climate +********************************************************~ + Drawn from Nordhaus' DICE model. + See: Nordhaus, W. D. 1994. Managing the Global Commons. Cambridge, MA: MIT \ + Press. + | + +Climate Sensitivity= + 2.908 + ~ DegreesC + ~ Equilibrium temperature change in response to a 2xCO2 equivalent change in \ + radiative forcing + | + +Climate Feedback Param= INITIAL ( + CO2 Rad Force Coeff/Climate Sensitivity) + ~ watt/meter/meter/DegreesC + ~ Climate Feedback Parameter - determines feedback effect from temperature \ + increase. + | + +CO2 Rad Forcing = CO2 Rad Force Coeff + *LOG(Effective CO2 in Atmosphere/Preindustrial CO2,2) + ~ watt/meter/meter + ~ Radiative forcing from accumulation of CO2. + | + +A UO Heat Cap = 44.248 + ~ watt*year/DegreesC/(meter*meter) + ~ Atmosphere & Upper Ocean Heat Capacity per Unit Area + | + +Init Atmos UOcean Temp = 0.2 + ~ DegreesC + ~ Initial Temperature of the Atmosphere and Upper Ocean + | + +Atmos UOcean Temp = INTEG(Chg A UO Temp, Init Atmos UOcean Temp) + ~ DegreesC + ~ Temperature of the Atmosphere and Upper Ocean + | + +Chg A UO Temp = (Radiative Forcing-Feedback Cooling-Heat Transfer)/A UO Heat Cap + ~ DegreesC/year + ~ Rate of Change in the Atmosphere & Upper Ocean Temperature. + | + +Chg DO Temp = Heat Transfer/DO Heat Cap + ~ DegreesC/year + ~ Rate of Change in the Deep Ocean Temperature + | + +CO2 Rad Force Coeff = 4.1 + ~ watt/meter/meter + ~ Coefficient of Radiative Forcing from CO2 + | + +Deep Ocean Temp = INTEG(Chg DO Temp, 0.1) + ~ DegreesC + ~ Temperature of the Deep Ocean + | + +DO Heat Cap= INITIAL ( + Heat Capacity Ratio*Heat Trans Coeff) + ~ watt*year/DegreesC/meter/meter + ~ Deep Ocean Heat Capacity per Unit Area + | + +Feedback Cooling = Atmos UOcean Temp*Climate Feedback Param + ~ watt/meter/meter + ~ Feedback cooling of atmosphere/upper ocean system due to blackbody \ + radiation. + | + +Heat Capacity Ratio = 0.44 + ~ watt/(meter*meter*DegreesC) + ~ Ratio of Thermal Capacity of Deep Ocean to Heat Transfer Time Constant + | + +Heat Trans Coeff = 500 + ~ year + ~ Heat Transfer Coefficient [tau12] (years) + Coefficient of heat transfer between the atmosphere & upper ocean and the \ + deep ocean. May be interpreted as a mixing time constant. + | + +Heat Transfer = Temp Diff*DO Heat Cap/Heat Trans Coeff + ~ watt/meter/meter + ~ Heat Transfer from the Atmosphere & Upper Ocean to the Deep Ocean + | + +Preindustrial CO2 = 5.9e+011 + ~ TonC + ~ Preindustrial CO2 content of atmosphere. + | + +Radiative Forcing = CO2 Rad Forcing+DICE IPCC Other Rad Forcing + ~ watt/meter/meter + ~ Total Radiative Forcing from All GHGs + | + +Temp Diff = Atmos UOcean Temp-Deep Ocean Temp + ~ DegreesC + ~ Temperature Difference between Upper and Deep Ocean + | + +******************************************************** + .Economy.Interest +********************************************************~ + | + +Gross Output per Cap= + Gross Output/Population + ~ $/person/year + ~ Gross output of goods and services per capita. + | + +Perceived Output per Cap= + SMOOTH(Gross Output per Cap,Output Perc Time) + ~ $/person/year + ~ Perceived output per capita. + | + +Interest Rate Switch= + 0 + ~ dmnl + ~ 0 = Ramsey rule, 1 = constant interest rate. + Switch for determining basis for interest rate calculation. + | + +Ramsey Interest Rate = Output Trend*Consumer Inequal Aversion+Consumer Discount Rate + ~ 1/year + ~ Interest rate from Ramsey rule. + | + +Const Interest Rate= + 0.055 + ~ 1/year + ~ Constant exogenous interest rate. + | + +Output Perc Time = 5 + ~ year + ~ Time to perceive output per capita. + | + +Output Trend Establishment Time = 20 + ~ year + ~ Time to establish output trends. + | + +Consumer Discount Rate= + 0.03 + ~ 1/year + ~ Effective discount rate for interest-rate setting. + | + +Consumer Inequal Aversion= + 1 + ~ dmnl + ~ Effective elasticity of marginal utility (rate of inequality aversion) for \ + interest-rate setting. + | + +Output Trend = TREND(Perceived Output per Cap,Output Trend Establishment Time, +Hist Output Growth Rate) + ~ 1/year + ~ Trend in per capita output. + | + +Hist Output Growth Rate = 0.04 + ~ 1/year + ~ Historic growth rate of output and investment. + | + +Interest Rate = Interest Rate Switch*Const Interest Rate ++(1-Interest Rate Switch)*Ramsey Interest Rate + ~ 1/year + ~ Interest rate, switchable between constant and endogenous inputs. + | + +******************************************************** + .Population +********************************************************~ + | + +Labor Force= + Labor Force Fraction*Population + ~ FTE + ~ Labor force. Assumes invariable labor participation. + | + +Labor Force Fraction = 0.25 + ~ FTE/person + ~ Fraction of population participating in labor force. + | + +Forecast Pop Growth Rt Decline Rt= + 0.02 + ~ 1/year + ~ Forecast rate of decline of population growth rate. Calibrated (roughly) \ + to EMF-14 scenario. + | + +Hist Pop Growth Rt Decline Rt= + 0.01 + ~ 1/year + ~ Historic rate of decline of population growth rate. Calibrated to World \ + Bank data. + | + +Pop Growth Switch Time= + 1990 + ~ year + ~ Year of switch from historic to forecast population growth rate decline \ + rate. + | + +Pop Gr Rt Decline Rt= + IF THEN ELSE(Time > Pop Growth Switch Time,Forecast Pop Growth Rt Decline Rt + ,Hist Pop Growth Rt Decline Rt) + ~ 1/year + ~ Rate of Decline of Population Growth Rate + | + +Initial Pop Growth Rt = 0.0224 + ~ 1/year + ~ Initial population growth rate. + | + +Initial Population= + 3.041e+009 + ~ people + ~ Initial population. + | + +Decline Pop Gr Rt = Pop Growth Rate*Pop Gr Rt Decline Rt + ~ 1/year/year + ~ Decline of Population Growth Rate + | + +Population = INTEG(Net Pop Incr, Initial Population) + ~ person + ~ Population + | + +Pop Growth Rate = INTEG(- Decline Pop Gr Rt, Initial Pop Growth Rt) + ~ 1/year + ~ Population Growth Rate + | + +Net Pop Incr = Population*Pop Growth Rate + ~ person/year + ~ Net Population Increase + | + +******************************************************** + .Economy.Utilization +********************************************************~ + | + +Marg Capital'Energy per Aggr Energy=Reference Capital'Energy Aggr + *(LR Capital Share*(Capital/Reference Capital)^Capital Energy Subst Coeff + +LR Energy Share*(Normal Aggr Energy Requirement/Ref Aggr Energy Production) + ^Capital Energy Subst Coeff) + ^(1/Capital Energy Subst Coeff-1)*LR Energy Share + *(Normal Aggr Energy Requirement/Ref Aggr Energy Production) + ^(Capital Energy Subst Coeff-1) + /Ref Aggr Energy Production + ~ Eff$/GJequiv*year + ~ Marginal output of capital-energy aggregate per unit aggregate energy \ + input. + | + +Normal Capital'Energy Aggr=Reference Capital'Energy Aggr + *(LR Capital Share*(Capital/Reference Capital)^Capital Energy Subst Coeff + +LR Energy Share*(Normal Aggr Energy Requirement/Ref Aggr Energy Production)^ + Capital Energy Subst Coeff) + ^(1/Capital Energy Subst Coeff) + ~ Eff$ + ~ Output of capital-energy aggregate good at normal capacity utilization. + | + +Reference Operating Ratio = 1 + ~ Op$/Eff$ + ~ Reference ratio of operating capital to capital-energy aggregate. + | + +SR Energy Value Share[source] = Energy Requirement[source] + *Marginal Aggr Energy per Energy[source]/Normal Aggr Energy Requirement + ~ dmnl + ~ CES value share of aggregate energy good in capital-energy aggregate. + | + +Utilization = Operating Coeff^(1/SR Elast Coeff) + ~ dmnl + ~ Utilization of capital-energy aggregate. Can be interpreted as + capacity utilization in the goods producing sector (1 = normal). + | + +Operating Capital = Normal Capital'Energy Aggr*Utilization + *Reference Operating Capital/Reference Capital'Energy Aggr + ~ Op$ + ~ Operating capital. Equals the long-run CES capital-energy aggregate adjusted for + short-run utilization (from variation of energy input). + | + +SR Elasticity= + 0.1 + ~ dmnl + ~ Short run elasticity of substitution between capital and aggregate energy \ + input. + | + +******************************************************** + .Economy.Capital +********************************************************~ + | + +Desired Capital Growth = Capital*LR Expected Output Growth Rate + ~ $/year + ~ Capital orders to meet expected growth in output. Since goods production + (unlike energy production) is not order driven, there is no order trend to + follow; output growth is used instead. + | + +Capital Correction= + (Desired Capital-Capital)/Capital Corr Time + ~ $/year + ~ Rate of correction to capital. + | + +Desired Capital= + Capital*Effect of Return + ~ $ + ~ Desired capital, anchored to existing capital stock and adjusted for \ + return. + | + +Marg Capital'Energy per Capital=Reference Capital'Energy Aggr + *(LR Capital Share*(Capital/Reference Capital)^Capital Energy Subst Coeff + +LR Energy Share*(Normal Aggr Energy Requirement/Ref Aggr Energy Production) + ^Capital Energy Subst Coeff) + ^(1/Capital Energy Subst Coeff-1)*LR Capital Share + *(Capital/Reference Capital)^(Capital Energy Subst Coeff-1) + /Reference Capital + ~ Eff$/$ + ~ Marginal output of capital-energy bundle per unit capital input. + | + +Perc Relative Return to Capital = SMOOTHI(Marg Prod Capital/Cost of Capital, + Return Perc Time,1) + ~ dmnl + ~ Ratio of marginal productivity to cost of capital. + | + +Marg Prod Capital = LR Marginal Prod of Eff Capital*Marg Capital'Energy per Capital + *Utilization + ~ $/year/$ + ~ Marginal productivity of capital. In contrast to the energy sector \ + formulation, utilization is considered here, as the goods producing sector \ + is not order driven, and thus there is no separate production pressure \ + effect. + | + +Desired Capital Order Rate = Capital Correction+Discard Rate+Desired Capital Growth + ~ $/year + ~ Desired capital order rate. Orders replace discards, provide for growth, + and adjust capital stock to desired level. + | + +LR Output Trend Time = 5 + ~ year + ~ Time to establish long-term trend in output, for capital planning. + | + +LR Expected Output Growth Rate = TREND(Gross Output, + LR Output Trend Time,Hist Output Growth Rate) + ~ 1/year + ~ Perceived long run trend in energy orders. + | + +Cost of Capital = Interest Rate+1/Capital Lifetime + ~ 1/year + ~ Cost of capital for investment decision. + | + +Investment Rate = Desired Investment*Fraction of Invest Goods Avail + ~ $/year + ~ Investment rate. Constrained by availability of investment goods in \ + extreme conditions. + | + +Desired Investment= + IF THEN ELSE(Investment Switch=1, max(0,Desired Capital Order Rate), + IF THEN ELSE(Investment Switch=2, Discard Rate, World Investment)) + ~ $/year + ~ Desired investment rate in goods producing capital; switchable between endogenous, + equilibrium, and exogenous drivers. + | + +Investment Switch = 1 + ~ dmnl + ~ 0 = exogenous + 1 = endogenous + 2 = equilibrium + Switches investment rate between between endogenous, + equilibrium, and exogenous drivers. In equilibrium case, + capital orders just replace discards. + | + +Return Coeff = 1 + ~ dmnl + ~ Coefficient of effect of relative return on desired capital. + | + +Effect of Return = Perc Relative Return to Capital^Return Coeff + ~ dmnl + ~ Effect of perceived relative return on desired capital. + | + +Capital = INTEG ( Investment Rate-Discard Rate, + Reference Capital) + ~ $ + ~ Capital stock for goods production. + | + +Discard Rate = Capital/Capital Lifetime + ~ $/year + ~ Goods producing capital discard rate. + | + +******************************************************** + .Economy.EnergyPricePerception +********************************************************~ + | + +SR Expected Energy Price[source]= + SMOOTH(Operative Energy Price[source],SR Energy Price Perc Time) + ~ $/GJ + ~ Perceived energy price for short-run (utilization) decisions. + | + +Operative Energy Price[source]= + Final Energy Price[source]*Energy Price Discount + ~ $/GJ + ~ Operative energy price for price perception. If availability switch is active, + the operative energy price is the greater of the energy sector price or the short-run + marginal product of energy in the economy. A systematic discount may be applied to \ + the + perceived price to represent systematic biases in energy price perception. + | + +SR Energy Price Perc Time= + 1 + ~ year + ~ Time to perceive energy price for short-run (utilization) decisions. + | + +Energy Price Trend[source] = + LN(Perceived Energy Price[source]/Historic Energy Price[source])/Energy Trend Time + ~ 1/year + ~ Rate of change in energy prices. + | + +Chg Hist Energy Price[source] = + (Perceived Energy Price[source]-Historic Energy Price[source])/Energy Trend Time + ~ $/GJ/year + ~ Rate of change of historic energy prices. + | + +Historic Energy Price[source] = INTEG ( + Chg Hist Energy Price[source], + Operative Energy Price[source]/exp(Initial Price Trend[source]*Energy Trend Time)) + ~ $/GJ + ~ Historic energy prices, for calculation of price trends. + | + +Perceived Energy Price[source] = + SMOOTH(Operative Energy Price[source],Energy Price Perc Time) + ~ $/GJ + ~ Perceived energy price for long-run (energy intensity of capital) \ + decisions. + | + +LR Expected Energy Price[source] = Perceived Energy Price[source] + *exp(Energy Forecast Time*Energy Price Trend[source]) + ~ $/GJ + ~ Long-run expected energy price, with perception delay and trend \ + extrapolation. + | + +Initial Price Trend[source] = 0 + ~ 1/year + ~ Initial perceived trend in energy prices. + | + +Energy Trend Time= + 10 + ~ year + ~ Time to establish energy price trends. + | + +Energy Price Perc Time= + 5 + ~ year + ~ Time to smooth energy prices for long-run decisions. + | + +Energy Forecast Time= + 10 + ~ year + ~ Time horizon for energy price extrapolation. + | + +Energy Price Discount = 1 + ~ dmnl + ~ Discount or bias in energy price perception; 1 = normal (unbiased). + | + +******************************************************** + .Economy.FactorProductivity +********************************************************~ + | + +Fractional Factor Prod Growth Rate= INTEG ( + -Factor Prod Gr Rt Decline Rt, + Init Frac Factor Prod Gr Rt) + ~ 1/year + ~ Relative rate of change of technology. + | + +Factor Prod Gr Rt Decline Rt= + (Fractional Factor Prod Growth Rate-Asymptotic Frac Factor Prod Gr Rt)*Frac Factor Prod Gr Rt Decline Rt + ~ 1/year/year + ~ Rate at which the technology growth rate decays to its asymptotic value. + | + +Asymptotic Frac Factor Prod Gr Rt= + 0.0075 + ~ 1/year + ~ Asymptotic rate of technological change. + | + +Init Frac Factor Prod Gr Rt= + 0.015 + ~ 1/year + ~ Initial fractional rate of technology growth. + | + +Frac Factor Prod Gr Rt Decline Rt= + 0.01 + ~ 1/year + ~ Fractional rate of decline of the factor productivity growth rate. + | + +Factor Prod Chg Rt= + Factor Productivity*Fractional Factor Prod Growth Rate + ~ 1/year + ~ Rate of change of autonomous technology. + | + +Initial Factor Productivity = 1 + ~ dmnl + ~ Initial technology level. + | + +Factor Productivity= INTEG ( + Factor Prod Chg Rt, + Initial Factor Productivity) + ~ dmnl + ~ Autonomous technology level. + | + +******************************************************** + .Economy.Output +********************************************************~ + | + +Gross Output= + Reference Output*Factor Productivity*Climate Damage Effect[Tangible] + *(Labor Force/Reference Labor)^Value Share of Labor + *(Operating Capital/Reference Operating Capital)^(1-Value Share of Labor) + ~ $/year + ~ Production of goods. Goods output price is fixed at $1. + | + +Value Share of Labor = 0.7 + ~ dmnl + ~ Cobb-Douglas value share of labor in output. + | + +Marginal Prod of Labor = Value Share of Labor*Gross Output/Labor Force + ~ $/year/FTE + ~ Marginal productivity of labor. + ~ :SUPPLEMENTARY + | + +Reference Labor = INITIAL(Labor Force) + ~ FTE + ~ Reference labor force. + | + +Marg Prod Oper Capital = (1-Value Share of Labor)*Gross Output/Operating Capital + ~ $/year/Op$ + ~ Marginal productivity of operating capital; i.e. marginal output \ + [production] per unit of operating capital (the short-run fixed \ + capital-energy aggregate). + | + +Reference Operating Capital = INITIAL(Reference Operating Ratio*Reference Capital'Energy Aggr +) + ~ Op$ + ~ Reference operating capital (short run fixed capital-energy aggregate). + | + +Reference Output = 6.124e+012 + ~ $/year + ~ Reference goods output. + | + +******************************************************** + .Energy.Utilization +********************************************************~ + | + +Max Effective Capital Intensity[source]= + (Max Input Ratio*Relative Variable Intensity[source])^(1-Capital Share[source]) + ~ dmnl + ~ Ratio of current vs. initial ratio of output to capital. Output intensity varies + as interest rate variations affect desired balance of capital and variable \ + inputs. + | + +Max Effective Energy Capital Ratio[source]= + Energy Capital[source]/Reference Energy Capital[source] + *Energy Technology[source]*Max Effective Capital Intensity[source] + ~ dmnl + ~ Ratio current vs. initial production effort, with adjustments for capital scale, + technology, and varying input intensity. + | + +Desired Eff Energy Capital Ratio[source]= + (((Scheduled Production[source]/Initial Production[source])^Saturation Coeff[source] + -Resource Share[source]*Resource Ratio[source]^Saturation Coeff[source]) + /(1-Resource Share[source]))^(1/Saturation Coeff[source]) + ~ dmnl + ~ Desired ratio of intensive inputs to normal level. + | + +Desired Variable Input[source]= + Reference Variable Cost[source] + *((Desired Eff Energy Capital Ratio[source]/Energy Technology[source]) + /(Energy Capital[source]/Reference Energy Capital[source])^Capital Share[source]) + ^(1/(1-Capital Share[source])) + ~ $/year + ~ Desired input of goods to energy production. + | + +Total Energy Production = SUM(Energy Production[source!]) + ~ GJ/year + ~ Total energy production (in physical terms). + | + +Max Production[source]= + Initial Production[source] + *(Resource Share[source]*Resource Ratio[source]^Saturation Coeff[source] + +(1-Resource Share[source])*Max Effective Energy Capital Ratio[source] + ^Saturation Coeff[source])^(1/Saturation Coeff[source]) + ~ GJ/year + ~ Upper limit to production in the short run (when capital is fixed). + | + +Energy Capacity Utilization[source]= + Scheduled Production[source]/Normal Production[source]*Fraction of Energy Goods Avail + ~ dmnl + ~ Effect of variable input on production level (can be thought of as \ + capacity utilization, where 1 = normal). + | + +Energy Production[source]= + Normal Production[source]*Energy Capacity Utilization[source] + ~ GJ/year + ~ Actual energy production, based on normal production adjusted for \ + production effort (utilization). + | + +Energy Order Rate[source]= + Exog Order Switch*Production Data[source] + +(1-Exog Order Switch)*Indicated Energy Order Rate[source] + ~ GJ/year + ~ Incoming orders for energy sources; switchable between endogenous and \ + exogenous drivers. + | + +Initial Production[source] = 5.67e+010,6.28e+010,6.4e+009,2.36e+007 + ~ GJ/year + ~ Oil, Gas: 4.53e+010,1.75e+010 + | + +Relative Variable Intensity[source]= + (Energy Capital Cost[source]*Reference Energy Capital[source] + *(1-Capital Share[source])) + /(1*Reference Variable Cost[source]*Capital Share[source]) + ~ dmnl + ~ Ratio of current to initial intensity of variable inputs to energy production. + The intensity of variable (vs. capital) inputs to production falls as \ + interest rates fall. + | + +Normal Variable Cost[source]= + Reference Variable Cost[source]*Energy Capital[source] + /Reference Energy Capital[source] + *Relative Variable Intensity[source] + ~ $/year + ~ Normal rate of variable cost inputs to energy production. Anchored to reference \ + variable + cost and adjusted for changes in capital scale and capital-variable factor \ + balance. + | + +Reference Variable Cost[source] = INITIAL(Reference Pretax Expenditure[source] + *Variable Share[source]) + ~ $/year + ~ Reference variable cost (goods) input rate by source. + | + +Variable Share[source] = INITIAL(1-Capital Share[source]) + ~ dmnl + ~ CES value share of variable costs in short-run output. + | + +Energy Delivery Delay = 0.25 + ~ year + ~ Delay between production and delivery of energy to goods producing sector. + | + +Energy Delivery[source] = SMOOTHI(Energy Production[source],Energy Delivery Delay +,Initial Production[source]) + ~ GJ/year + ~ Energy delivery rate; equals delayed production. ! + | + +Max Input Ratio= + 10 + ~ dmnl + ~ Maximum allowable ratio of variable inputs to normal variable input level. \ + Normally, in CES aggregate between capital and variable inputs, the short \ + run (fixed capital) upper limit to production is attained only with \ + infinite variable input. This formulation assumes that there is actually a \ + practical or behavioral upper limit to variable input. Thus the realizable \ + upper limit to production is less than the CES upper limit with infinite \ + inputs. + | + +Scheduled Production[source] = MIN(Max Production[source],Energy Order Rate[source]) + ~ GJ/year + ~ Scheduled energy production rate; equals incoming orders adjusted for an \ + upper limit to production. + | + +Capital Share[source] = 0.6,0.6,0.8,0.8 + ~ dmnl + ~ CES value share of capital in output. + | + +******************************************************** + .Energy.DepletionSaturation +********************************************************~ + | + +Resource Ratio[Renewable]= + 1 ~~| +Resource Ratio[nonrenewable]= + Resource Remaining[nonrenewable]/Init Resource Remaining[nonrenewable] + ~ dmnl + ~ Ratio of current to initial resource endowment. For renewables, this is by \ + definition 1, as the resource size is unchanging. For nonrenewables, this \ + equals the resource remaining expressed as a fraction of initial resource \ + remaining. + | + +Normal Production[source]= + Initial Production[source]*Resource Effect[source] + *Normal Effective Energy Capital Ratio[source] + ~ GJ/year + ~ Energy production at normal utilization, incorporating effects of scale of \ + effort, depletion (for nonrenewables), and saturation (for renewables). + | + +Min Depletion Time= + 20 + ~ year + ~ Minimum time to deplete remaining nonrenewable resource + | + +Fraction Consumed[nonrenewable]= + Cumulative Production[nonrenewable]/Initial Resource[nonrenewable] + ~ dmnl + ~ Fraction of ultimate resource consumed. + ~ :SUPPLEMENTARY + | + +Normal Effective Capital Intensity[source]= + Relative Variable Intensity[source]^(1-Capital Share[source]) + ~ dmnl + ~ Ratio of current vs. initial ratio of output to capital. Output intensity varies + as interest rate variations affect desired balance of capital and variable \ + inputs. + | + +Init Resource Remaining[nonrenewable]= INITIAL ( + Initial Resource[nonrenewable]-Init Cum Prod[nonrenewable]) + ~ GJ + ~ Initial resource remaining. + | + +Resource Effect[source]= + (Resource Share[source]*Resource Ratio[source]^Saturation Coeff[source] + +(1-Resource Share[source])*Normal Effective Energy Capital Ratio[source] + ^Saturation Coeff[source])^(1/Saturation Coeff[source]) + /Normal Effective Energy Capital Ratio[source] + ~ dmnl + ~ Effect of depletion and saturation on average productivity of capital. + | + +Saturation Coeff[source]= INITIAL ( + (Saturation Elasticity[source]-1)/Saturation Elasticity[source]) + ~ dmnl + ~ CES coefficient of substitution between fixed resource endowment and other \ + inputs. + | + +Marginal Resource Effect[source]= + (Resource Share[source]*Resource Ratio[source]^Saturation Coeff[source] + +(1-Resource Share[source])*Normal Effective Energy Capital Ratio[source] + ^Saturation Coeff[source])^(1/Saturation Coeff[source]-1) + *Normal Effective Energy Capital Ratio[source]^(Saturation Coeff[source]-1) + /Resource Effect[source] {*(1-Resource Share[source])} + ~ dmnl + ~ Marginal effect of depletion and saturation on productivity, expressed as \ + ratio of marginal to average product, at normal utilization. The last term \ + (in brackets) is omitted because the fixed factor (i.e. the resource \ + endowment) is unremunerated. + | + +Normal Effective Energy Capital Ratio[source]= + Energy Capital[source]/Reference Energy Capital[source] + *Energy Technology[source]*Normal Effective Capital Intensity[source] + ~ dmnl + ~ Ratio current vs. initial production effort, with adjustments for capital scale, + technology, and varying input intensity. + | + +Resource Remaining[nonrenewable]= INTEG ( + -Energy Production[nonrenewable], + Init Resource Remaining[nonrenewable]) + ~ GJ + ~ Resources remaining. + | + +Resource Share[Renewable]= INITIAL ( + (Reference Resource[Renewable]/Initial Production[Renewable]) + ^Saturation Coeff[Renewable]) ~~| +Resource Share[nonrenewable]= INITIAL ( + (Init Resource Remaining[nonrenewable]/Min Depletion Time + /Initial Production[nonrenewable]) + ^Saturation Coeff[nonrenewable]) + ~ dmnl + ~ Share of fixed factors (resource endowment) in renewable energy \ + production; set such that upper limit to renewable output is at a \ + specified level. + | + +Saturation Elasticity[nonrenewable]= + 0.7 ~~| +Saturation Elasticity[Renewable]= + 0.5 + ~ dmnl + ~ Elasticity of substitution between fixed factors and capital for renewable \ + sources, for saturation effect. + | + +Cumulative Production[nonrenewable] = INTEG(Energy Production[nonrenewable] +,Init Cum Prod[nonrenewable]) + ~ GJ + ~ Cumulative production of energy. + | + +Init Cum Prod[nonrenewable] = INITIAL(Initial Production[nonrenewable] + /Hist Energy Growth Rate[nonrenewable]) + ~ GJ + ~ Initial cumulative production; "backstrapolated" using current production \ + and historical growth rate. + | + +Initial Resource[Coal]= + 3e+014 ~~| +Initial Resource[OilGas]= + 3.05e+013 + ~ GJ + ~ EMF-14 values (95th percentile). Alternate values: 4.34e+014, 2.51e+013 + | + +Fraction Exploited[Renewable] = Normal Production[Renewable]/Reference Resource[Renewable +] + ~ dmnl + ~ Fraction of renewable resource potential exploited. + ~ :SUPPLEMENTARY + | + +Reference Resource[HN]= + 1.28e+011 ~~| +Reference Resource[New] = 1.9e+012 + ~ GJ/year + ~ Upper limit to renewable output. Upper limit for HN based primarily on \ + hydro endowment, with nuclear potential implicitly assumed to be \ + politically limited. + | + +******************************************************** + .Carbon.Emissions +********************************************************~ + | + +Emissions Pulse Time= + 2000 + ~ year + ~ Year of emissions test pulse. + | + +Emissions Pulse Volume= + 0 + ~ TonC + ~ Volume of test carbon pulse to atmosphere. + | + +Emissions Pulse= + IF THEN ELSE(Time >= Emissions Pulse Time :AND: Time < Emissions Pulse Time+TIME STEP +,Emissions Pulse Volume/TIME STEP,0) + ~ TonC/year + ~ Rate of emissions from test pulse of given volume. + | + +Total Carbon Emissions= + Total Energy Carbon Emissions+Nonenergy Carbon Emissions+Emissions Pulse + ~ TonC/year + ~ Emissions of carbon from energy use and other sources. + | + +Emissions Intensity of Output= + Total Energy Carbon Emissions/Gross Output + ~ TonC/$ + ~ Average emissions intensity of gross output of goods and services \ + (neglecting nonenergy emissions). + ~ :SUPPLEMENTARY + | + +Emissions Intensity of Aggr Energy= + Total Energy Carbon Emissions/SR Aggr Energy + ~ TonC/GJequiv + ~ Average emissions intensity of aggregate energy product (neglecting \ + nonenergy emissions). + ~ :SUPPLEMENTARY + | + +Emissions Intensity of Capital= + Total Energy Carbon Emissions/Capital + ~ TonC/year/$ + ~ Average emissions intensity of capital stock (neglecting nonenergy \ + emissions). + ~ :SUPPLEMENTARY + | + +Emissions Intensity of Energy= + Total Energy Carbon Emissions/Total Energy Production + ~ TonC/GJ + ~ Average emissions intensity of energy in physical terms (neglecting \ + nonenergy emissions). + ~ :SUPPLEMENTARY + | + +Energy Carbon Emissions[nonrenewable]= + Energy Production[nonrenewable]*Carbon Content[nonrenewable] + ~ TonC/year + ~ Carbon emissions rate from energy production. + | + +Nonenergy Carbon Emissions + ~ TonC/year + ~ Nonenergy carbon emissions. + | + +Total Energy Carbon Emissions= + SUM(Energy Carbon Emissions[nonrenewable!]) + ~ TonC/year + ~ Total carbon emissions from all energy sources + | + +******************************************************** + .Policy.Tax +********************************************************~ + | + +Minimum Carbon Tax= + 0 + ~ $/TonC + ~ Minimum carbon tax; constrains tax to prevent negative taxes (i.e. \ + subsidies) from creating negative energy prices. Negative minimum taxes \ + should be tested occasionally for full exploration of the policy space. + | + +Indicated Carbon Tax= + max(Minimum Carbon Tax,(Effective CO2 in Atmosphere-Preindustrial CO2)/Preindustrial CO2 +*Concentration Coeff + +(Perceived Emissions Rate-Reference Emissions Rate)/Reference Emissions Rate + *Emissions Coeff+Constant Tax) + ~ $/TonC + ~ Indicated carbon tax level. + | + +Energy Tax= INTEG ( + Energy Tax Adj Rate, + 0) + ~ $/GJ + ~ Tax on all energy sources. + | + +Carbon Tax= INTEG ( + Carbon Tax Adj Rate, + 0) + ~ $/TonC + ~ Effective carbon tax on carbon-based energy sources. + | + +Carbon Tax Adj Rate= + STEP((Indicated Carbon Tax-Carbon Tax)/Tax Adj Time,Initial Tax Time) + ~ $/TonC/year + ~ Rate of change of implemented carbon tax. + | + +Total Tax[nonrenewable]= + Energy Tax+Specific Carbon Tax[nonrenewable] ~~| +Total Tax[Renewable]= + Energy Tax + ~ $/GJ + ~ Indicated tax on energy sources. + | + +Constant Energy Tax= + 0 + ~ $/GJ + ~ Constant component of carbon tax. + | + +Energy Tax Adj Rate= + STEP((Constant Energy Tax-Energy Tax)/Tax Adj Time,Initial Tax Time) + ~ $/GJ/year + ~ Rate of adjustment of tax on all energy sources. + | + +Specific Carbon Tax[nonrenewable]= + Carbon Tax*Carbon Content[nonrenewable] + ~ $/GJ + ~ Carbon tax by energy source. + | + +Carbon Content[nonrenewable]= 0.0247,0.0171 + ~ TonC/GJ + ~ Carbon content of fuels. Oil, Gas: 0.0207,0.0134, weighted by resource \ + endowment. + | + +Constant Tax= 0 + ~ $/TonC + ~ Constant term in carbon tax. + | + +Emissions Perception Time= 1 + ~ year + ~ Time to perceive carbon emissions rate. + | + +Reference Emissions Rate= 5e+009 + ~ TonC/year + ~ Reference carbon emissions rate. + | + +Emissions Coeff= 0 + ~ $/TonC + ~ Coefficient for emissions rate contribution to carbon tax. + | + +Perceived Emissions Rate= + SMOOTH(Total Energy Carbon Emissions,Emissions Perception Time) + ~ TonC/year + ~ Perceived rate of carbon emissions from energy production. + | + +Concentration Coeff = 0 + ~ $/TonC + ~ Coefficient for atmospheric concentration contribution to carbon tax. + | + +Initial Tax Time = 1995 + ~ year + ~ Year in which tax implementation begins. + | + +Tax Adj Time = 5 + ~ year + ~ Time to adjust taxes to indicated levels. + | + +******************************************************** + .Energy.Sources +********************************************************~ + | + +nonrenewable : Coal,OilGas + ~ dmnl + ~ Nonrenewable energy sources. + | + +Renewable : HN,New + ~ dmnl + ~ Renewable energy sources. + | + +source : Coal,OilGas,HN,New + ~ dmnl + ~ Energy sources. Coal represents coal and similar solid fuels. OilGas + represents oil, gas, and natural gas liquids. HN = hydro/nuclear aggregate; + New = new renewables (solar, wind, biomass, etc.). + | + +******************************************************** + .Energy.Pricing +********************************************************~ + | + +Adjusted Average Cost[source]= + SR Average Cost[source]/Marginal Resource Effect[source] + ~ $/GJ + ~ Average cost of energy production, adjusted for long run (resource) \ + effects on marginal cost, but not short run (utilization) effects. + | + +Indicated Producer Price[source]= + Energy Producer Price[source]*Supply Demand Effect[source] + *(SR Marginal Cost[source]/Energy Producer Price[source])^Weight to Marg Cost + *(Adjusted Average Cost[source]/Energy Producer Price[source])^Weight to Average Cost + ~ $/GJ + ~ Indicated price of energy sources, prior to taxes and distribution costs. \ + Switchable between marginal and average cost prices. + | + +Primary Energy Price[nonrenewable]= + Energy Producer Price[nonrenewable]+Depletion Rent[nonrenewable] ~~| +Primary Energy Price[Renewable]= + Energy Producer Price[Renewable] + ~ $/GJ + ~ Price of primary energy, including depletion rent. + | + +Effective Primary Energy Price[source]= + Exog Energy Price Switch[source]*Price Data[source] + (1-Exog Energy Price Switch[source +])*Primary Energy Price[ +source] + ~ $/GJ + ~ Primary energy price, switchable between endogenous and exogenous drivers. + | + +SR Average Cost[source]= + SR Average Variable Cost[source]+Capital Cost[source] + ~ $/GJ + ~ Indicated price of energy on the basis of average variable cost and \ + capital cost, scaled to reflect demand pressure. + | + +SR Marginal Cost[source]= + Marginal Variable Input[source]*Marginal Eff Energy Capital Ratio[source] + ~ $/GJ + ~ Short run marginal cost of energy production. + | + +Weight to Average Cost= + 1 + ~ dmnl + ~ Weight to average cost in price calculation. + | + +Marginal Variable Input[source]= + Reference Variable Cost[source] + *((Desired Eff Energy Capital Ratio[source]/Energy Technology[source]) + /(Energy Capital[source]/Reference Energy Capital[source])^Capital Share[source]) + ^(1/(1-Capital Share[source])-1)/Energy Technology[source] + /(Energy Capital[source]/Reference Energy Capital[source])^Capital Share[source] + *(1/(1-Capital Share[source])) + ~ $/year + ~ Marginal variable cost per unit increase in capital-variable aggregate. + | + +Marginal Eff Energy Capital Ratio[source]= + (((Scheduled Production[source]/Initial Production[source]) + ^Saturation Coeff[source]-Resource Share[source]*Resource Ratio[source] + ^Saturation Coeff[source])/(1-Resource Share[source])) + ^(1/Saturation Coeff[source]-1) + *(Scheduled Production[source]/Initial Production[source]) + ^(Saturation Coeff[source]-1) + /Initial Production[source]/(1-Resource Share[source]) + ~ year/GJ + ~ Marginal increase in capital-variable aggregate per unit increase in \ + production. + | + +Final Data Time= 1990 + ~ year + ~ Year in which transition from price data to endogenous prices begins. + | + +Exog Energy Price Switch[source]= + Price Switch[source] + *(1-RAMP(1/Transition Time,Final Data Time,Final Data Time+Transition Time)) + ~ dmnl + ~ Switch between exogenous and endogenous energy prices and capacity planning. + Units error in RAMP is a Vensim bug. + | + +Transition Time= 5 + ~ years + ~ Time for transition between exogenous and endogenous energy prices. + | + +Init Unit Distribution Cost[source] = 0 + ~ $/GJ + ~ Initial unit energy distribution cost. + | + +Energy Producer Price[source] = INTEG(Producer Price Chg Rt[source], + Initial Producer Price[source]) + ~ $/GJ + ~ Endogenous primary energy price; adjusts to indicated price with a delay. + | + +Final Energy Price[source] = Effective Primary Energy Price[source]+Total Tax[source] + +Init Unit Distribution Cost[source] + ~ $/GJ + ~ Price of energy sources, including taxes and distribution costs. + | + +Producer Price Chg Rt[source] = (Indicated Producer Price[source]-Energy Producer Price +[source]) + /Price Adjustment Time + ~ $/GJ/year + ~ Rate of adjustment of energy price. + | + +Initial Producer Price[source]= + 1.278,1.297,6.648,60 + ~ $/GJ + ~ Initial prices of energy. From price data series. Oil, gas: 1.145, 1.69, \ + weighted by initial production. + | + +Price Switch[nonrenewable]= + 1 ~~| +Price Switch[Renewable]= + 0 + ~ dmnl + ~ 0 = endogenous, 1 = exogenous + Switches between endogenous and exogenous price drivers. + | + +Source Expenditure[source] = Final Energy Price[source]*Energy Production[source] + ~ $/year + ~ Energy expenditures, by source. + | + +Supply Demand Coeff = 2 + ~ dmnl + ~ Coefficient of production pressure effect on average cost price. + | + +Supply Demand Effect[source] = Production Pressure[source]^Supply Demand Coeff + ~ dmnl + ~ Effect of production pressure (demand/supply ratio) on average cost price. + | + +Capital Cost Basis Switch = 0 + ~ dmnl + ~ Basis for calculating unit capital costs. + 0 = normal production (nonrecovery of capital costs with low demand) + 1 = actual production (allows utility death spiral) + | + +Capital Cost[source]= + (Energy Capital Cost[source]*Energy Capital[source]) + /(Capital Cost Basis Switch*Energy Production[source] + +(1-Capital Cost Basis Switch)*Normal Production[source]) + ~ $/GJ + ~ Unit capital cost, on the basis of production (leads to utility death \ + spiral) or normal production (leads to nonrecovery of capital costs with \ + low demand). + | + +Price Adjustment Time = 1 + ~ year + ~ Time to adjust energy prices. Reflects delays in behavior as well as \ + contract turnover and regulatory adjustment times. + | + +Weight to Marg Cost = 0 + ~ dmnl + ~ Weight to short run marginal cost in price setting. + | + +SR Average Variable Cost[source] = Desired Variable Input[source] + /Energy Production[source] + ~ $/GJ + ~ Short run average variable cost of energy production. + | + +Production Pressure[source] = Energy Order Rate[source]/Normal Production[source] + ~ dmnl + ~ Production pressure, expressed as ratio of orders to normal production. + | + +******************************************************** + .Energy.Technology +********************************************************~ + | + +Energy Technology[source]= + (1-Tech Data Switch)*Indicated Energy Technology[source] + +Tech Data Switch*Technology Data[source] + ~ dmnl + ~ Energy technology level, switchable between exogenous (data from another run) + and endogenous drivers. + | + +Indicated Energy Technology[source]= + 1/(Low Lim Energy Tech[source]+(1-Low Lim Energy Tech[source]) + /Induced Energy Technology[source]^Endogenous Tech Fraction + /Autonomous Technology[source]^(1-Endogenous Tech Fraction) + /Energy Scale Economy[source]) + ~ dmnl + ~ Indicated energy technology level, including effect of lower bound + to cost reduction from technological improvement. + | + +Cumulative Energy Investment[source]= INTEG ( + Energy Capital Completion Rate[source], + Init Cum Energy Investment[source]) + ~ $ + ~ Cumulative investment in energy capital; drives learning process. + | + +Induced Energy Technology[source]= + (Cumulative Energy Investment[source] + /Init Cum Energy Investment[source])^Energy Learning Coeff + ~ dmnl + ~ Effect of learning on energy technology. + | + +Tech Data Switch= + 0 + ~ dmnl + ~ Weight to technology from exogenous data series in calculation of total \ + technology level; 0 = model generated, 1 = data. + | + +Technology Data[source] + ~ dmnl + ~ Technology data series (normally from another run) + | + +Auton Energy Tech Growth Rate[source]= + 0.01,0.01,0.01,0.05 + ~ 1/year + ~ Fractional rate of autonomous energy technology improvement. + | + +Low Lim Energy Tech[source]= + 0.1,0.1,0.1,0.01 + ~ dmnl + ~ Lower limit to energy production cost reduction from energy technology. + A nonzero value implies that there are some irreducible costs of energy \ + production. + | + +Energy Learning Coeff= INITIAL ( + -LOG(Energy Learning Rate,2)) + ~ dmnl + ~ Coefficient of learning curve effect. + | + +Endogenous Tech Fraction= + 1 + ~ dmnl + ~ Weight of induced technology in aggregate technological change (0 = \ + completely autonomous; 1 = completely induced). + | + +Autonomous Technology[source]= INTEG ( + Auton Energy Tech Chg Rt[source], + 1) + ~ dmnl + ~ Effect of autonomous technological improvement on energy technology level. + | + +Auton Energy Tech Chg Rt[source] = Autonomous Technology[source] +*Auton Energy Tech Growth Rate[source] + ~ 1/year + ~ Rate of autonomous technological improvement. + | + +Energy Learning Rate= + 0.8 + ~ dmnl + ~ Coefficient of induced technological change, expressed as a standard learning rate. + 1 = no learning; .7 to .9 typical. + | + +Init Cum Energy Investment[source] = INITIAL(Energy Capital[source] + /Energy Capital Lifetime[source]/Hist Energy Growth Rate[source]) + ~ $ + ~ Initial cumulative energy investment; "backstrapolated" using current \ + capital and historical growth rate. + | + +Hist Energy Growth Rate[source]= + 0.02,0.06,0.02, 0.06 + ~ 1/year + ~ Historic growth rate of energy production, for estimating initial \ + cumulative production stocks. Relatively unimportant, as recent history \ + dominates cumulative production. Oil: 1938-1960, Coal 1960-1970, Gas \ + 1960-1970, HN, 1925-1960, New arbitrary. + | + +Energy Scale Effect= + 1 + ~ dmnl + ~ Cost reducing returns to scale in energy production. 1 = constant returns. \ + Expressed in same terms as learning coefficient - cost reduction per \ + doubling of scale - so a value of .8 implies 20% cost reduction for a \ + doubling of scale. + | + +Energy Scale Coeff= INITIAL ( + -LOG(Energy Scale Effect,2)) + ~ dmnl + ~ Coefficient of energy scale economy effect. + | + +Energy Scale Economy[source]= + (Energy Capital[source]/Reference Energy Capital[source])^Energy Scale Coeff + ~ dmnl + ~ Cost-reducing economies of scale in energy production. + | + +******************************************************** + .Energy.Initialization +********************************************************~ + | + +Reference Pretax Expenditure[source] = INITIAL(Initial Production[source] +*Initial Producer Price[source]) + ~ $/year + ~ Reference energy expenditure by source, excluding taxes and distribution \ + costs. + | + +Ref Total Expenditure = INITIAL(SUM(Reference Final Expenditure[source!])) + ~ $/year + ~ Reference total energy expenditure. + | + +Reference Final Expenditure[source]= INITIAL ( + Final Energy Price[source]*Initial Production[source]*Energy Price Discount) + ~ $/year + ~ Reference energy expenditure by source, including taxes and distribution \ + costs. + | + +Ref Energy Value Share[Coal]= + 0.185 ~~| +Ref Energy Value Share[OilGas]= + 1-Ref Energy Value Share[Coal] + -Ref Energy Value Share[HN]-Ref Energy Value Share[New] ~~| +Ref Energy Value Share[HN]= + 0.216 ~~| +Ref Energy Value Share[New]= + 0.0101 + ~ dmnl + ~ Reference CES value share of energy sources. + | + +Exog Order Switch = 0 + ~ dmnl + ~ 0 = endogenous + 1 = exogenous (production data) + Switches energy orders between data and endogenous drivers. + | + +Ref Aggr Energy Production = 1.26e+011 + ~ GJequiv/year + ~ Reference production of CES aggregate energy good. + | + +******************************************************** + .Energy.Capital +********************************************************~ + | + +Marg Prod Energy Capital[nonrenewable]= + Capital Share[nonrenewable] + *(Effective Primary Energy Price[nonrenewable]-Depletion Rent[nonrenewable]) + *LR Marg Prod Effect[nonrenewable] ~~| +Marg Prod Energy Capital[Renewable]= + Capital Share[Renewable]*Effective Primary Energy Price[Renewable] + *LR Marg Prod Effect[Renewable] + ~ 1/year + ~ Marginal productivity of capital, incorporating effects of output price, + depletion/exploitation/technology, and utilization. + | + +LR Marg Prod Effect[source]= + Normal Production[source]/Energy Capital[source]*Marginal Resource Effect[source] + ~ GJ/$/year + ~ Effect of long run factors on marginal productivity of energy capital. + For nonrenewables, varies with depletion and technology. + For renewables, varies with technology and saturation. + | + +Desired Energy Capital[source]= Energy Capital[source] + *Production Pressure[source]*Effect of Return on Energy Capital[source] + ~ $ + ~ Desired energy capital; equals current capital adjusted for production \ + pressure and relative return. + | + +Effect of Return on Energy Capital[source]= Exog Energy Price Switch[source] + + (1-Exog Energy Price Switch[source])*Perc Relative Return[source]^Return Coeff + ~ dmnl + ~ Effect of relative return on desired energy capital. When exogenous energy \ + prices are used, effect of return is switched off. + | + +Initial Production Growth[source] = INITIAL(Hist Energy Growth Rate[source]) + ~ 1/year + ~ Initial growth rate of production; equal to historic rates. + | + +Indicated Energy Capital Completion Rate[source] = + Energy Capital under Constr[source]/Energy Construction Delay[source] + ~ $/year + ~ Indicated rate of completion of energy capital on order. + | + +Energy Capital Completion Rate[source] = + Indicated Energy Capital Completion Rate[source]*Fraction of Invest Goods Avail + ~ $/yr + ~ Rate of completion of capital under construction, constrained by \ + availability of investment goods. + | + +Energy Capital Order Rate[source] = max(0,Desired Energy Capital Order Rate[source]) + ~ $/yr + ~ Energy capital order rate. Constrained to be nonnegative (no \ + cancellations). + | + +Perc Relative Return[source] = + SMOOTHI(Marg Prod Energy Capital[source]/Energy Capital Cost[source], + Return Perc Time,1) + ~ dmnl + ~ Perceived relative return to capital; equal to delayed ratio of marginal \ + product to price of capital. + | + +Reference Energy Capital[source] = INITIAL(Reference Pretax Expenditure[source] + *Capital Share[source]/Energy Capital Cost[source]) + ~ $ + ~ Reference capital stock for energy production. + | + +LR Order Trend Time = 5 + ~ year + ~ Time to establish long-term trends in orders, for capital planning. + | + +Energy Capital Cost[source] = Interest Rate+1/Energy Capital Lifetime[source] + ~ 1/year + ~ Price of capital, including interest and depreciation. + | + +LR Expected Order Growth Rate[source] = TREND(Energy Order Rate[source], + LR Order Trend Time,Initial Production Growth[source]) + ~ 1/year + ~ Perceived long run trend in energy orders. + | + +Return Perc Time = 2 + ~ year + ~ Time to perceive relative return on capital. + | + +Desired Energy Capital Order Rate[source] = Energy Capital Discard Rate[source] + + Energy Capital Correction[source] + Energy Supply Line Correction[source] + ~ $/year + ~ Desired energy capital order rate; equals discard rate plus corrections \ + for capital and supply line stocks. + | + +Desired Energy Capital under Constr[source] = (Energy Capital Discard Rate[source] + +LR Expected Order Growth Rate[source]*Energy Capital[source]) + *Energy Construction Delay[source] + ~ $ + ~ Desired energy capital under construction; equals quantity needed to \ + replace discards and meet growth. + | + +Energy Capital Correction[source] = + (Desired Energy Capital[source]-Energy Capital[source]) + /Capital Corr Time + ~ $/year + ~ Rate of correction to energy capital stock. + | + +Energy Capital Discard Rate[source] = + Energy Capital[source]/Energy Capital Lifetime[source] + ~ $/year + ~ Energy capital discard rate. + | + +Energy Capital[source] = INTEG(Energy Capital Completion Rate[source] +-Energy Capital Discard Rate[source], +Reference Energy Capital[source]) + ~ $ + ~ Energy production capital stock. For fossil fuels, can be conceived of as \ + developed fields or mines. + | + +Capital Corr Time = 4 + ~ yr + ~ Time to adjust capital stock. + | + +Energy Capital Lifetime[source] = 20,20,40,30 + ~ year + ~ Lifetime of capital. + | + +Energy Capital under Constr[source] = INTEG(Energy Capital Order Rate[source] +-Energy Capital Completion Rate[source] +,Desired Energy Capital under Constr[source]) + ~ $ + ~ Stock of energy capital under construction. + | + +Energy Construction Delay[source] = 10 + ~ yr + ~ Time required to construct new energy capital (planning as well as \ + physical construction and exploitation). Delay is unaffected by demand on \ + the energy capital construction sectors, which are not explicitly modeled. + | + +Energy Supply Line Correction[source] = (Desired Energy Capital under Constr[source] +-Energy Capital under Constr[source])/Supply Line Correction Time + ~ $/year + ~ Correction to supply line of capital under construction. + | + +Supply Line Correction Time = 4 + ~ year + ~ Time to adjust supply line of capital under construction. + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 2300 + ~ year + ~ The final time for the simulation. + | + +INITIAL TIME = 1960 + ~ year + ~ The initial time for the simulation. + | + +SAVEPER = 5 + ~ year + ~ The frequency with which output is stored. + | + +TIME STEP = 0.125 + ~ year + ~ The time step for the simulation. + | + +******************************************************** + .Data +********************************************************~ + | + +World Population + ~ MillionPeople + ~ World Bank population data. + | + +Oil EIA + ~ GJ/year + ~ EIA oil production data/forecast. + | + +Primary Trabalka + ~ GJ/year + ~ Trabalka primary production data/forecast. + ~ :SUPPLEMENTARY + | + +OilGas EIA:= + Oil EIA+Gas EIA + ~ GJ/year + ~ EIA oil+gas production data/forecast. + ~ :SUPPLEMENTARY + | + +Primary WEC + ~ GJ/year + ~ WEC primary production data/forecast. + ~ :SUPPLEMENTARY + | + +Primary EIA + ~ GJ/year + ~ EIA primary production data/forecast. + ~ :SUPPLEMENTARY + | + +Coal EIA + ~ GJ/year + ~ EIA coal production data/forecast. + ~ :SUPPLEMENTARY + | + +Gas EIA + ~ GJ/year + ~ EIA gas production data/forecast. + | + +Share Data[source] := Production Data[source]/Total Production Data + ~ dmnl + ~ Energy production share data by source. + ~ :SUPPLEMENTARY + | + +Total Production Data := SUM(Production Data[source!]) + ~ GJ/year + ~ Total energy production data (physical terms). + | + +Production Data[Coal] := Coal Production ~~| +Production Data[OilGas] := Oil Production+Gas Production ~~| +Production Data[HN] := Hydro Electricity+Nuclear Electricity ~~| +Production Data[New] := Other Electricity + ~ GJ/year + ~ Production data array for all sources. + | + +Price Data[Coal] := World Coal Price ~~| +Price Data[OilGas] := (World Crude Price*Oil Production+World Gas Price*Gas Production +)/(Oil Production+Gas Production) ~~| +Price Data[HN] := Elect Price ~~| +Price Data[New] := 10*Elect Price + ~ $/GJ + ~ Price data array for all sources. + | + +Average Energy Price = (Average Thermal Price + *(Coal Production+Gas Production+Oil Production) + +Elect Price*Primary Electricity) + /(Coal Production+Gas Production+Oil Production+Primary Electricity) + ~ $/GJ + ~ Average price of energy in physical terms, from data. Electricity in \ + primary equivalent units. + ~ :SUPPLEMENTARY + | + +Average Thermal Price = (Oil Production*World Crude Price+Coal Production*World Coal Price ++Gas Production*World Gas Price)/(Coal Production+Gas Production+Oil Production) + ~ $/GJ + ~ Average price of thermal fuels from data. + | + +Coal Production + ~ GJ/year + ~ Coal production data. + | + +Commercial Energy + ~ GJ/year + ~ Commercial energy data. + ~ :SUPPLEMENTARY + | + +Cons Frac GDP + ~ dmnl + ~ Consumption as a fraction of GDP (data). + ~ :SUPPLEMENTARY + | + +Elect Price + ~ $/GJ + ~ Electricity price data. + | + +Gas Production + ~ GJ/year + ~ Gas production data. + | + +GDP := World GDP*1e+009 + ~ $/year + ~ GDP data. + ~ :SUPPLEMENTARY + | + +GDP Deflator + ~ dmnl + ~ GDP deflator data. + ~ :SUPPLEMENTARY + | + +Hydro Electricity + ~ GJ/year + ~ Hydro electricity data (primary equivalent units). + | + +Invest Frac GDP + ~ dmnl + ~ Investment as a fraction of GDP data. + | + +Nuclear Electricity + ~ GJ/year + ~ Nuclear electricity production data (primary equivalent units). + | + +Oil Production + ~ GJ/year + ~ Oil production data. + | + +Other Electricity + ~ GJ/year + ~ Other electricity production data (primary equivalent units). + | + +Primary Electricity = Hydro Electricity+Nuclear Electricity+Other Electricity + ~ GJ/year + ~ Primary electricity production data (primary equivalent units). + | + +Primary Energy + ~ GJ/year + ~ Total primary energy production data. + ~ :SUPPLEMENTARY + | + +Thermal Electricity + ~ GJ/year + ~ Thermal electricity production data (primary equivalent units). + ~ :SUPPLEMENTARY + | + +Total Electricity + ~ GJ/year + ~ Total electricity production data (primary equivalent units). + ~ :SUPPLEMENTARY + | + +Traditional Energy + ~ GJ/year + ~ Traditional energy production data. + ~ :SUPPLEMENTARY + | + +World Coal Price + ~ $/GJ + ~ Coal price data. + | + +World Crude Price + ~ $/GJ + ~ Oil price data. + | + +World Gas Price + ~ $/GJ + ~ Gas price data. + | + +World GDP + ~ $/year + ~ GDP data. + | + +World Investment = World GDP*Invest Frac GDP*1e+009 + ~ $/year + ~ Investment data. + | + +World Pop Growth Rt + ~ 1/year + ~ Population growth rate data. + ~ :SUPPLEMENTARY + | + +World Bank Population:= + World Population*1e+006 + ~ people + ~ Population data (World Bank). + ~ :SUPPLEMENTARY + | + +DICE IPCC CO2 Rad Forcing + ~ watt/(meter*meter) + ~ IPCC CO2 radiative forcing (from DICE) + ~ :SUPPLEMENTARY + | + +DICE IPCC Other Rad Forcing + ~ watt/(meter*meter) + ~ IPCC other GHG radiative forcing (from DICE) + | + +CO2 Emissions A + ~ TonC/year + ~ IPCC 92a emissions + ~ :SUPPLEMENTARY + | + +CO2 Emissions B + ~ TonC/year + ~ IPCC 92b emissions + ~ :SUPPLEMENTARY + | + +CO2 Emissions C + ~ TonC/year + ~ IPCC 92c emissions + ~ :SUPPLEMENTARY + | + +CO2 Emissions D + ~ TonC/year + ~ IPCC 92d emissions + ~ :SUPPLEMENTARY + | + +CO2 Emissions E + ~ TonC/year + ~ IPCC 92e emissions + ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions A + ~ TonC/year + ~ IPCC 92a energy emissions + ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions B + ~ TonC/year + ~ IPCC 92b energy emissions + ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions C + ~ TonC/year + ~ IPCC 92c energy emissions + ~ :SUPPLEMENTARY + | + +Energy CO2 Emissions D + ~ TonC/year + ~ IPCC 92d energy emissions + ~ :SUPPLEMENTARY + | + +CO2 Concentration A + ~ TonC + ~ IPCC 92a atmospheric concentration + ~ :SUPPLEMENTARY + | + +CO2 Concentration B + ~ TonC + ~ IPCC 92b atmospheric concentration + ~ :SUPPLEMENTARY + | + +CO2 Concentration C + ~ TonC + ~ IPCC 92c atmospheric concentration + ~ :SUPPLEMENTARY + | + +CO2 Concentration D + ~ TonC + ~ IPCC 92d atmospheric concentration + ~ :SUPPLEMENTARY + | + +CO2 Concentration E + ~ TonC + ~ IPCC 92e atmospheric concentration + ~ :SUPPLEMENTARY + | + +EMF Population + ~ people + ~ EMF-14 world population + ~ :SUPPLEMENTARY + | + +EMF GDP + ~ $/year + ~ EMF-14 world GDP + ~ :SUPPLEMENTARY + | + +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Intro +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,100 +12,1,0,356,228,130,65,8,4,0,0,-1,0,0,0 +FREE Model by Tom Fiddaman, 1997, documented in Feedback Complexity in Integrated Climate Economy Models, PhD Thesis, MIT Sloan School of Management. +12,2,0,363,351,41,15,8,4,0,8,-1,0,0,0,0-0-0,0-0-0,|9||0-0-0 +Copyright 1997 Tom Fiddaman. +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Welfare +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Base Year,607,95,34,11,0,3,0,0,-1,0,0,0 +10,2,Population,476,192,43,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,3,Total Utility,332,136,37,11,0,3,0,0,-1,0,0,0 +10,4,Utility,334,178,20,11,0,3,0,0,-1,0,0,0 +10,5,Rate of Inequal Aversion,167,162,77,11,0,3,0,0,-1,0,0,0 +10,6,Log Discounted Marginal Utility,600,251,98,11,0,3,0,0,-1,0,0,0 +12,7,48,258,78,8,8,0,3,0,0,-1,0,0,0 +10,8,Rate of Time Pref,626,117,56,11,0,3,0,0,-1,0,0,0 +10,9,Discount Factor,503,118,51,11,0,3,0,0,-1,0,0,0 +10,10,Consumption per Cap,335,280,69,11,0,3,0,0,-1,0,0,0 +10,11,Cum Disc Utility,455,73,46,20,3,3,0,0,0,0,0,0 +10,12,Discounted Marginal Utility,601,294,84,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,13,Environmental Services per Cap,182,297,99,11,0,3,0,0,-1,0,0,0 +10,14,Time,604,138,26,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Ref Utility,200,136,32,11,0,3,0,0,-1,0,0,0 +10,16,Ref Cons per Cap,151,192,58,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,17,Consumption,335,338,51,11,0,2,0,0,-1,0,0,0 +10,18,Share of Consumption,132,223,70,11,0,3,0,0,-1,0,0,0 +10,19,Equiv Consumption Index,335,225,80,11,0,3,0,0,-1,0,0,0 +10,20,Ref Envir Services per Cap,121,255,85,11,0,3,0,0,-1,0,0,0 +10,21,Marginal Equiv Consumption,687,383,90,11,0,3,0,0,-1,0,0,0 +10,22,Marginal Util Equiv Cons,518,384,78,11,0,3,0,0,-1,0,0,0 +10,23,Discount Factor,759,294,60,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Equiv Consumption Index,599,427,89,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Share of Consumption,780,425,79,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,26,Consumption per Cap,705,459,78,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,27,Ref Utility,451,428,41,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +11,28,2140,330,77,6,8,34,3,0,0,1,0,0,0 +10,29,Discounted Utility,330,93,56,11,32,3,0,0,-1,0,0,0 +10,30,Rate of Inequal Aversion,507,459,86,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,31,Climate Damage Effect,183,341,81,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,32,Marginal Utility,600,336,48,11,0,3,0,0,-1,0,0,0 +1,33,15,4,0,0,0,0,0,0,0,-1--1--1,,1|(266,156)| +1,34,1,9,0,0,0,0,0,0,0,-1--1--1,,1|(569,102)| +1,35,14,9,0,0,0,0,0,0,0,-1--1--1,,1|(572,131)| +1,36,5,4,0,0,0,0,0,0,0,-1--1--1,,1|(272,171)| +1,37,5,4,0,0,0,0,0,0,0,-1--1--1,,1|(272,171)| +1,38,5,4,0,0,0,0,0,0,0,-1--1--1,,1|(272,171)| +1,39,9,29,1,0,0,0,0,0,0,-1--1--1,,1|(407,118)| +1,40,8,9,0,0,0,0,0,0,0,-1--1--1,,1|(569,117)| +1,41,17,10,0,0,0,0,0,0,0,-1--1--1,,1|(335,316)| +1,42,28,11,4,0,0,22,0,0,0,-1--1--1,,1|(372,77)| +1,43,28,7,100,0,0,22,0,0,0,-1--1--1,,1|(295,77)| +1,44,2,10,0,0,0,0,0,0,0,-1--1--1,,1|(411,232)| +1,45,4,3,0,0,0,0,0,0,0,-1--1--1,,1|(333,163)| +1,46,2,3,0,0,0,0,0,0,0,-1--1--1,,1|(410,166)| +1,47,3,29,0,0,0,0,0,0,0,-1--1--1,,1|(331,121)| +1,48,12,6,0,0,0,0,0,0,0,-1--1--1,,1|(600,279)| +1,49,18,19,0,0,0,0,0,0,0,-1--1--1,,1|(221,223)| +1,50,13,19,0,0,0,0,0,0,0,-1--1--1,,1|(251,263)| +1,51,19,4,0,0,0,0,0,0,0,-1--1--1,,1|(334,208)| +1,52,10,19,0,0,0,0,0,0,0,-1--1--1,,1|(335,259)| +1,53,20,13,0,0,0,0,0,0,0,-1--1--1,,1|(145,272)| +1,54,16,19,0,0,0,0,0,0,0,-1--1--1,,1|(234,206)| +1,55,20,19,0,0,0,0,0,0,0,-1--1--1,,1|(220,240)| +1,56,22,32,0,0,0,0,0,0,0,-1--1--1,,1|(552,363)| +1,57,21,32,0,0,0,0,0,0,0,-1--1--1,,1|(649,362)| +1,58,32,12,0,0,0,0,0,0,0,-1--1--1,,1|(600,322)| +1,59,24,22,0,0,0,0,0,0,0,-1--1--1,,1|(564,408)| +1,60,30,22,0,0,0,0,0,0,0,-1--1--1,,1|(510,428)| +1,61,27,22,0,0,0,0,0,0,0,-1--1--1,,1|(478,409)| +1,62,26,21,0,0,0,0,0,0,0,-1--1--1,,1|(697,427)| +1,63,24,21,0,0,0,0,0,0,0,-1--1--1,,1|(636,408)| +1,64,25,21,0,0,0,0,0,0,0,-1--1--1,,1|(739,406)| +1,65,23,12,0,0,0,0,0,0,0,-1--1--1,,1|(699,294)| +1,66,31,13,0,0,0,0,0,0,0,-1--1--1,,1|(182,325)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Constrained Utility +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Discounted Utility,398,141,65,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Effective CO2 in Atmosphere,168,144,101,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,3,CO2 Constraint Factor,89,181,73,11,0,3,0,0,-1,0,0,0 +10,4,Constraint Violation Cost,185,272,79,11,0,3,0,0,-1,0,0,0 +10,5,CO2 Constraint,208,204,51,11,0,3,0,0,-1,0,0,0 +10,6,Preindustrial CO2,98,229,66,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Constraint Violation Penalty,358,203,86,11,0,3,0,0,-1,0,0,0 +10,8,Net Discounted Utility,537,203,69,11,0,3,0,0,-1,0,0,0 +1,9,5,7,0,0,0,0,0,0,0,-1--1--1,,1|(258,204)| +1,10,2,7,0,0,0,0,0,0,0,-1--1--1,,1|(255,171)| +1,11,7,8,0,0,0,0,0,0,0,-1--1--1,,1|(449,203)| +1,12,4,7,0,0,0,0,0,0,0,-1--1--1,,1|(264,240)| +1,13,1,8,0,0,0,0,0,0,0,-1--1--1,,1|(460,169)| +1,14,3,5,0,0,0,0,0,0,1,-1--1--1,,1|(144,191)| +1,15,6,5,0,0,0,0,0,0,1,-1--1--1,,1|(145,218)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Population +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Population,183,124,40,20,3,3,0,0,0,0,0,0 +10,2,Pop Growth Rate,306,214,40,20,3,3,0,0,0,0,0,0 +10,3,Hist Pop Growth Rt Decline Rt,372,351,96,11,0,3,0,0,-1,0,0,0 +10,4,Pop Gr Rt Decline Rt,471,280,67,11,0,3,0,0,-1,0,0,0 +12,5,48,373,125,8,8,0,3,0,0,-1,0,0,0 +10,6,Forecast Pop Growth Rt Decline Rt,474,391,111,11,0,3,0,0,-1,0,0,0 +12,7,48,519,213,8,8,0,3,0,0,-1,0,0,0 +10,8,Pop Growth Switch Time,554,350,79,11,0,3,0,0,-1,0,0,0 +11,9,5308,294,125,6,8,34,3,0,0,1,0,0,0 +10,10,Net Pop Incr,294,141,42,11,32,3,0,0,-1,0,0,0 +11,11,5420,428,213,6,8,34,3,0,0,1,0,0,0 +10,12,Decline Pop Gr Rt,428,229,58,11,32,3,0,0,-1,0,0,0 +10,13,Time,582,313,26,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Labor Force,75,125,41,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,15,Labor Force Fraction,73,189,68,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +1,16,1,14,0,0,0,0,0,0,0,-1--1--1,,1|(136,124)| +1,17,15,14,0,0,0,0,0,0,0,-1--1--1,,1|(73,163)| +1,18,13,4,0,0,0,0,0,0,0,-1--1--1,,1|(538,300)| +1,19,8,4,0,0,0,0,0,0,0,-1--1--1,,1|(517,319)| +1,20,6,4,0,0,0,0,0,0,0,-1--1--1,,1|(472,342)| +1,21,3,4,0,0,0,0,0,0,0,-1--1--1,,1|(415,319)| +1,22,11,2,100,0,0,22,0,0,0,-1--1--1,,1|(384,213)| +1,23,11,7,4,0,0,22,0,0,0,-1--1--1,,1|(472,213)| +1,24,9,5,100,0,0,22,0,0,0,-1--1--1,,1|(332,125)| +1,25,9,1,4,0,0,22,0,0,0,-1--1--1,,1|(255,125)| +1,26,4,12,0,0,0,0,0,0,0,-1--1--1,,1|(454,259)| +1,27,2,12,1,0,0,0,0,0,0,-1--1--1,,1|(363,249)| +1,28,2,10,0,0,0,0,0,0,0,-1--1--1,,1|(300,179)| +1,29,1,10,1,0,0,0,0,0,0,-1--1--1,,1|(231,160)| +10,30,Initial Population,183,37,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,31,30,1,0,0,0,0,0,0,1,-1--1--1,,1|(183,73)| +10,32,Initial Pop Growth Rt,305,296,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,33,32,2,0,0,0,0,0,0,1,-1--1--1,,1|(305,262)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Interest +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Output Trend,387,277,38,8,0,3,0,0,-1,0,0,0 +10,2,Output Trend Establishment Time,201,266,90,8,0,3,0,0,-1,0,0,0 +10,3,Consumer Inequal Aversion,214,232,72,8,0,3,0,0,-1,0,0,0 +10,4,Consumer Discount Rate,219,190,66,8,0,3,0,0,-1,0,0,0 +10,5,Interest Rate,387,140,35,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,6,Hist Output Growth Rate,211,296,77,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Perceived Output per Cap,387,339,70,8,0,3,0,0,-1,0,0,0 +10,8,Output Perc Time,216,339,49,8,0,3,0,0,-1,0,0,0 +10,9,Const Interest Rate,231,154,52,8,0,3,0,0,-1,0,0,0 +10,10,Interest Rate Switch,221,119,54,8,0,3,0,0,-1,0,0,0 +10,11,Ramsey Interest Rate,387,212,57,8,0,3,0,0,-1,0,0,0 +10,12,Gross Output per Cap,385,394,62,8,0,3,0,0,-1,0,0,0 +10,13,Gross Output,342,448,45,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Population,435,447,36,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,15,3,11,0,0,0,0,0,0,0,-1--1--1,,1|(299,221)| +1,16,4,11,0,0,0,0,0,0,0,-1--1--1,,1|(298,200)| +1,17,10,5,0,0,0,0,0,0,0,-1--1--1,,1|(306,129)| +1,18,9,5,0,0,0,0,0,0,0,-1--1--1,,1|(310,147)| +1,19,11,5,0,0,0,0,0,0,0,-1--1--1,,1|(387,183)| +1,20,1,11,0,0,0,0,0,0,0,-1--1--1,,1|(387,251)| +1,21,8,7,0,0,0,0,0,0,0,-1--1--1,,1|(284,339)| +1,22,7,1,0,0,0,0,0,0,0,-1--1--1,,1|(387,315)| +1,23,6,1,0,0,0,0,0,0,0,-1--1--1,,1|(310,285)| +1,24,2,1,0,0,0,0,0,0,0,-1--1--1,,1|(313,272)| +1,25,14,12,0,0,0,0,0,0,0,-1--1--1,,1|(414,425)| +1,26,12,7,0,0,0,0,0,0,0,-1--1--1,,1|(385,373)| +1,27,13,12,0,0,0,0,0,0,0,-1--1--1,,1|(358,426)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Goods Allocation +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Indicated Energy Distribution Cost,401,152,87,8,0,3,0,0,-1,0,0,0 +10,2,Energy Invest Req,590,168,47,8,0,3,0,0,-1,0,0,0 +10,3,Init Unit Distribution Cost,329,107,74,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,4,Scheduled Production,474,107,61,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,Indicated Total Energy Dist Cost,403,199,82,8,0,3,0,0,-1,0,0,0 +10,6,Desired Variable Input,218,153,64,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Indicated Total Cost Energy Production,315,239,98,8,0,3,0,0,-1,0,0,0 +10,8,Indicated Total Energy Variable Cost,216,200,91,8,0,3,0,0,-1,0,0,0 +10,9,Output Net of Energy,312,314,56,8,0,3,0,0,-1,0,0,0 +10,10,Fraction of Energy Goods Avail,188,275,79,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,11,Total Invest Req,592,232,43,8,0,3,0,0,-1,0,0,0 +10,12,Desired Investment,725,169,56,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,Consumption,593,314,35,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,14,Fraction of Invest Goods Avail,473,275,77,8,0,3,0,0,-1,0,0,0 +10,15,Indicated Energy Capital Completion Rate,676,109,111,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,16,Gross Output,58,315,43,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,17,11,13,0,0,0,0,0,0,0,-1--1--1,,1|(592,266)| +1,18,11,14,0,0,0,0,0,0,0,-1--1--1,,1|(539,251)| +1,19,9,14,0,0,0,0,0,0,0,-1--1--1,,1|(385,296)| +1,20,9,13,0,0,0,0,0,0,0,-1--1--1,,1|(456,314)| +1,21,2,11,0,0,0,0,0,0,0,-1--1--1,,1|(590,193)| +1,22,12,11,0,0,0,0,0,0,0,-1--1--1,,1|(664,197)| +1,23,7,9,0,0,0,0,0,0,0,-1--1--1,,1|(313,269)| +1,24,16,10,0,0,0,0,0,0,0,-1--1--1,,1|(116,297)| +1,25,16,9,0,0,0,0,0,0,0,-1--1--1,,1|(171,314)| +1,26,7,10,0,0,0,0,0,0,0,-1--1--1,,1|(258,255)| +1,27,6,8,0,0,0,0,0,0,0,-1--1--1,,1|(217,169)| +1,28,5,7,0,0,0,0,0,0,0,-1--1--1,,1|(365,216)| +1,29,8,7,0,0,0,0,0,0,0,-1--1--1,,1|(258,216)| +1,30,1,5,0,0,0,0,0,0,0,-1--1--1,,1|(401,168)| +1,31,4,1,0,0,0,0,0,0,0,-1--1--1,,1|(443,125)| +1,32,3,1,0,0,0,0,0,0,0,-1--1--1,,1|(358,125)| +1,33,15,2,0,0,0,0,0,0,0,-1--1--1,,1|(638,134)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Gross Output +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Climate Damage Effect,273,146,64,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Labor Force,197,180,38,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,3,Gross Output,420,246,36,8,0,3,0,0,-1,0,0,0 +10,4,Factor Productivity,411,145,38,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,Marg Prod Oper Capital,625,250,61,8,0,3,0,0,-1,0,0,0 +10,6,Reference Operating Capital,587,149,77,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Marginal Prod of Labor,196,249,59,8,0,3,0,0,-1,0,0,0 +10,8,Reference Labor,343,127,48,8,0,2,0,0,-1,0,0,0 +10,9,Operating Capital,626,189,52,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Reference Output,463,127,45,8,0,3,0,0,-1,0,0,0 +10,11,Value Share of Labor,418,313,52,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +1,12,11,7,0,0,0,0,0,0,0,-1--1--1,,1|(313,282)| +1,13,8,3,0,0,0,0,0,0,0,-1--1--1,,1|(377,180)| +1,14,11,3,0,0,0,0,0,0,0,-1--1--1,,1|(418,286)| +1,15,10,3,0,0,0,0,0,0,0,-1--1--1,,1|(443,179)| +1,16,4,3,0,0,0,0,0,0,0,-1--1--1,,1|(414,188)| +1,17,9,3,0,0,0,0,0,0,0,-1--1--1,,1|(529,215)| +1,18,9,5,0,0,0,0,0,0,0,-1--1--1,,1|(625,212)| +1,19,6,3,0,0,0,0,0,0,0,-1--1--1,,1|(509,194)| +1,20,3,7,0,0,0,0,0,0,0,-1--1--1,,1|(326,246)| +1,21,3,5,0,0,0,0,0,0,0,-1--1--1,,1|(503,246)| +1,22,11,5,0,0,0,0,0,0,0,-1--1--1,,1|(514,283)| +1,23,2,3,0,0,0,0,0,0,0,-1--1--1,,1|(301,211)| +1,24,2,7,0,0,0,0,0,0,0,-1--1--1,,1|(196,207)| +1,25,1,3,0,0,0,0,0,0,0,-1--1--1,,1|(340,192)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Factor Productivity +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Init Frac Factor Prod Gr Rt,586,325,86,11,0,3,0,0,-1,0,0,0 +10,2,Asymptotic Frac Factor Prod Gr Rt,128,382,111,11,0,3,0,0,-1,0,0,0 +10,3,Fractional Factor Prod Growth Rate,390,324,40,20,3,3,0,0,0,0,0,0 +12,4,48,367,237,8,8,0,3,0,0,-1,0,0,0 +11,5,48,431,237,6,8,34,3,0,0,1,0,0,0 +10,6,Factor Prod Chg Rt,431,253,63,11,32,3,0,0,-1,0,0,0 +10,7,Initial Factor Productivity,681,237,87,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Factor Productivity,537,237,35,19,3,3,0,0,0,0,0,0 +12,9,48,188,323,8,8,0,3,0,0,-1,0,0,0 +11,10,48,262,323,6,8,34,3,0,0,1,0,0,0 +10,11,Factor Prod Gr Rt Decline Rt,262,339,92,11,32,3,0,0,-1,0,0,0 +10,12,Frac Factor Prod Gr Rt Decline Rt,215,411,108,11,0,3,0,0,-1,0,0,0 +1,13,5,8,4,0,0,22,0,0,0,-1--1--1,,1|(469,237)| +1,14,5,4,100,0,0,22,0,0,0,-1--1--1,,1|(400,237)| +1,15,8,6,1,0,0,0,0,0,0,-1--1--1,,1|(474,273)| +1,16,10,9,4,0,0,22,0,0,0,-1--1--1,,1|(226,323)| +1,17,10,3,100,0,0,22,0,0,0,-1--1--1,,1|(309,323)| +1,18,12,11,0,0,0,0,0,0,0,-1--1--1,,1|(234,380)| +1,19,3,11,1,0,0,0,0,0,0,-1--1--1,,1|(314,367)| +1,20,2,11,0,0,0,0,0,0,0,-1--1--1,,1|(187,362)| +1,21,3,6,1,0,0,0,0,0,0,-1--1--1,,1|(401,283)| +1,22,1,3,0,0,0,0,0,0,1,-1--1--1,,1|(471,324)| +1,23,7,8,0,0,0,0,0,0,1,-1--1--1,,1|(590,237)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Capital +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Capital,502,310,40,20,3,3,0,0,0,0,0,0 +12,2,48,322,309,8,8,0,3,0,0,-1,0,0,0 +11,3,48,397,309,6,8,34,3,0,0,1,0,0,0 +10,4,Investment Rate,397,325,51,11,32,3,0,0,0,0,0,0 +12,5,48,714,312,8,8,0,3,0,0,-1,0,0,0 +11,6,48,629,311,6,8,34,3,0,0,1,0,0,0 +10,7,Discard Rate,629,327,42,11,32,3,0,0,0,0,0,0 +10,8,Desired Capital,510,137,49,11,0,3,0,0,-1,0,0,0 +10,9,Capital Correction,209,97,58,11,0,3,0,0,-1,0,0,0 +10,10,Desired Investment,253,326,60,11,0,3,0,0,-1,0,0,0 +10,11,LR Energy Share,814,383,63,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Capital Lifetime,707,370,59,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,Cost of Capital,688,32,48,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,14,Desired Capital Order Rate,52,326,86,11,0,3,0,0,-1,0,0,0 +10,15,Marg Prod Capital,853,173,59,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,16,Fraction of Invest Goods Avail,396,384,104,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,17,Capital Lifetime,541,5,59,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,18,Interest Rate,544,45,50,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,19,Capital Energy Subst Coeff,1002,203,94,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Perc Relative Return to Capital,772,93,96,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,21,Effect of Return,595,94,50,11,0,3,0,0,-1,0,0,0 +10,22,LR Marginal Prod of Eff Capital,973,120,108,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,23,Return Coeff,680,153,50,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Reference Capital,620,235,65,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,World Investment,164,367,65,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,26,Investment Switch,230,386,57,11,0,3,0,0,-1,0,0,0 +10,27,Return Perc Time,826,33,64,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,28,LR Capital Share,1018,236,64,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,29,Normal Aggr Energy Requirement,988,312,114,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,30,Capital Corr Time,382,55,66,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,31,Ref Aggr Energy Production,1076,262,97,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,32,Desired Capital Growth,234,165,74,11,0,3,0,0,-1,0,0,0 +10,33,Gross Output,213,264,52,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,34,Hist Output Growth Rate,367,264,87,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,35,Reference Capital,924,333,65,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,36,LR Output Trend Time,276,283,72,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,37,LR Expected Output Growth Rate,277,214,106,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,38,Reference Capital'Energy Aggr,883,354,105,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,39,Utilization,978,150,41,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,40,Marg Capital'Energy per Capital,754,268,100,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +1,41,36,37,0,0,0,0,0,0,0,-1--1--1,,1|(276,256)| +1,42,30,9,1,0,0,0,0,0,0,-1--1--1,,1|(273,70)| +1,43,8,9,1,0,0,0,0,0,0,-1--1--1,,1|(392,87)| +1,44,6,5,4,0,0,22,0,0,0,-1--1--1,,1|(670,311)| +1,45,6,1,100,0,0,22,0,0,0,-1--1--1,,1|(582,311)| +1,46,1,7,1,0,0,0,0,0,0,-1--1--1,,1|(556,345)| +1,47,12,7,0,0,0,0,0,0,0,-1--1--1,,1|(674,351)| +1,48,3,1,4,0,0,22,0,0,0,-1--1--1,,1|(432,309)| +1,49,3,2,100,0,0,22,0,0,0,-1--1--1,,1|(360,309)| +1,50,10,4,0,0,0,0,0,0,0,-1--1--1,,1|(322,325)| +1,51,9,14,1,0,0,0,0,0,0,-1--1--1,,1|(65,209)| +1,52,14,10,0,0,0,0,0,0,0,-1--1--1,,1|(158,326)| +1,53,20,21,1,0,0,0,0,0,0,-1--1--1,,1|(675,78)| +1,54,23,21,1,0,0,0,0,0,0,-1--1--1,,1|(646,123)| +1,55,21,8,1,0,0,0,0,0,0,-1--1--1,,1|(547,111)| +1,56,7,14,1,0,0,0,0,0,0,-1--1--1,,1|(318,505)| +1,57,16,4,0,0,0,0,0,0,0,-1--1--1,,1|(396,361)| +1,58,26,10,0,0,0,0,0,0,0,-1--1--1,,1|(238,362)| +1,59,25,10,0,0,0,0,0,0,0,-1--1--1,,1|(201,349)| +1,60,13,20,0,0,0,0,0,0,0,-1--1--1,,1|(723,58)| +1,61,17,13,0,0,0,0,0,0,0,-1--1--1,,1|(613,17)| +1,62,18,13,0,0,0,0,0,0,0,-1--1--1,,1|(610,39)| +1,63,22,15,0,0,0,0,0,0,0,-1--1--1,,1|(919,143)| +1,64,27,20,0,0,0,0,0,0,0,-1--1--1,,1|(803,57)| +1,65,37,32,0,0,0,0,0,0,0,-1--1--1,,1|(260,194)| +1,66,32,14,1,0,0,0,0,0,0,-1--1--1,,1|(108,208)| +1,67,33,37,0,0,0,0,0,0,0,-1--1--1,,1|(239,243)| +1,68,34,37,0,0,0,0,0,0,0,-1--1--1,,1|(328,242)| +1,69,39,15,0,0,0,0,0,0,0,-1--1--1,,1|(931,158)| +1,70,40,15,1,0,0,0,0,0,0,-1--1--1,,1|(821,230)| +1,71,15,20,1,0,0,0,0,0,0,-1--1--1,,1|(826,130)| +1,72,1,40,1,0,0,0,0,0,0,-1--1--1,,1|(612,296)| +1,73,19,40,0,0,0,0,0,0,0,-1--1--1,,1|(884,233)| +1,74,28,40,0,0,0,0,0,0,0,-1--1--1,,1|(905,249)| +1,75,29,40,0,0,0,0,0,0,0,-1--1--1,,1|(877,291)| +1,76,31,40,0,0,0,0,0,0,0,-1--1--1,,1|(923,264)| +1,77,35,40,0,0,0,0,0,0,0,-1--1--1,,1|(845,302)| +1,78,38,40,0,0,0,0,0,0,0,-1--1--1,,1|(824,314)| +1,79,1,9,1,0,0,0,0,0,0,-1--1--1,,1|(442,189)| +1,80,1,32,1,0,0,0,0,0,0,-1--1--1,,1|(376,191)| +1,81,1,8,1,0,0,0,0,0,0,-1--1--1,,1|(536,195)| +1,82,7,10,1,0,0,2,0,0,0,-1--1--1,,1|(420,435)| +1,83,11,40,0,0,0,0,0,0,0,-1--1--1,,1|(787,331)| +1,84,24,1,0,0,0,0,0,0,1,-1--1--1,,1|(573,264)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*AEEI +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Capital,588,70,33,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +12,2,48,309,187,8,8,0,3,0,0,-1,0,0,0 +11,3,48,396,187,6,8,34,3,0,0,1,0,0,0 +10,4,AEEI Install Rate,396,203,55,11,32,3,0,0,-1,0,0,0 +10,5,Investment Rate,267,250,60,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +12,6,48,509,352,8,8,0,3,0,0,-1,0,0,0 +10,7,Capital,508,40,33,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Embodied AEEI,509,187,40,20,3,3,0,0,0,0,0,0 +10,9,Retrofit Rate,689,311,50,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +11,10,1132,509,275,8,6,33,3,0,0,4,0,0,0 +10,11,AEEI Retrofit Rate,569,275,60,11,32,3,0,0,-1,0,0,0 +10,12,Average AEEI,510,108,47,11,0,3,0,0,-1,0,0,0 +10,13,Capital,595,337,33,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Asymptotic AEEI,354,401,56,11,0,3,0,0,-1,0,0,0 +12,15,48,742,185,8,8,0,3,0,0,-1,0,0,0 +11,16,48,644,184,6,8,34,3,0,0,1,0,0,0 +10,17,AEEI Discard Rate,644,200,61,11,32,3,0,0,0,0,0,0 +10,18,Capital Lifetime,707,254,50,11,0,3,0,0,-1,0,0,0 +10,19,Reference Productivity,415,70,80,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Frac Auton Energy Eff Improvement Rate,157,402,128,11,0,3,0,0,-1,0,0,0 +10,21,Auton Energy Eff Index,360,327,40,20,3,3,0,0,0,0,0,0 +12,22,48,137,333,8,8,0,3,0,0,-1,0,0,0 +11,23,48,228,333,6,8,34,3,0,0,1,0,0,0 +10,24,Auton Energy Eff Improvement,228,349,96,11,32,3,0,0,-1,0,0,0 +1,25,21,24,1,0,0,0,0,0,0,-1--1--1,,1|(301,376)| +1,26,23,22,68,0,0,22,0,0,0,-1--1--1,,1|(183,333)| +1,27,23,21,36,0,0,22,0,0,0,-1--1--1,,1|(277,333)| +1,28,18,17,1,0,0,0,0,0,0,-1--1--1,,1|(681,229)| +1,29,16,15,4,0,0,22,0,0,0,-1--1--1,,1|(692,184)| +1,30,5,4,0,0,0,0,0,0,0,-1--1--1,,1|(324,228)| +1,31,3,2,100,0,0,22,0,0,0,-1--1--1,,1|(353,187)| +1,32,3,8,4,0,0,22,0,0,0,-1--1--1,,1|(435,187)| +1,33,8,17,1,0,0,0,0,0,0,-1--1--1,,1|(581,227)| +1,34,16,8,36,0,0,22,0,0,0,-1--1--1,,1|(593,184)| +1,35,8,12,0,0,0,0,0,0,0,-1--1--1,,1|(509,150)| +1,36,7,12,0,0,0,0,0,0,0,-1--1--1,,1|(508,67)| +1,37,21,4,1,0,0,0,0,0,0,-1--1--1,,1|(362,267)| +1,38,20,24,0,0,0,0,0,0,0,-1--1--1,,1|(186,379)| +1,39,10,6,4,0,0,22,0,0,0,-1--1--1,,1|(509,312)| +1,40,10,8,68,0,0,22,0,0,0,-1--1--1,,1|(509,238)| +1,41,8,11,1,0,0,0,0,0,0,-1--1--1,,1|(546,230)| +1,42,21,10,1,0,0,0,0,0,0,-1--1--1,,1|(418,294)| +1,43,9,11,0,0,0,0,0,0,0,-1--1--1,,1|(635,294)| +1,44,13,11,0,0,0,0,0,0,0,-1--1--1,,1|(584,312)| +1,45,14,24,1,0,0,0,0,0,0,-1--1--1,,1|(262,382)| +1,46,21,8,0,0,0,0,0,0,1,-1--1--1,,1|(428,261)| +10,47,Capital,630,113,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,48,47,8,0,0,0,0,0,0,1,-1--1--1,,1|(575,146)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Intensity +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Initial Energy Requirement,787,560,90,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,LR Marginal Prod of Energy,575,78,88,11,0,3,0,0,-1,0,0,0 +10,3,Energy Intensity Adj Coeff,325,47,83,11,0,3,0,0,-1,0,0,0 +10,4,Ref Energy Value Share,875,293,84,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +12,5,48,563,465,8,8,0,3,0,0,-1,0,0,0 +11,6,48,564,409,8,6,33,3,0,0,4,0,0,0 +10,7,Energy Req Retrofit Rate,640,409,78,11,32,3,0,0,-1,0,0,0 +10,8,Adj Energy Intensity,378,100,64,11,0,3,0,0,-1,0,0,0 +10,9,Planned Energy Intensity,261,365,76,11,0,3,0,0,-1,0,0,0 +10,10,Energy Intensity Adjustment Time,103,313,104,11,0,3,0,0,-1,0,0,0 +10,11,LR Expected Energy Price,438,19,92,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Investment Rate,411,384,60,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,Capital Lifetime,780,373,59,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Ref Aggr Energy Production,855,99,97,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Total Normal Energy Expenditure,1063,-27,104,11,0,3,0,0,-1,0,0,0 +10,16,Normal Energy Expenditure,1053,340,86,11,0,3,0,0,-1,0,0,0 +10,17,Normal Aggr Energy Price,614,-151,83,11,0,3,0,0,-1,0,0,0 +10,18,Desired Energy Intensity,204,268,76,11,0,3,0,0,-1,0,0,0 +10,19,Total Adj Energy Intensity,215,118,81,11,0,3,0,0,-1,0,0,0 +10,20,Aggr Energy Intensity Effect,149,4,87,11,0,3,0,0,-1,0,0,0 +10,21,Desired Share,213,184,45,11,0,3,0,0,-1,0,0,0 +10,22,Energy Subst Coeff,764,47,70,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,23,Aggr Intensity Adj Coeff,153,-101,77,11,0,3,0,0,-1,0,0,0 +10,24,LR Expected Energy Price,1098,408,92,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,LR Marginal Prod of Eff Capital,593,-90,108,11,0,2,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,26,Reference Production,936,263,77,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,27,Aggr Energy Input,755,252,58,11,0,3,0,0,-1,0,0,0 +10,28,Total Aggr Energy Input,794,190,75,11,0,3,0,0,-1,0,0,0 +10,29,Normal Aggr Energy Requirement,943,5,105,11,0,3,0,0,-1,0,0,0 +10,30,Marginal Aggr Energy per Energy,665,144,104,11,0,3,0,0,-1,0,0,0 +10,31,Reference Production,823,64,77,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,32,Retrofit Rate,617,487,50,11,0,2,0,0,-1,0,0,0 +10,33,LR Marginal Productivity of Aggr Energy,480,-23,126,11,0,3,0,0,-1,0,0,0 +10,34,Energy Requirement,558,307,40,20,3,3,0,0,0,0,0,0 +12,35,48,347,306,8,8,0,3,0,0,-1,0,0,0 +11,36,48,433,306,6,8,34,3,0,0,1,0,0,0 +10,37,Energy Req Install Rate,433,322,73,11,32,3,0,0,0,0,0,0 +12,38,48,764,307,8,8,0,3,0,0,-1,0,0,0 +11,39,48,689,307,6,8,34,3,0,0,1,0,0,0 +10,40,Energy Req Discard Rate,689,323,79,11,32,3,0,0,0,0,0,0 +10,41,Capital,700,476,33,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,42,Energy Intensity of Capital,536,186,82,11,0,3,0,0,-1,0,0,0 +10,43,Capital,406,156,33,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,44,Marg Capital'Energy per Aggr Energy,720,-47,126,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,45,Energy Subst Coeff,971,201,70,11,0,2,0,2,-1,0,0,0,-1--1--1,0-0-0,|12||128-128-128 +10,46,Ref Energy Value Share,705,31,84,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,47,Total Energy Requirement,460,239,81,11,0,3,0,0,-1,0,0,0 +10,48,Total Energy Intensity,345,196,68,11,0,3,0,0,-1,0,0,0 +1,49,34,40,1,0,0,0,0,0,0,-1--1--1,,1|(619,339)| +1,50,39,34,100,0,0,22,0,0,0,-1--1--1,,1|(640,307)| +1,51,39,38,4,0,0,22,0,0,0,-1--1--1,,1|(725,307)| +1,52,36,35,100,0,0,22,0,0,0,-1--1--1,,1|(391,306)| +1,53,36,34,4,0,0,22,0,0,0,-1--1--1,,1|(478,306)| +1,54,13,40,0,0,0,0,0,0,0,-1--1--1,,1|(740,351)| +1,55,12,37,1,0,0,0,0,0,0,-1--1--1,,1|(426,358)| +1,56,25,33,1,0,0,0,0,0,0,-1--1--1,,1|(545,-69)| +1,57,33,2,1,0,0,0,0,0,0,-1--1--1,,1|(525,9)| +1,58,2,8,1,0,0,0,0,0,0,-1--1--1,,1|(446,86)| +1,59,11,8,1,0,0,0,0,0,0,-1--1--1,,1|(416,63)| +1,60,34,27,1,0,0,0,0,0,0,-1--1--1,,1|(661,287)| +1,61,26,27,0,0,0,0,0,0,0,-1--1--1,,1|(842,257)| +1,62,45,27,1,0,0,0,0,0,0,-1--1--1,,1|(876,236)| +1,63,27,28,1,0,0,0,0,0,0,-1--1--1,,1|(785,220)| +1,64,28,29,1,0,0,0,0,0,0,-1--1--1,,1|(926,131)| +1,65,14,29,1,0,0,0,0,0,0,-1--1--1,,1|(899,59)| +1,66,45,29,1,0,0,0,0,0,0,-1--1--1,,1|(987,96)| +1,67,28,30,1,0,0,0,0,0,0,-1--1--1,,1|(770,162)| +1,68,46,30,0,0,0,0,0,0,0,-1--1--1,,1|(687,80)| +1,69,14,30,0,0,0,0,0,0,0,-1--1--1,,1|(766,119)| +1,70,34,30,1,0,0,0,0,0,0,-1--1--1,,1|(637,229)| +1,71,22,30,0,0,0,0,0,0,0,-1--1--1,,1|(719,90)| +1,72,31,30,0,0,0,0,0,0,0,-1--1--1,,1|(750,100)| +1,73,43,42,0,0,0,0,0,0,0,-1--1--1,,1|(456,167)| +1,74,34,42,1,0,0,0,0,0,0,-1--1--1,,1|(570,258)| +1,75,30,2,1,0,0,0,0,0,0,-1--1--1,,1|(642,104)| +1,76,44,33,1,0,0,0,0,0,0,-1--1--1,,1|(583,-45)| +1,77,42,8,1,0,0,0,0,0,0,-1--1--1,,1|(466,136)| +1,78,34,47,1,0,0,0,0,0,0,-1--1--1,,1|(494,271)| +1,79,43,48,0,0,0,0,0,0,0,-1--1--1,,1|(381,172)| +1,80,47,48,1,0,0,0,0,0,0,-1--1--1,,1|(433,214)| +1,81,3,8,1,0,0,0,0,0,0,-1--1--1,,1|(360,70)| +1,82,4,27,0,0,0,0,0,0,0,-1--1--1,,1|(821,274)| +1,83,6,5,4,0,0,22,0,0,0,-1--1--1,,1|(564,436)| +1,84,6,34,68,0,0,22,0,0,0,-1--1--1,,1|(564,365)| +1,85,34,7,1,0,0,0,0,0,0,-1--1--1,,1|(619,368)| +1,86,10,9,1,0,0,0,0,0,0,-1--1--1,,1|(158,342)| +1,87,9,37,1,0,0,0,0,0,0,-1--1--1,,1|(370,359)| +1,88,9,6,1,0,0,0,0,0,0,-1--1--1,,1|(407,418)| +1,89,29,17,1,0,0,0,0,0,0,-1--1--1,,1|(860,-74)| +1,90,34,16,1,0,0,0,0,0,0,-1--1--1,,1|(746,401)| +1,91,16,15,1,0,0,0,0,0,0,-1--1--1,,1|(1104,158)| +1,92,15,17,1,0,0,0,0,0,0,-1--1--1,,1|(859,-151)| +1,93,18,9,1,0,0,0,0,0,0,-1--1--1,,1|(221,310)| +1,94,8,19,1,0,0,0,0,0,0,-1--1--1,,1|(286,99)| +1,95,48,18,1,0,0,0,0,0,0,-1--1--1,,1|(255,218)| +1,96,33,20,1,0,0,0,0,0,0,-1--1--1,,1|(307,-38)| +1,97,17,20,1,0,0,0,0,0,0,-1--1--1,,1|(317,-101)| +1,98,20,18,1,0,0,0,0,0,0,-1--1--1,,1|(130,129)| +1,99,19,21,1,0,0,0,0,0,0,-1--1--1,,1|(208,146)| +1,100,8,21,1,0,0,0,0,0,0,-1--1--1,,1|(297,131)| +1,101,21,18,1,0,0,0,0,0,0,-1--1--1,,1|(202,215)| +1,102,23,20,1,0,0,0,0,0,0,-1--1--1,,1|(144,-55)| +1,103,24,16,0,0,0,0,0,0,0,-1--1--1,,1|(1079,379)| +1,104,32,7,1,0,0,0,0,0,0,-1--1--1,,1|(636,448)| +1,105,41,7,1,0,0,0,0,0,0,-1--1--1,,1|(680,440)| +10,106,Energy Adj Coeff,325,74,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,107,106,3,0,0,0,0,0,0,1,-1--1--1,,1|(325,63)| +10,108,Energy Subst Elast,325,74,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,109,108,3,0,0,0,0,0,0,1,-1--1--1,,1|(325,63)| +10,110,Capital Energy Subst Elast,153,-74,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,111,110,23,0,0,0,0,0,0,1,-1--1--1,,1|(153,-85)| +10,112,Energy Adj Coeff,153,-74,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,113,112,23,0,0,0,0,0,0,1,-1--1--1,,1|(153,-85)| +10,114,Initial Energy Requirement,514,382,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,115,114,34,0,0,0,0,0,0,1,-1--1--1,,1|(531,350)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Utilization +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Normal Aggr Energy Requirement,304,131,62,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +12,2,0,150,333,7,7,2,7,0,0,1,0,0,0 + +10,3,Operating Capital,566,245,47,8,0,3,0,0,-1,0,0,0 +10,4,SR Aggr Energy Value Share,392,243,76,8,0,3,0,0,-1,0,0,0 +10,5,Normal Aggr Energy Requirement,147,244,62,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,LR Energy Share,391,346,53,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,SR Aggr Energy,250,180,51,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Capital,276,302,27,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,9,Reference Capital'Energy Aggr,747,274,86,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Reference Operating Capital,738,214,80,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,11,Normal Capital'Energy Aggr,391,332,73,8,0,3,0,0,-1,0,0,0 +10,12,Capital Energy Subst Coeff,276,302,80,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,LR Capital Share,276,302,53,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,LR Energy Share,276,302,53,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Normal Aggr Energy Requirement,276,302,62,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,16,Ref Aggr Energy Production,276,302,82,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,17,SR Elast Coeff,483,117,41,8,0,3,0,0,-1,0,0,0 +10,18,Reference Capital,276,302,53,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,19,Reference Capital'Energy Aggr,276,302,86,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Capital,-11,354,27,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,21,Capital Energy Subst Coeff,-5,391,80,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,22,LR Capital Share,-30,316,53,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,23,Ref Aggr Energy Production,-46,283,82,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Reference Capital,2,258,53,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Reference Capital'Energy Aggr,16,224,86,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,26,SR Elasticity,478,63,35,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,27,Utilization,564,182,28,8,0,3,0,0,-1,0,0,0 +10,28,Operating Coeff,392,183,43,8,0,3,0,0,-1,0,0,0 +10,29,Marg Capital'Energy per Aggr Energy,276,288,99,8,0,3,0,0,-1,0,0,0 +1,30,17,28,0,0,0,0,0,0,0,-1--1--1,,1|(443,145)| +1,31,9,3,0,0,0,0,0,0,0,-1--1--1,,1|(662,260)| +1,32,10,3,0,0,0,0,0,0,0,-1--1--1,,1|(658,228)| +1,33,4,28,0,0,0,0,0,0,0,-1--1--1,,1|(392,220)| +1,34,29,4,0,0,0,0,0,0,0,-1--1--1,,1|(326,268)| +1,35,11,4,0,0,0,0,0,0,0,-1--1--1,,1|(391,294)| +1,36,28,27,0,0,0,0,0,0,0,-1--1--1,,1|(478,182)| +1,37,27,3,0,0,0,0,0,0,0,-1--1--1,,1|(564,206)| +1,38,17,27,0,0,0,0,0,0,0,-1--1--1,,1|(517,145)| +1,39,11,3,0,0,0,0,0,0,0,-1--1--1,,1|(471,291)| +1,40,21,2,0,0,0,0,0,0,0,-1--1--1,,1|(72,361)| +1,41,20,2,0,0,0,0,0,0,0,-1--1--1,,1|(72,342)| +1,42,22,2,0,0,0,0,0,0,0,-1--1--1,,1|(76,325)| +1,43,23,2,0,0,0,0,0,0,0,-1--1--1,,1|(57,309)| +1,44,24,2,0,0,0,0,0,0,0,-1--1--1,,1|(73,294)| +1,45,25,2,0,0,0,0,0,0,0,-1--1--1,,1|(79,275)| +1,46,5,2,0,0,0,0,0,0,0,-1--1--1,,1|(147,282)| +1,47,5,4,0,0,0,0,0,0,0,-1--1--1,,1|(255,243)| +1,48,1,28,0,0,0,0,0,0,0,-1--1--1,,1|(341,153)| +1,49,7,28,0,0,0,0,0,0,0,-1--1--1,,1|(318,181)| +1,50,2,11,0,0,0,0,0,0,0,-1--1--1,,1|(230,332)| +1,51,6,11,0,1,0,0,0,0,0,-1--1--1,,1|(391,332)| +1,52,8,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,53,12,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,54,13,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,55,14,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,56,15,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,57,16,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,58,18,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,59,19,29,0,1,0,0,0,0,0,-1--1--1,,1|(276,288)| +1,60,2,29,0,0,0,0,0,0,0,-1--1--1,,1|(197,315)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Input +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Energy Requirement,421,156,72,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Energy Delivery,701,204,59,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,3,SR Energy Value Share,329,175,83,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,4,Marg Prod Oper Capital,12,366,86,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,SR Marg Prod Aggr Energy,259,355,87,11,0,3,0,0,-1,0,0,0 +10,6,SR Energy Subst Coeff,340,45,82,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,SR Energy Value Share,190,68,83,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,SR Marg Prod Energy,505,291,70,11,0,3,0,0,-1,0,0,0 +10,9,Normal Aggr Energy Requirement,368,262,114,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Energy Requirement,493,68,72,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,11,Reference Capital'Energy Aggr,107,427,105,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Indicated Energy Order Rate,701,295,90,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,13,SR Aggr Energy Value Share,-3,338,100,11,0,2,0,2,-1,0,0,0,-1--1--1,0-0-0,|12||128-128-128 +10,14,Normal Capital'Energy Aggr,185,461,97,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Normal Aggr Energy Requirement,16,302,114,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,16,SR Energy Subst Coeff,313,230,82,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,17,Operating Coeff,334,414,60,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,18,Energy Order Adj Coeff,642,382,76,11,0,3,0,0,-1,0,0,0 +10,19,Reference Operating Capital,41,396,97,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,SR Elast Coeff,276,440,47,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,21,SR Expected Energy Price,791,381,92,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,22,SR Aggr Energy Input,331,99,69,11,0,3,0,0,-1,0,0,0 +10,23,SR Total Aggr Energy Input,162,199,87,11,0,3,0,0,-1,0,0,0 +10,24,SR Aggr Energy,150,273,52,11,0,3,0,0,-1,0,0,0 +10,25,SR Marg Aggr Energy per Energy,505,204,105,11,0,3,0,0,-1,0,0,0 +10,26,SR Energy Subst Elast,-46,198,70,11,0,3,0,0,-1,0,0,0 +10,27,SR Energy Subst Coeff,-37,244,73,11,0,3,0,0,-1,0,0,0 +1,28,22,23,1,0,0,0,0,0,0,-1--1--1,,1|(232,133)| +1,29,23,24,1,0,0,0,0,0,0,-1--1--1,,1|(147,229)| +1,30,23,25,0,0,0,0,0,0,0,-1--1--1,,1|(317,200)| +1,31,17,5,0,0,0,0,0,0,0,-1--1--1,,1|(302,388)| +1,32,20,5,0,0,0,0,0,0,0,-1--1--1,,1|(268,404)| +1,33,13,5,0,0,0,0,0,0,0,-1--1--1,,1|(127,346)| +1,34,4,5,0,0,0,0,0,0,0,-1--1--1,,1|(128,360)| +1,35,11,5,0,0,0,0,0,0,0,-1--1--1,,1|(176,394)| +1,36,19,5,0,0,0,0,0,0,0,-1--1--1,,1|(142,376)| +1,37,14,5,0,0,0,0,0,0,0,-1--1--1,,1|(217,413)| +1,38,2,22,1,0,0,0,0,0,0,-1--1--1,,1|(536,126)| +1,39,27,24,1,0,0,0,0,0,0,-1--1--1,,1|(58,258)| +1,40,3,25,0,0,0,0,0,0,0,-1--1--1,,1|(409,188)| +1,41,9,25,0,0,0,0,0,0,0,-1--1--1,,1|(429,235)| +1,42,1,25,0,0,0,0,0,0,0,-1--1--1,,1|(456,176)| +1,43,2,25,1,0,0,0,0,0,0,-1--1--1,,1|(593,182)| +1,44,24,5,1,0,0,0,0,0,0,-1--1--1,,1|(180,312)| +1,45,25,8,1,0,0,0,0,0,0,-1--1--1,,1|(493,238)| +1,46,5,8,1,0,0,0,0,0,0,-1--1--1,,1|(401,336)| +1,47,8,12,1,0,0,0,0,0,0,-1--1--1,,1|(578,318)| +1,48,2,12,1,0,0,0,0,0,0,-1--1--1,,1|(710,239)| +1,49,16,25,0,0,0,0,0,0,0,-1--1--1,,1|(401,217)| +1,50,18,12,0,0,0,0,0,0,0,-1--1--1,,1|(667,344)| +1,51,21,12,0,0,0,0,0,0,0,-1--1--1,,1|(751,342)| +1,52,15,24,0,0,0,0,0,0,0,-1--1--1,,1|(75,288)| +1,53,15,5,0,0,0,0,0,0,0,-1--1--1,,1|(130,327)| +1,54,6,22,0,0,0,0,0,0,0,-1--1--1,,1|(336,65)| +1,55,10,22,0,0,0,0,0,0,0,-1--1--1,,1|(418,82)| +1,56,7,22,0,0,0,0,0,0,0,-1--1--1,,1|(253,81)| +10,57,SR Elasticity,282,500,49,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,58,57,20,0,0,0,0,0,0,1,-1--1--1,,1|(279,476)| +1,59,26,27,0,0,0,0,0,0,1,-1--1--1,,1|(-42,214)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Technology +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Energy Technology,613,215,60,11,0,3,0,0,0,0,0,0 +10,2,Hist Energy Growth Rate,592,430,78,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,3,Autonomous Technology,337,128,40,20,3,3,0,0,0,0,0,0 +12,4,48,145,128,8,8,0,3,0,0,-1,0,0,0 +10,5,Energy Production,124,395,67,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,Energy Capital Completion Rate,332,345,109,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Init Cum Energy Investment,455,331,86,11,0,3,0,0,-1,0,0,0 +10,8,Energy Capital Completion Rate,405,404,109,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +12,9,48,71,330,8,8,0,3,0,0,-1,0,0,0 +10,10,Technology Data,562,144,54,11,0,3,0,0,-1,0,0,0 +10,11,Initial Production Growth,405,404,87,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Tech Data Switch,663,145,56,11,0,3,0,0,-1,0,0,0 +10,13,Energy Learning Coeff,213,268,70,11,0,3,0,0,-1,0,0,0 +10,14,Energy Learning Rate,75,268,67,11,0,3,0,0,-1,0,0,0 +11,15,7900,220,129,6,8,34,3,0,0,1,0,0,0 +10,16,Auton Energy Tech Chg Rt,220,145,84,11,32,3,0,0,0,0,0,0 +10,17,Energy Scale Economy,588,271,72,11,0,3,0,0,-1,0,0,0 +10,18,Endogenous Tech Fraction,234,194,83,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,19,Energy Capital Lifetime,589,458,82,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Low Lim Energy Tech,243,233,70,11,0,3,0,0,-1,0,0,0 +10,21,Energy Capital,602,320,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,22,Auton Energy Tech Growth Rate,23,145,102,11,0,3,0,0,-1,0,0,0 +11,23,7884,177,328,6,8,34,3,0,0,1,0,0,0 +10,24,Energy Capital Completion Rate,177,344,109,11,32,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Reference Energy Capital,721,319,88,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,26,Energy Scale Coeff,736,270,61,11,0,3,0,0,-1,0,0,0 +10,27,Energy Scale Effect,888,270,61,11,0,3,0,0,-1,0,0,0 +10,28,Cumulative Energy Investment,315,330,40,20,3,3,0,0,0,0,0,0 +10,29,Induced Energy Technology,425,268,87,11,0,3,0,0,-1,0,0,0 +10,30,Indicated Energy Technology,442,215,90,11,0,3,0,0,0,0,0,0 +1,31,28,29,0,0,0,0,0,0,0,-1--1--1,,1|(371,297)| +1,32,15,3,4,0,0,22,0,0,0,-1--1--1,,1|(261,129)| +1,33,15,4,100,0,0,22,0,0,0,-1--1--1,,1|(183,129)| +1,34,22,16,0,0,0,0,0,0,0,-1--1--1,,1|(123,145)| +1,35,3,16,1,0,0,0,0,0,0,-1--1--1,,1|(274,170)| +1,36,23,28,4,0,0,22,0,0,0,-1--1--1,,1|(229,328)| +1,37,23,9,100,0,0,22,0,0,0,-1--1--1,,1|(125,328)| +1,38,13,29,0,0,0,0,0,0,0,-1--1--1,,1|(303,268)| +1,39,7,29,0,0,0,0,0,0,0,-1--1--1,,1|(443,305)| +1,40,12,1,0,0,0,0,0,0,0,-1--1--1,,1|(642,174)| +1,41,10,1,0,0,0,0,0,0,0,-1--1--1,,1|(582,173)| +1,42,21,17,0,0,0,0,0,0,0,-1--1--1,,1|(596,302)| +1,43,25,17,0,0,0,0,0,0,0,-1--1--1,,1|(661,297)| +1,44,26,17,0,0,0,0,0,0,0,-1--1--1,,1|(674,270)| +1,45,3,30,0,0,0,0,0,0,0,-1--1--1,,1|(389,171)| +1,46,18,30,0,0,0,0,0,0,0,-1--1--1,,1|(327,202)| +1,47,29,30,0,0,0,0,0,0,0,-1--1--1,,1|(430,248)| +1,48,20,30,0,0,0,0,0,0,0,-1--1--1,,1|(325,225)| +1,49,30,1,0,0,0,0,0,0,0,-1--1--1,,1|(535,215)| +1,50,17,30,0,0,0,0,0,0,0,-1--1--1,,1|(521,245)| +10,51,Energy Capital,594,398,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,52,51,7,0,0,0,0,0,0,1,-1--1--1,,1|(530,367)| +1,53,19,7,0,0,0,0,0,0,1,-1--1--1,,1|(527,399)| +1,54,2,7,0,0,0,0,0,0,1,-1--1--1,,1|(529,384)| +1,55,14,13,0,0,0,0,0,0,1,-1--1--1,,1|(135,268)| +1,56,27,26,0,0,0,0,0,0,1,-1--1--1,,1|(819,270)| +1,57,7,28,0,0,0,0,0,0,1,-1--1--1,,1|(368,330)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Depletion +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Fraction Consumed,323,339,62,11,0,3,0,0,-1,0,0,0 +10,2,Energy Capacity Utilization,470,483,93,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,3,Init Resource Remaining,773,397,75,11,0,3,0,0,-1,0,0,0 +10,4,Marginal Resource Effect,129,193,88,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,Resource Effect,594,268,50,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,6,Energy Capital,280,171,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Energy Production,308,413,67,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Resource Share,719,293,50,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,9,Saturation Coeff,786,231,61,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Normal Production,449,287,60,11,0,3,0,0,-1,0,0,0 +10,11,Energy Capital,714,244,56,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Initial Production,842,267,62,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,Energy Technology,544,110,69,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Reference Energy Capital,356,109,88,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Initial Production,284,284,62,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,16,Normal Effective Capital Intensity,455,75,104,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,17,Energy Technology,670,270,69,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,18,Min Depletion Time,842,294,62,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,19,Reference Resource,831,321,63,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,20,Resource Ratio,614,326,49,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,21,Marginal Resource Effect,640,199,79,11,0,3,0,0,-1,0,0,0 +10,22,Resource Remaining,613,398,40,20,3,3,0,0,0,0,0,0 +10,23,Capital Share,382,40,52,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Relative Variable Intensity,456,17,90,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Cumulative Production,322,400,40,20,3,3,0,0,0,0,0,0 +10,26,Saturation Elasticity,833,350,61,11,0,3,0,0,-1,0,0,0 +11,27,6652,469,403,6,8,34,3,0,0,1,0,0,0 +10,28,Energy Production,469,419,58,11,32,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,29,Initial Resource,183,339,49,11,0,3,0,0,-1,0,0,0 +10,30,Init Cum Prod,190,402,45,11,0,3,0,0,-1,0,0,0 +10,31,Normal Effective Energy Capital Ratio,456,174,118,11,0,3,0,0,-1,0,0,0 +1,32,15,10,0,0,0,0,0,0,0,-1--1--1,,1|(360,285)| +1,33,27,25,4,0,0,22,0,0,0,-1--1--1,,1|(412,403)| +1,34,27,22,100,0,0,22,0,0,0,-1--1--1,,1|(524,403)| +1,35,31,10,1,0,0,0,0,0,0,-1--1--1,,1|(447,222)| +1,36,5,10,1,0,0,0,0,0,0,-1--1--1,,1|(512,254)| +1,37,6,31,0,0,0,0,0,0,0,-1--1--1,,1|(330,171)| +1,38,13,31,0,0,0,0,0,0,0,-1--1--1,,1|(505,137)| +1,39,14,31,0,0,0,0,0,0,0,-1--1--1,,1|(399,137)| +1,40,16,31,0,0,0,0,0,0,0,-1--1--1,,1|(455,117)| +1,41,25,1,0,0,0,0,0,0,0,-1--1--1,,1|(322,372)| +1,42,29,1,0,0,0,0,0,0,0,-1--1--1,,1|(239,339)| +1,43,10,27,1,0,0,0,0,0,0,-1--1--1,,1|(445,344)| +1,44,2,28,0,0,0,0,0,0,0,-1--1--1,,1|(469,457)| +1,45,31,5,1,0,0,0,0,0,0,-1--1--1,,1|(527,211)| +1,46,8,5,1,0,0,0,0,0,0,-1--1--1,,1|(670,274)| +1,47,9,5,1,0,0,0,0,0,0,-1--1--1,,1|(689,236)| +1,48,20,5,1,0,0,0,0,0,0,-1--1--1,,1|(612,302)| +1,49,3,20,0,0,0,0,0,0,0,-1--1--1,,1|(699,364)| +1,50,22,20,1,0,0,0,0,0,0,-1--1--1,,1|(619,360)| +1,51,31,21,1,0,0,0,0,0,0,-1--1--1,,1|(587,180)| +1,52,8,21,1,0,0,0,0,0,0,-1--1--1,,1|(692,243)| +1,53,9,21,1,0,0,0,0,0,0,-1--1--1,,1|(741,207)| +1,54,5,21,1,0,0,0,0,0,0,-1--1--1,,1|(609,237)| +1,55,23,16,0,0,0,0,0,0,0,-1--1--1,,1|(411,54)| +1,56,24,16,0,0,0,0,0,0,0,-1--1--1,,1|(455,39)| +1,57,20,21,1,0,0,0,0,0,0,-1--1--1,,1|(645,275)| +1,58,30,3,1,0,0,0,0,0,1,-1--1--1,,1|(454,458)| +1,59,29,3,1,0,0,0,0,0,1,-1--1--1,,1|(453,325)| +1,60,3,8,0,0,0,0,0,0,1,-1--1--1,,1|(749,351)| +1,61,12,8,0,0,0,0,0,0,1,-1--1--1,,1|(786,278)| +1,62,18,8,0,0,0,0,0,0,1,-1--1--1,,1|(781,294)| +1,63,19,8,0,0,0,0,0,0,1,-1--1--1,,1|(781,308)| +1,64,9,8,0,0,0,0,0,0,1,-1--1--1,,1|(757,257)| +1,65,3,22,0,0,0,0,0,0,1,-1--1--1,,1|(682,397)| +1,66,30,25,0,0,0,0,0,0,1,-1--1--1,,1|(251,401)| +10,67,Hist Energy Growth Rate,249,489,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,68,67,30,0,0,0,0,0,0,1,-1--1--1,,1|(220,446)| +10,69,Initial Production,148,485,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,70,69,30,0,0,0,0,0,0,1,-1--1--1,,1|(167,445)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Capital +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Energy Capital,556,259,40,20,3,3,0,0,0,0,0,0 +10,2,Energy Capital under Constr,293,258,40,20,3,3,0,0,0,0,0,0 +11,3,8124,427,254,6,8,34,3,0,0,1,0,0,0 +10,4,Energy Capital Completion Rate,427,282,40,20,104,3,0,0,0,0,0,0 +12,5,48,738,260,8,8,0,3,0,0,-1,0,0,0 +11,6,48,688,261,6,8,34,3,0,0,1,0,0,0 +10,7,Energy Capital Discard Rate,688,277,88,11,32,3,0,0,0,0,0,0 +12,8,48,122,262,8,8,0,3,0,0,-1,0,0,0 +11,9,48,176,262,6,8,34,3,0,0,1,0,0,0 +10,10,Energy Capital Order Rate,176,278,83,11,32,3,0,0,0,0,0,0 +10,11,Energy Construction Delay,327,182,83,11,0,3,0,0,-1,0,0,0 +10,12,Energy Capital Lifetime,843,246,73,11,0,3,0,0,-1,0,0,0 +10,13,Desired Energy Capital Order Rate,155,376,109,11,0,3,0,0,-1,0,0,0 +10,14,Energy Supply Line Correction,128,195,96,11,0,3,0,0,-1,0,0,0 +10,15,Desired Energy Capital under Constr,451,159,114,11,0,3,0,0,-1,0,0,0 +10,16,Energy Capital Correction,269,447,81,11,0,3,0,0,-1,0,0,0 +10,17,Desired Energy Capital,473,475,72,11,0,3,0,0,-1,0,0,0 +10,18,Supply Line Correction Time,207,123,90,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,19,Capital Corr Time,361,515,57,11,0,3,0,0,-1,0,0,0 +10,20,Energy Capital Cost,774,325,63,11,0,3,0,0,-1,0,0,0 +10,21,Indicated Energy Capital Completion Rate,403,214,130,11,0,3,0,0,-1,0,0,0 +10,22,Energy Order Rate,750,582,69,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,23,Reference Energy Capital,539,264,88,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Normal Production,775,540,69,11,0,2,0,0,-1,0,0,0 +10,25,Energy Order Rate,441,76,69,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,26,LR Marg Prod Effect,1065,402,76,11,0,2,0,0,-1,0,0,0 +10,27,Marg Prod Energy Capital,901,413,82,11,0,3,0,0,-1,0,0,0 +10,28,Perc Relative Return,741,395,64,11,0,3,0,0,-1,0,0,0 +10,29,Effect of Return on Energy Capital,669,449,106,11,0,3,0,0,-1,0,0,0 +10,30,Exog Energy Price Switch,826,502,90,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,31,Production Pressure,577,538,63,11,0,3,0,0,-1,0,0,0 +10,32,Capital Share,982,370,52,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,33,Effective Primary Energy Price,1062,438,103,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,34,Return Coeff,846,470,50,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,35,Initial Production Growth,519,43,87,11,0,2,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,36,Return Perc Time,875,337,55,11,0,3,0,0,-1,0,0,0 +10,37,LR Order Trend Time,611,76,69,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,38,Interest Rate,892,283,50,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,39,Fraction of Invest Goods Avail,343,332,104,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,40,Depletion Rent,998,468,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,41,LR Expected Order Growth Rate,520,119,104,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +1,42,19,16,1,0,0,0,0,0,0,-1--1--1,,1|(306,484)| +1,43,18,14,0,0,0,0,0,0,0,-1--1--1,,1|(174,154)| +1,44,7,13,1,0,0,0,0,0,0,-1--1--1,,1|(426,399)| +1,45,16,13,1,0,0,0,0,0,0,-1--1--1,,1|(196,410)| +1,46,17,16,1,0,0,0,0,0,0,-1--1--1,,1|(358,470)| +1,47,14,13,1,0,0,0,0,0,0,-1--1--1,,1|(85,280)| +1,48,15,14,1,0,0,0,0,0,0,-1--1--1,,1|(255,165)| +1,49,2,14,1,0,0,0,0,0,0,-1--1--1,,1|(243,215)| +1,50,11,15,1,0,0,0,0,0,0,-1--1--1,,1|(421,178)| +1,51,13,10,1,0,0,0,0,0,0,-1--1--1,,1|(145,335)| +1,52,12,7,1,0,0,0,0,0,0,-1--1--1,,1|(787,268)| +1,53,9,8,100,0,0,22,0,0,0,-1--1--1,,1|(150,262)| +1,54,9,2,4,0,0,22,0,0,0,-1--1--1,,1|(218,262)| +1,55,6,5,4,0,0,22,0,0,0,-1--1--1,,1|(712,261)| +1,56,3,2,100,0,0,22,0,0,0,-1--1--1,,1|(377,254)| +1,57,3,1,4,0,0,22,0,0,0,-1--1--1,,1|(474,254)| +1,58,1,7,1,0,0,0,0,0,0,-1--1--1,,1|(598,293)| +1,59,6,1,36,0,0,22,0,0,0,-1--1--1,,1|(639,261)| +1,60,1,16,1,0,0,0,0,0,0,-1--1--1,,1|(453,402)| +1,61,1,17,1,0,0,0,0,0,0,-1--1--1,,1|(543,378)| +1,62,28,29,1,0,0,0,0,0,0,-1--1--1,,1|(726,412)| +1,63,34,29,1,0,0,0,0,0,0,-1--1--1,,1|(764,468)| +1,64,31,17,1,0,0,0,0,0,0,-1--1--1,,1|(526,514)| +1,65,24,31,1,0,0,0,0,0,0,-1--1--1,,1|(690,552)| +1,66,36,28,0,0,0,0,0,0,0,-1--1--1,,1|(814,363)| +1,67,41,15,0,0,0,0,0,0,0,-1--1--1,,1|(491,135)| +1,68,1,15,1,0,0,0,0,0,0,-1--1--1,,1|(517,195)| +1,69,29,17,1,0,0,0,0,0,0,-1--1--1,,1|(597,470)| +1,70,12,20,1,0,0,0,0,0,0,-1--1--1,,1|(803,277)| +1,71,38,20,1,0,0,0,0,0,0,-1--1--1,,1|(833,293)| +1,72,20,28,1,0,0,0,0,0,0,-1--1--1,,1|(760,362)| +1,73,6,15,1,0,0,0,0,0,0,-1--1--1,,1|(618,187)| +1,74,22,31,1,0,0,0,0,0,0,-1--1--1,,1|(644,572)| +1,75,35,41,0,0,0,0,0,0,0,-1--1--1,,1|(519,74)| +1,76,37,41,0,0,0,0,0,0,0,-1--1--1,,1|(571,95)| +1,77,25,41,0,0,0,0,0,0,0,-1--1--1,,1|(473,95)| +1,78,26,27,0,0,0,0,0,0,0,-1--1--1,,1|(993,407)| +1,79,27,28,0,0,0,0,0,0,0,-1--1--1,,1|(818,403)| +1,80,33,27,0,0,0,0,0,0,0,-1--1--1,,1|(988,426)| +1,81,2,21,1,0,0,0,0,0,0,-1--1--1,,1|(348,231)| +1,82,11,21,0,0,0,0,0,0,0,-1--1--1,,1|(359,195)| +1,83,21,3,0,0,0,0,0,0,0,-1--1--1,,1|(412,230)| +1,84,39,4,1,0,0,0,0,0,0,-1--1--1,,1|(392,312)| +1,85,30,29,1,0,0,0,0,0,0,-1--1--1,,1|(733,483)| +1,86,40,27,0,0,0,0,0,0,0,-1--1--1,,1|(955,443)| +1,87,32,27,0,0,0,0,0,0,0,-1--1--1,,1|(947,388)| +10,88,Reference Energy Capital,706,165,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,89,88,1,0,0,0,0,0,0,1,-1--1--1,,1|(636,208)| +1,90,15,2,1,0,0,0,0,0,1,-1--1--1,,1|(335,196)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Production +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Fraction of Energy Goods Avail,404,194,86,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Resource Share,79,180,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,3,Capital Share,70,87,41,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,4,Energy Production,578,245,47,8,0,3,0,0,-1,0,0,0 +10,5,Saturation Coeff,74,223,49,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,Resource Ratio,54,291,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Capital Share,84,421,34,8,0,3,0,0,-1,0,0,0 +10,8,Energy Capacity Utilization,402,243,70,8,0,3,0,0,-1,0,0,0 +10,9,Desired Eff Energy Capital Ratio,226,332,82,8,0,3,0,0,-1,0,0,0 +10,10,Energy Delivery,721,248,42,8,0,3,0,0,-1,0,0,0 +10,11,Energy Order Rate,41,243,54,8,0,2,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,12,Energy Delivery Delay,781,185,65,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,Desired Variable Input,230,422,57,8,0,3,0,0,-1,0,0,0 +10,14,Initial Production,657,185,51,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Normal Variable Cost,230,501,54,8,0,3,0,0,-1,0,0,0 +10,16,Initial Production,56,340,51,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,17,Relative Variable Intensity,55,526,73,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,18,Energy Technology,404,409,56,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,19,Relative Variable Intensity,37,109,73,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Initial Production,80,201,51,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,21,Reference Variable Cost,415,437,67,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,22,Resource Ratio,75,161,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,23,Resource Share,57,315,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Saturation Coeff,58,362,49,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Energy Capital,413,152,45,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,26,Energy Technology,423,130,56,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,27,Reference Energy Capital,430,172,70,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,28,Max Production,228,192,41,8,0,3,0,0,-1,0,0,0 +10,29,Max Input Ratio,227,55,43,8,0,3,0,0,-1,0,0,0 +10,30,Normal Production,488,309,55,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,31,Total Energy Production,675,308,62,8,0,3,0,0,-1,0,0,0 +10,32,Scheduled Production,227,243,54,8,0,3,0,0,-1,0,0,0 +10,33,Reference Variable Cost,415,526,67,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,34,Energy Capital,400,467,45,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,35,Reference Energy Capital,52,464,70,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,36,Max Effective Capital Intensity,226,100,79,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,37,Max Effective Energy Capital Ratio,230,151,88,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +1,38,11,32,0,0,0,0,0,0,0,-1--1--1,,1|(127,243)| +1,39,28,32,0,0,0,0,0,0,0,-1--1--1,,1|(227,210)| +1,40,4,31,0,0,0,0,0,0,0,-1--1--1,,1|(620,272)| +1,41,12,10,0,0,0,0,0,0,0,-1--1--1,,1|(755,211)| +1,42,4,10,0,0,0,0,0,0,0,-1--1--1,,1|(644,245)| +1,43,14,10,0,0,0,0,0,0,0,-1--1--1,,1|(683,211)| +1,44,34,15,0,0,0,0,0,0,0,-1--1--1,,1|(321,482)| +1,45,35,15,0,0,0,0,0,0,0,-1--1--1,,1|(133,481)| +1,46,33,15,0,0,0,0,0,0,0,-1--1--1,,1|(326,513)| +1,47,17,15,0,0,0,0,0,0,0,-1--1--1,,1|(136,514)| +1,48,30,8,0,0,0,0,0,0,0,-1--1--1,,1|(450,280)| +1,49,30,4,0,0,0,0,0,0,0,-1--1--1,,1|(526,281)| +1,50,32,8,0,0,0,0,0,0,0,-1--1--1,,1|(299,243)| +1,51,1,8,0,0,0,0,0,0,0,-1--1--1,,1|(403,211)| +1,52,8,4,0,0,0,0,0,0,0,-1--1--1,,1|(494,243)| +1,53,29,36,0,0,0,0,0,0,0,-1--1--1,,1|(226,70)| +1,54,36,37,0,0,0,0,0,0,0,-1--1--1,,1|(226,118)| +1,55,37,28,0,0,0,0,0,0,0,-1--1--1,,1|(229,164)| +1,56,22,28,0,0,0,0,0,0,0,-1--1--1,,1|(144,175)| +1,57,25,37,0,0,0,0,0,0,0,-1--1--1,,1|(349,151)| +1,58,26,37,0,0,0,0,0,0,0,-1--1--1,,1|(342,138)| +1,59,27,37,0,0,0,0,0,0,0,-1--1--1,,1|(339,162)| +1,60,3,36,0,0,0,0,0,0,0,-1--1--1,,1|(122,90)| +1,61,32,9,0,0,0,0,0,0,0,-1--1--1,,1|(226,280)| +1,62,9,13,0,0,0,0,0,0,0,-1--1--1,,1|(227,370)| +1,63,16,9,0,0,0,0,0,0,0,-1--1--1,,1|(118,337)| +1,64,23,9,0,0,0,0,0,0,0,-1--1--1,,1|(117,320)| +1,65,24,9,0,0,0,0,0,0,0,-1--1--1,,1|(134,348)| +1,66,7,13,0,0,0,0,0,0,0,-1--1--1,,1|(138,421)| +1,67,35,13,0,0,0,0,0,0,0,-1--1--1,,1|(133,444)| +1,68,34,13,0,0,0,0,0,0,0,-1--1--1,,1|(321,446)| +1,69,18,13,0,0,0,0,0,0,0,-1--1--1,,1|(324,414)| +1,70,19,36,0,0,0,0,0,0,0,-1--1--1,,1|(121,105)| +1,71,20,28,0,0,0,0,0,0,0,-1--1--1,,1|(152,196)| +1,72,2,28,0,0,0,0,0,0,0,-1--1--1,,1|(149,184)| +1,73,5,28,0,0,0,0,0,0,0,-1--1--1,,1|(143,208)| +1,74,6,9,0,0,0,0,0,0,0,-1--1--1,,1|(132,309)| +1,75,21,13,0,0,0,0,0,0,0,-1--1--1,,1|(324,429)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Pricing +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Effective Primary Energy Price,190,405,94,11,0,3,0,0,0,0,0,0 +10,2,Capital Cost Basis Switch,528,124,81,11,0,3,0,0,-1,0,0,0 +10,3,SR Average Variable Cost,725,208,83,11,0,3,0,0,-1,0,0,0 +10,4,Initial Producer Price,478,481,66,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,5,Weight to Marg Cost,356,278,67,11,0,3,0,0,-1,0,0,0 +10,6,SR Average Cost,601,240,56,11,0,3,0,0,-1,0,0,0 +10,7,Weight to Average Cost,493,215,76,11,0,3,0,0,-1,0,0,0 +10,8,Capital Cost,607,192,40,11,0,3,0,0,-1,0,0,0 +10,9,Energy Capital,605,107,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Price Adjustment Time,649,477,71,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,11,Normal Production,482,148,69,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Indicated Producer Price,539,332,78,11,0,3,0,0,-1,0,0,0 +10,13,Energy Production,863,169,67,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Desired Variable Input,904,206,80,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Energy Production,758,142,67,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +12,16,48,656,403,8,8,0,3,0,0,-1,0,0,0 +11,17,48,582,403,6,8,34,3,0,0,1,0,0,0 +10,18,Producer Price Chg Rt,582,419,71,11,32,3,0,0,-1,0,0,0 +10,19,Supply Demand Effect,738,295,70,11,0,3,0,0,-1,0,0,0 +10,20,Supply Demand Coeff,894,257,70,11,0,3,0,0,-1,0,0,0 +10,21,Production Pressure,890,313,63,11,0,3,0,0,-1,0,0,0 +10,22,Exog Energy Price Switch,154,357,81,11,0,3,0,0,-1,0,0,0 +10,23,Normal Production,973,349,69,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Energy Order Rate,956,278,69,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Total Energy Expenditure,673,591,79,11,0,3,0,0,-1,0,0,0 +10,26,Final Data Time,25,320,50,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,27,Source Expenditure,822,592,62,11,0,3,0,0,-1,0,0,0 +10,28,Final Energy Price,820,638,66,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,29,Avg Energy Price,674,642,55,11,0,3,0,0,-1,0,0,0 +10,30,Energy Production,819,547,67,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,31,Total Energy Production,477,643,85,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,32,Marginal Resource Effect,730,246,88,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,33,Depletion Rent,347,459,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,34,Transition Time,67,293,49,11,0,3,0,0,-1,0,0,0 +10,35,Primary Energy Price,347,405,66,11,0,3,0,0,-1,0,0,0 +10,36,Energy Capital Cost,677,125,72,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,37,Initial Production,355,72,62,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,38,Adjusted Average Cost,591,285,74,11,0,3,0,0,-1,0,0,0 +10,39,Final Energy Price,20,406,57,11,0,3,0,0,-1,0,0,0 +10,40,Price Data,268,356,43,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,41,Price Switch,153,313,49,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,42,Total Tax,158,455,40,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,43,Resource Ratio,284,50,58,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,44,Resource Share,173,84,59,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,45,Energy Producer Price,481,404,40,20,3,3,0,0,0,0,0,0 +10,46,Init Unit Distribution Cost,19,457,79,11,0,3,0,0,-1,0,0,0 +10,47,Saturation Coeff,146,103,61,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,48,Scheduled Production,217,66,78,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,49,Capital Share,105,196,52,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,50,Desired Eff Energy Capital Ratio,67,175,110,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,51,Energy Capital,111,157,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,52,Energy Technology,153,258,69,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,53,Reference Energy Capital,95,219,88,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,54,Reference Variable Cost,118,239,86,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,55,SR Marginal Cost,407,233,57,11,0,3,0,0,-1,0,0,0 +10,56,Marginal Eff Energy Capital Ratio,319,130,104,11,0,3,0,0,-1,0,0,0 +10,57,Marginal Variable Input,281,205,74,11,0,3,0,0,-1,0,0,0 +1,58,30,27,0,0,0,0,0,0,0,-1--1--1,,1|(819,562)| +1,59,27,25,0,0,0,0,0,0,0,-1--1--1,,1|(762,592)| +1,60,25,29,0,0,0,0,0,0,0,-1--1--1,,1|(673,609)| +1,61,28,27,0,0,0,0,0,0,0,-1--1--1,,1|(820,621)| +1,62,11,8,0,0,0,0,0,0,0,-1--1--1,,1|(537,167)| +1,63,2,8,0,0,0,0,0,0,0,-1--1--1,,1|(561,153)| +1,64,55,12,0,0,0,0,0,0,0,-1--1--1,,1|(466,278)| +1,65,5,12,0,0,0,0,0,0,0,-1--1--1,,1|(440,303)| +1,66,9,8,0,0,0,0,0,0,0,-1--1--1,,1|(605,142)| +1,67,8,6,0,0,0,0,0,0,0,-1--1--1,,1|(605,209)| +1,68,3,6,0,0,0,0,0,0,0,-1--1--1,,1|(669,222)| +1,69,13,3,0,0,0,0,0,0,0,-1--1--1,,1|(800,186)| +1,70,14,3,0,0,0,0,0,0,0,-1--1--1,,1|(822,206)| +1,71,15,8,0,0,0,0,0,0,0,-1--1--1,,1|(689,164)| +1,72,17,16,100,0,0,22,0,0,0,-1--1--1,,1|(618,403)| +1,73,12,17,1,0,0,0,0,0,0,-1--1--1,,1|(569,358)| +1,74,10,18,1,0,0,0,0,0,0,-1--1--1,,1|(625,448)| +1,75,23,21,0,0,0,0,0,0,0,-1--1--1,,1|(937,333)| +1,76,21,19,0,0,0,0,0,0,0,-1--1--1,,1|(824,305)| +1,77,20,19,0,0,0,0,0,0,0,-1--1--1,,1|(822,274)| +1,78,24,21,0,0,0,0,0,0,0,-1--1--1,,1|(929,292)| +1,79,31,29,0,0,0,0,0,0,0,-1--1--1,,1|(583,642)| +1,80,1,39,0,0,0,0,0,0,0,-1--1--1,,1|(94,405)| +1,81,17,45,4,0,0,22,0,0,0,-1--1--1,,1|(548,403)| +1,82,40,1,0,0,0,0,0,0,0,-1--1--1,,1|(235,376)| +1,83,45,18,1,0,0,0,0,0,0,-1--1--1,,1|(511,435)| +1,84,42,39,0,0,0,0,0,0,0,-1--1--1,,1|(97,432)| +1,85,46,39,0,0,0,0,0,0,0,-1--1--1,,1|(20,438)| +1,86,22,1,0,0,0,0,0,0,0,-1--1--1,,1|(168,375)| +1,87,26,22,0,0,0,0,0,0,0,-1--1--1,,1|(83,336)| +1,88,41,22,0,0,0,0,0,0,0,-1--1--1,,1|(154,328)| +1,89,34,22,0,0,0,0,0,0,0,-1--1--1,,1|(105,320)| +1,90,36,8,0,0,0,0,0,0,0,-1--1--1,,1|(647,153)| +1,91,37,56,0,0,0,0,0,0,0,-1--1--1,,1|(340,95)| +1,92,43,56,0,0,0,0,0,0,0,-1--1--1,,1|(298,83)| +1,93,44,56,0,0,0,0,0,0,0,-1--1--1,,1|(238,104)| +1,94,47,56,0,0,0,0,0,0,0,-1--1--1,,1|(221,114)| +1,95,48,56,0,0,0,0,0,0,0,-1--1--1,,1|(261,94)| +1,96,49,57,0,0,0,0,0,0,0,-1--1--1,,1|(176,199)| +1,97,50,57,0,0,0,0,0,0,0,-1--1--1,,1|(170,189)| +1,98,51,57,0,0,0,0,0,0,0,-1--1--1,,1|(189,179)| +1,99,52,57,0,0,0,0,0,0,0,-1--1--1,,1|(211,234)| +1,100,53,57,0,0,0,0,0,0,0,-1--1--1,,1|(189,212)| +1,101,54,57,0,0,0,0,0,0,0,-1--1--1,,1|(193,223)| +1,102,56,55,0,0,0,0,0,0,0,-1--1--1,,1|(357,176)| +1,103,57,55,0,0,0,0,0,0,0,-1--1--1,,1|(336,217)| +1,104,7,12,0,0,0,0,0,0,0,-1--1--1,,1|(512,266)| +1,105,45,12,1,0,0,0,0,0,0,-1--1--1,,1|(494,360)| +1,106,19,12,0,0,0,0,0,0,0,-1--1--1,,1|(645,312)| +1,107,45,35,0,0,0,0,0,0,0,-1--1--1,,1|(434,404)| +1,108,35,1,0,0,0,0,0,0,0,-1--1--1,,1|(289,405)| +1,109,33,35,0,0,0,0,0,0,0,-1--1--1,,1|(347,439)| +1,110,32,38,0,0,0,0,0,0,0,-1--1--1,,1|(667,263)| +1,111,6,38,0,0,0,0,0,0,0,-1--1--1,,1|(597,255)| +1,112,38,12,0,0,0,0,0,0,0,-1--1--1,,1|(570,303)| +1,113,4,45,0,0,0,0,0,0,1,-1--1--1,,1|(478,453)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Price Perception +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Final Energy Price,343,359,66,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Energy Price Discount,471,358,69,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,3,Perceived Energy Price,298,221,73,11,0,3,0,0,-1,0,0,0 +10,4,Initial Price Trend,133,207,56,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,5,Average Energy Price,243,339,77,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,LR Expected Energy Price,646,143,83,11,0,3,0,0,-1,0,0,0 +10,7,SR Energy Price Perc Time,644,244,85,11,0,3,0,0,-1,0,0,0 +10,8,Energy Forecast Time,598,78,69,11,0,3,0,0,-1,0,0,0 +10,9,Energy Price Perc Time,198,267,74,11,0,3,0,0,-1,0,0,0 +10,10,Energy Trend Time,346,79,60,11,0,3,0,0,-1,0,0,0 +10,11,Operative Energy Price,397,300,73,11,0,3,0,0,-1,0,0,0 +10,12,Historic Energy Price,351,140,40,20,3,3,0,0,0,0,0,0 +12,13,48,189,141,8,8,0,3,0,0,-1,0,0,0 +11,14,48,248,141,6,8,34,3,0,0,1,0,0,0 +10,15,Chg Hist Energy Price,248,157,69,11,32,3,0,0,-1,0,0,0 +10,16,Energy Price Trend,475,143,61,11,0,3,0,0,-1,0,0,0 +10,17,SR Expected Energy Price,459,247,83,11,0,3,0,0,-1,0,0,0 +1,18,1,11,0,0,0,0,0,0,0,-1--1--1,,1|(364,334)| +1,19,14,12,4,0,0,22,0,0,0,-1--1--1,,1|(282,141)| +1,20,14,13,100,0,0,22,0,0,0,-1--1--1,,1|(219,141)| +1,21,12,15,1,0,0,0,0,0,0,-1--1--1,,1|(316,182)| +1,22,12,16,0,0,0,0,0,0,0,-1--1--1,,1|(395,140)| +1,23,16,6,0,0,0,0,0,0,0,-1--1--1,,1|(542,143)| +1,24,10,16,1,0,0,0,0,0,0,-1--1--1,,1|(422,93)| +1,25,10,14,1,0,0,0,0,0,0,-1--1--1,,1|(267,102)| +1,26,8,6,1,0,0,0,0,0,0,-1--1--1,,1|(622,100)| +1,27,2,11,0,0,0,0,0,0,0,-1--1--1,,1|(439,333)| +1,28,11,3,0,0,0,0,0,0,0,-1--1--1,,1|(353,264)| +1,29,9,3,0,0,0,0,0,0,0,-1--1--1,,1|(241,246)| +1,30,3,15,1,0,0,0,0,0,0,-1--1--1,,1|(260,195)| +1,31,3,6,1,0,0,0,0,0,0,-1--1--1,,1|(486,205)| +1,32,3,16,1,0,0,0,0,0,0,-1--1--1,,1|(414,194)| +1,33,11,17,0,0,0,0,0,0,0,-1--1--1,,1|(422,277)| +1,34,7,17,0,0,0,0,0,0,0,-1--1--1,,1|(557,245)| +1,35,10,12,0,0,0,0,0,0,1,-1--1--1,,1|(346,98)| +1,36,4,12,1,0,0,0,0,0,1,-1--1--1,,1|(260,199)| +1,37,11,12,1,0,0,0,0,0,1,-1--1--1,,1|(396,226)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Carbon Tax +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Indicated Carbon Tax,308,214,54,8,0,3,0,0,-1,0,0,0 +10,2,Carbon Tax,566,198,40,20,3,3,0,0,0,0,0,0 +10,3,Minimum Carbon Tax,307,136,56,8,0,3,0,0,-1,0,0,0 +12,4,48,384,198,8,8,0,3,0,0,-1,0,0,0 +10,5,Tax Adj Time,444,288,36,8,0,3,0,0,-1,0,0,0 +10,6,Carbon Content,728,146,41,8,0,3,0,0,-1,0,0,0 +10,7,Specific Carbon Tax,728,199,51,8,0,3,0,0,-1,0,0,0 +10,8,Constant Energy Tax,295,371,53,8,0,3,0,0,-1,0,0,0 +10,9,Effective CO2 in Atmosphere,107,251,81,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Concentration Coeff,140,227,51,8,0,3,0,0,-1,0,0,0 +10,11,Preindustrial CO2,135,278,53,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Initial Tax Time,349,288,41,8,0,3,0,0,-1,0,0,0 +10,13,Constant Tax,155,312,35,8,0,3,0,0,-1,0,0,0 +11,14,7068,443,198,6,8,34,3,0,0,1,0,0,0 +10,15,Carbon Tax Adj Rate,443,214,53,8,32,3,0,0,-1,0,0,0 +10,16,Total Energy Carbon Emissions,10,78,86,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,17,Reference Emissions Rate,131,198,64,8,0,3,0,0,-1,0,0,0 +10,18,Emissions Coeff,153,171,42,8,0,3,0,0,-1,0,0,0 +10,19,Perceived Emissions Rate,136,119,64,8,0,3,0,0,-1,0,0,0 +10,20,Emissions Perception Time,24,154,68,8,0,3,0,0,-1,0,0,0 +10,21,Total Tax,727,275,26,8,0,3,0,0,-1,0,0,0 +10,22,Energy Tax,570,352,40,20,3,3,0,0,0,0,0,0 +12,23,48,385,354,8,8,0,3,0,0,-1,0,0,0 +11,24,48,444,354,6,8,34,3,0,0,1,0,0,0 +10,25,Energy Tax Adj Rate,444,370,53,8,32,3,0,0,-1,0,0,0 +1,26,22,25,1,0,0,0,0,0,0,-1--1--1,,1|(516,388)| +1,27,24,23,100,0,0,22,0,0,0,-1--1--1,,1|(415,354)| +1,28,24,22,4,0,0,22,0,0,0,-1--1--1,,1|(490,354)| +1,29,6,7,0,0,0,0,0,0,0,-1--1--1,,1|(728,165)| +1,30,9,1,0,0,0,0,0,0,0,-1--1--1,,1|(200,233)| +1,31,10,1,0,0,0,0,0,0,0,-1--1--1,,1|(215,221)| +1,32,11,1,0,0,0,0,0,0,0,-1--1--1,,1|(214,248)| +1,33,13,1,0,0,0,0,0,0,0,-1--1--1,,1|(225,267)| +1,34,17,1,0,0,0,0,0,0,0,-1--1--1,,1|(217,205)| +1,35,18,1,0,0,0,0,0,0,0,-1--1--1,,1|(223,190)| +1,36,16,19,0,0,0,0,0,0,0,-1--1--1,,1|(65,96)| +1,37,19,1,0,0,0,0,0,0,0,-1--1--1,,1|(215,163)| +1,38,20,19,0,0,0,0,0,0,0,-1--1--1,,1|(72,138)| +1,39,22,21,0,0,0,0,0,0,0,-1--1--1,,1|(653,311)| +1,40,7,21,0,0,0,0,0,0,0,-1--1--1,,1|(727,230)| +1,41,14,2,4,0,0,22,0,0,0,-1--1--1,,1|(487,198)| +1,42,14,4,100,0,0,22,0,0,0,-1--1--1,,1|(414,198)| +1,43,1,15,0,0,0,0,0,0,0,-1--1--1,,1|(369,214)| +1,44,2,15,1,0,0,0,0,0,0,-1--1--1,,1|(513,232)| +1,45,2,7,0,0,0,0,0,0,0,-1--1--1,,1|(634,198)| +1,46,12,15,0,0,0,0,0,0,0,-1--1--1,,1|(390,255)| +1,47,5,15,0,0,0,0,0,0,0,-1--1--1,,1|(443,257)| +1,48,8,25,0,0,0,0,0,0,0,-1--1--1,,1|(362,370)| +1,49,12,24,0,0,0,0,0,0,0,-1--1--1,,1|(393,318)| +1,50,5,24,0,0,0,0,0,0,0,-1--1--1,,1|(444,314)| +1,51,3,1,0,0,0,0,0,0,0,-1--1--1,,1|(307,168)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Depletion Tax +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Initial Production,533,356,51,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Depletion Rent,352,93,39,8,0,3,0,0,-1,0,0,0 +10,3,Frac Depletion Recovered,354,36,65,8,0,3,0,0,-1,0,0,0 +10,4,Resource Ratio,508,376,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,Resource Share,477,394,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,Saturation Coeff,429,411,49,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Scheduled Production,557,338,61,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Marginal Resource Eff on Cost,189,272,77,8,0,3,0,0,-1,0,0,0 +10,9,Normal Variable Cost,96,390,61,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Energy Capital,58,370,45,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,11,Energy Capital Cost,20,345,58,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,LR Marginal Cost of Energy Prod,158,317,84,8,0,3,0,0,-1,0,0,0 +10,13,Normal Effective Energy Capital Ratio,154,408,102,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Init Resource Remaining,572,320,68,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Desired Depletion Rent,350,156,40,20,3,3,0,0,0,0,0,0 +12,16,48,154,156,8,8,0,3,0,0,-1,0,0,0 +11,17,48,232,156,6,8,34,3,0,0,1,0,0,0 +10,18,Chg Depletion Rent,232,172,50,8,32,3,0,0,0,0,0,0 +10,19,Interest Rate,279,254,40,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Initial Depletion Tax,137,61,52,8,0,3,0,0,-1,0,0,0 +10,21,Marginal Resource Eff Energy Capital Ratio,345,342,108,8,0,3,0,0,-1,0,0,0 +10,22,Desired Depletion Rent,193,462,66,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,23,Final Depletion Rent,372,462,53,8,0,3,0,0,-1,0,0,0 +10,24,FINAL TIME,311,503,44,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Time,429,505,22,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,26,Cost Trend,407,306,30,8,0,3,0,0,-1,0,0,0 +10,27,Trend Time,555,278,31,8,0,3,0,0,-1,0,0,0 +10,28,Depletion Planning Horizon,571,225,70,8,0,3,0,0,-1,0,0,0 +10,29,Indicated Depletion Rent,428,261,63,8,0,3,0,0,-1,0,0,0 +10,30,Target Final Rent,595,248,44,8,0,3,0,0,-1,0,0,0 +10,31,FINAL TIME,729,225,44,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,32,Time,695,196,22,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,33,Initial Cost Trend,582,298,52,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,34,Time to Correct Rent,512,162,54,8,0,3,0,0,-1,0,0,0 +10,35,Depletion Rent Correction,389,226,66,8,0,3,0,0,-1,0,0,0 +10,36,Exog Energy Price Switch,567,183,71,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,37,22,23,0,0,0,0,0,0,0,-1--1--1,,1|(282,462)| +1,38,14,21,0,0,0,0,0,0,0,-1--1--1,,1|(472,329)| +1,39,12,8,0,0,0,0,0,0,0,-1--1--1,,1|(169,300)| +1,40,13,12,0,0,0,0,0,0,0,-1--1--1,,1|(155,369)| +1,41,9,12,0,0,0,0,0,0,0,-1--1--1,,1|(121,358)| +1,42,10,12,0,0,0,0,0,0,0,-1--1--1,,1|(101,346)| +1,43,11,12,0,0,0,0,0,0,0,-1--1--1,,1|(81,332)| +1,44,8,18,1,0,0,0,0,0,0,-1--1--1,,1|(199,231)| +1,45,21,8,0,0,0,0,0,0,0,-1--1--1,,1|(273,309)| +1,46,7,21,0,0,0,0,0,0,0,-1--1--1,,1|(481,339)| +1,47,6,21,0,0,0,0,0,0,0,-1--1--1,,1|(392,380)| +1,48,5,21,0,0,0,0,0,0,0,-1--1--1,,1|(417,370)| +1,49,4,21,0,0,0,0,0,0,0,-1--1--1,,1|(433,360)| +1,50,1,21,0,0,0,0,0,0,0,-1--1--1,,1|(474,352)| +1,51,15,2,0,0,0,0,0,0,0,-1--1--1,,1|(350,125)| +1,52,19,18,1,0,0,0,0,0,0,-1--1--1,,1|(245,220)| +1,53,17,15,4,0,0,22,0,0,0,-1--1--1,,1|(274,156)| +1,54,17,16,100,0,0,22,0,0,0,-1--1--1,,1|(194,156)| +1,55,15,18,1,0,0,0,0,0,0,-1--1--1,,1|(300,190)| +1,56,24,23,0,0,0,0,0,0,0,-1--1--1,,1|(335,486)| +1,57,25,23,0,0,0,0,0,0,0,-1--1--1,,1|(406,487)| +1,58,8,26,1,0,0,0,0,0,0,-1--1--1,,1|(289,296)| +1,59,27,26,0,0,0,0,0,0,0,-1--1--1,,1|(487,290)| +1,60,19,29,0,0,0,0,0,0,0,-1--1--1,,1|(335,256)| +1,61,28,29,0,0,0,0,0,0,0,-1--1--1,,1|(506,241)| +1,62,26,29,1,0,0,0,0,0,0,-1--1--1,,1|(434,286)| +1,63,8,29,1,0,0,0,0,0,0,-1--1--1,,1|(314,281)| +1,64,30,29,0,0,0,0,0,0,0,-1--1--1,,1|(527,252)| +1,65,34,35,0,0,0,0,0,0,0,-1--1--1,,1|(456,190)| +1,66,15,35,1,0,0,0,0,0,0,-1--1--1,,1|(389,196)| +1,67,29,35,1,0,0,0,0,0,0,-1--1--1,,1|(429,242)| +1,68,32,28,0,0,0,0,0,0,0,-1--1--1,,1|(645,207)| +1,69,31,28,0,0,0,0,0,0,0,-1--1--1,,1|(670,225)| +1,70,36,35,0,0,0,0,0,0,0,-1--1--1,,1|(484,202)| +1,71,35,18,1,0,0,0,0,0,0,-1--1--1,,1|(293,223)| +1,72,3,2,0,0,0,0,0,0,0,-1--1--1,,1|(353,57)| +1,73,33,26,0,0,0,0,0,0,0,-1--1--1,,1|(490,301)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Emissions +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Energy Production,388,388,54,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Energy Carbon Emissions,309,318,64,8,0,3,0,0,-1,0,0,0 +10,3,Carbon Content,245,388,48,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,4,Total Carbon Emissions,508,263,60,8,0,3,0,0,-1,0,0,0 +10,5,Total Energy Carbon Emissions,308,261,79,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,6,Nonenergy Carbon Emissions,681,262,74,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,7,Capital,38,113,27,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,SR Aggr Energy,210,112,48,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,9,Total Energy Production,384,116,69,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Gross Output,544,117,43,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,11,Emissions Intensity of Capital,38,170,76,8,0,3,0,0,-1,0,0,0 +10,12,Emissions Intensity of Aggr Energy,212,170,88,8,0,3,0,0,-1,0,0,0 +10,13,Emissions Intensity of Energy,384,170,75,8,0,3,0,0,-1,0,0,0 +10,14,Emissions Intensity of Output,544,170,76,8,0,3,0,0,-1,0,0,0 +10,15,Emissions Pulse,509,318,41,8,0,3,0,0,-1,0,0,0 +10,16,Emissions Pulse Volume,509,384,61,8,0,3,0,0,-1,0,0,0 +10,17,Emissions Pulse Time,662,384,55,8,0,3,0,0,-1,0,0,0 +10,18,Time,693,350,22,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,19,TIME STEP,678,316,40,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,20,3,2,0,0,0,0,0,0,0,-1--1--1,,1|(271,358)| +1,21,1,2,0,0,0,0,0,0,0,-1--1--1,,1|(353,357)| +1,22,5,4,0,0,0,0,0,0,0,-1--1--1,,1|(410,261)| +1,23,6,4,0,0,0,0,0,0,0,-1--1--1,,1|(594,262)| +1,24,2,5,0,0,0,0,0,0,0,-1--1--1,,1|(308,296)| +1,25,5,11,0,0,0,0,0,0,0,-1--1--1,,1|(179,217)| +1,26,5,12,0,0,0,0,0,0,0,-1--1--1,,1|(265,220)| +1,27,5,13,0,0,0,0,0,0,0,-1--1--1,,1|(340,220)| +1,28,5,14,0,0,0,0,0,0,0,-1--1--1,,1|(418,218)| +1,29,10,14,0,0,0,0,0,0,0,-1--1--1,,1|(544,136)| +1,30,9,13,0,0,0,0,0,0,0,-1--1--1,,1|(384,136)| +1,31,8,12,0,0,0,0,0,0,0,-1--1--1,,1|(210,134)| +1,32,7,11,0,0,0,0,0,0,0,-1--1--1,,1|(38,134)| +1,33,16,15,0,0,0,0,0,0,0,-1--1--1,,1|(509,358)| +1,34,17,15,0,0,0,0,0,0,0,-1--1--1,,1|(591,353)| +1,35,15,4,0,0,0,0,0,0,0,-1--1--1,,1|(508,297)| +1,36,18,15,0,0,0,0,0,0,0,-1--1--1,,1|(617,337)| +1,37,19,15,0,0,0,0,0,0,0,-1--1--1,,1|(600,316)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Carbon Cycle +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Preindustrial CO2,719,262,66,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Preindustrial CO2,628,438,66,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +11,3,396,173,235,6,8,34,3,0,0,1,0,0,0 +10,4,Total Carbon Emissions,173,251,83,11,32,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,CO2 in Atmosphere,304,235,40,20,3,3,0,0,0,0,0,0 +10,6,CO2 in Mixed Layer,305,453,40,20,3,3,0,0,0,0,0,0 +10,7,CO2 in Deep Ocean,305,614,40,20,3,3,0,0,0,0,0,0 +12,8,48,88,234,8,8,0,3,0,0,-1,0,0,0 +11,9,48,308,363,8,6,33,3,0,0,4,0,0,0 +10,10,Flux Atm to Ocean,369,363,60,11,32,3,0,0,-1,0,0,0 +11,11,4044,309,526,8,6,33,3,0,0,4,0,0,0 +10,12,Diffusion Flux,362,526,44,11,32,3,0,0,-1,0,0,0 +10,13,Thickness,522,552,32,11,0,3,0,0,-1,0,0,0 +10,14,Concentration,398,574,45,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,15,Eddy Diff Coeff,525,518,50,11,0,3,0,0,-1,0,0,0 +10,16,Mixed Depth,514,483,42,11,0,3,0,0,-1,0,0,0 +10,17,CO2 in Humus,297,64,40,20,3,3,0,0,0,0,0,0 +10,18,Atmospheric Retention,143,675,80,11,0,2,0,0,-1,0,0,0 +10,19,CO2 in Biomass,537,166,40,20,3,3,0,0,0,0,0,0 +11,20,4236,482,235,6,8,34,3,0,0,1,0,0,0 +10,21,Flux Atm to Biomass,482,251,66,11,32,3,0,0,-1,0,0,0 +10,22,Biostim Coeff,662,236,44,11,0,3,0,0,-1,0,0,0 +10,23,Biomass Res Time,347,106,58,11,0,3,0,0,-1,0,0,0 +10,24,Init NPP,617,206,29,11,0,3,0,0,-1,0,0,0 +10,25,Buffer Factor,588,309,43,11,0,3,0,0,-1,0,0,0 +10,26,Equil CO2 in Mixed Layer,529,370,83,11,0,3,0,0,-1,0,0,0 +10,27,Mixing Time,416,416,40,11,0,3,0,0,-1,0,0,0 +10,28,Preind CO2 in Mixed Layer,679,407,87,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,29,Ref Buffer Factor,739,314,55,11,0,3,0,0,-1,0,0,0 +10,30,Ref Buff CO2,734,338,45,11,0,3,0,0,-1,0,0,0 +10,31,Buff CO2 Coeff,712,287,51,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +11,32,4172,407,164,6,8,34,3,0,0,1,0,0,0 +10,33,Flux Biomass to Atmosphere,407,180,90,11,32,3,0,0,0,0,0,0 +10,34,Humification Fraction,460,129,67,11,0,3,0,0,-1,0,0,0 +10,35,Humus Res Time,147,81,54,11,0,3,0,0,-1,0,0,0 +11,36,4124,458,62,6,8,34,3,0,0,1,0,0,0 +10,37,Flux Biomass to Humus,458,78,74,11,32,3,0,0,-1,0,0,0 +11,38,4252,276,150,8,6,33,3,0,0,2,0,0,0 +10,39,Flux Humus to Atmosphere,194,150,85,11,32,3,0,0,-1,0,0,0 +1,40,1,21,1,0,0,0,0,0,0,-1--1--1,,1|(569,277)| +1,41,34,32,0,0,0,0,0,0,0,-1--1--1,,1|(433,146)| +1,42,5,21,1,0,0,0,0,0,0,-1--1--1,,1|(372,249)| +1,43,22,21,1,0,0,0,0,0,0,-1--1--1,,1|(594,257)| +1,44,24,21,1,0,0,0,0,0,0,-1--1--1,,1|(580,243)| +1,45,23,32,0,0,0,0,0,0,0,-1--1--1,,1|(374,133)| +1,46,35,39,0,0,0,0,0,0,0,-1--1--1,,1|(166,109)| +1,47,17,39,1,0,0,0,0,0,0,-1--1--1,,1|(224,91)| +1,48,38,17,100,0,0,22,0,0,0,-1--1--1,,1|(276,114)| +1,49,38,5,4,0,0,22,0,0,0,-1--1--1,,1|(276,185)| +1,50,34,37,0,0,0,0,0,0,0,-1--1--1,,1|(459,110)| +1,51,19,37,1,0,0,0,0,0,0,-1--1--1,,1|(519,112)| +1,52,23,37,0,0,0,0,0,0,0,-1--1--1,,1|(395,93)| +1,53,36,19,100,0,0,22,0,0,0,-1--1--1,,1|(537,62)| +1,54,36,17,4,0,0,22,0,0,0,-1--1--1,,1|(394,62)| +1,55,19,33,1,0,0,0,0,0,0,-1--1--1,,1|(465,201)| +1,56,32,19,100,0,0,22,0,0,0,-1--1--1,,1|(455,164)| +1,57,32,5,4,0,0,22,0,0,0,-1--1--1,,1|(304,164)| +1,58,28,26,0,0,0,0,0,0,0,-1--1--1,,1|(610,390)| +1,59,31,25,0,0,0,0,0,0,0,-1--1--1,,1|(652,297)| +1,60,30,25,0,0,0,0,0,0,0,-1--1--1,,1|(666,325)| +1,61,29,25,0,0,0,0,0,0,0,-1--1--1,,1|(664,311)| +1,62,25,26,1,0,0,0,0,0,0,-1--1--1,,1|(578,343)| +1,63,20,5,68,0,0,22,0,0,0,-1--1--1,,1|(410,235)| +1,64,20,19,4,0,0,22,0,0,0,-1--1--1,,1|(537,235)| +1,65,13,14,0,0,0,0,0,0,0,-1--1--1,,1|(473,560)| +1,66,7,14,1,0,0,0,0,0,0,-1--1--1,,1|(380,616)| +1,67,14,12,1,0,0,0,0,0,0,-1--1--1,,1|(396,547)| +1,68,16,12,0,0,0,0,0,0,0,-1--1--1,,1|(444,502)| +1,69,6,12,1,0,0,0,0,0,0,-1--1--1,,1|(367,481)| +1,70,13,12,0,0,0,0,0,0,0,-1--1--1,,1|(454,541)| +1,71,15,12,0,0,0,0,0,0,0,-1--1--1,,1|(447,521)| +1,72,6,10,1,0,0,0,0,0,0,-1--1--1,,1|(362,395)| +1,73,11,6,100,0,0,22,0,0,0,-1--1--1,,1|(309,496)| +1,74,11,7,4,0,0,22,0,0,0,-1--1--1,,1|(309,563)| +1,75,9,5,68,0,0,22,0,0,0,-1--1--1,,1|(308,306)| +1,76,9,6,4,0,0,22,0,0,0,-1--1--1,,1|(308,401)| +1,77,26,10,1,0,0,0,0,0,0,-1--1--1,,1|(434,389)| +1,78,27,10,0,0,0,0,0,0,0,-1--1--1,,1|(397,394)| +1,79,5,25,1,0,0,0,0,0,0,-1--1--1,,1|(437,269)| +1,80,5,26,1,0,0,0,0,0,0,-1--1--1,,1|(437,290)| +1,81,3,5,4,0,0,22,0,0,0,-1--1--1,,1|(221,235)| +1,82,3,8,100,0,0,22,0,0,0,-1--1--1,,1|(131,235)| +1,83,2,26,0,0,0,0,0,0,0,-1--1--1,,1|(584,407)| +10,84,init co2 in atm,214,322,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,85,84,5,0,0,0,0,0,0,1,-1--1--1,,1|(253,283)| +10,86,Init CO2 in Mixed Ocean,211,530,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,87,86,6,0,0,0,0,0,0,1,-1--1--1,,1|(252,496)| +10,88,Init CO2 in Deep Ocean,304,692,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,89,88,7,0,0,0,0,0,0,1,-1--1--1,,1|(304,660)| +10,90,Init CO2 in Humus,296,-24,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,91,90,17,0,0,0,0,0,0,1,-1--1--1,,1|(296,13)| +10,92,Init CO2 in Biomass,684,168,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,93,92,19,0,0,0,0,0,0,1,-1--1--1,,1|(617,167)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*DICE Carbon +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Total Carbon Emissions,125,282,67,8,0,2,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,2,CO2 in Atmos,419,197,40,20,3,3,0,0,0,0,0,0 +10,3,Marginal Atmos Retention,326,283,67,8,0,3,0,0,-1,0,0,0 +10,4,Average Atmos Retention,312,128,65,8,0,3,0,0,-1,0,0,0 +10,5,Rate of CO2 Transfer,711,235,55,8,0,3,0,0,-1,0,0,0 +10,6,Preindustrial CO2,644,288,46,8,0,3,0,0,-1,0,0,0 +12,7,48,216,199,8,8,0,3,0,0,-1,0,0,0 +12,8,48,672,197,8,8,0,3,0,0,-1,0,0,0 +11,9,48,561,197,6,8,34,3,0,0,1,0,0,0 +10,10,CO2 Storage,561,213,33,8,32,3,0,0,-1,0,0,0 +11,11,4668,301,199,6,8,34,3,0,0,1,0,0,0 +10,12,CO2 Net Emiss,301,215,40,8,32,3,0,0,-1,0,0,0 +1,13,9,2,100,0,0,22,0,0,0,-1--1--1,,1|(507,197)| +1,14,9,8,4,0,0,22,0,0,0,-1--1--1,,1|(615,197)| +1,15,11,7,100,0,0,22,0,0,0,-1--1--1,,1|(259,199)| +1,16,11,2,4,0,0,22,0,0,0,-1--1--1,,1|(343,199)| +1,17,2,10,1,0,0,0,0,0,0,-1--1--1,,1|(483,233)| +1,18,6,10,0,0,0,0,0,0,0,-1--1--1,,1|(607,255)| +1,19,5,10,0,0,0,0,0,0,0,-1--1--1,,1|(632,223)| +1,20,3,12,1,0,0,0,0,0,0,-1--1--1,,1|(318,252)| +1,21,1,12,1,0,0,0,0,0,0,-1--1--1,,1|(193,243)| +1,22,11,4,0,0,0,0,0,0,0,-1--1--1,,1|(304,170)| +1,23,9,4,1,0,0,0,0,0,0,-1--1--1,,1|(459,153)| +1,24,1,4,1,0,0,0,0,0,0,-1--1--1,,1|(174,189)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*DICE Climate +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Climate Sensitivity,206,200,57,11,0,3,0,0,-1,0,0,0 +10,2,Atmos UOcean Temp,270,358,40,20,3,3,0,0,0,0,0,0 +10,3,Temp Diff,274,437,33,11,0,3,0,0,-1,0,0,0 +10,4,Feedback Cooling,337,300,58,11,0,3,0,0,-1,0,0,0 +10,5,CO2 in Atmosphere,414,56,73,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,DICE IPCC Other Rad Forcing,535,212,99,11,0,3,0,0,-1,0,0,0 +10,7,CO2 Rad Forcing,386,183,57,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,8,Climate Feedback Param,294,246,79,11,0,3,0,0,-1,0,0,0 +10,9,Heat Transfer,416,439,44,11,0,3,0,0,-1,0,0,0 +10,10,A UO Heat Cap,550,376,53,11,0,3,0,0,-1,0,0,0 +10,11,Heat Trans Coeff,568,439,55,11,0,3,0,0,-1,0,0,0 +10,12,Radiative Forcing,427,259,55,11,0,3,0,0,-1,0,0,0 +10,13,Deep Ocean Temp,275,508,40,20,3,3,0,0,0,0,0,0 +12,14,48,465,357,8,8,0,3,0,0,-1,0,0,0 +10,15,CO2 in Atmos,482,76,56,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,16,CO2 Rad Force Coeff,268,129,71,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,17,Preindustrial CO2,339,95,57,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,18,Carbon Cycle Switch,639,118,67,11,0,3,0,0,-1,0,0,0 +12,19,48,449,508,8,8,0,3,0,0,-1,0,0,0 +11,20,48,378,508,6,8,34,3,0,0,1,0,0,0 +10,21,Chg DO Temp,378,527,48,11,32,3,0,0,-1,0,0,0 +11,22,4924,383,357,6,8,34,3,0,0,1,0,0,0 +10,23,Chg A UO Temp,383,376,55,11,32,3,0,0,-1,0,0,0 +10,24,DO Heat Cap,551,523,45,11,0,3,0,0,-1,0,0,0 +10,25,Heat Capacity Ratio,543,572,64,11,0,3,0,0,-1,0,0,0 +10,26,Effective CO2 in Atmosphere,457,134,92,11,0,3,0,0,-1,0,0,0 +1,27,9,20,1,0,0,0,0,0,0,-1--1--1,,1|(411,475)| +1,28,12,22,1,0,0,0,0,0,0,-1--1--1,,1|(418,308)| +1,29,4,22,1,0,0,0,0,0,0,-1--1--1,,1|(368,317)| +1,30,22,14,100,0,0,22,0,0,0,-1--1--1,,1|(423,357)| +1,31,22,2,4,0,0,22,0,0,0,-1--1--1,,1|(343,357)| +1,32,20,19,100,0,0,22,0,0,0,-1--1--1,,1|(412,508)| +1,33,20,13,4,0,0,22,0,0,0,-1--1--1,,1|(343,508)| +1,34,17,7,0,0,0,0,0,0,0,-1--1--1,,1|(358,132)| +1,35,16,7,0,0,0,0,0,0,0,-1--1--1,,1|(320,153)| +1,36,2,3,0,0,0,0,0,0,0,-1--1--1,,1|(271,395)| +1,37,13,3,0,0,0,0,0,0,0,-1--1--1,,1|(274,474)| +1,38,7,12,0,0,0,0,0,0,0,-1--1--1,,1|(402,214)| +1,39,6,12,0,0,0,0,0,0,0,-1--1--1,,1|(487,232)| +1,40,3,9,0,0,0,0,0,0,0,-1--1--1,,1|(332,437)| +1,41,24,9,0,0,0,0,0,0,0,-1--1--1,,1|(489,484)| +1,42,11,9,0,0,0,0,0,0,0,-1--1--1,,1|(493,439)| +1,43,2,4,1,0,0,0,0,0,0,-1--1--1,,1|(278,324)| +1,44,8,4,0,0,0,0,0,0,0,-1--1--1,,1|(310,267)| +1,45,24,21,0,0,0,0,0,0,0,-1--1--1,,1|(472,524)| +1,46,9,23,1,0,0,0,0,0,0,-1--1--1,,1|(410,407)| +1,47,10,23,0,0,0,0,0,0,0,-1--1--1,,1|(474,376)| +1,48,15,26,0,0,0,0,0,0,0,-1--1--1,,1|(472,98)| +1,49,26,7,0,0,0,0,0,0,0,-1--1--1,,1|(427,154)| +1,50,18,26,0,0,0,0,0,0,0,-1--1--1,,1|(567,123)| +1,51,5,26,0,0,0,0,0,0,0,-1--1--1,,1|(431,88)| +10,52,Init Atmos UOcean Temp,144,359,40,20,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,53,52,2,0,0,0,0,0,0,1,-1--1--1,,1|(200,358)| +1,54,1,8,0,0,0,0,0,0,1,-1--1--1,,1|(243,219)| +1,55,16,8,0,0,0,0,0,0,1,-1--1--1,,1|(278,180)| +1,56,25,24,0,0,0,0,0,0,1,-1--1--1,,1|(545,554)| +1,57,11,24,0,0,0,0,0,0,1,-1--1--1,,1|(560,474)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Impacts +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Gross Output,380,175,36,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,2,Output Loss,379,249,33,8,0,3,0,0,-1,0,0,0 +10,3,Climate Damage Effect,274,318,57,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,4,Labor Force,402,53,38,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,Operating Capital,454,78,52,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,Reference Labor,339,71,48,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Reference Operating Capital,513,105,77,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Atmos UOcean Temp,437,378,63,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,9,Climate Damage Nonlinearity,143,379,73,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,10,Climate Damage Scale,213,406,55,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,11,Reference Temperature,338,406,58,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,12,Reference Output,546,170,52,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,Factor Productivity,524,134,38,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Value Share of Labor,275,92,59,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Environmental Services per Cap,191,177,79,8,0,3,0,0,-1,0,0,0 +10,16,Ref Envir Services per Cap,190,129,74,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,17,Adapted Temperature,453,315,40,20,3,3,0,0,0,0,0,0 +12,18,48,652,317,8,8,0,3,0,0,-1,0,0,0 +11,19,48,576,316,6,8,34,3,0,0,1,0,0,0 +10,20,Adaptation Rate,576,332,42,8,32,3,0,0,-1,0,0,0 +10,21,Fractional Adaptation Rate,634,380,68,8,0,3,0,0,-1,0,0,0 +10,22,Consumption Equiv Loss,148,248,64,8,0,3,0,0,-1,0,0,0 +10,23,Marginal Util Equiv Cons,148,262,71,8,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,24,Share of Consumption,79,293,63,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,25,Consumption,70,203,42,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,26,8,3,1,0,0,0,0,0,0,-1--1--1,,1|(376,350)| +1,27,9,3,0,0,0,0,0,0,0,-1--1--1,,1|(201,351)| +1,28,10,3,0,0,0,0,0,0,0,-1--1--1,,1|(239,367)| +1,29,1,2,0,0,0,0,0,0,0,-1--1--1,,1|(379,205)| +1,30,3,2,0,0,0,0,0,0,0,-1--1--1,,1|(320,287)| +1,31,3,1,0,0,0,0,0,0,0,-1--1--1,,1|(322,252)| +1,32,4,1,0,0,0,0,0,0,0,-1--1--1,,1|(392,107)| +1,33,5,1,0,0,0,0,0,0,0,-1--1--1,,1|(421,120)| +1,34,6,1,0,0,0,0,0,0,0,-1--1--1,,1|(356,116)| +1,35,7,1,0,0,0,0,0,0,0,-1--1--1,,1|(452,136)| +1,36,12,1,0,0,0,0,0,0,0,-1--1--1,,1|(461,171)| +1,37,13,1,0,0,0,0,0,0,0,-1--1--1,,1|(458,152)| +1,38,14,1,0,0,0,0,0,0,0,-1--1--1,,1|(321,129)| +1,39,3,15,0,0,0,0,0,0,0,-1--1--1,,1|(236,253)| +1,40,16,15,0,0,0,0,0,0,0,-1--1--1,,1|(190,146)| +1,41,11,3,0,0,0,0,0,0,0,-1--1--1,,1|(310,367)| +1,42,17,3,0,0,0,0,0,0,0,-1--1--1,,1|(378,315)| +1,43,19,17,4,0,0,22,0,0,0,-1--1--1,,1|(531,316)| +1,44,19,18,100,0,0,22,0,0,0,-1--1--1,,1|(613,316)| +1,45,17,20,1,0,0,0,0,0,0,-1--1--1,,1|(494,345)| +1,46,8,20,1,0,0,0,0,0,0,-1--1--1,,1|(537,366)| +1,47,21,20,0,0,0,0,0,0,0,-1--1--1,,1|(610,360)| +1,48,3,22,0,0,0,0,0,0,0,-1--1--1,,1|(217,286)| +1,49,24,22,0,0,0,0,0,0,0,-1--1--1,,1|(107,274)| +1,50,25,22,0,0,0,0,0,0,0,-1--1--1,,1|(102,222)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Energy Initialization +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Ref Energy Value Share,485,426,75,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,2,Ref Aggr Energy Production,147,429,88,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,3,Reference Energy Capital,493,319,79,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,4,Reference Variable Cost,492,369,77,11,0,3,0,0,-1,0,0,0 +10,5,Variable Share,630,370,47,11,0,3,0,0,-1,0,0,0 +10,6,Reference Production,139,309,68,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,7,Reference Resource,140,168,72,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Initial Production,141,241,53,11,0,3,0,0,-1,0,0,0 +10,9,Init Cum Energy Investment,144,103,95,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Init Cum Prod,143,133,54,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,11,Initial Energy Requirement,138,354,81,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,12,Initial Producer Price,138,271,66,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,13,Initial Production Growth,143,70,87,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Initial Resource,138,203,58,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,15,Capital Share,632,320,43,11,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,16,Initial Producer Price,314,170,75,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,17,Init Unit Distribution Cost,308,208,88,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,18,Energy Capital Cost,640,238,72,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,19,Total Tax,308,401,40,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Reference Pretax Expenditure,315,317,92,11,0,3,0,0,-1,0,0,0 +10,21,Ref Total Expenditure,310,430,68,11,0,3,0,0,-1,0,0,0 +10,22,Reference Final Expenditure,312,372,87,11,0,3,0,0,-1,0,0,0 +10,23,Final Energy Price,147,386,66,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,24,15,3,0,0,0,0,0,0,1,-1--1--1,,1|(587,319)| +1,25,18,3,0,0,0,0,0,0,1,-1--1--1,,1|(572,275)| +1,26,20,3,0,0,0,0,0,0,1,-1--1--1,,1|(403,318)| +1,27,20,4,0,0,0,0,0,0,1,-1--1--1,,1|(396,341)| +1,28,5,4,0,0,0,0,0,0,1,-1--1--1,,1|(582,369)| +1,29,15,5,0,0,0,0,0,0,1,-1--1--1,,1|(631,338)| +1,30,12,20,0,0,0,0,0,0,1,-1--1--1,,1|(219,292)| +1,31,8,20,0,0,0,0,0,0,1,-1--1--1,,1|(221,276)| +1,32,22,21,0,0,0,0,0,0,1,-1--1--1,,1|(311,394)| +10,33,Energy Price Discount,142,410,78,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,34,33,22,0,0,0,0,0,0,1,-1--1--1,,1|(219,392)| +1,35,23,22,0,0,0,0,0,0,1,-1--1--1,,1|(212,381)| +1,36,8,22,0,0,0,0,0,0,1,-1--1--1,,1|(220,302)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Indicators +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Savings Rate,224,-112,33,8,0,3,0,0,-1,0,0,0 +10,2,Total Investment,158,-161,44,8,0,3,0,0,-1,0,0,0 +10,3,Gross Output,287,-165,43,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,4,Total Capital,169,-23,34,8,0,3,0,0,-1,0,0,0 +10,5,Investment Rate,89,-200,49,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,Total Energy Investment,214,-201,69,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Capital,123,-71,27,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Total Energy Capital,232,-71,60,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,9,Energy Capital,424,-195,45,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Total Energy Capital,422,-153,53,8,0,3,0,0,-1,0,0,0 +10,11,Energy Capital Completion Rate,575,-196,88,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,12,Total Energy Investment,570,-152,62,8,0,3,0,0,-1,0,0,0 +10,13,Energy Order Rate,175,49,59,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Gross Output,151,311,43,8,0,2,0,2,-1,0,0,0,-1--1--1,0-0-0,|12||128-128-128 +10,15,Total Energy Cost,355,234,47,8,0,3,0,0,-1,0,0,0 +10,16,Primary Energy Order Rate,174,104,68,8,0,3,0,0,-1,0,0,0 +10,17,Total Energy Production,688,109,69,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,18,Production Share,607,56,43,8,0,3,0,0,-1,0,0,0 +10,19,Indicated Total Cost Energy Production,485,185,105,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,20,Total Energy Expenditure,549,233,71,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,21,Energy Order Rate,339,108,59,8,0,2,0,0,-1,0,0,0 +10,22,Output Growth Rate,154,352,53,8,0,3,0,0,-1,0,0,0 +10,23,Availability,421,56,31,8,0,3,0,0,-1,0,0,0 +10,24,Consumption Growth Rate,345,354,68,8,0,3,0,0,-1,0,0,0 +10,25,Growth Trend Time,246,381,51,8,0,3,0,0,-1,0,0,0 +10,26,Energy Production,501,110,54,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,27,Fraction of Energy Goods Avail,264,184,86,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||130-130-130 +10,28,Energy Invest Req,451,277,54,8,0,2,0,2,-1,0,0,0,-1--1--1,0-0-0,|12||130-130-130 +10,29,Fraction of Invest Goods Avail,285,276,84,8,0,2,0,2,-1,0,0,0,-1--1--1,0-0-0,|12||130-130-130 +10,30,Hist Output Growth Rate,247,425,72,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,31,Avg Energy Price,633,276,44,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,32,Total Energy Production,716,233,69,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,33,Consumption,349,312,42,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,34,Emissions Intensity of Output,503,-39,76,8,0,3,0,0,-1,0,0,0 +10,35,Gross Output,407,-95,43,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,36,Total Energy Carbon Emissions,597,-87,86,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,37,Emissions Intensity of Energy,688,-42,75,8,0,3,0,0,-1,0,0,0 +10,38,Total Energy Production,775,-89,69,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,39,29,15,0,0,0,0,0,0,0,-1--1--1,,1|(313,258)| +1,40,28,15,0,0,0,0,0,0,0,-1--1--1,,1|(409,258)| +1,41,27,15,0,0,0,0,0,0,0,-1--1--1,,1|(302,205)| +1,42,19,15,0,0,0,0,0,0,0,-1--1--1,,1|(426,206)| +1,43,13,16,0,0,0,0,0,0,0,-1--1--1,,1|(174,69)| +1,44,26,18,0,0,0,0,0,0,0,-1--1--1,,1|(547,86)| +1,45,17,18,0,0,0,0,0,0,0,-1--1--1,,1|(653,86)| +1,46,21,23,0,0,0,0,0,0,0,-1--1--1,,1|(373,85)| +1,47,26,23,0,0,0,0,0,0,0,-1--1--1,,1|(466,86)| +1,48,11,12,0,0,0,0,0,0,0,-1--1--1,,1|(573,-180)| +1,49,9,10,0,0,0,0,0,0,0,-1--1--1,,1|(423,-180)| +1,50,6,2,0,0,0,0,0,0,0,-1--1--1,,1|(191,-185)| +1,51,5,2,0,0,0,0,0,0,0,-1--1--1,,1|(117,-183)| +1,52,8,4,0,0,0,0,0,0,0,-1--1--1,,1|(206,-51)| +1,53,7,4,0,0,0,0,0,0,0,-1--1--1,,1|(140,-52)| +1,54,2,1,0,0,0,0,0,0,0,-1--1--1,,1|(184,-141)| +1,55,3,1,0,0,0,0,0,0,0,-1--1--1,,1|(260,-142)| +1,56,25,22,0,0,0,0,0,0,0,-1--1--1,,1|(206,368)| +1,57,25,24,0,0,0,0,0,0,0,-1--1--1,,1|(288,369)| +1,58,33,24,0,0,0,0,0,0,0,-1--1--1,,1|(348,326)| +1,59,14,22,0,0,0,0,0,0,0,-1--1--1,,1|(151,324)| +1,60,30,24,0,0,0,0,0,0,0,-1--1--1,,1|(289,393)| +1,61,30,22,0,0,0,0,0,0,0,-1--1--1,,1|(206,392)| +1,62,20,31,0,0,0,0,0,0,0,-1--1--1,,1|(584,251)| +1,63,32,31,0,0,0,0,0,0,0,-1--1--1,,1|(680,251)| +1,64,35,34,0,0,0,0,0,0,0,-1--1--1,,1|(448,-70)| +1,65,36,34,0,0,0,0,0,0,0,-1--1--1,,1|(556,-65)| +1,66,36,37,0,0,0,0,0,0,0,-1--1--1,,1|(635,-67)| +1,67,38,37,0,0,0,0,0,0,0,-1--1--1,,1|(737,-68)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Data +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,World Crude Price,79,49,47,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,2,Oil Production,78,134,38,8,0,3,0,0,-1,0,0,0 +10,3,World Gas Price,78,75,42,8,0,3,0,0,-1,0,0,0 +10,4,World Coal Price,91,103,43,8,0,3,0,0,-1,0,0,0 +10,5,Elect Price,405,120,28,8,0,3,0,0,-1,0,0,0 +10,6,Primary Energy,89,246,40,8,0,3,0,0,-1,0,0,0 +10,7,Traditional Energy,90,271,47,8,0,3,0,0,-1,0,0,0 +10,8,Commercial Energy,90,296,49,8,0,3,0,0,-1,0,0,0 +10,9,Gas Production,81,167,40,8,0,3,0,0,-1,0,0,0 +10,10,Coal Production,78,201,41,8,0,3,0,0,-1,0,0,0 +10,11,Total Electricity,407,277,42,8,0,3,0,0,-1,0,0,0 +10,12,Thermal Electricity,404,250,49,8,0,3,0,0,-1,0,0,0 +10,13,Hydro Electricity,406,169,45,8,0,3,0,0,-1,0,0,0 +10,14,Nuclear Electricity,408,193,47,8,0,3,0,0,-1,0,0,0 +10,15,Other Electricity,409,220,43,8,0,3,0,0,-1,0,0,0 +10,16,GDP Deflator,544,48,36,8,0,3,0,0,-1,0,0,0 +10,17,World GDP,545,75,31,8,0,3,0,0,-1,0,0,0 +10,18,Invest Frac GDP,546,104,43,8,0,3,0,0,-1,0,0,0 +10,19,Cons Frac GDP,548,132,41,8,0,3,0,0,-1,0,0,0 +10,20,World Bank Population,548,158,59,8,0,3,0,0,-1,0,0,0 +10,21,World Pop Growth Rt,549,182,57,8,0,3,0,0,-1,0,0,0 +10,22,World Investment,678,88,46,8,0,3,0,0,-1,0,0,0 +10,23,Average Thermal Price,216,75,57,8,0,3,0,0,-1,0,0,0 +10,24,Primary Electricity,266,196,48,8,0,3,0,0,-1,0,0,0 +10,25,Average Energy Price,262,120,54,8,0,3,0,0,-1,0,0,0 +10,26,GDP,667,58,15,8,0,3,0,0,-1,0,0,0 +10,27,World Population,685,159,52,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,28,17,26,0,0,0,0,0,0,0,-1--1--1,,1|(607,66)| +1,29,15,24,0,0,0,0,0,0,0,-1--1--1,,1|(346,209)| +1,30,14,24,0,0,0,0,0,0,0,-1--1--1,,1|(344,193)| +1,31,13,24,0,0,0,0,0,0,0,-1--1--1,,1|(342,181)| +1,32,10,25,0,0,0,0,0,0,0,-1--1--1,,1|(163,163)| +1,33,9,25,0,0,0,0,0,0,0,-1--1--1,,1|(164,145)| +1,34,2,25,0,0,0,0,0,0,0,-1--1--1,,1|(155,128)| +1,35,23,25,0,0,0,0,0,0,0,-1--1--1,,1|(233,92)| +1,36,5,25,0,0,0,0,0,0,0,-1--1--1,,1|(353,120)| +1,37,24,25,0,0,0,0,0,0,0,-1--1--1,,1|(264,164)| +1,38,10,23,0,0,0,0,0,0,0,-1--1--1,,1|(141,142)| +1,39,9,23,0,0,0,0,0,0,0,-1--1--1,,1|(142,124)| +1,40,2,23,0,0,0,0,0,0,0,-1--1--1,,1|(140,107)| +1,41,4,23,0,0,0,0,0,0,0,-1--1--1,,1|(146,90)| +1,42,3,23,0,0,0,0,0,0,0,-1--1--1,,1|(132,75)| +1,43,1,23,0,0,0,0,0,0,0,-1--1--1,,1|(140,60)| +1,44,18,22,0,0,0,0,0,0,0,-1--1--1,,1|(603,96)| +1,45,17,22,0,0,0,0,0,0,0,-1--1--1,,1|(597,79)| +1,46,27,20,0,0,0,0,0,0,0,-1--1--1,,1|(626,158)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Data 2 +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Price Data,413,159,29,8,0,3,0,0,-1,0,0,0 +10,2,Production Data,408,320,43,8,0,3,0,0,-1,0,0,0 +10,3,Elect Price,258,208,36,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,4,World Coal Price,256,178,53,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,5,World Crude Price,254,145,57,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,6,World Gas Price,250,117,52,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,7,Coal Production,257,325,50,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,8,Gas Production,249,355,48,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,9,Hydro Electricity,253,389,53,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,10,Oil Production,263,264,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,11,Share Data,530,320,30,8,0,3,0,0,-1,0,0,0 +10,12,Nuclear Electricity,259,297,56,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,13,Other Electricity,259,428,51,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,14,Total Production Data,529,381,59,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +10,15,Gas Production,538,137,48,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,16,Oil Production,542,176,46,8,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,17,2,11,0,0,0,0,0,0,0,-1--1--1,,1|(468,320)| +1,18,10,2,0,0,0,0,0,0,0,-1--1--1,,1|(328,289)| +1,19,9,2,0,0,0,0,0,0,0,-1--1--1,,1|(323,357)| +1,20,8,2,0,0,0,0,0,0,0,-1--1--1,,1|(321,339)| +1,21,7,2,0,0,0,0,0,0,0,-1--1--1,,1|(329,322)| +1,22,6,1,0,0,0,0,0,0,0,-1--1--1,,1|(325,136)| +1,23,5,1,0,0,0,0,0,0,0,-1--1--1,,1|(340,152)| +1,24,4,1,0,0,0,0,0,0,0,-1--1--1,,1|(339,167)| +1,25,3,1,0,0,0,0,0,0,0,-1--1--1,,1|(328,186)| +1,26,12,2,0,0,0,0,0,0,0,-1--1--1,,1|(330,307)| +1,27,13,2,0,0,0,0,0,0,0,-1--1--1,,1|(327,378)| +1,28,14,11,0,0,0,0,0,0,0,-1--1--1,,1|(529,357)| +1,29,2,14,0,0,0,0,0,0,0,-1--1--1,,1|(461,347)| +1,30,15,1,0,0,0,0,0,0,0,-1--1--1,,1|(474,147)| +1,31,16,1,0,0,0,0,0,0,0,-1--1--1,,1|(475,167)| +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*IPCC/EMF Data +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,CO2 Concentration A,185,91,55,8,0,3,0,0,-1,0,0,0 +10,2,CO2 Concentration B,172,122,55,8,0,3,0,0,-1,0,0,0 +10,3,CO2 Concentration C,169,149,55,8,0,3,0,0,-1,0,0,0 +10,4,CO2 Concentration D,167,182,55,8,0,3,0,0,-1,0,0,0 +10,5,CO2 Concentration E,175,218,54,8,0,3,0,0,-1,0,0,0 +10,6,CO2 Emissions A,382,87,46,8,0,3,0,0,-1,0,0,0 +10,7,CO2 Emissions B,375,121,45,8,0,3,0,0,-1,0,0,0 +10,8,CO2 Emissions C,370,150,45,8,0,3,0,0,-1,0,0,0 +10,9,CO2 Emissions D,372,181,46,8,0,3,0,0,-1,0,0,0 +10,10,CO2 Emissions E,365,213,45,8,0,3,0,0,-1,0,0,0 +10,11,Energy CO2 Emissions A,561,86,64,8,0,3,0,0,-1,0,0,0 +10,12,Energy CO2 Emissions B,555,120,64,8,0,3,0,0,-1,0,0,0 +10,13,Energy CO2 Emissions C,552,150,64,8,0,3,0,0,-1,0,0,0 +10,14,Energy CO2 Emissions D,553,189,64,8,0,3,0,0,-1,0,0,0 +10,15,DICE IPCC CO2 Rad Forcing,176,298,75,8,0,3,0,0,-1,0,0,0 +10,16,DICE IPCC Other Rad Forcing,165,330,77,8,0,3,0,0,-1,0,0,0 +10,17,EMF Population,426,299,43,8,0,3,0,0,-1,0,0,0 +10,18,EMF GDP,421,334,29,8,0,3,0,0,-1,0,0,0 +10,19,Nonenergy Carbon Emissions,168,366,74,8,0,3,0,1,-1,0,0,0,128-128-128,0-0-0,|12||0-0-0 +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Forecast Data +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,0 +10,1,Primary WEC,129,139,36,8,0,3,0,0,-1,0,0,0 +10,2,Primary EIA,122,180,33,8,0,3,0,0,-1,0,0,0 +10,3,Primary Trabalka,120,216,44,8,0,3,0,0,-1,0,0,0 +10,4,Oil EIA,123,254,21,8,0,3,0,0,-1,0,0,0 +10,5,Gas EIA,117,289,23,8,0,3,0,0,-1,0,0,0 +10,6,Coal EIA,123,322,25,8,0,3,0,0,-1,0,0,0 +10,7,OilGas EIA,231,271,31,8,0,3,0,0,-1,0,0,0 +1,8,4,7,0,0,0,0,0,0,0,-1--1--1,,1|(165,260)| +1,9,5,7,0,0,0,0,0,0,0,-1--1--1,,1|(163,281)| +///---\\\ +:L<%^E!@ +9:j +13:all_data2 +15:0,0,0,0,0,0 +19:100,0 +27:0, +4:Time +5:Discount Factor +24:1960 +25:2300 +26:2300 +6:Coal +6:layer1 +6:Tangible diff --git a/test/metasd/FREE/FREE6/FREE6-original/tech_data.mdl b/test/metasd/FREE/FREE6/FREE6-original/tech_data.mdl new file mode 100644 index 000000000..1849455ee --- /dev/null +++ b/test/metasd/FREE/FREE6/FREE6-original/tech_data.mdl @@ -0,0 +1,52 @@ +Energy Technology[source] + ~ dmnl + ~ Energy technology level, extracted from a simulation run of full model. + | + +source: + Coal,OilGas,HN,New + ~ dmnl + ~ Energy sources. + | + +Technology Data[source]= + Energy Technology[source] + ~ dmnl + ~ Technology data, for input as data driver to full model. + ~ :SUPPLEMENTARY + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +FINAL TIME = 2300 + ~ Year + ~ The final time for the simulation. + | + +INITIAL TIME = 1960 + ~ Year + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Year + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Year + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V160 Do not put anything below this section - it will be ignored +*View 1 +$Times New Roman|12||0-0-0|0-0-0|0-0-0 +|0,Energy Technology,362,216,49,8,0,0,0,0,0,0,-1--1--1,-1--1--1 +|1,Technology Data,189,216,44,8,0,0,0,0,-1,0,-1--1--1,-1--1--1 +>0,1,0,0,0,0,0,-1--1--1,1|(280,216)| diff --git a/test/metasd/FREE/PROVENANCE.md b/test/metasd/FREE/PROVENANCE.md new file mode 100644 index 000000000..96f7fec2f --- /dev/null +++ b/test/metasd/FREE/PROVENANCE.md @@ -0,0 +1,47 @@ +# FREE (Feedback-Rich Energy-Economy model) + +FREE is a system dynamics integrated assessment model of energy-economy-climate +interactions, documented in Thomas Fiddaman's MIT PhD dissertation, "Feedback +Complexity in Integrated Climate-Economy Models." + +## Source + +- MetaSD post: https://metasd.com/2014/07/free/ +- Direct download (zip): https://metasd.com/wp-content/uploads/2010/06/FREE6.zip + (the FREE 6 model archive, linked from the 2014 post) +- Downloaded: 2026-05-13 + +The contents of `FREE6.zip` are extracted here as-is. The archive ships two +parallel trees, `FREE6/FREE6-original/` and `FREE6/FREE6-corrected/`, each with +the main model plus many `.cin` change files, `.cmd` command scripts, `.voc` / +`.vsc` control files, `.dat` data files, and `.vgd` graph definitions, along +with a top-level `Readme.txt`. + +## Attribution + +- Posted by Tom Fiddaman (Ventana Systems) on the MetaSD blog (July 2014, + updated August 2016). +- The FREE model was created by Thomas S. Fiddaman as part of his doctoral + dissertation at the MIT Sloan School of Management. + +## License + +The MetaSD blog is licensed under a Creative Commons Attribution 3.0 Unported +License (CC BY 3.0). The site notes that some Model Library content may be +subject to the original author's copyright; these model files carry no separate +license statement. + +## Macro content + +The main model `FREE6/FREE6-original/free 6.mdl` contains one macro: + +- `INIT(input)` -- one-line macro returning `INITIAL(input)`, i.e. the `INITIAL` + builtin made usable anywhere in an expression. Single output, no stock. + +Notes: +- The `FREE6-corrected/` tree ships only a binary `free 6-corr.vmf` for the main + model (no `.mdl`), so the macro-bearing text source is the one in + `FREE6-original/`. +- The smaller auxiliary `.mdl` files in the archive (`all_data.mdl`, + `conversion*.mdl`, `energy_pos_loop.mdl`, `energy_tech_cld.mdl`, + `tech_data.mdl`) do **not** contain macros. diff --git a/test/metasd/bathtub-statistics/PROVENANCE.md b/test/metasd/bathtub-statistics/PROVENANCE.md new file mode 100644 index 000000000..77342d937 --- /dev/null +++ b/test/metasd/bathtub-statistics/PROVENANCE.md @@ -0,0 +1,39 @@ +# Bathtub Statistics Sandbox + +A sandbox model exploring the statistics of stocks and flows (integration, +measurement error, noise). + +## Source + +- MetaSD post: https://metasd.com/2012/05/bathtub-statistics-sandbox/ +- Direct download: https://metasd.com/wp-content/uploads/2012/05/integration3.mdl +- Downloaded: 2026-05-13 + +## Attribution + +- Posted by Tom Fiddaman (Ventana Systems) on the MetaSD blog. +- The PINK NOISE macro was contributed by Ed Anderson (MIT / University of + Texas - Austin) and updated by Tom Fiddaman (2010). + +## License + +The MetaSD blog is licensed under a Creative Commons Attribution 3.0 Unported +License (CC BY 3.0). The site notes that some Model Library content may be +subject to the original author's copyright; this model carries no separate +license statement. + +## Macro content + +`integration3.mdl` (the original Vensim model linked directly on the post) +contains three macros: + +- `TREND2(x, horizon, smoothing time)` -- second-order trend estimate; uses the + `SMOOTH` builtin and has several internal auxiliary equations. Single output, + no explicit stock. +- `INIT(x)` -- one-line wrapper around the `INITIAL` builtin. +- `PINK NOISE(mean, std deviation, correlation time, seed)` -- contains a stock + (`INTEG`), uses `RANDOM NORMAL` and `TIME STEP$`. + +Note: a later updated package for this post (`integration6.mdl`, dated 2025) has +the macros removed and was not added; only the macro-bearing `integration3.mdl` +is included here. diff --git a/test/metasd/bathtub-statistics/integration3.mdl b/test/metasd/bathtub-statistics/integration3.mdl new file mode 100644 index 000000000..5bdea576b --- /dev/null +++ b/test/metasd/bathtub-statistics/integration3.mdl @@ -0,0 +1,406 @@ +{UTF-8} +:MACRO: TREND2(x,horizon,smoothing time) +TREND2 = smoothed error/horizon + ~ x/horizon + ~ Second order trend estimate for rate of change of input x, with 0 initial \ + trend + | + +smoothed error = SMOOTH(error,horizon) + ~ x + ~ | + +smoothed x = SMOOTH(x,smoothing time) + ~ x + ~ | + +error = x - smoothed x + ~ x + ~ | + +:END OF MACRO: +:MACRO: INIT(x) +INIT = INITIAL(x) + ~ x + ~ | + +:END OF MACRO: +:MACRO: PINK NOISE(mean, std deviation, correlation time, seed) +PINK NOISE = INTEG(updating pink noise,mean+std deviation*RANDOM NORMAL(-6,6,0,1,seed\ + )) + ~ mean + ~ Contributed by Ed Anderson, MIT/U. Texas - Austin + Description: The pink noise molecule described generates a simple random + series with autocorrelation. This is useful in representing time series, + like rainfall from day to day, in which today's value has some correlation + with what happened yesterday. This particular formulation will also have + properties such as standard deviation and mean that are insensitive both to + the time step and the correlation (smoothing) time. Finally, the output as + a whole and the difference in values between any two days is guaranteed to + be Gaussian (normal) in distribution. + + Behavior: Pink noise series will have both a historical and a random + component during each period. The relative "trend-to-noise" ratio is + controlled by the length of the correlation time. As the correlation time + approaches zero, the pink noise output will become more independent of its + historical value and more "noisy." On the other hand, as the correlation + time approaches infinity, the pink noise output will approximate a + continuous time random walk or Brownian motion. Displayed above are two + time series with correlation times of 1 and 8 months. While both series + have approximately the same standard deviation, the 1-month correlation time + series is less smooth from period to period than the 8-month series, which + is characterized by "sustained" swings in a given direction. Note that this + behavior will be independent of the time-step. + + The "pink" in pink noise refers to the power spectrum of the output. A time + series in which each period's observation is independent of the past is + characterized by a flat or "white" power spectrum. Smoothing a time series + attenuates the higher or "bluer" frequencies of the power spectrum, leaving + the lower or "redder" frequencies relatively stronger in the output. + + Caveats: This assumes the use of Euler integration with a time step of no + more than 1/4 of the correlation time. Very long correlation times should be + avoided also as the multiplication in the scaled white noise will become + progressively less accurate. + + Technical Notes: This particular form of pink noise is superior to that of + Britting presented in Richardson and Pugh (1981) because the Gaussian + (Normal) distribution of the output does not depend on the Central Limit + Theorem. (Dynamo did not have a Gaussian random number generator and hence + R&P had to invoke the CLM to get a normal distribution.) Rather, this + molecule's normal output is a result of the observations being a sum of + Gaussian draws. Hence, the series over short intervals should better + approximate normality than the macro in R&P. + + MEAN: This is the desired mean for the pink noise. + STD DEVIATION: This is the desired standard deviation for the pink noise. + CORRELATION TIME: This is the smooth time for the noise, or for the more technically \ + minded this is the inverse of the filter's cut-off frequency in radians. + + Updated by Tom Fiddaman, 2010, to include a random initial value, + correct units, and use TIME STEP$ keyword + | + +updating pink noise = gap/correlation time + ~ mean/correlation time + ~ | + +gap = scaled white noise-PINK NOISE + ~ mean + ~ | + +scaled white noise =mean+white noise*std deviation*SQRT((2-time step$/correlation time +)/(time step$/correlation time)) + ~ mean + ~ This adjusts the standard deviation of the white noise to compensate for the time \ + step and the + correlation time to produce the appropriate pink noise std \ + deviation. + | + +white noise = RANDOM NORMAL(-6,6,0,1,seed) + ~ dmnl + ~ This is an independent, identically distributed random quantity drawn every time \ + step. The distribution is gaussian with mean = 0 and variance = 1. + Note that RANDOM NORMAL is truncated +/- 6 standard deviations here. + For Vensim 1.62 syntax, remove the arguments to RANDOM NORMAL. + | + +:END OF MACRO: +Smoothing Time= + 5 + ~ Month + ~ | + +Horizon= + 20 + ~ Month + ~ | + +Flow Trend= + TREND2(Measured Flow,Horizon,Smoothing Time) + ~ drips/(Month*Month) + ~ | + +Stock Trend= + TREND2(Measured Stock,Horizon,Smoothing Time) + ~ drips/Month + ~ | + +Lagged Measured Flow= + DELAY FIXED(Measured Flow,TIME STEP*"Lag #",Measured Flow) + ~ drips/Month + ~ | + +"Lag #"= + 1 + ~ dmnl [1,5,1] + ~ | + +Initial Stock= + 0 + ~ drips + ~ | + +Fractional Outflow Rate= + 0 + ~ fraction/Month [0,?] + ~ | + +Outflow= + Stock*Fractional Outflow Rate + ~ drips/Month + ~ | + +Flow Abs Error SD= + 0 + ~ drips/Month [0,?] + ~ | + +Measured Stock= + Stock*EXP(Stock Frac Measurement Error SD*RANDOM NORMAL(-6,6,0,1,0)) + +Stock Abs Error SD*RANDOM NORMAL(-6,6,0,1,0) + ~ drips + ~ | + +Measured Flow= + Flow*EXP(Flow Frac Measurement Error SD*RANDOM NORMAL(-6,6,0,1,0)) + +Flow Abs Error SD*RANDOM NORMAL(-6,6,0,1,0) + ~ drips/Month + ~ | + +Stock Abs Error SD= + 0 + ~ drips [0,?] + ~ | + +Stock= INTEG ( + Flow+Noise-Outflow, + Initial Stock) + ~ drips + ~ | + +Base Flow= + 1 + ~ drips/Month + ~ | + +Correlation Time= + 1 + ~ Month [1,100] + ~ | + +Driving Noise SD= + 0 + ~ drips/Month [0,?] + ~ Standard deviation of driving noise. + | + +Flow= + Base Flow + STEP(Flow Step, Step Time) + RAMP( Slope , Ramp Time , FINAL TIME ) + + Random Flow SD*PINK NOISE(0,1,Correlation Time,0) + ~ drips/Month + ~ | + +Flow Frac Measurement Error SD= + 0 + ~ fraction [0,?] + ~ | + +Flow Step= + 0 + ~ drips/Month + ~ | + +Noise= + Driving Noise SD*RANDOM NORMAL(-6,6,0,1,0) + ~ drips/Month + ~ | + +NOISE SEED= + 1 + ~ dmnl [1,10000,1] + ~ | + +Ramp Time= + 20 + ~ Month + ~ | + +Random Flow SD= + 0 + ~ drips/Month [0,1] + ~ | + +Slope= + 0 + ~ drips/Month/Month + ~ | + +Step Time= + 10 + ~ Month [0,100] + ~ | + +Stock 1st Difference= + Measured Stock-SMOOTH(Measured Stock,TIME STEP) + ~ drips + ~ | + +Stock Frac Measurement Error SD= + 0 + ~ fraction [0,?] + ~ | + +******************************************************** + .Control +********************************************************~ + Simulation Control Parameters + | + +FINAL TIME = 100 + ~ Month + ~ The final time for the simulation. + | + +INITIAL TIME = 0 + ~ Month + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ Month [0,?] + ~ The frequency with which output is stored. + | + +TIME STEP = 1 + ~ Month [0,?] + ~ The time step for the simulation. + | + +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*View 1 +$192-192-192,0,Arial|12||0-0-0|0-0-0|0-0-255|-1--1--1|-1--1--1|96,96,100,0 +10,1,Stock,501,274,40,20,3,3,0,0,0,0,0,0 +12,2,48,289,274,10,8,0,3,0,0,-1,0,0,0 +1,3,5,1,4,0,0,22,1,0,0,0-0-0,|12||0-0-0,1|(423,274)| +1,4,5,2,100,0,0,22,1,0,0,0-0-0,|12||0-0-0,1|(336,274)| +11,5,48,380,274,6,8,34,3,0,0,1,0,0,0 +10,6,Flow,380,293,18,11,40,3,0,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +12,7,48,499,421,10,8,0,3,16,2,-1,0,0,0,0-0-0,0-0-0,|12||128-0-128 +1,8,10,1,4,16,0,22,1,0,0,0-0-0,|12||0-0-0,1|(497,320)| +1,9,10,7,100,16,0,22,1,0,0,0-0-0,|12||0-0-0,1|(497,386)| +11,10,48,497,353,8,6,33,3,16,0,4,0,0,0 +10,11,Noise,528,353,23,10,40,3,16,2,-1,0,0,0,0-0-0,0-0-0,|12||128-0-128 +10,12,Measured Stock,503,162,59,10,8,3,13,2,0,0,0,0,0-0-0,0-0-0,|12||255-0-0 +10,13,Measured Flow,334,197,56,10,8,3,16,2,0,0,0,0,0-0-0,0-0-0,|12||255-0-0 +1,14,5,13,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(361,243)| +1,15,1,12,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(501,219)| +10,16,Base Flow,182,296,39,10,8,3,12,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +1,17,16,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(284,294)| +10,18,Correlation Time,521,500,41,18,8,3,12,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +1,19,18,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(451,398)| +10,20,FINAL TIME,177,335,55,11,8,2,12,3,-1,0,0,0,128-128-128,0-0-0,|12||0-128-0 +1,21,20,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(289,311)| +10,22,Random Flow SD,420,458,51,18,8,3,12,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +1,23,22,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(400,378)| +10,24,Flow Step,215,410,37,10,8,3,12,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +1,25,24,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(290,356)| +10,26,Ramp Time,328,485,43,10,8,3,12,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +1,27,26,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(351,396)| +10,28,Slope,254,452,23,10,8,3,12,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +1,29,28,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(311,378)| +10,30,Step Time,191,370,38,10,8,3,12,2,-1,0,0,0,0-0-0,0-0-0,|12||0-128-0 +1,31,30,6,0,12,0,0,1,64,0,0-0-0,|12||0-0-0,1|(282,333)| +12,32,0,999,182,150,150,3,44,0,0,1,0,0,0 +Stock_vs_Flow +10,33,Driving Noise SD,599,442,50,18,8,3,16,2,-1,0,0,0,0-0-0,0-0-0,|12||128-0-128 +1,34,33,11,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(564,398)| +10,35,NOISE SEED,750,499,51,10,8,3,16,0,0,0,0,0 +10,36,Stock Frac Measurement Error SD,723,89,71,27,8,3,16,2,0,0,0,0,0-0-0,0-0-0,|12||255-0-0 +1,37,36,12,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(599,129)| +10,38,Flow Frac Measurement Error SD,142,188,71,27,8,3,13,2,-1,0,0,0,0-0-0,0-0-0,|12||255-0-0 +1,39,38,13,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(238,192)| +10,40,Stock 1st Difference,746,164,39,18,8,3,16,2,0,0,0,0,0-0-0,0-0-0,|12||255-128-0 +1,41,12,40,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(627,162)| +10,42,TIME STEP,746,224,50,11,8,2,16,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,43,42,40,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(746,204)| +12,44,0,999,481,150,150,3,44,0,0,1,0,0,0 +Stock_1st_Difference +10,45,Lagged Measured Flow,239,126,57,18,8,3,13,2,0,0,0,0,0-0-0,0-0-0,|12||255-128-0 +1,46,13,45,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(297,169)| +10,47,TIME STEP,103,126,50,11,8,2,13,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,48,47,45,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(160,126)| +10,49,Flow Abs Error SD,193,246,35,18,8,3,16,2,0,0,0,0,0-0-0,0-0-0,|12||255-0-0 +10,50,Stock Abs Error SD,590,81,39,18,8,3,16,2,0,0,0,0,0-0-0,0-0-0,|12||255-0-0 +1,51,49,13,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(259,222)| +1,52,50,12,0,16,0,0,1,64,0,0-0-0,|12||0-0-0,1|(547,120)| +12,53,48,698,273,10,8,0,3,8,0,-1,0,0,0 +1,54,56,53,4,8,0,22,1,0,0,0-0-0,|12||0-0-0,1|(654,273)| +1,55,56,1,100,8,0,22,1,0,0,0-0-0,|12||0-0-0,1|(574,273)| +11,56,48,614,273,6,8,34,3,8,0,1,0,0,0 +10,57,Outflow,614,292,28,10,40,3,8,0,-1,0,0,0 +10,58,Fractional Outflow Rate,711,352,47,18,8,3,8,0,0,0,0,0 +1,59,58,57,0,8,0,0,1,64,0,0-0-0,|12||0-0-0,1|(661,321)| +1,60,1,57,1,8,0,0,1,64,0,0-0-0,|12||0-0-0,1|(563,314)| +10,61,Initial Stock,580,222,42,10,8,3,0,0,-1,0,0,0 +1,62,61,1,0,0,0,0,1,64,1,0-0-0,|12||0-0-0,1|(553,239)| +10,63,"Lag #",104,78,22,10,8,3,13,2,0,0,0,0,-1--1--1,0-0-0,|12||255-128-0 +1,64,63,45,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(150,94)| +10,65,Flow Trend,333,81,41,10,8,3,13,2,0,0,0,0,0-0-0,0-0-0,|12||0-0-255 +10,66,Stock Trend,462,82,44,10,8,3,13,2,0,0,0,0,0-0-0,0-0-0,|12||0-0-255 +1,67,13,65,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(333,145)| +1,68,12,66,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(485,128)| +10,69,Horizon,400,120,29,10,8,3,13,2,0,0,0,0,0-0-0,0-0-0,|12||0-0-255 +1,70,69,65,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(372,103)| +1,71,69,66,0,13,0,0,1,64,0,0-0-0,|12||0-0-0,1|(424,104)| +10,72,Smoothing Time,392,40,59,10,8,3,0,2,0,0,0,0,0-0-0,0-0-0,|0||0-0-255 +1,73,72,65,0,0,0,0,1,64,0,0-0-0,|0||0-0-0,1|(368,56)| +1,74,72,66,0,0,0,0,1,64,0,0-0-0,|0||0-0-0,1|(420,57)| +12,75,0,131,581,79,18,8,7,0,0,-1,0,0,0 +Tom Fiddaman, 2012 - in the public domain +12,76,0,363,579,98,15,8,135,0,18,-1,0,253,253,-1--1--1,0-0-0,|0|U|0-0-255 +http://models.metasd.com|http://models.metasd.com +///---\\\ +:GRAPH Stock_vs_Flow +:TITLE Stock vs Flow +:X-AXIS Measured Flow +:DOTS +:SCALE +:VAR Measured Stock + +:GRAPH Stock_1st_Difference +:TITLE Stock 1st Difference +:X-AXIS Lagged Measured Flow +:DOTS +:SCALE +:VAR Stock 1st Difference + +:GRAPH Trend_Comparison +:TITLE Trend Comparison +:X-DIV 4 +:SCALE +:VAR Flow Trend +:SCALE +:VAR Stock Trend +:L<%^E!@ +1:RandomFlowNoiseErr.vdf +9:RandomFlowNoiseErr +15:0,0,0,0,0,0 +19:100,0 +27:2, +34:0, +4:Time +5:Flow Trend +35:Date +36:YYYY-MM-DD +37:2000 +38:1 +39:1 +40:2 +41:0 +24:0 +25:100 +26:100 diff --git a/test/metasd/beer-game/PROVENANCE.md b/test/metasd/beer-game/PROVENANCE.md new file mode 100644 index 000000000..46e70638c --- /dev/null +++ b/test/metasd/beer-game/PROVENANCE.md @@ -0,0 +1,49 @@ +# The Beer Game + +A Vensim implementation of the classic Beer Distribution Game from system +dynamics. This is the **arrayed/subscripted** version, which is the one that +uses Vensim macros. + +## Source + +- MetaSD post: https://metasd.com/2018/03/the-beer-game/ +- Direct download (zip): https://metasd.com/wp-content/uploads/2018/03/Beer-Game-Fiddaman-Array.zip +- Downloaded: 2026-05-13 + +The contents of `Beer-Game-Fiddaman-Array.zip` are extracted here as-is: +`RealBeer4-Sterman13.mdl`, its `.vpm` published companion, `.cin` / `.voc` +control files, `.cmd` command scripts, `.vpd` payoff definitions, and the +`Beer Table 4b.xls` / `StermanTable4b.txt` data files. + +## Attribution + +- Posted by Tom Fiddaman (Ventana Systems) on the MetaSD blog (March 2018). + Vensim implementation by Tom Fiddaman. +- The underlying Beer Game is the classic MIT system dynamics exercise; John + Sterman's *Management Science* analysis is the basis for the calibrated + decision heuristics. +- The PINK NOISE macro included in the model was contributed by Ed Anderson + (MIT / University of Texas - Austin). + +## License + +The MetaSD blog is licensed under a Creative Commons Attribution 3.0 Unported +License (CC BY 3.0). The site notes that some Model Library content may be +subject to the original author's copyright; these model files carry no separate +license statement. + +## Macro content + +`RealBeer4-Sterman13.mdl` contains three macros: + +- `PINK NOISE(noise mean, std deviation, correlation time, time step, seed)` -- + contains a stock (`INTEG`), uses `RANDOM NORMAL`, and has several internal + auxiliary equations. +- `ROUND(x, interval)` -- one-line macro rounding `x` to the nearest `interval`; + uses the `INTEGER` builtin. +- `PEAK(x)` -- one-line macro tracking the running maximum of `x` using + `SAMPLE IF TRUE`; the macro body references its own output name. + +Note: the companion non-arrayed version from the same post +(`RB4-S13-NoSS-6.mdl` in `Beer-Game-Fiddaman-NoSubscripts.zip`) does **not** use +macros and was not added. diff --git a/test/metasd/beer-game/RealBeer4-Sterman13.mdl b/test/metasd/beer-game/RealBeer4-Sterman13.mdl new file mode 100644 index 000000000..e6ef9d2bd --- /dev/null +++ b/test/metasd/beer-game/RealBeer4-Sterman13.mdl @@ -0,0 +1,765 @@ +{UTF-8} +:MACRO: PINK NOISE(noise mean, std deviation, correlation time, time step, seed) +PINK NOISE = INTEG(updating pink noise,noise mean) + ~ noise mean + ~ Contributed by Ed Anderson, MIT/U. Texas - Austin + Description: The pink noise molecule described generates a simple random + series with autocorrelation. This is useful in representing time series, + like rainfall from day to day, in which today's value has some correlation + with what happened yesterday. This particular formulation will also have + properties such as standard deviation and mean that are insensitive both to + the time step and the correlation (smoothing) time. Finally, the output as + a whole and the difference in values between any two days is guaranteed to + be Gaussian (normal) in distribution. + + Behavior: Pink noise series will have both a historical and a random + component during each period. The relative "trend-to-noise" ratio is + controlled by the length of the correlation time. As the correlation time + approaches zero, the pink noise output will become more independent of its + historical value and more "noisy." On the other hand, as the correlation + time approaches infinity, the pink noise output will approximate a + continuous time random walk or Brownian motion. Displayed above are two + time series with correlation times of 1 and 8 months. While both series + have approximately the same standard deviation, the 1-month correlation time + series is less smooth from period to period than the 8-month series, which + is characterized by "sustained" swings in a given direction. Note that this + behavior will be independent of the time-step. + + The "pink" in pink noise refers to the power spectrum of the output. A time + series in which each period's observation is independent of the past is + characterized by a flat or "white" power spectrum. Smoothing a time series + attenuates the higher or "bluer" frequencies of the power spectrum, leaving + the lower or "redder" frequencies relatively stronger in the output. + + Caveats: This assumes the use of Euler integration with a time step of no + more than 1/4 of the correlation time. Very long correlation times should be + avoided also as the multiplication in the scaled white noise will become + progressively less accurate. + + Technical Notes: This particular form of pink noise is superior to that of + Britting presented in Richardson and Pugh (1981) because the Gaussian + (Normal) distribution of the output does not depend on the Central Limit + Theorem. (Dynamo did not have a Gaussian random number generator and hence + R&P had to invoke the CLM to get a normal distribution.) Rather, this + molecule's normal output is a result of the observations being a sum of + Gaussian draws. Hence, the series over short intervals should better + approximate normality than the macro in R&P. + + MEAN: This is the desired mean for the pink noise. + STD DEVIATION: This is the desired standard deviation for the pink noise. + CORRELATION TIME: This is the smooth time for the noise, or for the more \ + technically minded this is the inverse of the filter's cut-off frequency \ + in radians. + | + +updating pink noise = gap/correlation time + ~ noise mean/correlation time + ~ | + +gap = scaled white noise-PINK NOISE + ~ noise mean + ~ | + +scaled white noise =noise mean+white noise*std deviation*SQRT((2-time step/correlation time\ + )/(time step/correlation time)) + ~ noise mean + ~ This adjusts the standard deviation of the white noise to compensate for the time \ + step and the + correlation time to produce the appropriate pink noise std \ + deviation. + | + +white noise = RANDOM NORMAL(-6,6,0,1,seed){RANDOM NORMAL()} + ~ dmnl + ~ This is an independent, identically distributed random quantity drawn every time \ + step. The distribution is gaussian with mean = 0 and variance = 1. + Note that RANDOM NORMAL is truncated +/- 6 standard deviations here. + For Vensim 1.62 syntax, remove the arguments to RANDOM NORMAL. + | + +:END OF MACRO: +:MACRO: ROUND(x,interval) +ROUND = IF THEN ELSE(interval = 0, x, interval*INTEGER(x/interval+0.5)) + ~ x + ~ Rounds x to the nearest interval + | + +:END OF MACRO: +:MACRO: PEAK(x) +PEAK = SAMPLE IF TRUE(x>PEAK,x,x) + ~ x + ~ | + +:END OF MACRO: +Minimum Inventory[Games,Level]=SAMPLE IF TRUE( + Effective Inventory[Games,Level]Peak Inventory[Games,Level], + Effective Inventory[Games,Level], Effective Inventory[Games,Level] ) + ~ cases + ~ ~ :SUPPLEMENTARY + | + +Peak Order Rate[Games,Level]=SAMPLE IF TRUE( + Placing[Games,Level]>Peak Order Rate[Games,Level], + Placing[Games,Level], Placing[Games,Level]) + ~ cases/week + ~ ~ :SUPPLEMENTARY + | + +******************************************************** + .System +********************************************************~ + | + +Desired Order Rate[Games,Level]= + Expected Order Rate[Games,Level] + +Stock Correction Rate[Games,Level] + *(Desired Stock[Games,Level]-Effective Inventory[Games,Level] + -Supply Line Weight[Games,Level]*Effective Supply Line[Games,Level]) + ~ cases/week + ~ | + +Desired Stock[Games,Level]= + 17 + ~ cases + ~ | + +Fixed Order Rate= INITIAL( + Initial Ordering) + ~ cases/week + ~ | + +Games: + (Game1-Game13) + ~ + ~ | + +Lower Levels: + Retailer,Wholesaler,Distributor -> Upper Levels + ~ + ~ | + +Initial Inventory= + 12 + ~ cases + ~ | + +Upper Levels: + Wholesaler, Distributor, Factory -> Lower Levels + ~ + ~ | + +Level: + Retailer,Wholesaler,Distributor,Factory + ~ + ~ | + +Incoming Order Rate[Games,Retailer]= + IF THEN ELSE(Time < Free Order Start Time, Fixed Order Rate, + ROUND(Initial Ordering + STEP(Order Step[Games],Order Step Time) + + Order Noise[Games], Integer Constraint)) ~~| +Incoming Order Rate[Games,Upper Levels]= + Processing[Games,Upper Levels] + ~ cases/week + ~ Retail orders come from deck; others come from incoming order slips. + | + +Adjusting[Games,Level]= + (Incoming Order Rate[Games,Level]-Expected Order Rate[Games,Level]) + *Expectation Adjustment Rate[Games,Level] + ~ (cases/week)/week + ~ | + +Advancing[Games,Level]= + Orders Placed[Games,Level]/One Week + ~ cases/week + ~ Players advance slips, and factories brew beer. + | + +Placing[Games,Level]= + IF THEN ELSE(Time < Free Order Start Time, Fixed Order Rate, + MAX(0,ROUND(Desired Order Rate[Games,Level], Integer Constraint))) + ~ cases/week + ~ | + +Booking[Games,Level]= + Incoming Order Rate[Games,Level] + ~ cases/week + ~ | + +In Transit 1[Games,Level]= INTEG ( + Starting[Games,Level]-Moving[Games,Level], + Initial Ordering*One Week) + ~ cases + ~ | + +Desired Shipping[Games,Level]= + Incoming Order Rate[Games,Level]+Backlog[Games,Level]/One Week + ~ cases/week + ~ | + +Starting[Games,Lower Levels]= + Shipping[Games,Upper Levels] ~~| +Starting[Games,Factory]= + Advancing[Games,Factory] + ~ cases/week + ~ | + +Expected Order Rate[Games,Level]= INTEG ( + Adjusting[Games,Level], + Initial Ordering) + ~ cases/week + ~ | + +Expectation Adjustment Rate[Games,Level]= + 0.25 + ~ fraction/week + ~ | + +Free Order Start Time= + 5 + ~ week + ~ | + +Backlog[Games,Level]= INTEG ( + Booking[Games,Level]-Fulfilling[Games,Level], + 0) + ~ cases + ~ | + +Processing[Games,Upper Levels]= + Incoming Orders[Games,Upper Levels]/One Week + ~ cases/week + ~ Players turn over incoming order slips, process order, and discard slip. + | + +Effective Inventory[Games,Level]= + Recorded Inventory[Games,Level]-Recorded Backlog[Games,Level] + ~ cases + ~ | + +Effective Supply Line[Games,Level]= + Supply Line[Games,Level]-Receiving[Games,Level]*One Week + ~ cases + ~ Effective supply line perceived by players at time of order placement \ + (shipment received in current week is deducted). + | + +Fulfilling[Games,Level]= + Shipping[Games,Level] + ~ cases/week + ~ | + +In Transit 2[Games,Level]= INTEG ( + Moving[Games,Level]-Receiving[Games,Level], + Initial Ordering*One Week) + ~ cases + ~ | + +Incoming Orders[Games,Upper Levels]= INTEG ( + Advancing[Games,Lower Levels]-Processing[Games,Upper Levels], + Initial Ordering*One Week) + ~ cases + ~ Incoming orders at upper levels come from advancement of orders placed at \ + lower levels. + | + +Inventory[Games,Level]= INTEG ( + Receiving[Games,Level]-Shipping[Games,Level], + Initial Inventory) + ~ cases + ~ | + +Stock Correction Rate[Games,Level]= + 0.26 + ~ fraction/week + ~ | + +Maximum Shipping[Games,Level]= + Inventory[Games,Level]/One Week+Receiving[Games,Level] + ~ cases/week + ~ | + +Moving[Games,Level]= + In Transit 1[Games,Level]/One Week + ~ cases/week + ~ | + +One Week= + 1 + ~ week + ~ | + +Orders Placed[Games,Level]= INTEG ( + +Placing[Games,Level]-Advancing[Games,Level], + Initial Ordering*One Week) + ~ cases + ~ | + +Receiving[Games,Level]= + In Transit 2[Games,Level]/One Week + ~ cases/week + ~ | + +Recorded Backlog[Games,Level]= + Backlog[Games,Level]+(Booking[Games,Level]-Fulfilling[Games,Level])*One Week + ~ cases + ~ Backlog recorded on players' record sheets. + | + +Recorded Inventory[Games,Level]= + Inventory[Games,Level]+(Receiving[Games,Level]-Shipping[Games,Level])*One Week + ~ cases + ~ Inventory recorded on players' record sheets. + | + +Shipping[Games,Level]= + MIN(Desired Shipping[Games,Level],Maximum Shipping[Games,Level]) + ~ cases/week + ~ | + +Supply Line[Games,Lower Levels]= INTEG ( + Placing[Games,Lower Levels]-Receiving[Games,Lower Levels], + Orders Placed[Games,Lower Levels]+Incoming Orders[Games,Upper Levels]+Backlog[Games\ + ,Upper Levels]+In Transit 1[Games,Lower Levels]+In Transit 2[Games,Lower Levels]) ~~| +Supply Line[Games,Factory]= INTEG ( + Placing[Games,Factory]-Receiving[Games,Factory], + Orders Placed[Games,Factory]+In Transit 1[Games,Factory]+In Transit 2[Games,Factory\ + ]) + ~ cases + ~ | + +Supply Line Weight[Games,Level]= + 0.34 + ~ dmnl + ~ | + +******************************************************** + .Cost +********************************************************~ + | + +Total Cumulative Cost= + SUM(Game Cumulative Cost[Games!]) + ~ $ + ~ ~ :SUPPLEMENTARY + | + +Total Cost= + SUM(Game Cost[Games!]) + ~ $/week + ~ ~ :SUPPLEMENTARY + | + +Backlog Cost[Games,Level]= + Backlog Unit Cost*Recorded Backlog[Games,Level] + ~ $/week + ~ | + +Backlog Unit Cost= + 1 + ~ $/case/week + ~ | + +Cost[Games,Level]= + Inventory Cost[Games,Level]+Backlog Cost[Games,Level] + ~ $/week + ~ | + +Cumulative Cost[Games,Level]= INTEG ( + Cost[Games,Level], + 0) + ~ $ + ~ | + +Game Cumulative Cost[Games]= + SUM(Cumulative Cost[Games,Level!]) + ~ $ + ~ | + +Inventory Unit Cost= + 0.5 + ~ $/case/week + ~ | + +Inventory Cost[Games,Level]= + Inventory Unit Cost*Recorded Inventory[Games,Level] + ~ $/week + ~ | + +Game Cost[Games]= + SUM(Cost[Games,Level!]) + ~ $/week + ~ | + +******************************************************** + .Customer +********************************************************~ + | + +Order Step[Games]= INITIAL( + MAX(-Initial Ordering, + Order Step Size+Order Step Size SD*RANDOM NORMAL(-6,6,1,1,Order Step Seed))) + ~ cases/week + ~ | + +Order Step Time = 5 + ~ week + ~ | + +Noise SD= + 0 + ~ cases/week + ~ | + +Noise Correlation Time= + 8 + ~ weeks + ~ | + +Order Noise[Games]= + PINK NOISE(Noise Mean,Noise SD,Noise Correlation Time,TIME STEP,Order Noise Seed+Games\ + ) + ~ cases/week + ~ Note: Games is added to the noise seed to prevent each subscript of the \ + macro from being recognized as identical, which would cause all of the \ + noise streams to be identical. + | + +Order Noise Seed= + 37 + ~ dmnl + ~ | + +Noise Mean= + 0 + ~ cases/week + ~ | + +Order Step Size SD= + 0 + ~ cases/week + ~ | + +Order Step Seed= + 137 + ~ dmnl + ~ | + +Initial Ordering= + 4 + ~ cases/week + ~ | + +Order Step Size= + 4 + ~ cases/week + ~ | + +Integer Constraint= + 1 + ~ cases/week + ~ 0 = no constraint; 1 = integer constraint; other values (e.g 0.1 or 10) \ + may also be used + | + +******************************************************** + .Control +********************************************************~ + Simulation Control Paramaters + | + +TIME STEP = 1 + ~ week + ~ The time step for the simulation. + | + +FINAL TIME = 36 + ~ week + ~ The final time for the simulation. + | + +INITIAL TIME = 1 + ~ week + ~ The initial time for the simulation. + | + +SAVEPER = + TIME STEP + ~ week + ~ The frequency with which output is stored. + | + +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*System +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-0|-1--1--1|-1--1--1|96,96,100,0 +10,1,Orders Placed,566,360,40,20,3,3,0,0,0,0,0,0 +10,2,Incoming Orders,796,360,40,20,3,3,0,0,0,0,0,0 +10,3,Inventory,541,688,40,20,3,3,0,0,0,0,0,0 +10,4,In Transit 2,731,689,40,20,3,3,0,0,0,0,0,0 +10,5,In Transit 1,911,689,40,20,3,3,0,0,0,0,0,0 +12,6,48,382,689,10,8,0,3,0,0,-1,0,0,0 +1,7,9,6,4,0,0,22,0,0,0,-1--1--1,,1|(418,689)| +1,8,9,3,100,0,0,22,0,0,0,-1--1--1,,1|(478,689)| +11,9,48,450,689,6,8,34,3,0,0,1,0,0,0 +10,10,Shipping,450,708,28,11,32,3,0,0,-1,0,0,0 +1,11,13,3,4,0,0,22,0,0,0,-1--1--1,,1|(608,689)| +1,12,13,4,100,0,0,22,0,0,0,-1--1--1,,1|(669,689)| +11,13,1212,641,689,6,8,34,3,0,0,1,0,0,0 +10,14,Receiving,641,708,31,11,32,3,0,0,-1,0,0,0 +12,15,48,975,359,10,8,0,3,0,0,-1,0,0,0 +1,16,18,15,4,0,0,22,0,0,0,-1--1--1,,1|(933,360)| +1,17,18,2,100,0,0,22,0,0,0,-1--1--1,,1|(863,360)| +11,18,48,896,360,6,8,34,3,0,0,1,0,0,0 +10,19,Processing,896,379,35,11,32,3,0,0,-1,0,0,0 +1,20,22,2,4,0,0,22,0,0,0,-1--1--1,,1|(721,360)| +1,21,22,1,100,0,0,22,0,0,0,-1--1--1,,1|(640,360)| +11,22,1004,681,360,6,8,34,3,0,0,1,0,0,0 +10,23,Advancing,681,379,34,11,32,3,0,0,-1,0,0,0 +12,24,48,400,360,10,8,0,3,0,0,-1,0,0,0 +1,25,27,1,4,0,0,22,0,0,0,-1--1--1,,1|(499,360)| +1,26,27,24,100,0,0,22,0,0,0,-1--1--1,,1|(435,360)| +11,27,48,467,360,6,8,34,3,0,0,1,0,0,0 +10,28,Placing,467,379,24,11,32,3,0,0,-1,0,0,0 +1,29,31,4,4,0,0,22,0,0,0,-1--1--1,,1|(793,689)| +1,30,31,5,100,0,0,22,0,0,0,-1--1--1,,1|(849,689)| +11,31,396,821,689,6,8,34,3,0,0,1,0,0,0 +10,32,Moving,821,708,25,11,32,3,0,0,-1,0,0,0 +10,33,Backlog,734,490,40,20,3,3,0,0,0,0,0,0 +12,34,48,935,492,10,8,0,3,0,0,-1,0,0,0 +1,35,37,33,4,0,0,22,0,0,0,-1--1--1,,1|(817,491)| +1,36,37,34,100,0,0,22,0,0,0,-1--1--1,,1|(898,491)| +11,37,48,866,491,6,8,34,3,0,0,1,0,0,0 +10,38,Booking,866,510,28,11,32,3,0,0,-1,0,0,0 +12,39,48,535,492,10,8,0,3,0,0,-1,0,0,0 +1,40,42,39,4,0,0,22,0,0,0,-1--1--1,,1|(582,492)| +1,41,42,33,100,0,0,22,0,0,0,-1--1--1,,1|(662,492)| +11,42,48,625,492,6,8,34,3,0,0,1,0,0,0 +10,43,Fulfilling,625,511,27,11,32,3,0,0,-1,0,0,0 +1,44,4,14,1,0,49,0,2,192,0,-1--1--1,|12||255-0-0,1|(675,743)| +1,45,5,32,1,0,49,0,2,192,0,-1--1--1,|12||255-0-0,1|(862,738)| +10,46,Desired Shipping,506,450,54,11,0,3,0,0,0,0,0,0 +1,47,33,46,1,0,0,0,0,64,0,-1--1--1,,1|(659,464)| +10,48,Maximum Shipping,596,780,60,11,0,3,0,0,0,0,0,0 +1,49,3,48,1,0,0,0,0,64,0,-1--1--1,,1|(576,720)| +1,50,48,10,1,0,50,0,2,64,0,-1--1--1,|12||255-0-0,1|(521,768)| +1,51,46,9,1,0,50,0,2,192,0,-1--1--1,|12||255-0-0,1|(451,519)| +1,52,2,19,1,0,50,0,2,0,0,-1--1--1,|12||255-0-0,1|(850,400)| +1,53,9,43,1,0,50,0,2,64,0,-1--1--1,|12||255-0-0,1|(465,579)| +10,54,Recorded Inventory,556,620,63,11,0,3,0,0,0,0,0,0 +10,55,Recorded Backlog,735,562,59,11,0,3,0,0,0,0,0,0 +1,56,3,54,0,0,51,0,2,64,0,-1--1--1,|12||255-0-0,1|(547,656)| +1,57,33,55,0,0,51,0,2,64,0,-1--1--1,|12||255-0-0,1|(734,523)| +1,58,38,55,1,0,51,0,2,64,0,-1--1--1,|12||255-0-0,1|(819,540)| +1,59,43,55,1,0,51,0,2,192,0,-1--1--1,|12||255-0-0,1|(654,534)| +1,60,1,23,1,0,52,0,2,192,0,-1--1--1,|12||255-0-0,1|(627,405)| +10,61,Desired Order Rate,326,470,62,11,0,3,0,0,0,0,0,0 +1,62,14,48,1,0,0,0,0,64,0,-1--1--1,,1|(626,743)| +1,63,13,54,1,0,51,0,2,64,0,-1--1--1,|12||255-0-0,1|(612,656)| +1,64,9,54,1,0,51,0,2,64,0,-1--1--1,|12||255-0-0,1|(479,656)| +10,65,Effective Inventory,556,570,59,11,0,3,0,0,0,0,0,0 +1,66,54,65,1,0,0,0,0,64,0,-1--1--1,,1|(562,597)| +1,67,55,65,1,0,0,0,0,64,0,-1--1--1,,1|(652,589)| +1,68,65,61,1,0,0,0,0,64,0,-1--1--1,,1|(361,508)| +1,69,61,28,1,0,53,0,2,128,0,-1--1--1,|12||255-0-0,1|(402,392)| +10,70,Desired Stock,218,381,46,11,0,3,0,0,0,0,0,0 +10,71,Integer Constraint,426,300,56,11,0,3,0,0,0,0,0,0 +1,72,71,27,0,0,0,0,0,64,0,-1--1--1,,1|(444,327)| +10,73,Stock Correction Rate,316,590,71,11,0,3,0,0,0,0,0,0 +10,74,Supply Line Weight,216,560,62,11,0,3,0,0,0,0,0,0 +1,75,74,61,0,0,0,0,0,64,0,-1--1--1,,1|(265,519)| +1,76,73,61,0,0,0,0,0,64,0,-1--1--1,,1|(319,536)| +10,77,One Week,796,310,36,11,0,3,1,2,-1,0,0,0,0-0-0,0-0-0,|12||128-128-128 +1,78,77,22,1,1,0,0,1,0,0,128-128-128,|12||0-0-0,1|(727,331)| +1,79,77,18,1,1,0,0,1,0,0,128-128-128,|12||0-0-0,1|(854,328)| +10,80,One Week,456,410,45,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,81,80,46,0,1,0,0,1,64,0,128-128-128,|12||0-0-0,1|(474,425)| +10,82,One Week,806,610,45,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,83,82,55,0,1,0,0,1,64,0,128-128-128,|12||0-0-0,1|(776,589)| +1,84,82,54,0,1,0,0,1,64,0,128-128-128,|12||0-0-0,1|(696,613)| +1,85,82,13,0,1,0,0,1,64,0,128-128-128,|12||0-0-0,1|(721,650)| +1,86,82,31,0,1,0,0,1,64,0,128-128-128,|12||0-0-0,1|(812,645)| +10,87,One Week,696,820,45,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,88,87,48,0,1,0,0,1,64,0,128-128-128,|12||0-0-0,1|(652,802)| +10,89,Supply Line,601,245,40,20,3,3,0,0,0,0,0,0 +12,90,48,432,243,10,8,0,3,0,0,-1,0,0,0 +11,91,48,500,243,6,8,2,3,0,0,1,0,0,0 +1,92,91,89,4,0,0,22,0,0,0,-1--1--1,,1|(533,243)| +1,93,91,90,100,0,0,22,0,0,0,-1--1--1,,1|(468,243)| +12,94,48,795,245,10,8,0,3,0,0,-1,0,0,0 +1,95,97,94,4,0,0,22,0,0,0,-1--1--1,,1|(752,245)| +1,96,97,89,100,0,0,22,0,0,0,-1--1--1,,1|(674,245)| +11,97,48,714,245,6,8,34,3,0,0,1,0,0,0 +10,98,Receiving,714,264,40,11,32,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,99,27,91,1,0,0,0,0,64,0,-1--1--1,,1|(494,306)| +10,100,Effective Supply Line,486,190,66,11,0,3,0,0,0,0,0,0 +1,101,89,100,1,0,0,0,0,64,0,-1--1--1,,1|(577,214)| +1,102,97,100,1,0,0,0,0,64,0,-1--1--1,,1|(646,213)| +1,103,100,61,1,0,0,0,0,64,0,-1--1--1,,1|(355,289)| +10,104,One Week,675,170,45,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,105,104,100,1,1,0,0,1,64,0,128-128-128,|12||0-0-0,1|(564,170)| +10,106,Incoming Order Rate,946,430,66,11,0,3,0,0,0,0,0,0 +1,107,106,46,1,0,0,0,0,64,0,-1--1--1,,1|(714,427)| +1,108,106,37,1,0,50,0,2,64,0,-1--1--1,|12||255-0-0,1|(907,470)| +10,109,Initial Ordering,1096,320,47,11,0,3,0,0,-1,0,0,0 +1,110,109,106,0,0,0,0,0,0,0,-1--1--1,,1|(1026,370)| +10,111,Order Step Size,1236,310,51,11,0,3,0,0,-1,0,0,0 +1,112,19,106,1,0,0,0,0,64,0,-1--1--1,,1|(916,391)| +10,113,Expected Order Rate,716,110,40,20,3,3,0,0,0,0,0,0 +12,114,48,926,110,10,8,0,3,0,0,-1,0,0,0 +1,115,117,113,4,0,0,22,0,0,0,-1--1--1,,1|(798,110)| +1,116,117,114,100,0,0,22,0,0,0,-1--1--1,,1|(884,110)| +11,117,48,846,110,6,8,34,3,0,0,1,0,0,0 +10,118,Adjusting,846,129,31,11,32,3,0,0,-1,0,0,0 +1,119,113,118,1,0,0,0,0,64,0,-1--1--1,,1|(776,153)| +1,120,106,118,1,0,0,0,0,64,0,-1--1--1,,1|(992,233)| +10,121,Expectation Adjustment Rate,826,40,90,11,0,3,0,0,0,0,0,0 +1,122,121,117,0,0,0,0,0,64,0,-1--1--1,,1|(834,70)| +1,123,113,61,1,0,0,0,0,64,0,-1--1--1,,1|(323,285)| +12,124,48,1081,687,10,8,0,3,0,0,-1,0,0,0 +1,125,127,5,4,0,0,22,0,0,0,-1--1--1,,1|(978,687)| +1,126,127,124,100,0,0,22,0,0,0,-1--1--1,,1|(1044,687)| +11,127,48,1012,687,6,8,34,3,0,0,1,0,0,0 +10,128,Starting,1012,706,25,11,32,3,0,0,-1,0,0,0 +10,129,Fixed Order Rate,566,290,65,11,0,2,0,2,0,0,0,0,0-0-0,0-0-0,|12||128-128-128 +10,130,Free Order Start Time,626,310,70,11,0,3,0,0,0,0,0,0 +1,131,129,27,0,0,0,0,0,64,0,-1--1--1,,1|(516,324)| +1,132,130,27,1,0,0,0,0,64,0,-1--1--1,,1|(539,329)| +10,133,Time,556,410,26,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,134,133,28,0,1,0,0,0,0,0,-1--1--1,,1|(517,396)| +1,135,70,61,1,0,0,0,0,64,0,-1--1--1,,1|(257,428)| +10,136,Order Step Size SD,1246,340,63,11,0,3,0,0,0,0,0,0 +10,137,Order Step Seed,1246,370,54,11,0,3,0,0,-1,0,0,0 +10,138,Order Step,1106,350,37,11,0,3,0,0,0,0,0,0 +1,139,138,106,0,0,0,0,0,64,0,-1--1--1,,1|(1032,386)| +10,140,Order Noise,1113,550,41,11,0,3,0,0,-1,0,0,0 +10,141,Noise Correlation Time,1313,540,73,11,0,3,0,0,-1,0,0,0 +1,142,141,140,0,0,0,0,0,0,0,-1--1--1,,1|(1203,544)| +10,143,Noise Mean,1263,570,40,11,0,3,0,0,-1,0,0,0 +1,144,143,140,0,0,0,0,0,0,0,-1--1--1,,1|(1195,561)| +10,145,Noise SD,1243,600,32,11,0,3,0,0,-1,0,0,0 +1,146,145,140,0,0,0,0,0,0,0,-1--1--1,,1|(1184,577)| +10,147,Order Noise Seed,1233,640,58,11,0,3,0,0,-1,0,0,0 +1,148,147,140,0,0,0,0,0,0,0,-1--1--1,,1|(1178,599)| +10,149,TIME STEP,1173,670,50,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,150,149,140,0,1,0,0,0,0,0,-1--1--1,,1|(1146,616)| +1,151,140,106,0,0,0,0,0,64,0,-1--1--1,,1|(1035,494)| +10,152,Integer Constraint,1126,420,65,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,153,152,106,0,0,0,0,0,64,0,-1--1--1,,1|(1043,424)| +10,154,Initial Inventory,366,760,49,11,0,3,0,0,-1,0,0,0 +10,155,Order Step Time,1116,380,54,11,0,3,0,0,-1,0,0,0 +1,156,155,106,0,0,0,0,0,0,0,-1--1--1,,1|(1037,403)| +10,157,Time,1106,490,26,11,0,2,1,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,158,157,106,0,1,0,0,0,0,0,-1--1--1,,1|(1034,463)| +10,159,Fixed Order Rate,1076,280,56,11,0,3,0,0,-1,0,0,0 +10,160,Free Order Start Time,1136,450,79,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +1,161,160,106,0,0,0,0,0,64,0,-1--1--1,,1|(1041,439)| +1,162,159,106,1,0,0,0,0,64,0,-1--1--1,,1|(1026,348)| +1,163,10,128,3,0,0,2,0,64,0,-1--1--1,,2|(451,834)|(1014,832)| +1,164,23,127,3,0,0,2,0,64,0,-1--1--1,,1|(1011,493)| +1,165,109,1,0,1,0,0,0,0,1,-1--1--1,,1|(834,338)| +1,166,77,1,0,1,0,0,0,0,1,-1--1--1,,1|(689,332)| +1,167,109,2,0,1,0,0,0,0,1,-1--1--1,,1|(949,339)| +1,168,77,2,0,1,0,0,0,0,1,-1--1--1,,1|(796,323)| +1,169,154,3,0,1,0,0,0,0,1,-1--1--1,,1|(440,729)| +1,170,109,4,0,1,0,0,0,0,1,-1--1--1,,1|(922,495)| +1,171,77,4,0,1,0,0,0,0,1,-1--1--1,,1|(765,488)| +1,172,109,5,0,1,0,0,0,0,1,-1--1--1,,1|(1009,493)| +1,173,77,5,0,1,0,0,0,0,1,-1--1--1,,1|(849,488)| +1,174,33,89,0,1,0,0,0,0,1,-1--1--1,,1|(670,373)| +1,175,5,89,0,1,0,0,0,0,1,-1--1--1,,1|(760,472)| +1,176,4,89,0,1,0,0,0,0,1,-1--1--1,,1|(667,473)| +1,177,2,89,0,1,0,0,0,0,1,-1--1--1,,1|(704,306)| +1,178,1,89,0,1,0,0,0,0,1,-1--1--1,,1|(581,309)| +1,179,109,113,0,1,0,0,0,0,1,-1--1--1,,1|(920,222)| +1,180,109,138,0,1,0,0,0,0,1,-1--1--1,,1|(1098,328)| +1,181,137,138,0,0,0,0,0,0,1,-1--1--1,,1|(1174,360)| +1,182,111,138,0,0,0,0,0,0,1,-1--1--1,,1|(1177,327)| +1,183,136,138,0,0,0,0,0,0,1,-1--1--1,,1|(1169,344)| +1,184,109,159,0,1,0,0,0,0,1,-1--1--1,,1|(1089,306)| +12,185,0,189,63,86,28,8,4,0,18,-1,0,0,0,-1--1--1,0-0-0,|12|B|128-0-0 +Beer Distribution Game, Tom Fiddaman, Ventana Systems +12,186,0,189,127,67,18,8,135,0,18,-1,0,253,253,-1--1--1,0-0-0,|12|U|0-0-255 +http://metasd.com|http://metasd.com +\\\---/// Sketch information - do not modify anything except names +V300 Do not put anything below this section - it will be ignored +*Cost & Indicators +$192-192-192,0,Times New Roman|12||0-0-0|0-0-0|0-0-0|-1--1--1|-1--1--1|96,96,0,0 +10,1,Recorded Backlog,140,127,68,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,2,Recorded Inventory,139,172,72,11,0,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,3,Game Cost,520,200,37,11,0,3,0,0,0,0,0,0 +10,4,Backlog Cost,330,127,44,11,0,3,0,0,0,0,0,0 +10,5,Inventory Cost,329,172,47,11,0,3,0,0,0,0,0,0 +1,6,4,20,0,0,0,0,0,64,0,-1--1--1,,1|(430,127)| +1,7,5,20,0,0,0,0,0,64,0,-1--1--1,,1|(431,148)| +1,8,20,3,0,0,0,0,0,64,0,-1--1--1,,1|(518,157)| +1,9,1,4,0,0,0,0,0,64,0,-1--1--1,,1|(240,127)| +1,10,2,5,0,0,0,0,0,64,0,-1--1--1,,1|(239,172)| +10,11,Backlog Unit Cost,330,77,58,11,0,3,0,0,0,0,0,0 +10,12,Inventory Unit Cost,329,232,62,11,0,3,0,0,0,0,0,0 +1,13,11,4,0,0,0,0,0,64,0,-1--1--1,,1|(330,95)| +1,14,12,5,0,0,0,0,0,64,0,-1--1--1,,1|(329,209)| +10,15,Cumulative Cost,652,110,40,20,3,3,0,0,0,0,0,0 +12,16,48,438,109,8,8,0,3,0,0,-1,0,0,0 +1,17,19,15,4,0,0,22,0,0,0,-1--1--1,,1|(568,109)| +1,18,19,16,100,0,0,22,0,0,0,-1--1--1,,1|(479,109)| +11,19,48,518,109,6,8,34,3,0,0,1,0,0,0 +10,20,Cost,518,128,17,11,32,3,0,0,0,0,0,0 +10,21,Game Cumulative Cost,652,200,72,11,0,3,0,0,0,0,0,0 +1,22,15,21,0,0,0,0,0,64,0,-1--1--1,,1|(652,152)| +10,23,Total Cost,521,253,34,11,0,3,0,0,0,0,0,0 +10,24,Total Cumulative Cost,653,253,70,11,0,3,0,0,0,0,0,0 +1,25,3,23,0,0,0,0,0,64,0,-1--1--1,,1|(520,219)| +1,26,21,24,0,0,0,0,0,64,0,-1--1--1,,1|(652,219)| +10,27,Effective Inventory,234,398,35,19,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,28,Placing,232,529,33,11,8,2,0,3,-1,0,0,0,128-128-128,0-0-0,|12||128-128-128 +10,29,Peak Inventory,408,372,48,11,8,3,0,0,0,0,0,0 +10,30,Minimum Inventory,400,436,31,19,8,3,0,0,0,0,0,0 +10,31,Peak Order Rate,394,529,54,11,8,3,0,0,0,0,0,0 +1,32,28,31,0,0,0,0,0,64,0,-1--1--1,,1|(295,529)| +1,33,27,29,0,0,0,0,0,64,0,-1--1--1,,1|(307,387)| +1,34,27,30,0,0,0,0,0,64,0,-1--1--1,,1|(312,415)| +///---\\\ +:GRAPH INVENTORY-ORDERING +:TITLE Inventory-Ordering +:X-AXIS Effective Inventory +:SCALE +:VAR Placing +:L<%^E!@ +1:Sterman1longB.vdf +1:Sterman1long.vdf +9:Sterman1longB +22:$,Dollar,Dollars,$s +22:case,cases +22:Day,Days +22:Hour,Hours +22:Month,Months +22:Person,People,Persons +22:Unit,Units +22:Week,Weeks +22:Year,Years +10:StermanTable4b.txt, +11:realopt2.voc +12:realpay.vpd +18:stepsize.vsc +20:sensi.lst +15:0,0,0,0,0,0 +19:100,0 +27:0, +34:0, +4:Time +5:Game Cost[Games] +24:1 +25:36 +26:1000 +6:Factory +6:Game11 +6:Game12 +6:Game13 diff --git a/test/metasd/covid19-us-homer/PROVENANCE.md b/test/metasd/covid19-us-homer/PROVENANCE.md new file mode 100644 index 000000000..72f934843 --- /dev/null +++ b/test/metasd/covid19-us-homer/PROVENANCE.md @@ -0,0 +1,41 @@ +# COVID-19 in the US (Homer model) + +A model of COVID-19 in the US with endogenous testing, containment measures, and +social distancing. This is the "homer v8" revision distributed on the MetaSD +post. + +## Source + +- MetaSD post: https://metasd.com/2020/03/model-covid-19-us/ +- Direct download (zip): https://metasd.com/wp-content/uploads/2020/03/homer-v8.zip +- Downloaded: 2026-05-13 + +The contents of `homer-v8.zip` are extracted here as-is (under the `homer v8/` +subdirectory from the archive): `Covid19US v8.mdl`, its `.vpmx` published +companion, the `.vgd` graph definition, the `Covid19US data.xlsx` data file, and +a PDF write-up. + +## Attribution + +- Posted by Tom Fiddaman (Ventana Systems) on the MetaSD blog (March 2020). +- The model is based on work by Jack Homer; Tom Fiddaman contributed revisions + ("tf" appears in related filenames on the post). See the MetaSD post and the + bundled PDF for details. + +## License + +The MetaSD blog is licensed under a Creative Commons Attribution 3.0 Unported +License (CC BY 3.0). The site notes that some Model Library content may be +subject to the original author's copyright; these model files carry no separate +license statement. + +## Macro content + +`Covid19US v8.mdl` contains one large macro: + +- `SSTATS(historical, simulated : R2, MAE, MAE over Mean, MAPE, RMSE, MSE, Um, + Us, Uc, Count)` -- a multi-output summary-statistics macro (10 named outputs + declared after the `:` in the signature). Contains many stocks (`INTEG`), uses + the `:RAW:` variable keyword, `:NA:` values, the `:OR:` operator, `ZIDZ`, and + the `TIME STEP$` keyword. This is a renamed variant of the THEIL / summary + statistics macro that recurs throughout Tom Fiddaman's models. diff --git a/test/metasd/covid19-us-homer/homer v8/Covid19US v8.mdl b/test/metasd/covid19-us-homer/homer v8/Covid19US v8.mdl new file mode 100644 index 000000000..a372c4c27 --- /dev/null +++ b/test/metasd/covid19-us-homer/homer v8/Covid19US v8.mdl @@ -0,0 +1,2725 @@ +{UTF-8} +:MACRO: SSTATS(historical,simulated:R2,MAE,MAE over Mean,MAPE,RMSE,MSE,Um,Us,Uc,Count\ + ) +SSTATS = residuals + ~ simulated + ~ Note that first argument (historical) must be data; + second argument (simulation) can be data or a simulation, + but if it is data, it will not be checked for existence. + This could easily by changed by modifying the code below. + Arguments following the : are outputs. They generate model + variables that are visible in the listing on the Variable + tab of the control panel, and can be used in equations + and custom graphs/tables/reports. However, they cannot be + made visible on diagrams. + | + +R2 = r*r + ~ Dimensionless + ~ Correlation coefficient squared + | + +MAE= + ZIDZ(sum ae,Count) + ~ simulated + ~ mean absolute error + | + +MAE over Mean= + ZIDZ(MAE,meanx) + ~ Dimensionless + ~ Mean Absolute Error as a fraction of the mean of the data + | + +MAPE = ZIDZ(Sum APE,Count) + ~ Dimensionless + ~ Mean Absolute Percent Error is reported as fraction rather than + percentage (x100) for consistency with other the other metrics + | + +RMSE = SQRT(MSE) + ~ simulated + ~ Root Mean Square Error + | + +MSE = dif mea + dif var + dif cov + ~ simulated*simulated + ~ Mean Square Error. The addition of the three components + | + +Um = ZIDZ(dif mea,MSE) + ~ Dimensionless + ~ Bias inequality proportion + | + +Us = ZIDZ(dif var,MSE) + ~ Dimensionless + ~ Variance inequality proportion + | + +Uc = ZIDZ(dif cov,MSE) + ~ Dimensionless + ~ Covariance inequality proportion + | + +Count = INTEG(pick/dt,0) + ~ Dimensionless + ~ Counter for # of points + | + +residuals= + IF THEN ELSE(pick, Yi - Xi, :NA:) + ~ simulated + ~ Errors + | + +r = MIN(1,ZIDZ(Mxy-(meanx*MeanY),Sx*Sy)) + ~ Dimensionless + ~ Correlation coefficient. Calculated through the 'hand computation' formula. + Sterman (1984) pg. 63 + | + +sum ae= INTEG ( + ABS(Xi - Yi)/dt, + 0) + ~ simulated + ~ Sum of Absolute Errors + | + +meanx = ZIDZ(Sum Xi,Count) + ~ simulated + ~ Mean of x (sum x)/n + | + +Sum APE = INTEG(ABS(ZIDZ(Xi-Yi,Yi))/dt,0) + ~ Dimensionless + ~ Sum of Absolute Percent Errors is reported as fraction rather than + percentage (x100) for consistency with other the other metrics + | + +dif mea = (meanx-MeanY)*(meanx-MeanY) + ~ simulated*simulated + ~ Difference of Means (bias) + | + +dif var = (Sx-Sy)*(Sx-Sy) + ~ simulated*simulated + ~ Difference of variances + | + +dif cov = 2*Sx*Sy*(1-r) + ~ simulated*simulated + ~ Difference of covariances + | + +pick= IF THEN ELSE(Y = :NA: :OR: X = :NA:, 0, 1) + ~ Dimensionless + ~ Takes a value of one for every data point available, assuming the data are \ + available at intervals of Interval between the Start Time and End Time. + | + +dt = TIME STEP$ + ~ Time$ + ~ | + +Yi = pick*Y + ~ simulated + ~ Sampled simulated variable + | + +Xi = pick*X + ~ simulated + ~ The historic data series + | + +Mxy = ZIDZ(SumXY,Count) + ~ simulated*simulated + ~ Mean of x*y (sum x*y)/n + | + +MeanY = ZIDZ(Sum Yi,Count) + ~ simulated + ~ Mean of y (sum y)/n + | + +Sx = SQRT(MAX(0,MX2-(meanx*meanx))) + ~ simulated + ~ Standard Deviation of x. Calculated using the 'hand computation' + formula to calculate the standard deviation without prior knowledge of + the mean. Sterman (1984), pg. 64 MAX prevents spurious numerical + problems from roundoff + | + +Sy = SQRT(MAX(0,MY2-(MeanY*MeanY))) + ~ simulated + ~ Standard Deviation of y. Calculated using the 'hand computation' + formula to calculate the standard deviation without prior knowledge of + the mean. Sterman (1984), pg. 64 + | + +Sum Xi = INTEG(Xi/dt,0) + ~ simulated + ~ Sum of x's (simulated) + | + +Y = simulated + ~ simulated + ~ The simulated data series + | + +X :RAW: := historical + ~ simulated + ~ The historical data input + | + +SumXY = INTEG(Xi*Yi/dt,0) + ~ simulated*simulated + ~ Sum of x*y + | + +Sum Yi = INTEG(Yi/dt,0) + ~ simulated + ~ Sum of y + | + +MX2= + ZIDZ(SumX2,Count) + ~ simulated*simulated + ~ Mean of x^2 + | + +MY2 = ZIDZ(SumY2,Count) + ~ simulated*simulated + ~ Mean of y^2 + | + +SumX2 = INTEG(Xi*Xi/dt,0) + ~ simulated*simulated + ~ Sum of x^2 + | + +SumY2 = INTEG(Yi*Yi/dt,0) + ~ simulated*simulated + ~ Sum of y^2 + | + +:END OF MACRO: +******************************************************** + .Active +********************************************************~ + Active equations + | + +Accidental drug OD deaths per day= + Accidental drug OD deaths per year normal*(1+Fractional increase in accidental drug OD deaths\ + )/Days per year + ~ popn/day + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Accidental drug OD deaths per million normal= + 190.8 + ~ 1/year + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Accidental drug OD deaths per year normal= + Total popn reference/1e+06*Accidental drug OD deaths per million normal + ~ popn/year + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Adjustment in critical care cap= + (MAX(Critical care capacity initial, MIN(Ideal critical care cap,Max critical care capacity\ + ))-Critical care capacity)/Time to adjust critical care cap + ~ popn/Month + ~ | + +Alcohol OD deaths per day= + Alcohol OD deaths per year normal*(1+Fractional increase in alcohol OD deaths)/Days per year + ~ popn/day + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Alcohol OD deaths per million normal= + 91.8 + ~ 1/year + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Alcohol OD deaths per year normal= + Total popn reference/1e+06*Alcohol OD deaths per million normal + ~ popn/year + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Avg days for catch up reporting of past probable fatalities= + 6 + ~ days [0.5,10,0.5] + ~ Through v7: 1.5 + | + +Avg time to death or recovery= + 0.37 + ~ months [0.2,0.6,0.01] + ~ 0.37 month = 11 days + | + +Avg YLL per accidental drug overdose death= + 38.4 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per alcohol OD death= + 35.1 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per chronic respir disease death= + 12.4 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per Covid fatality= + 15.6 + ~ years + ~ Based on 1,562 Covid-19 deaths in NYC 4/2/20; \ + https://www1.nyc.gov/assets/doh/downloads/pdf/imm/covid-19-daily-data-summa\ + ry-deaths.pdf. See "Deaths by age group" spreadsheet. Also: Zhou et al \ + Lance 3/12/20 finds avg age of non-survivors = 69. In US, life expectancy \ + at 69 = 15 yrs male, 17 yrs female. + | + +Avg YLL per CVD and hypertn death= + 12.2 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per diabetes death= + 15.9 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per family homicide= + 46.2 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per nonfamily homicide= + 45.6 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per other acute infect death= + 14.9 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per suicide= + 35.2 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Avg YLL per vehicle accident death= + 36.7 + ~ years + ~ See "Deaths by age group" spreadsheet. + | + +Basic reproduction number= + Effective reproduction number/Susceptible fraction of popn + ~ dmnl + ~ | + +Becoming symptomatic= + Infected presympto/Incubation period + ~ popn/Month + ~ | + +Catch up reporting of past fatalities per day= + IF THEN ELSE(Time>=Date to change reporting of fatalities, Potential for catch up reporting of dead\ + /Avg days for catch up reporting of past probable fatalities, 0) + ~ popn/day + ~ | + +Chronic respir deaths per million normal= + 487.4 + ~ 1/year + ~ See "Deaths by age group" spreadsheet; 2017 data from NY Times. + | + +Chronic respir disease deaths per day= + Chronic respir disease deaths per year normal*(1+Fractional increase in chronic respir disease deaths\ + )/Days per year + ~ popn/day + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Chronic respir disease deaths per year normal= + Total popn reference/1e+06*Chronic respir deaths per million normal + ~ popn/year + ~ See "Deaths by age group" spreadsheet + | + +Contact tracing= + Contact tracing per day*Days per month + ~ popn/Month + ~ | + +Contact tracing coverage= + SMOOTHI(XIDZ(Contact tracing per day,Reported new cases per day,Contact tracing in effect\ + )*Tested frac of sympto,Time to trace and quarantine + ,0) + ~ dmnl + ~ | + +Contact tracing daily capacity= + Total popn reference/1e+06*Potential cases per million contact traced per day*Contact tracing in effect + ~ popn/day [0,10000,500] + ~ max traceable new cases per day + | + +Contact tracing in effect= + IF THEN ELSE(Time=Date to end contact tracing\ + , 0, 1)) + ~ dmnl + ~ | + +Contact tracing per day= + MIN(Contact tracing daily capacity, Reported new cases per day) + ~ popn/day + ~ | + +Contacts per day normal= + 41 + ~ 1/day [20,60,1] + ~ (V1: 100; v2-5: 120 per month) + | + +Contacts per presympto= + Contacts per day normal * Days per month * (1-Social distancing) * (1-Contact tracing coverage\ + ) + ~ 1/Month + ~ | + +Contacts per sympto= + Contacts per presympto*Reltv contacts per sympto + ~ 1/Month + ~ | + +COVID fatalities per day= + Fatalities/Days per month + ~ popn/day + ~ | + +Critical care capacity= INTEG ( + Adjustment in critical care cap, + Critical care capacity initial) + ~ popn + ~ In high load conditions, some severe cases don't get hospitalized due to \ + shortages of one or more types of critical care assets: personnel, beds, \ + materials, equipment (aside from ventilators, handled separately), EMS \ + vehicles, etc. ICU beds are used here as a proxy for these critical-care \ + assets. + | + +Critical care capacity initial= + Total popn reference/1e+06*Critical care capacity per million initial + ~ popn [0,200000,10000] + ~ In high load conditions, some severe cases don't get hospitalized due to \ + shortages of one or more types of critical care assets: personnel, beds, \ + materials, equipment (aside from ventilators, handled separately), EMS \ + vehicles, etc. ICU beds are used here as a proxy for these critical-care \ + assets. + | + +Critical care capacity per million initial= + 278 + ~ dmnl [100,400,10] + ~ 278 per million * 330m = 92k. (Modern Healthcare 3/21/20.) In high load \ + conditions, some severe cases don't get hospitalized due to shortages of \ + one or more types of critical care assets: personnel, PPE, beds, \ + materials, ventilators, EMS vehicles, etc. ICU beds are used here as a \ + proxy for all these critical-care assets. + | + +Cumul added deaths of despair= INTEG ( + Increase in deaths of despair, + 0) + ~ popn + ~ | + +Cumul combined loss billions= + Cumul GDP loss billions + Cumul lost life value billions + ~ bdollars + ~ | + +Cumul contact tracing= INTEG ( + Contact tracing, + 0) + ~ popn + ~ | + +Cumul GDP loss billions= INTEG ( + GDP loss billions, + 0) + ~ bdollars + ~ | + +Cumul hospitalized= INTEG ( + Hospital admissions, + 0) + ~ popn + ~ | + +Cumul incoming infections= INTEG ( + Incoming infections, + 0) + ~ popn + ~ | + +Cumul lost life value billions= INTEG ( + Lost life value billions, + 0) + ~ bdollars + ~ | + +Cumul reported cases= INTEG ( + Reported new cases, + 0) + ~ popn + ~ | + +Cumul YLG from fewer street deaths= INTEG ( + YLG from fewer street deaths, + 0) + ~ popn*years + ~ | + +Cumul YLL from Covid fatalities= INTEG ( + YLL from Covid fatalities, + 0) + ~ popn*years + ~ | + +Cumul YLL from increased deaths of despair= INTEG ( + YLL from increased deaths of despair, + 0) + ~ popn*years + ~ | + +Cumul YLL from increased other disease deaths= INTEG ( + YLL from increased other disease deaths, + 0) + ~ popn*years + ~ | + +Cumul YLL lost from adverse nonCovid outcomes= + Cumul YLL from increased deaths of despair + Cumul YLL from increased other disease deaths + ~ popn*years + ~ | + +Cumul YLL net change from all outcomes= + Cumul YLL from Covid fatalities + Cumul YLL net change from nonCovid outcomes + ~ popn*years + ~ | + +Cumul YLL net change from nonCovid outcomes= + Cumul YLL lost from adverse nonCovid outcomes - Cumul YLG from fewer street deaths + ~ popn*years + ~ | + +CVD and hypertn deaths per day= + CVD and hypertn deaths per year normal*(1+Fractional increase in CVD and hypertn deaths\ + )/Days per year + ~ popn/day + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +CVD and hypertn deaths per million normal= + 2193.9 + ~ 1/year + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +CVD and hypertn deaths per year normal= + Total popn reference/1e+06*CVD and hypertn deaths per million normal + ~ popn/year + ~ See "Deaths by age group" spreadsheet + | + +Date of final prevaccine incoming infections= + 3.25 + ~ Month [0,16,0.5] + ~ | + +Date of first incoming infections= + 0.75 + ~ Month [0,8,0.5] + ~ | + +Date of peak incoming infections= + 2 + ~ Month [0,12,0.5] + ~ | + +Date to change reporting of fatalities= + 3.46875 + ~ months [3,4,0.01] + ~ 3.46875=April 14 + | + +Date to end contact tracing= + 15 + ~ Month [5,15,0.5] + ~ | + +Date to start contact tracing= + 4 + ~ Month [2,8,0.5] + ~ | + +Days per month= + 30 + ~ days/Month + ~ | + +Days per year= + Days per month*Months per year + ~ days/year + ~ | + +Dead frac of past infections= + ZIDZ(Dead from COVID, Past infections) + ~ dmnl + ~ | + +Dead from COVID= INTEG ( + Fatalities, + 0) + ~ popn + ~ | + +Deaths of despair per day= + Suicides per day+Family homicides per day+Accidental drug OD deaths per day+Alcohol OD deaths per day + ~ popn/day + ~ | + +Deaths of despair per day normal= + INITIAL(Deaths of despair per day) + ~ popn/day + ~ | + +Decrease in monthly nonfamily homicides= + Nonfamily homicides per year normal/Months per year * Fractional decrease in nonfamily homicide deaths + ~ popn/Month + ~ | + +Decrease in monthly vehicle accident deaths= + Vehicle accident deaths per year normal/Months per year * Fractional decrease in vehicle accident deaths + ~ popn/Month + ~ | + +Decrease in street deaths= + Street deaths per day normal-Street deaths per day + ~ popn/day + ~ | + +Diabetes deaths per day= + Diabetes deaths per year normal*(1+Fractional increase in diabetes deaths)/Days per year + ~ popn/day + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Diabetes deaths per million normal= + 259.6 + ~ 1/year + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Diabetes deaths per year normal= + Total popn reference/1e+06*Diabetes deaths per million normal + ~ popn/year + ~ See "Deaths by age group" spreadsheet; 2018 data from WONDER. + | + +Dollars per billion dollars= + 1e+09 + ~ dollars/bdollars + ~ | + +Effect of season on transmission= + Lookup for effect of season on transmission(Months elapsed in year) + ~ dmnl + ~ | + +Effect of vaccine on infection probability= + IF THEN ELSE(Time