message_ix_models.model.buildings.build.main

message_ix_models.model.buildings.build.main(context: Context, scenario: Scenario, *args: DataFrame) None[source]

Set up the structure and data for MESSAGE_Buildings on scenario.

The function responds to a buildings.Config instance at context.buildings; if none exists, it is created using bmt.config.load_buildings_config(); see its documentation.

If buildings.Config.method is ~.buildings.config.METHOD.A:

  • args must contain four (4) data frames; these are data for demand, prices, sturm_r, and sturm_c.

  • Model data are prepared using prepare_data_A().

If buildings.Config.method is ~.buildings.config.METHOD.B:

  • get_spec() is called with the filter_relations parameter, using only the relation set members already present on scenario.

  • args must be empty.

  • Data for demand, prices, and STURM are loaded from CSV files given by buildings.Config.data_paths.

  • Model data are prepared using prepare_data_B()

  • The functions _remove_rc_bounds() and _replace_ue_rt_share_with_share_mode() are called on scenario.

Parameters:
  • contextcontext.buildings may be an instance of buildings.Config.

  • scenario – Scenario to set up.