Skip to content

Commit 42fe0ae

Browse files
Allow for var fixing
1 parent d8b1ea9 commit 42fe0ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

message_ix/core.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,7 @@ def create_model_instance(
808808
self,
809809
model="MESSAGE",
810810
modifiable_pars=None,
811+
fixable_vars=None,
811812
use_defaults=True,
812813
**model_options,
813814
):
@@ -823,6 +824,8 @@ def create_model_instance(
823824
modifiable_pars : list of str, optional
824825
List of parameter names that can be modified between solves.
825826
If None and use_defaults=True, uses DEFAULT_MODIFIABLE_PARS.
827+
fixable_vars : list of str, optional
828+
List of variable names that can be fixed between solves.
826829
use_defaults : bool, optional
827830
If True and modifiable_pars is None, uses DEFAULT_MODIFIABLE_PARS.
828831
Set to False to create instance with no modifiable parameters.
@@ -859,7 +862,10 @@ def create_model_instance(
859862
modifiable_pars = DEFAULT_MODIFIABLE_PARS
860863

861864
return super().create_model_instance(
862-
model=model, modifiable_pars=modifiable_pars, **model_options
865+
model=model,
866+
modifiable_pars=modifiable_pars,
867+
fixable_vars=fixable_vars,
868+
**model_options,
863869
)
864870

865871
def add_macro(

0 commit comments

Comments
 (0)