calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
297 stars 93 forks source link

Separate top-level config and parameters #452

Closed brynpickering closed 11 months ago

brynpickering commented 1 year ago

Problem description

run and model configs mix up configuration and parameters. We want to be able to pipe these parameters to the Calliope model dataset and then onto the backend. We handle that at the moment with hardcoding which are parameters in the core code, which isn't ideal. An idea on how to change these YAML structures:

config:
  init:
    name: null
    calliope_version: null
    random_seed: null
    subset_time: null
    time: {}
    timeseries_data_path: null 
    timeseries_data: null 
    timeseries_dateformat: "%Y-%m-%d %H:%M:%S"
  build:
    custom_math: []
    backend: pyomo
    cyclic_storage: true
    ensure_feasibility: false
    mode: plan
  solve: 
    operate_window: null
    operate_horizon: null
    operate_use_cap_results: false
    spores_number: 3
    spores_score_cost_class: spores_score
    spores_slack_cost_group: null
    spores_save_per_spore: false
    spores_save_per_spore_path: null
    spores_skip_cost_op: false
    save_logs: null
    solver_io: null
    solver_options: null
    solver: cbc
    zero_threshold: 1e-10

parameters:
  reserve_margin: {electricity: 0.1}
  bigM: 1e9
  objective_cost_class: {"costs": {"monetary": 1, "emissions": 0.1}}
  my_param: {("costs", "carriers"): {("monetary", "electricity"): 1, ("monetary", "heat"): 0.1}}
  spores_slack: 0.1
  spores_objective_cost_class: {"costs": {spores_score: 1, monetary: 0} }

Other things:

Calliope version

v0.7.0-dev

brynpickering commented 11 months ago

Completed in #497