calliope-project / calliope

A multi-scale energy systems modelling framework

Home Page:https://www.callio.pe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add public API to update a built optimisation model

brynpickering opened this issue · comments

Problem description

Since we have YAML math we also have a new set of methods to build optimisation models using Pyomo (and hopefully Gurobi python API). Certain methods need to be made available on the model object so a user can do the following:

  • Check the content of a specific variable/constraint/expression
  • Update a parameter's values (and update the corresponding expressions/constraints/objectives that rely on that parameter)
  • Fix a variable, so it acts as a parameter
  • (De)activate a constraint so it is(n't) applied in the optimisation
  • Update decision variable bounds

This replaces #293 for the 0.7.x development (#293 will stay open for any future v0.6.x dev).

Calliope version

v0.7.0-dev

Ignoring constraint activation/deactivation since it can't be implemented with the gurobi python interface, so is a very specific Pyomo feature. If a user really wants to use the pyomo feature, they can do so directly with sufficient knowledge of pyomo and xarray.

Completed in #471 based on not allowing contraint (de)activation