90 — Internals and advanced access#
This notebook is intentionally last. It shows the lower-level Pyomo/PyCGE machinery that ordinary users do not need in order to run a CGE experiment.
%pip install -q "https://github.com/miraflor/CGE-core/releases/download/v0.8.0/cge_core-0.8.0-py3-none-any.whl"
The retained PyCGE lifecycle#
from cge_core import PyCGE, example_data
from cge_core.models import StdCGE
from cge_core.solver import resolve_solver
engine = PyCGE(StdCGE())
engine.model_data(example_data("stdcge"))
engine.model_instance("pf", "LAB")
engine.model_drop_redundant("eqpf", "LAB")
engine.model_calibrate(solver=resolve_solver())
engine.base
The high-level StandardCGE.example().solve() route packages those decisions as model metadata. The lower-level API remains useful for debugging, equation inspection, persistence, compatibility with code written against earlier releases, and explicit numerical-backend work.