message_ix_models.model.transport.build.get_computer
- message_ix_models.model.transport.build.get_computer(context: Context, obj: Computer | None = None, *, visualize: bool = True, **kwargs) Computer [source]
Return a
genno.Computer
set up for model-building calculations.The returned computer contains:
Everything added by
add_structure()
,add_exogenous_data()
, andadd_debug()
.For each module in
transport.config.Config.modules
, everything added by theprepare_computer()
function in that module.context
: a reference to context.scenario
: a reference to a Scenario, if one appears in kwargs.add transport data
: a list of keys which, when computed, will cause all transport data to be computed and added toscenario
.
- Parameters:
obj – If obj is an existing
Computer
(or subclass, such as :class`.Reporter`), tasks are added the existing tasks in its graph. Otherwise, a new Computer is created and populated.visualize – If
True
(the default), a filetransport/build.svg
is written in the local data directory with a visualization of theadd transport data
key.