Skip to content

Allow users to overwrite configs #33

Description

@amanmajid

Currently, users will load and solve a model as follows:

from tz_pypsa.model import Model
n = Model.load_model('ASEAN')
n.optimize()

Users cannot overwrite model configurations unless they edit the raw input files. We should give users the ability to overwrite configs. For example, something like:

from tz_pypsa.model import Model

update_config = {
   'global_constraints' : {
           'annual_co2_budget': false,
           'bus_self_sufficiency': true,
           'cumulative_p_nom_max': true,
   }
}

n = Model.load_model('ASEAN', update_config=update_config)

n.optimize()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions