From 3ea7fb022f0bdbc317e68e558bf2d50849b5cd06 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 11:43:06 +0100 Subject: [PATCH 01/36] Reify some core docstrings --- ixmp4/core/optimization/equation.py | 4 ++-- ixmp4/core/optimization/parameter.py | 2 +- ixmp4/core/optimization/table.py | 2 +- ixmp4/core/optimization/variable.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ixmp4/core/optimization/equation.py b/ixmp4/core/optimization/equation.py index 2d6e2cdf..d90e4778 100644 --- a/ixmp4/core/optimization/equation.py +++ b/ixmp4/core/optimization/equation.py @@ -40,7 +40,7 @@ def data(self) -> dict[str, Any]: return self._model.data def add(self, data: dict[str, Any] | pd.DataFrame) -> None: - """Adds data to an existing Equation.""" + """Adds data to the Equation.""" self.backend.optimization.equations.add_data( equation_id=self._model.id, data=data ) @@ -49,7 +49,7 @@ def add(self, data: dict[str, Any] | pd.DataFrame) -> None: ).data def remove_data(self) -> None: - """Removes data from an existing Equation.""" + """Removes all data from the Equation.""" self.backend.optimization.equations.remove_data(equation_id=self._model.id) self._model.data = self.backend.optimization.equations.get( run_id=self._model.run__id, name=self._model.name diff --git a/ixmp4/core/optimization/parameter.py b/ixmp4/core/optimization/parameter.py index 25f6f054..09f5a48d 100644 --- a/ixmp4/core/optimization/parameter.py +++ b/ixmp4/core/optimization/parameter.py @@ -40,7 +40,7 @@ def data(self) -> dict[str, Any]: return self._model.data def add(self, data: dict[str, Any] | pd.DataFrame) -> None: - """Adds data to an existing Parameter.""" + """Adds data to the Parameter.""" self.backend.optimization.parameters.add_data( parameter_id=self._model.id, data=data ) diff --git a/ixmp4/core/optimization/table.py b/ixmp4/core/optimization/table.py index fb1d6316..7901f60c 100644 --- a/ixmp4/core/optimization/table.py +++ b/ixmp4/core/optimization/table.py @@ -40,7 +40,7 @@ def data(self) -> dict[str, Any]: return self._model.data def add(self, data: dict[str, Any] | pd.DataFrame) -> None: - """Adds data to an existing Table.""" + """Adds data to the Table.""" self.backend.optimization.tables.add_data(table_id=self._model.id, data=data) self._model.data = self.backend.optimization.tables.get( run_id=self._model.run__id, name=self._model.name diff --git a/ixmp4/core/optimization/variable.py b/ixmp4/core/optimization/variable.py index 2bb7cde8..5cea5394 100644 --- a/ixmp4/core/optimization/variable.py +++ b/ixmp4/core/optimization/variable.py @@ -40,7 +40,7 @@ def data(self) -> dict[str, Any]: return self._model.data def add(self, data: dict[str, Any] | pd.DataFrame) -> None: - """Adds data to an existing Variable.""" + """Adds data to the Variable.""" self.backend.optimization.variables.add_data( variable_id=self._model.id, data=data ) @@ -49,7 +49,7 @@ def add(self, data: dict[str, Any] | pd.DataFrame) -> None: ).data def remove_data(self) -> None: - """Removes data from an existing Variable.""" + """Removes all data from the Variable.""" self.backend.optimization.variables.remove_data(variable_id=self._model.id) self._model.data = self.backend.optimization.variables.get( run_id=self._model.run__id, name=self._model.name From 8536bb088ebd9fc18980e7342e5103c941eb612f Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 11:49:34 +0100 Subject: [PATCH 02/36] Include forgotten test case --- tests/data/test_optimization_variable.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/data/test_optimization_variable.py b/tests/data/test_optimization_variable.py index f7969134..92bbb4c9 100644 --- a/tests/data/test_optimization_variable.py +++ b/tests/data/test_optimization_variable.py @@ -83,6 +83,18 @@ def test_create_variable(self, platform: ixmp4.Platform) -> None: column_names=["Dimension 1"], ) + # Test that giving column_names, but not constrained_to_indexsets raises + with pytest.raises( + OptimizationItemUsageError, + match="Received `column_names` to name columns, but no " + "`constrained_to_indexsets`", + ): + _ = platform.backend.optimization.variables.create( + run_id=run.id, + name="Variable 0", + column_names=["Dimension 1"], + ) + # Test mismatch in constrained_to_indexsets and column_names raises with pytest.raises(OptimizationItemUsageError, match="not equal in length"): _ = platform.backend.optimization.variables.create( From 9555053f6f643181cf05400cbd54f25602c9eccf Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 12:01:14 +0100 Subject: [PATCH 03/36] Make util function more concise --- ixmp4/data/db/optimization/utils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ixmp4/data/db/optimization/utils.py b/ixmp4/data/db/optimization/utils.py index 3ff3bd8c..d612b4f3 100644 --- a/ixmp4/data/db/optimization/utils.py +++ b/ixmp4/data/db/optimization/utils.py @@ -10,13 +10,10 @@ def collect_indexsets_to_check( columns: list["Column"], -) -> dict[str, Any]: +) -> dict[str, list[float] | list[int] | list[str]]: """Creates a {key:value} dict from linked Column.names and their IndexSet.data.""" - collection: dict[str, Any] = {} - for column in columns: - collection[column.name] = column.indexset.data - return collection + return {column.name: column.indexset.data for column in columns} def validate_data( From b8c9b0db73f3142adf37adc65c2c724dd4dcf1b6 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 12:08:34 +0100 Subject: [PATCH 04/36] Remove superfluous lines --- ixmp4/data/db/optimization/equation/repository.py | 6 +----- ixmp4/data/db/optimization/indexset/repository.py | 1 - ixmp4/data/db/optimization/scalar/repository.py | 3 +-- ixmp4/data/db/optimization/table/repository.py | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ixmp4/data/db/optimization/equation/repository.py b/ixmp4/data/db/optimization/equation/repository.py index 34f9fdcd..393c5ae8 100644 --- a/ixmp4/data/db/optimization/equation/repository.py +++ b/ixmp4/data/db/optimization/equation/repository.py @@ -79,11 +79,7 @@ def _add_column( # type: ignore[no-untyped-def] **kwargs, ) - def add( - self, - run_id: int, - name: str, - ) -> Equation: + def add(self, run_id: int, name: str) -> Equation: equation = Equation(name=name, run__id=run_id) equation.set_creation_info(auth_context=self.backend.auth_context) self.session.add(equation) diff --git a/ixmp4/data/db/optimization/indexset/repository.py b/ixmp4/data/db/optimization/indexset/repository.py index c559ce23..69e5eac8 100644 --- a/ixmp4/data/db/optimization/indexset/repository.py +++ b/ixmp4/data/db/optimization/indexset/repository.py @@ -95,5 +95,4 @@ def add_data( Literal["float", "int", "str"], type(_data[0]).__name__ ) - self.session.add(indexset) self.session.commit() diff --git a/ixmp4/data/db/optimization/scalar/repository.py b/ixmp4/data/db/optimization/scalar/repository.py index 3ad02f51..e79af22d 100644 --- a/ixmp4/data/db/optimization/scalar/repository.py +++ b/ixmp4/data/db/optimization/scalar/repository.py @@ -89,8 +89,7 @@ def update( self.session.execute(exc) self.session.commit() - scalar: Scalar = self.get_by_id(id) - return scalar + return self.get_by_id(id) @guard("view") def list(self, **kwargs: Unpack[EnumerateKwargs]) -> Iterable[Scalar]: diff --git a/ixmp4/data/db/optimization/table/repository.py b/ixmp4/data/db/optimization/table/repository.py index 27dbef2c..dcdad5be 100644 --- a/ixmp4/data/db/optimization/table/repository.py +++ b/ixmp4/data/db/optimization/table/repository.py @@ -154,5 +154,4 @@ def add_data(self, table_id: int, data: dict[str, Any] | pd.DataFrame) -> None: orient="list" ) # type: ignore[assignment] - self.session.add(table) self.session.commit() From 7c463ee5a7fd803912af08b8121fe6ecd12cded8 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 12:32:50 +0100 Subject: [PATCH 05/36] Test adding data to scalar variable raises --- ixmp4/data/db/optimization/variable/repository.py | 13 ++++++++----- tests/core/test_optimization_variable.py | 8 ++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ixmp4/data/db/optimization/variable/repository.py b/ixmp4/data/db/optimization/variable/repository.py index 76aa13f3..c8bed49e 100644 --- a/ixmp4/data/db/optimization/variable/repository.py +++ b/ixmp4/data/db/optimization/variable/repository.py @@ -178,11 +178,14 @@ def add_data(self, variable_id: int, data: dict[str, Any] | pd.DataFrame) -> Non index_list = [column.name for column in variable.columns] existing_data = pd.DataFrame(variable.data) - if not existing_data.empty: - existing_data.set_index(index_list, inplace=True) - variable.data = ( - data.set_index(index_list).combine_first(existing_data).reset_index() - ).to_dict(orient="list") # type: ignore[assignment] + if index_list: + data = data.set_index(index_list) + if not existing_data.empty: + existing_data.set_index(index_list, inplace=True) + data = data.combine_first(existing_data) + if index_list: + data = data.reset_index() + variable.data = data.to_dict(orient="list") # type: ignore[assignment] self.session.commit() diff --git a/tests/core/test_optimization_variable.py b/tests/core/test_optimization_variable.py index 183e65f5..0dec1d45 100644 --- a/tests/core/test_optimization_variable.py +++ b/tests/core/test_optimization_variable.py @@ -273,6 +273,14 @@ def test_variable_add_data(self, platform: ixmp4.Platform) -> None: ) assert_unordered_equality(expected, pd.DataFrame(variable_4.data)) + # Test adding to scalar variable raises + with pytest.raises( + OptimizationDataValidationError, + match="Trying to add data to unknown Columns!", + ): + variable_5 = run.optimization.variables.create("Variable 5") + variable_5.add(data={"foo": ["bar"], "levels": [1], "marginals": [0]}) + def test_variable_remove_data(self, platform: ixmp4.Platform) -> None: run = platform.runs.create("Model", "Scenario") indexset = run.optimization.indexsets.create("Indexset") From ea60cc18949a61ed011de703d0f260a206d89437 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 12:38:30 +0100 Subject: [PATCH 06/36] Validate var/equ data only for non-empty data --- ixmp4/data/db/optimization/equation/model.py | 11 ++++++----- ixmp4/data/db/optimization/variable/model.py | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ixmp4/data/db/optimization/equation/model.py b/ixmp4/data/db/optimization/equation/model.py index e7588043..ee8d2898 100644 --- a/ixmp4/data/db/optimization/equation/model.py +++ b/ixmp4/data/db/optimization/equation/model.py @@ -31,11 +31,12 @@ def validate_data(self, key: Any, data: dict[str, Any]) -> dict[str, Any]: data_to_validate = copy.deepcopy(data) del data_to_validate["levels"] del data_to_validate["marginals"] - _ = utils.validate_data( - host=self, - data=data_to_validate, - columns=self.columns, - ) + if data_to_validate != {}: + _ = utils.validate_data( + host=self, + data=data_to_validate, + columns=self.columns, + ) return data __table_args__ = (db.UniqueConstraint("name", "run__id"),) diff --git a/ixmp4/data/db/optimization/variable/model.py b/ixmp4/data/db/optimization/variable/model.py index 32cfae59..548e7499 100644 --- a/ixmp4/data/db/optimization/variable/model.py +++ b/ixmp4/data/db/optimization/variable/model.py @@ -32,11 +32,12 @@ def validate_data(self, key: Any, data: dict[str, Any]) -> dict[str, Any]: data_to_validate = copy.deepcopy(data) del data_to_validate["levels"] del data_to_validate["marginals"] - _ = utils.validate_data( - host=self, - data=data_to_validate, - columns=self.columns, - ) + if data_to_validate != {}: + _ = utils.validate_data( + host=self, + data=data_to_validate, + columns=self.columns, + ) return data __table_args__ = (db.UniqueConstraint("name", "run__id"),) From b0201c60c18a40ba25dc72b5c5778c208e45e00a Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 12:40:02 +0100 Subject: [PATCH 07/36] Introduce run.optimization.remove_solution() --- ixmp4/core/optimization/data.py | 6 ++++++ tests/core/test_run.py | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/ixmp4/core/optimization/data.py b/ixmp4/core/optimization/data.py index c604dbe1..d3f8cbfb 100644 --- a/ixmp4/core/optimization/data.py +++ b/ixmp4/core/optimization/data.py @@ -29,3 +29,9 @@ def __init__(self, run: Run, **kwargs: Backend) -> None: self.scalars = ScalarRepository(_backend=self.backend, _run=run) self.tables = TableRepository(_backend=self.backend, _run=run) self.variables = VariableRepository(_backend=self.backend, _run=run) + + def remove_solution(self) -> None: + for equation in self.equations.list(): + equation.remove_data() + for variable in self.variables.list(): + variable.remove_data() diff --git a/tests/core/test_run.py b/tests/core/test_run.py index e75aa4f5..1a128555 100644 --- a/tests/core/test_run.py +++ b/tests/core/test_run.py @@ -181,3 +181,29 @@ def delete_all_datapoints(self, run: ixmp4.Run) -> None: run.iamc.remove(cat, type=ixmp4.DataPoint.Type.CATEGORICAL) if not datetime.empty: run.iamc.remove(datetime, type=ixmp4.DataPoint.Type.DATETIME) + + def test_run_remove_solution(self, platform: ixmp4.Platform) -> None: + run = platform.runs.create("Model", "Scenario") + indexset = run.optimization.indexsets.create("Indexset") + indexset.add(["foo", "bar"]) + test_data = { + "Indexset": ["bar", "foo"], + "levels": [2.0, 1], + "marginals": [0, "test"], + } + run.optimization.equations.create( + "Equation", + constrained_to_indexsets=[indexset.name], + ).add(test_data) + run.optimization.variables.create( + "Variable", + constrained_to_indexsets=[indexset.name], + ).add(test_data) + + run.optimization.remove_solution() + # Need to fetch them here even if fetched before because API layer might not + # forward changes automatically + equation = run.optimization.equations.get("Equation") + variable = run.optimization.variables.get("Variable") + assert equation.data == {} + assert variable.data == {} From 8513cac51bc29bd7ee3adbbf5e0d17ad6da67546 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 12:58:29 +0100 Subject: [PATCH 08/36] Introduce run.get_by_id() --- ixmp4/data/abstract/run.py | 20 ++++++++++++++++++++ ixmp4/data/api/run.py | 4 ++++ ixmp4/server/rest/run.py | 8 ++++++++ tests/data/test_run.py | 10 ++++++++++ 4 files changed, 42 insertions(+) diff --git a/ixmp4/data/abstract/run.py b/ixmp4/data/abstract/run.py index e528f5a5..e79a4554 100644 --- a/ixmp4/data/abstract/run.py +++ b/ixmp4/data/abstract/run.py @@ -137,6 +137,26 @@ def get_default_version(self, model_name: str, scenario_name: str) -> Run: """ ... + def get_by_id(self, id: int) -> Run: + """Retrieves a Run by its id. + + Parameters + ---------- + id : int + Unique integer id. + + Raises + ------ + :class:`ixmp4.data.abstract.Run.NotFound`. + If the Run with `id` does not exist. + + Returns + ------- + :class:`ixmp4.data.abstract.Run`: + The retrieved Run. + """ + ... + def list(self, **kwargs: Unpack[EnumerateKwargs]) -> list[Run]: r"""Lists runs by specified criteria. diff --git a/ixmp4/data/api/run.py b/ixmp4/data/api/run.py index 374d0ebc..184f60c8 100644 --- a/ixmp4/data/api/run.py +++ b/ixmp4/data/api/run.py @@ -67,6 +67,10 @@ def get(self, model_name: str, scenario_name: str, version: int) -> Run: is_default=None, ) + def get_by_id(self, id: int) -> Run: + res = self._get_by_id(id) + return Run(**res) + def enumerate( self, **kwargs: Unpack[abstract.run.EnumerateKwargs] ) -> list[Run] | pd.DataFrame: diff --git a/ixmp4/server/rest/run.py b/ixmp4/server/rest/run.py index 1457db83..ce180027 100644 --- a/ixmp4/server/rest/run.py +++ b/ixmp4/server/rest/run.py @@ -61,3 +61,11 @@ def unset_as_default_version( backend: Backend = Depends(deps.get_backend), ) -> None: backend.runs.unset_as_default_version(id) + + +@router.get("/{id}/", response_model=api.Run) +def get_by_id( + id: int, + backend: Backend = Depends(deps.get_backend), +) -> Run: + return backend.runs.get_by_id(id) diff --git a/tests/data/test_run.py b/tests/data/test_run.py index e9ba4ebf..89de756f 100644 --- a/tests/data/test_run.py +++ b/tests/data/test_run.py @@ -2,6 +2,8 @@ import pytest import ixmp4 +import ixmp4.data +import ixmp4.data.abstract from ixmp4.core.exceptions import NoDefaultRunVersion from ..utils import assert_unordered_equality @@ -55,6 +57,14 @@ def test_get_or_create_run(self, platform: ixmp4.Platform) -> None: run3 = platform.backend.runs.get_or_create("Model", "Scenario") assert run1.id == run3.id + def test_get_run_by_id(self, platform: ixmp4.Platform) -> None: + expected = platform.backend.runs.create("Model", "Scenario") + result = platform.backend.runs.get_by_id(id=expected.id) + assert expected.id == result.id + + with pytest.raises(ixmp4.data.abstract.Run.NotFound): + _ = platform.backend.runs.get_by_id(id=expected.id + 1) + def test_list_run(self, platform: ixmp4.Platform) -> None: run1 = platform.backend.runs.create("Model", "Scenario") platform.backend.runs.create("Model", "Scenario") From 321e81ab873ef5a84de71b8f1535b86ee5c5db5d Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Thu, 28 Nov 2024 14:29:01 +0100 Subject: [PATCH 09/36] Remove superfluous casts --- ixmp4/data/db/iamc/timeseries/repository.py | 6 ++---- ixmp4/data/db/meta/repository.py | 3 +-- ixmp4/data/db/model/repository.py | 3 +-- ixmp4/data/db/run/repository.py | 7 ++----- ixmp4/data/db/timeseries.py | 3 +-- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ixmp4/data/db/iamc/timeseries/repository.py b/ixmp4/data/db/iamc/timeseries/repository.py index 5e469364..eedb0a7b 100644 --- a/ixmp4/data/db/iamc/timeseries/repository.py +++ b/ixmp4/data/db/iamc/timeseries/repository.py @@ -92,13 +92,11 @@ def select_joined_parameters(self) -> Select[tuple[BaseModel, ...]]: @guard("view") def list(self, **kwargs: Unpack[EnumerateKwargs]) -> list[TimeSeries]: - timeseries_list: list[TimeSeries] = super().list(**kwargs) - return timeseries_list + return super().list(**kwargs) @guard("view") def tabulate(self, **kwargs: Unpack[EnumerateKwargs]) -> pd.DataFrame: - df: pd.DataFrame = super().tabulate(**kwargs) - return df + return super().tabulate(**kwargs) @guard("edit") def bulk_upsert(self, df: pd.DataFrame, create_related: bool = False) -> None: diff --git a/ixmp4/data/db/meta/repository.py b/ixmp4/data/db/meta/repository.py index 8257be85..bc8fbc37 100644 --- a/ixmp4/data/db/meta/repository.py +++ b/ixmp4/data/db/meta/repository.py @@ -116,8 +116,7 @@ def get(self, run__id: int, key: str) -> RunMetaEntry: exc = self.select(run_id=run__id, key=key) try: - runmetaentry = self.session.execute(exc).scalar_one() - return runmetaentry + return self.session.execute(exc).scalar_one() except NoResultFound: raise RunMetaEntry.NotFound(run__id=run__id, key=key) diff --git a/ixmp4/data/db/model/repository.py b/ixmp4/data/db/model/repository.py index c143dd9e..d575ce7c 100644 --- a/ixmp4/data/db/model/repository.py +++ b/ixmp4/data/db/model/repository.py @@ -53,8 +53,7 @@ def add(self, name: str) -> Model: def get(self, name: str) -> Model: exc = self.select(name=name) try: - model: Model = self.session.execute(exc).scalar_one() - return model + return self.session.execute(exc).scalar_one() except db.NoResultFound: raise Model.NotFound diff --git a/ixmp4/data/db/run/repository.py b/ixmp4/data/db/run/repository.py index 81370410..0df01566 100644 --- a/ixmp4/data/db/run/repository.py +++ b/ixmp4/data/db/run/repository.py @@ -102,9 +102,7 @@ def get(self, model_name: str, scenario_name: str, version: int) -> Run: ) try: - # TODO clean up unnecessary cast such as this - run: Run = self.session.execute(exc).scalar_one() - return run + return self.session.execute(exc).scalar_one() except NoResultFound: raise Run.NotFound( model=model_name, @@ -129,8 +127,7 @@ def get_default_version(self, model_name: str, scenario_name: str) -> Run: ) try: - run: Run = self.session.execute(exc).scalar_one() - return run + return self.session.execute(exc).scalar_one() except NoResultFound: raise NoDefaultRunVersion diff --git a/ixmp4/data/db/timeseries.py b/ixmp4/data/db/timeseries.py index 7f62dfca..2d2247e5 100644 --- a/ixmp4/data/db/timeseries.py +++ b/ixmp4/data/db/timeseries.py @@ -45,8 +45,7 @@ def run(cls) -> db.Relationship["Run"]: @property def run_id(self) -> int: - run_id: int = self.run__id - return run_id + return self.run__id ModelType = TypeVar("ModelType", bound=TimeSeries) From 3cb5f39a6c35dd31be98774c31e400f4bf8f75ee Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 13:54:49 +0100 Subject: [PATCH 10/36] Remove superfluous lines --- ixmp4/data/api/base.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/ixmp4/data/api/base.py b/ixmp4/data/api/base.py index 5978fc2f..9db95dd5 100644 --- a/ixmp4/data/api/base.py +++ b/ixmp4/data/api/base.py @@ -359,9 +359,7 @@ def _handle_pagination( return [data.pop("results")] + results def _list( - self, - params: ParamType | None = None, - json: JsonType | None = None, + self, params: ParamType | None = None, json: JsonType | None = None ) -> list[ModelType]: data = self._request_enumeration(params=params, table=False, json=json) if isinstance(data, dict): @@ -375,9 +373,7 @@ def _list( return [self.model_class(**i) for i in results] def _tabulate( - self, - params: ParamType | None = {}, - json: JsonType | None = None, + self, params: ParamType | None = {}, json: JsonType | None = None ) -> pd.DataFrame: # we can assume this type on table endpoints data: dict[str, Any] = self._request_enumeration( @@ -398,9 +394,7 @@ def _tabulate( return DataFrame(**data).to_pandas() def _create( - self, - *args: Unpack[tuple[str]], - **kwargs: Unpack[_RequestKwargs], + self, *args: Unpack[tuple[str]], **kwargs: Unpack[_RequestKwargs] ) -> dict[str, Any]: # we can assume this type on create endpoints return self._request("POST", *args, **kwargs) # type: ignore[return-value] @@ -455,10 +449,7 @@ def create( | float | None, ) -> ModelType: - res = self._create( - self.prefix, - json=kwargs, - ) + res = self._create(self.prefix, json=kwargs) return self.model_class(**res) @@ -539,9 +530,4 @@ def bulk_delete( def bulk_delete_chunk(self, df: pd.DataFrame, **kwargs: Any) -> None: dict_ = df_to_dict(df) json_ = DataFrame(**dict_).model_dump_json() - self._request( - "PATCH", - self.prefix + "bulk/", - params=kwargs, - content=json_, - ) + self._request("PATCH", self.prefix + "bulk/", params=kwargs, content=json_) From 54eb700e34ae799b16b03daf501c8cf642cc8fc8 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 13:56:41 +0100 Subject: [PATCH 11/36] Make return value of indexset.data consistent --- ixmp4/core/optimization/indexset.py | 2 +- ixmp4/data/types.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ixmp4/core/optimization/indexset.py b/ixmp4/core/optimization/indexset.py index cefe403f..82e52ca0 100644 --- a/ixmp4/core/optimization/indexset.py +++ b/ixmp4/core/optimization/indexset.py @@ -29,7 +29,7 @@ def name(self) -> str: return self._model.name @property - def data(self) -> list[float | int | str]: + def data(self) -> list[float] | list[int] | list[str]: return self._model.data def add( diff --git a/ixmp4/data/types.py b/ixmp4/data/types.py index 449657f9..2a255d21 100644 --- a/ixmp4/data/types.py +++ b/ixmp4/data/types.py @@ -10,8 +10,7 @@ Float = Mapped[float] IndexSetId = Mapped[db.IndexSetIdType] Integer = Mapped[int] -# NOTE only one type will ever be in list, but not sure if we can map a union of lists -OptimizationDataList = Mapped[list[float | int | str]] +OptimizationDataList = Mapped[list[float] | list[int] | list[str]] JsonDict = Mapped[dict[str, Any]] OptimizationDataType = Mapped[Literal["float", "int", "str"] | None] String = Mapped[str] From 335388bda61b6be93bbec7908e6a6022ce465ece Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 14:03:41 +0100 Subject: [PATCH 12/36] Enable all abstract EnumerateKwargs for DB-timeseries --- ixmp4/data/db/timeseries.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ixmp4/data/db/timeseries.py b/ixmp4/data/db/timeseries.py index 2d2247e5..732a47a1 100644 --- a/ixmp4/data/db/timeseries.py +++ b/ixmp4/data/db/timeseries.py @@ -60,7 +60,11 @@ class SelectKwargs(TypedDict, total=False): run: dict[str, int] -class EnumerateKwargs(abstract.annotations.HasNameFilter, total=False): +class EnumerateKwargs( + abstract.annotations.HasNameFilter, + abstract.iamc.timeseries.EnumerateKwargs, + total=False, +): _filter: BaseFilter join_parameters: bool | None From 39e1d19b1fca7b83a2a8675b94a60608ab79ad60 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 14:18:43 +0100 Subject: [PATCH 13/36] Make iamc.data helper functions available in DB layer --- ixmp4/core/iamc/data.py | 82 ++++---------------------------------- ixmp4/data/db/iamc/data.py | 63 +++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 74 deletions(-) create mode 100644 ixmp4/data/db/iamc/data.py diff --git a/ixmp4/core/iamc/data.py b/ixmp4/core/iamc/data.py index 18329412..d1a74e3e 100644 --- a/ixmp4/core/iamc/data.py +++ b/ixmp4/core/iamc/data.py @@ -1,10 +1,6 @@ from collections.abc import Iterable -from typing import Optional, TypeVar import pandas as pd -import pandera as pa -from pandera.engines import pandas_engine -from pandera.typing import Series # TODO Import this from typing when dropping Python 3.11 from typing_extensions import Unpack @@ -13,67 +9,17 @@ from ixmp4.data.abstract import Run from ixmp4.data.abstract.iamc.datapoint import EnumerateKwargs from ixmp4.data.backend import Backend +from ixmp4.data.db.iamc.data import ( + AddDataPointFrameSchema, + RemoveDataPointFrameSchema, + normalize_df, +) from ..base import BaseFacade from ..utils import substitute_type from .variable import VariableRepository -class RemoveDataPointFrameSchema(pa.DataFrameModel): - type: Optional[Series[pa.String]] = pa.Field(isin=[t for t in DataPointModel.Type]) - step_year: Optional[Series[pa.Int]] = pa.Field(coerce=True, nullable=True) - step_datetime: Optional[Series[pandas_engine.DateTime]] = pa.Field( - coerce=True, nullable=True - ) - step_category: Optional[Series[pa.String]] = pa.Field(nullable=True) - - region: Optional[Series[pa.String]] = pa.Field(coerce=True) - unit: Optional[Series[pa.String]] = pa.Field(coerce=True) - variable: Optional[Series[pa.String]] = pa.Field(coerce=True) - - -class AddDataPointFrameSchema(RemoveDataPointFrameSchema): - value: Series[pa.Float] = pa.Field(coerce=True) - - -MAP_STEP_COLUMN = { - "ANNUAL": "step_year", - "CATEGORICAL": "step_year", - "DATETIME": "step_datetime", -} - - -def convert_to_std_format(df: pd.DataFrame, join_runs: bool) -> pd.DataFrame: - df.rename(columns={"step_category": "subannual"}, inplace=True) - - if set(df.type.unique()).issubset(["ANNUAL", "CATEGORICAL"]): - df.rename(columns={"step_year": "year"}, inplace=True) - time_col = "year" - else: - T = TypeVar("T", bool, float, int, str) - - def map_step_column(df: "pd.Series[T]") -> "pd.Series[T]": - df["time"] = df[MAP_STEP_COLUMN[str(df.type)]] - return df - - df = df.apply(map_step_column, axis=1) - time_col = "time" - - columns = ["model", "scenario", "version"] if join_runs else [] - columns += ["region", "variable", "unit"] + [time_col] - if "subannual" in df.columns: - columns += ["subannual"] - return df[columns + ["value"]] - - -def normalize_df(df: pd.DataFrame, raw: bool, join_runs: bool) -> pd.DataFrame: - if not df.empty: - df = df.drop(columns=["time_series__id"]) - if raw is False: - return convert_to_std_format(df, join_runs) - return df - - class RunIamcData(BaseFacade): """IAMC data. @@ -106,29 +52,17 @@ def _get_or_create_ts(self, df: pd.DataFrame) -> pd.DataFrame: # merge on the identity columns return pd.merge( - df, - ts_df, - how="left", - on=id_cols, - suffixes=(None, "_y"), + df, ts_df, how="left", on=id_cols, suffixes=(None, "_y") ) # tada, df with 'time_series__id' added from the database. - def add( - self, - df: pd.DataFrame, - type: Optional[DataPointModel.Type] = None, - ) -> None: + def add(self, df: pd.DataFrame, type: DataPointModel.Type | None = None) -> None: df = AddDataPointFrameSchema.validate(df) # type: ignore[assignment] df["run__id"] = self.run.id df = self._get_or_create_ts(df) substitute_type(df, type) self.backend.iamc.datapoints.bulk_upsert(df) - def remove( - self, - df: pd.DataFrame, - type: Optional[DataPointModel.Type] = None, - ) -> None: + def remove(self, df: pd.DataFrame, type: DataPointModel.Type | None = None) -> None: df = RemoveDataPointFrameSchema.validate(df) # type: ignore[assignment] df["run__id"] = self.run.id df = self._get_or_create_ts(df) diff --git a/ixmp4/data/db/iamc/data.py b/ixmp4/data/db/iamc/data.py new file mode 100644 index 00000000..789f6550 --- /dev/null +++ b/ixmp4/data/db/iamc/data.py @@ -0,0 +1,63 @@ +from typing import TypeVar + +import pandas as pd +import pandera as pa +from pandera.engines import pandas_engine +from pandera.typing import Series + +from ixmp4.data.abstract import DataPoint as DataPointModel + + +class RemoveDataPointFrameSchema(pa.DataFrameModel): + type: Series[pa.String] | None = pa.Field(isin=[t for t in DataPointModel.Type]) + step_year: Series[pa.Int] | None = pa.Field(coerce=True, nullable=True) + step_datetime: Series[pandas_engine.DateTime] | None = pa.Field( + coerce=True, nullable=True + ) + step_category: Series[pa.String] | None = pa.Field(nullable=True) + + region: Series[pa.String] | None = pa.Field(coerce=True) + unit: Series[pa.String] | None = pa.Field(coerce=True) + variable: Series[pa.String] | None = pa.Field(coerce=True) + + +class AddDataPointFrameSchema(RemoveDataPointFrameSchema): + value: Series[pa.Float] = pa.Field(coerce=True) + + +MAP_STEP_COLUMN = { + "ANNUAL": "step_year", + "CATEGORICAL": "step_year", + "DATETIME": "step_datetime", +} + + +def convert_to_std_format(df: pd.DataFrame, join_runs: bool) -> pd.DataFrame: + df.rename(columns={"step_category": "subannual"}, inplace=True) + + if set(df.type.unique()).issubset(["ANNUAL", "CATEGORICAL"]): + df.rename(columns={"step_year": "year"}, inplace=True) + time_col = "year" + else: + T = TypeVar("T", bool, float, int, str) + + def map_step_column(df: "pd.Series[T]") -> "pd.Series[T]": + df["time"] = df[MAP_STEP_COLUMN[str(df.type)]] + return df + + df = df.apply(map_step_column, axis=1) + time_col = "time" + + columns = ["model", "scenario", "version"] if join_runs else [] + columns += ["region", "variable", "unit"] + [time_col] + if "subannual" in df.columns: + columns += ["subannual"] + return df[columns + ["value"]] + + +def normalize_df(df: pd.DataFrame, raw: bool, join_runs: bool) -> pd.DataFrame: + if not df.empty: + df = df.drop(columns=["time_series__id"]) + if raw is False: + return convert_to_std_format(df, join_runs) + return df From 9e2dab4147ba144d6e2dae0ad7330f8c9bb8225e Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 14:20:35 +0100 Subject: [PATCH 14/36] Introduce run.clone() --- doc/source/openapi-v1.json | 2 +- ixmp4/core/run.py | 40 ++++++---- ixmp4/data/abstract/run.py | 28 +++++++ ixmp4/data/api/run.py | 25 ++++++- ixmp4/data/db/run/repository.py | 126 ++++++++++++++++++++++++++++++++ ixmp4/server/rest/run.py | 15 ++++ tests/core/test_run.py | 91 ++++++++++++++++++++++- 7 files changed, 308 insertions(+), 19 deletions(-) diff --git a/doc/source/openapi-v1.json b/doc/source/openapi-v1.json index 2047813a..5eed78f7 100644 --- a/doc/source/openapi-v1.json +++ b/doc/source/openapi-v1.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/iamc/datapoints/": {"patch": {"tags": ["iamc", "datapoints"], "summary": "Query", "description": "This endpoint is used to retrieve and optionally filter data.add()\n\nFilter parameters are provided as keyword arguments.\n\nThe available filters can be found here:\n:class:`ixmp4.data.db.iamc.datapoint.filter.DataPointFilter`.\n\nExamples\n--------\n\nFilter data points for a given model, scenario combination, and a number of years:\n\n.. code-block:: json\n\n {\n \"model\" : {\"name\": \"model 1\"},\n \"scenario\" : {\"name\": \"scenario 1\"},\n \"year__in\" : [2020, 2025]\n }\n\nReturn all data for a given variable:\n\n.. code-block:: json\n\n {\n \"variable\": {\"name\": \"Final Energy\"}\n }", "operationId": "query_iamc_datapoints__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "join_runs", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Join Runs"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/DataPointFilter"}], "default": {"run": {"default_only": true}}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_DataPoint_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/datapoints/bulk/": {"post": {"tags": ["iamc", "datapoints"], "summary": "Bulk Upsert", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_upsert`", "operationId": "bulk_upsert_iamc_datapoints_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["iamc", "datapoints"], "summary": "Bulk Delete", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_delete`", "operationId": "bulk_delete_iamc_datapoints_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/": {"get": {"tags": ["docs"], "summary": "List Models", "operationId": "list_models_docs_models__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Models", "operationId": "set_models_docs_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Models", "operationId": "delete_models_docs_models__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/": {"get": {"tags": ["docs"], "summary": "List Regions", "operationId": "list_regions_docs_regions__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Regions", "operationId": "set_regions_docs_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Regions", "operationId": "delete_regions_docs_regions__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/": {"get": {"tags": ["docs"], "summary": "List Scenarios", "operationId": "list_scenarios_docs_scenarios__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scenarios", "operationId": "set_scenarios_docs_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scenarios", "operationId": "delete_scenarios_docs_scenarios__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/": {"get": {"tags": ["docs"], "summary": "List Units", "operationId": "list_units_docs_units__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Units", "operationId": "set_units_docs_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Units", "operationId": "delete_units_docs_units__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/": {"get": {"tags": ["docs"], "summary": "List Variables", "operationId": "list_variables_docs_iamc_variables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Variables", "operationId": "set_variables_docs_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Variables", "operationId": "delete_variables_docs_iamc_variables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/": {"get": {"tags": ["docs"], "summary": "List Indexsets", "operationId": "list_indexsets_docs_optimization_indexsets__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Indexsets", "operationId": "set_indexsets_docs_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Indexsets", "operationId": "delete_indexsets_docs_optimization_indexsets__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/": {"get": {"tags": ["docs"], "summary": "List Scalars", "operationId": "list_scalars_docs_optimization_scalars__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Docs"}, "title": "Response List Scalars Docs Optimization Scalars Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scalars", "operationId": "set_scalars_docs_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scalars", "operationId": "delete_scalars_docs_optimization_scalars__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/": {"get": {"tags": ["docs"], "summary": "List Tables", "operationId": "list_tables_docs_optimization_tables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Docs"}, "title": "Response List Tables Docs Optimization Tables Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Tables", "operationId": "set_tables_docs_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Tables", "operationId": "delete_tables_docs_optimization_tables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/models/": {"patch": {"tags": ["iamc", "models"], "summary": "Query", "operationId": "query_iamc_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/IamcModelFilter"}], "default": {"run": {"default_only": true, "is_default": true}}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/scenarios/": {"patch": {"tags": ["iamc", "scenarios"], "summary": "Query", "operationId": "query_iamc_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/IamcScenarioFilter"}], "default": {"run": {"default_only": true, "is_default": true}}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/regions/": {"patch": {"tags": ["iamc", "regions"], "summary": "Query", "operationId": "query_iamc_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/IamcRegionFilter"}], "default": {"run": {"default_only": true, "is_default": true}}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/units/": {"patch": {"tags": ["iamc", "units"], "summary": "Query", "operationId": "query_iamc_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/IamcUnitFilter"}], "default": {"run": {"default_only": true, "is_default": true}}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/variables/": {"patch": {"tags": ["iamc", "variables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.variable.query`", "operationId": "query_iamc_variables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__variable__filter__VariableFilter"}], "default": {"run": {"default_only": true, "is_default": true}}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Variable_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "variables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.iamc.variable.create`", "operationId": "create_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VariableInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.indexset.query`", "operationId": "query_optimization_indexsets__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/OptimizationIndexSetFilter"}], "default": {}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_IndexSet_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "indexsets"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.indexset.create`", "operationId": "create_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSetInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSet"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/{indexset_id}/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Add Elements", "description": ":func:`ixmp4.server.rest.optimization.indexset.add_elements`", "operationId": "add_elements_optimization_indexsets__indexset_id___patch", "parameters": [{"name": "indexset_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Indexset Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ElementsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/": {"patch": {"tags": ["meta"], "summary": "Query", "operationId": "query_meta__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_run_index", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Run Index"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/RunMetaEntryFilter"}], "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_RunMetaEntry_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["meta"], "summary": "Create", "operationId": "create_meta__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntryInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntry"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/{id}/": {"delete": {"tags": ["meta"], "summary": "Delete", "operationId": "delete_meta__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/bulk/": {"post": {"tags": ["meta"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_meta_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["meta"], "summary": "Bulk Delete", "operationId": "bulk_delete_meta_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/models/": {"patch": {"tags": ["models"], "summary": "Query", "description": ":func:`ixmp4.server.rest.model.query`", "operationId": "query_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/ixmp4__data__db__model__filter__ModelFilter"}], "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["models"], "summary": "Create", "description": ":func:`ixmp4.server.rest.model.create`", "operationId": "create_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Model"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/": {"patch": {"tags": ["regions"], "summary": "Query", "description": ":func:`ixmp4.server.rest.region.query`", "operationId": "query_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/ixmp4__data__db__region__filter__RegionFilter"}], "default": {}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["regions"], "summary": "Create", "description": ":func:`ixmp4.server.rest.region.create`", "operationId": "create_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegionInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Region"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/{id}/": {"delete": {"tags": ["regions"], "summary": "Delete", "operationId": "delete_regions__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/": {"patch": {"tags": ["runs"], "summary": "Query", "operationId": "query_runs__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/ixmp4__data__db__run__filter__RunFilter"}], "default": {"default_only": true}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Run_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["runs"], "summary": "Create", "operationId": "create_runs__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/set-as-default-version/": {"post": {"tags": ["runs"], "summary": "Set As Default Version", "operationId": "set_as_default_version_runs__id__set_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/unset-as-default-version/": {"post": {"tags": ["runs"], "summary": "Unset As Default Version", "operationId": "unset_as_default_version_runs__id__unset_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/{id}/": {"get": {"tags": ["optimization", "scalars"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.scalar.get_by_id`", "operationId": "get_by_id_optimization_scalars__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["optimization", "scalars"], "summary": "Update", "description": ":func:`ixmp4.server.rest.optimization.scalar.update`", "operationId": "update_optimization_scalars__id___patch", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarUpdateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/": {"patch": {"tags": ["optimization", "scalars"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.scalar.query`", "operationId": "query_optimization_scalars__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/OptimizationScalarFilter"}], "default": {}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scalar_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "scalars"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.scalar.create`", "operationId": "create_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/scenarios/": {"patch": {"tags": ["scenarios"], "summary": "Query", "description": ":func:`ixmp4.server.rest.scenario.query`", "operationId": "query_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__ScenarioFilter"}], "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["scenarios"], "summary": "Create", "description": ":func:`ixmp4.server.rest.scenario.create`", "operationId": "create_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScenarioInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scenario"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{id}/": {"get": {"tags": ["optimization", "tables"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.table.get_by_id`", "operationId": "get_by_id_optimization_tables__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/": {"patch": {"tags": ["optimization", "tables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.table.query`", "operationId": "query_optimization_tables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/OptimizationTableFilter"}], "default": {}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Table_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "tables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.table.create`", "operationId": "create_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{table_id}/data/": {"patch": {"tags": ["optimization", "tables"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.table.add_data`", "operationId": "add_data_optimization_tables__table_id__data__patch", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Table Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/": {"patch": {"tags": ["iamc", "timeseries"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.timeseries.query`", "operationId": "query_iamc_timeseries__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/TimeSeriesFilter"}], "default": {"run": {"default_only": true}}, "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_TimeSeries_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "timeseries"], "summary": "Create", "operationId": "create_iamc_timeseries__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeriesInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/{id}/": {"get": {"tags": ["iamc", "timeseries"], "summary": "Get By Id", "operationId": "get_by_id_iamc_timeseries__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeries"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/bulk/": {"post": {"tags": ["iamc", "timeseries"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_iamc_timeseries_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "create_related", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Create Related"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/": {"patch": {"tags": ["units"], "summary": "Query", "description": ":func:`ixmp4.server.rest.unit.query`", "operationId": "query_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/ixmp4__data__db__unit__filter__UnitFilter"}], "title": "Filter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["units"], "summary": "Create", "operationId": "create_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnitInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unit"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/{id}/": {"delete": {"tags": ["units"], "summary": "Delete", "operationId": "delete_units__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"type": "string", "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/APIInfo"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"APIInfo": {"properties": {"name": {"type": "string", "title": "Name"}, "version": {"type": "string", "title": "Version"}, "is_managed": {"type": "boolean", "title": "Is Managed"}, "manager_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manager Url"}, "utcnow": {"type": "string", "format": "date-time", "title": "Utcnow"}}, "type": "object", "required": ["name", "version", "is_managed", "manager_url", "utcnow"], "title": "APIInfo"}, "Column": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "dtype": {"type": "string", "title": "Dtype"}, "table__id": {"type": "integer", "title": "Table Id"}, "indexset": {"$ref": "#/components/schemas/IndexSet"}, "constrained_to_indexset": {"type": "integer", "title": "Constrained To Indexset"}, "unique": {"type": "boolean", "title": "Unique"}}, "type": "object", "required": ["id", "name", "dtype", "table__id", "indexset", "constrained_to_indexset", "unique"], "title": "Column"}, "DataFrame": {"properties": {"index": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Index"}, "columns": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Columns"}, "dtypes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dtypes"}, "data": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Data"}}, "type": "object", "required": ["columns", "dtypes", "data"], "title": "DataFrame"}, "DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "DataPoint": {"properties": {"id": {"type": "integer", "title": "Id"}, "time_series__id": {"type": "integer", "title": "Time Series Id"}, "value": {"type": "number", "title": "Value"}, "type": {"type": "string", "title": "Type"}, "step_category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Step Category"}, "step_year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Step Year"}, "step_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Step Datetime"}}, "type": "object", "required": ["id", "time_series__id", "value", "type", "step_category", "step_year", "step_datetime"], "title": "DataPoint"}, "DataPointFilter": {"properties": {"year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year", "sqla_column": "step_year"}, "time_series_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Time Series Id", "sqla_column": "time_series__id"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "year__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Year In", "sqla_column": "step_year"}, "year__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gt", "sqla_column": "step_year"}, "year__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lt", "sqla_column": "step_year"}, "year__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gte", "sqla_column": "step_year"}, "year__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lte", "sqla_column": "step_year"}, "time_series_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Time Series Id In", "sqla_column": "time_series__id"}}, "additionalProperties": false, "type": "object", "title": "run", "description": "This class is used for filtering data points\n\nAll parameters are optional. Use the field name (or the field alias)\ndirectly for equality comparisons. For performing an SQL IN operation\nuse the field name followed by a double underscore and *in*.\n\nParameters\n----------\nstep_year : filters.Integer, Optional\n Filter for data point year, can also be called with \"year\"\ntime_series__id : filters.Id, Optional\n Filter for the id of the time series, can also be called with \"time_series_id\"\nregion : RegionFilter, Optional\n Filter for either region name or hierarchy\nunit : UnitFilter, Optional\n Filter for unit name\nvariable : VariableFilter, Optional\n Filter for variable name\nmodel : ModelFilter, Optional\n Filter for model name\nscenario : ScenarioFilter, Optional\n Filter for the scenario name\nrun : RunFilter, Optional\n Filter for the run, options are id or default_only\n\nExamples\n--------\n\nReturn all data points for a given year.\n\n>>> DataPointFilter(year=2020)\n\nReturn all data points a number of years\n\n>>> DataPointFilter(year__in=[2020, 2025])\n\nReturn all data point that map to a given variable\n\n>>> DataPointFilter(variable=VariableFilter(name=\"variable 1\"))\n\nNote that for actual use providing the filter parameters as key word arguments is\nsufficient. Calling an endpoint could look like this:\n\n>>> filter = {\"variable\": {\"name\": \"variable 1\"}, \"year\": 2020}\n>>> iamc.tabulate(**filter)"}, "Docs": {"properties": {"id": {"type": "integer", "title": "Id"}, "description": {"type": "string", "title": "Description"}, "dimension__id": {"type": "integer", "title": "Dimension Id"}}, "type": "object", "required": ["id", "description", "dimension__id"], "title": "Docs"}, "DocsInput": {"properties": {"dimension_id": {"type": "integer", "title": "Dimension Id"}, "description": {"type": "string", "title": "Description"}}, "type": "object", "required": ["dimension_id", "description"], "title": "DocsInput"}, "ElementsInput": {"properties": {"elements": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}]}, "type": "array"}], "title": "Elements"}}, "type": "object", "required": ["elements"], "title": "ElementsInput"}, "EnumerationOutput_DataPoint_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/DataPoint"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[DataPoint]"}, "EnumerationOutput_Docs_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Docs"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Docs]"}, "EnumerationOutput_IndexSet_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/IndexSet"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[IndexSet]"}, "EnumerationOutput_Model_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Model"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Model]"}, "EnumerationOutput_Region_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Region"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Region]"}, "EnumerationOutput_RunMetaEntry_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/RunMetaEntry"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[RunMetaEntry]"}, "EnumerationOutput_Run_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Run"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Run]"}, "EnumerationOutput_Scalar_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scalar"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scalar]"}, "EnumerationOutput_Scenario_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scenario"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scenario]"}, "EnumerationOutput_Table_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Table"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Table]"}, "EnumerationOutput_TimeSeries_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/TimeSeries"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[TimeSeries]"}, "EnumerationOutput_Unit_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Unit"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Unit]"}, "EnumerationOutput_Variable_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Variable"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Variable]"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IamcModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__model__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRunFilter": {"properties": {"region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "IamcScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcUnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IndexSet": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "elements": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}]}, "type": "array"}, {"type": "null"}], "title": "Elements"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "elements", "run__id", "created_at", "created_by"], "title": "IndexSet"}, "IndexSetInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["run_id", "name"], "title": "IndexSetInput"}, "Model": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Model"}, "ModelInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ModelInput"}, "OptimizationIndexSetFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationIndexSetFilter"}, "OptimizationScalarFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id", "sqla_column": "unit__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "unit_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Unit Id In", "sqla_column": "unit__id"}, "unit_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gt", "sqla_column": "unit__id"}, "unit_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lt", "sqla_column": "unit__id"}, "unit_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gte", "sqla_column": "unit__id"}, "unit_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lte", "sqla_column": "unit__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationScalarFilter"}, "OptimizationTableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationTableFilter"}, "Pagination": {"properties": {"limit": {"type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Limit", "default": 5000}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset", "default": 0}}, "type": "object", "title": "Pagination"}, "Region": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "hierarchy"], "title": "Region"}, "RegionInput": {"properties": {"name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}}, "type": "object", "required": ["name", "hierarchy"], "title": "RegionInput"}, "Run": {"properties": {"id": {"type": "integer", "title": "Id"}, "model": {"$ref": "#/components/schemas/Model"}, "model__id": {"type": "integer", "title": "Model Id"}, "scenario": {"$ref": "#/components/schemas/Scenario"}, "scenario__id": {"type": "integer", "title": "Scenario Id"}, "version": {"type": "integer", "title": "Version"}, "is_default": {"type": "boolean", "title": "Is Default"}}, "type": "object", "required": ["id", "model", "model__id", "scenario", "scenario__id", "version", "is_default"], "title": "Run"}, "RunInput": {"properties": {"model_name": {"type": "string", "title": "Model Name"}, "scenario_name": {"type": "string", "title": "Scenario Name"}}, "type": "object", "required": ["model_name", "scenario_name"], "title": "RunInput"}, "RunMetaEntry": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "type": {"type": "string", "title": "Type"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["id", "run__id", "key", "type", "value"], "title": "RunMetaEntry"}, "RunMetaEntryFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type", "sqla_column": "type"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key", "sqla_column": "key"}, "value_int": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int", "sqla_column": "value_int"}, "value_str": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str", "sqla_column": "value_str"}, "value_float": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float", "sqla_column": "value_float"}, "value_bool": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Value Bool", "sqla_column": "value_bool"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "type__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Type In", "sqla_column": "type"}, "type__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type Like", "sqla_column": "type"}, "type__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type Ilike", "sqla_column": "type"}, "type__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type Notlike", "sqla_column": "type"}, "type__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type Notilike", "sqla_column": "type"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "key__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Key In", "sqla_column": "key"}, "key__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Like", "sqla_column": "key"}, "key__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Ilike", "sqla_column": "key"}, "key__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notlike", "sqla_column": "key"}, "key__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notilike", "sqla_column": "key"}, "value_int__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Int In", "sqla_column": "value_int"}, "value_int__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gt", "sqla_column": "value_int"}, "value_int__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lt", "sqla_column": "value_int"}, "value_int__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gte", "sqla_column": "value_int"}, "value_int__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lte", "sqla_column": "value_int"}, "value_str__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Value Str In", "sqla_column": "value_str"}, "value_str__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Like", "sqla_column": "value_str"}, "value_str__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Ilike", "sqla_column": "value_str"}, "value_str__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notlike", "sqla_column": "value_str"}, "value_str__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notilike", "sqla_column": "value_str"}, "value_float__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Float In", "sqla_column": "value_float"}, "value_float__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gt", "sqla_column": "value_float"}, "value_float__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lt", "sqla_column": "value_float"}, "value_float__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gte", "sqla_column": "value_float"}, "value_float__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lte", "sqla_column": "value_float"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__meta__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "RunMetaEntryInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["run__id", "key", "value"], "title": "RunMetaEntryInput"}, "Scalar": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit": {"$ref": "#/components/schemas/Unit"}, "unit__id": {"type": "integer", "title": "Unit Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "value", "unit", "unit__id", "run__id", "created_at", "created_by"], "title": "Scalar"}, "ScalarCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit_name": {"type": "string", "title": "Unit Name"}, "run_id": {"type": "integer", "title": "Run Id"}}, "type": "object", "required": ["name", "value", "unit_name", "run_id"], "title": "ScalarCreateInput"}, "ScalarUpdateInput": {"properties": {"value": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Value"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id"}}, "type": "object", "required": ["value", "unit_id"], "title": "ScalarUpdateInput"}, "Scenario": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Scenario"}, "ScenarioInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ScenarioInput"}, "Table": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Table"}, "TableCreateInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "name": {"type": "string", "title": "Name"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["run_id", "name", "constrained_to_indexsets", "column_names"], "title": "TableCreateInput"}, "TimeSeries": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["id", "run__id", "parameters"], "title": "TimeSeries"}, "TimeSeriesFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "TimeSeriesInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["run__id", "parameters"], "title": "TimeSeriesInput"}, "Unit": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Unit"}, "UnitInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "UnitInput"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "Variable": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Variable"}, "VariableInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "VariableInput"}, "ixmp4__data__db__filters__model__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__region__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__run__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__scenario__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__unit__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__variable__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ModelFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RegionFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__UnitFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__VariableFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__variable__filter__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "ixmp4__data__db__meta__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "RunFilter"}, "ixmp4__data__db__model__filter__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcModelFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__model__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "model"}, "ixmp4__data__db__region__filter__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRegionFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__run__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRunFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__scenario__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "scenario"}, "ixmp4__data__db__scenario__filter__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcScenarioFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__unit__filter__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcUnitFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}}}} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/iamc/datapoints/": {"patch": {"tags": ["iamc", "datapoints"], "summary": "Query", "description": "This endpoint is used to retrieve and optionally filter data.add()\n\nFilter parameters are provided as keyword arguments.\n\nThe available filters can be found here:\n:class:`ixmp4.data.db.iamc.datapoint.filter.DataPointFilter`.\n\nExamples\n--------\n\nFilter data points for a given model, scenario combination, and a number of years:\n\n.. code-block:: json\n\n {\n \"model\" : {\"name\": \"model 1\"},\n \"scenario\" : {\"name\": \"scenario 1\"},\n \"year__in\" : [2020, 2025]\n }\n\nReturn all data for a given variable:\n\n.. code-block:: json\n\n {\n \"variable\": {\"name\": \"Final Energy\"}\n }", "operationId": "query_iamc_datapoints__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "join_runs", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Join Runs"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataPointFilter", "default": {"run": {"default_only": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_DataPoint_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/datapoints/bulk/": {"post": {"tags": ["iamc", "datapoints"], "summary": "Bulk Upsert", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_upsert`", "operationId": "bulk_upsert_iamc_datapoints_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["iamc", "datapoints"], "summary": "Bulk Delete", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_delete`", "operationId": "bulk_delete_iamc_datapoints_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/": {"get": {"tags": ["docs"], "summary": "List Models", "operationId": "list_models_docs_models__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Models", "operationId": "set_models_docs_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Models", "operationId": "delete_models_docs_models__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/": {"get": {"tags": ["docs"], "summary": "List Regions", "operationId": "list_regions_docs_regions__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Regions", "operationId": "set_regions_docs_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Regions", "operationId": "delete_regions_docs_regions__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/": {"get": {"tags": ["docs"], "summary": "List Scenarios", "operationId": "list_scenarios_docs_scenarios__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scenarios", "operationId": "set_scenarios_docs_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scenarios", "operationId": "delete_scenarios_docs_scenarios__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/": {"get": {"tags": ["docs"], "summary": "List Units", "operationId": "list_units_docs_units__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Units", "operationId": "set_units_docs_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Units", "operationId": "delete_units_docs_units__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/": {"get": {"tags": ["docs"], "summary": "List Variables", "operationId": "list_variables_docs_iamc_variables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Variables", "operationId": "set_variables_docs_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Variables", "operationId": "delete_variables_docs_iamc_variables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/": {"get": {"tags": ["docs"], "summary": "List Indexsets", "operationId": "list_indexsets_docs_optimization_indexsets__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Indexsets", "operationId": "set_indexsets_docs_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Indexsets", "operationId": "delete_indexsets_docs_optimization_indexsets__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/": {"get": {"tags": ["docs"], "summary": "List Scalars", "operationId": "list_scalars_docs_optimization_scalars__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scalars", "operationId": "set_scalars_docs_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scalars", "operationId": "delete_scalars_docs_optimization_scalars__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/": {"get": {"tags": ["docs"], "summary": "List Tables", "operationId": "list_tables_docs_optimization_tables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Tables", "operationId": "set_tables_docs_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Tables", "operationId": "delete_tables_docs_optimization_tables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/parameters/": {"get": {"tags": ["docs"], "summary": "List Parameters", "operationId": "list_parameters_docs_optimization_parameters__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Parameters", "operationId": "set_parameters_docs_optimization_parameters__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/parameters/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Parameters", "operationId": "delete_parameters_docs_optimization_parameters__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/variables/": {"get": {"tags": ["docs"], "summary": "List Optimization Variables", "operationId": "list_optimization_variables_docs_optimization_variables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Optimization Variables", "operationId": "set_optimization_variables_docs_optimization_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/variables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Optimization Variables", "operationId": "delete_optimization_variables_docs_optimization_variables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/equations/": {"get": {"tags": ["docs"], "summary": "List Equations", "operationId": "list_equations_docs_optimization_equations__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Equations", "operationId": "set_equations_docs_optimization_equations__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/equations/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Equations", "operationId": "delete_equations_docs_optimization_equations__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/models/": {"patch": {"tags": ["iamc", "models"], "summary": "Query", "operationId": "query_iamc_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcModelFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/scenarios/": {"patch": {"tags": ["iamc", "scenarios"], "summary": "Query", "operationId": "query_iamc_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcScenarioFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/regions/": {"patch": {"tags": ["iamc", "regions"], "summary": "Query", "operationId": "query_iamc_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcRegionFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/units/": {"patch": {"tags": ["iamc", "units"], "summary": "Query", "operationId": "query_iamc_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcUnitFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/variables/": {"patch": {"tags": ["iamc", "variables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.variable.query`", "operationId": "query_iamc_variables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__iamc__variable__filter__VariableFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__base__EnumerationOutput_Variable___1"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "variables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.iamc.variable.create`", "operationId": "create_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VariableInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__iamc__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/": {"patch": {"tags": ["meta"], "summary": "Query", "operationId": "query_meta__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_run_index", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Run Index"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntryFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_RunMetaEntry_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["meta"], "summary": "Create", "operationId": "create_meta__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntryInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntry"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/{id}/": {"delete": {"tags": ["meta"], "summary": "Delete", "operationId": "delete_meta__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/bulk/": {"post": {"tags": ["meta"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_meta_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["meta"], "summary": "Bulk Delete", "operationId": "bulk_delete_meta_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/models/": {"patch": {"tags": ["models"], "summary": "Query", "description": ":func:`ixmp4.server.rest.model.query`", "operationId": "query_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__model__filter__ModelFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["models"], "summary": "Create", "description": ":func:`ixmp4.server.rest.model.create`", "operationId": "create_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Model"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/{id}/": {"get": {"tags": ["optimization", "equations"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.equation.get_by_id`", "operationId": "get_by_id_optimization_equations__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Equation"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/": {"patch": {"tags": ["optimization", "equations"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.equation.query`", "operationId": "query_optimization_equations__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EquationFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Equation_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "equations"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.equation.create`", "operationId": "create_optimization_equations__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EquationCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Equation"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/{equation_id}/data/": {"patch": {"tags": ["optimization", "equations"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.equation.add_data`", "operationId": "add_data_optimization_equations__equation_id__data__patch", "parameters": [{"name": "equation_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Equation Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__equation__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["optimization", "equations"], "summary": "Remove Data", "description": ":func:`ixmp4.server.rest.optimization.equation.remove_data`", "operationId": "remove_data_optimization_equations__equation_id__data__delete", "parameters": [{"name": "equation_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Equation Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.indexset.query`", "operationId": "query_optimization_indexsets__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationIndexSetFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_IndexSet_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "indexsets"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.indexset.create`", "operationId": "create_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSetInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSet"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/{indexset_id}/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.indexset.add_data`", "operationId": "add_data_optimization_indexsets__indexset_id___patch", "parameters": [{"name": "indexset_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Indexset Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__indexset__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/{id}/": {"get": {"tags": ["optimization", "parameters"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.parameter.get_by_id`", "operationId": "get_by_id_optimization_parameters__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Parameter"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/": {"patch": {"tags": ["optimization", "parameters"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.parameter.query`", "operationId": "query_optimization_parameters__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationParameterFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Parameter_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "parameters"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.parameter.create`", "operationId": "create_optimization_parameters__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ParameterCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Parameter"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/{parameter_id}/data/": {"patch": {"tags": ["optimization", "parameters"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.parameter.add_data`", "operationId": "add_data_optimization_parameters__parameter_id__data__patch", "parameters": [{"name": "parameter_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Parameter Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__parameter__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/{id}/": {"get": {"tags": ["optimization", "scalars"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.scalar.get_by_id`", "operationId": "get_by_id_optimization_scalars__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["optimization", "scalars"], "summary": "Update", "description": ":func:`ixmp4.server.rest.optimization.scalar.update`", "operationId": "update_optimization_scalars__id___patch", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarUpdateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/": {"patch": {"tags": ["optimization", "scalars"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.scalar.query`", "operationId": "query_optimization_scalars__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationScalarFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scalar_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "scalars"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.scalar.create`", "operationId": "create_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{id}/": {"get": {"tags": ["optimization", "tables"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.table.get_by_id`", "operationId": "get_by_id_optimization_tables__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/": {"patch": {"tags": ["optimization", "tables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.table.query`", "operationId": "query_optimization_tables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationTableFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Table_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "tables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.table.create`", "operationId": "create_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{table_id}/data/": {"patch": {"tags": ["optimization", "tables"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.table.add_data`", "operationId": "add_data_optimization_tables__table_id__data__patch", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Table Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__table__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/{id}/": {"get": {"tags": ["optimization", "variables"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.variable.get_by_id`", "operationId": "get_by_id_optimization_variables__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/": {"patch": {"tags": ["optimization", "variables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.variable.query`", "operationId": "query_optimization_variables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationVariableFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__base__EnumerationOutput_Variable___2"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "variables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.variable.create`", "operationId": "create_optimization_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VariableCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/{variable_id}/data/": {"patch": {"tags": ["optimization", "variables"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.variable.add_data`", "operationId": "add_data_optimization_variables__variable_id__data__patch", "parameters": [{"name": "variable_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Variable Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__variable__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["optimization", "variables"], "summary": "Remove Data", "description": ":func:`ixmp4.server.rest.optimization.variable.remove_data`", "operationId": "remove_data_optimization_variables__variable_id__data__delete", "parameters": [{"name": "variable_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Variable Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/": {"patch": {"tags": ["regions"], "summary": "Query", "description": ":func:`ixmp4.server.rest.region.query`", "operationId": "query_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__region__filter__RegionFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["regions"], "summary": "Create", "description": ":func:`ixmp4.server.rest.region.create`", "operationId": "create_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegionInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Region"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/{id}/": {"delete": {"tags": ["regions"], "summary": "Delete", "operationId": "delete_regions__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/": {"patch": {"tags": ["runs"], "summary": "Query", "operationId": "query_runs__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__run__filter__RunFilter", "default": {"default_only": true}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Run_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["runs"], "summary": "Create", "operationId": "create_runs__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/clone/": {"post": {"tags": ["runs"], "summary": "Clone", "operationId": "clone_runs_clone__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CloneInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/set-as-default-version/": {"post": {"tags": ["runs"], "summary": "Set As Default Version", "operationId": "set_as_default_version_runs__id__set_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/unset-as-default-version/": {"post": {"tags": ["runs"], "summary": "Unset As Default Version", "operationId": "unset_as_default_version_runs__id__unset_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/": {"get": {"tags": ["runs"], "summary": "Get By Id", "operationId": "get_by_id_runs__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/scenarios/": {"patch": {"tags": ["scenarios"], "summary": "Query", "description": ":func:`ixmp4.server.rest.scenario.query`", "operationId": "query_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__ScenarioFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["scenarios"], "summary": "Create", "description": ":func:`ixmp4.server.rest.scenario.create`", "operationId": "create_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScenarioInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scenario"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/": {"patch": {"tags": ["iamc", "timeseries"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.timeseries.query`", "operationId": "query_iamc_timeseries__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeriesFilter", "default": {"run": {"default_only": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_TimeSeries_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "timeseries"], "summary": "Create", "operationId": "create_iamc_timeseries__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeriesInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeries"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/{id}/": {"get": {"tags": ["iamc", "timeseries"], "summary": "Get By Id", "operationId": "get_by_id_iamc_timeseries__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeries"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/bulk/": {"post": {"tags": ["iamc", "timeseries"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_iamc_timeseries_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "create_related", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Create Related"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/": {"patch": {"tags": ["units"], "summary": "Query", "description": ":func:`ixmp4.server.rest.unit.query`", "operationId": "query_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__unit__filter__UnitFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["units"], "summary": "Create", "operationId": "create_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnitInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unit"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/{id}/": {"delete": {"tags": ["units"], "summary": "Delete", "operationId": "delete_units__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/APIInfo"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"APIInfo": {"properties": {"name": {"type": "string", "title": "Name"}, "version": {"type": "string", "title": "Version"}, "is_managed": {"type": "boolean", "title": "Is Managed"}, "manager_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manager Url"}, "utcnow": {"type": "string", "format": "date-time", "title": "Utcnow"}}, "type": "object", "required": ["name", "version", "is_managed", "manager_url", "utcnow"], "title": "APIInfo"}, "CloneInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "model_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Model Name"}, "scenario_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scenario Name"}, "keep_solution": {"type": "boolean", "title": "Keep Solution", "default": true}}, "type": "object", "required": ["run_id"], "title": "CloneInput"}, "Column": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "dtype": {"type": "string", "title": "Dtype"}, "equation__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Equation Id"}, "parameter__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parameter Id"}, "table__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Table Id"}, "variable__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Variable Id"}, "indexset": {"$ref": "#/components/schemas/IndexSet"}, "constrained_to_indexset": {"type": "integer", "title": "Constrained To Indexset"}, "unique": {"type": "boolean", "title": "Unique"}}, "type": "object", "required": ["id", "name", "dtype", "equation__id", "parameter__id", "table__id", "variable__id", "indexset", "constrained_to_indexset", "unique"], "title": "Column"}, "DataFrame": {"properties": {"index": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Index"}, "columns": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Columns"}, "dtypes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dtypes"}, "data": {"anyOf": [{"items": {"items": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}]}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Data"}}, "type": "object", "required": ["columns", "dtypes", "data"], "title": "DataFrame"}, "DataPoint": {"properties": {"id": {"type": "integer", "title": "Id"}, "time_series__id": {"type": "integer", "title": "Time Series Id"}, "value": {"type": "number", "title": "Value"}, "type": {"type": "string", "title": "Type"}, "step_category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Step Category"}, "step_year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Step Year"}, "step_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Step Datetime"}}, "type": "object", "required": ["id", "time_series__id", "value", "type", "step_category", "step_year", "step_datetime"], "title": "DataPoint"}, "DataPointFilter": {"properties": {"year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year", "sqla_column": "step_year"}, "time_series_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Time Series Id", "sqla_column": "time_series__id"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "year__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gt", "sqla_column": "step_year"}, "year__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lt", "sqla_column": "step_year"}, "year__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lte", "sqla_column": "step_year"}, "year__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Year In", "sqla_column": "step_year"}, "year__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gte", "sqla_column": "step_year"}, "time_series_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Time Series Id In", "sqla_column": "time_series__id"}}, "additionalProperties": false, "type": "object", "title": "run", "description": "This class is used for filtering data points.\n\nAll parameters are optional. Use the field name (or the field alias)\ndirectly for equality comparisons. For performing an SQL IN operation\nuse the field name followed by a double underscore and *in*.\n\nParameters\n----------\nstep_year : filters.Integer, Optional\n Filter for data point year, can also be called with \"year\"\ntime_series__id : filters.Id, Optional\n Filter for the id of the time series, can also be called with \"time_series_id\"\nregion : RegionFilter, Optional\n Filter for either region name or hierarchy\nunit : UnitFilter, Optional\n Filter for unit name\nvariable : VariableFilter, Optional\n Filter for variable name\nmodel : ModelFilter, Optional\n Filter for model name\nscenario : ScenarioFilter, Optional\n Filter for the scenario name\nrun : RunFilter, Optional\n Filter for the run, options are id or default_only\n\nExamples\n--------\n\nReturn all data points for a given year.\n\n>>> DataPointFilter(year=2020)\n\nReturn all data points a number of years\n\n>>> DataPointFilter(year__in=[2020, 2025])\n\nReturn all data point that map to a given variable\n\n>>> DataPointFilter(variable=VariableFilter(name=\"variable 1\"))\n\nNote that for actual use providing the filter parameters as key word arguments is\nsufficient. Calling an endpoint could look like this:\n\n>>> filter = {\"variable\": {\"name\": \"variable 1\"}, \"year\": 2020}\n>>> iamc.tabulate(**filter)"}, "Docs": {"properties": {"id": {"type": "integer", "title": "Id"}, "description": {"type": "string", "title": "Description"}, "dimension__id": {"type": "integer", "title": "Dimension Id"}}, "type": "object", "required": ["id", "description", "dimension__id"], "title": "Docs"}, "DocsInput": {"properties": {"dimension_id": {"type": "integer", "title": "Dimension Id"}, "description": {"type": "string", "title": "Description"}}, "type": "object", "required": ["dimension_id", "description"], "title": "DocsInput"}, "EnumerationOutput_DataPoint_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/DataPoint"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[DataPoint]"}, "EnumerationOutput_Docs_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Docs"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Docs]"}, "EnumerationOutput_Equation_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Equation"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Equation]"}, "EnumerationOutput_IndexSet_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/IndexSet"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[IndexSet]"}, "EnumerationOutput_Model_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Model"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Model]"}, "EnumerationOutput_Parameter_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Parameter"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Parameter]"}, "EnumerationOutput_Region_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Region"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Region]"}, "EnumerationOutput_RunMetaEntry_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/RunMetaEntry"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[RunMetaEntry]"}, "EnumerationOutput_Run_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Run"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Run]"}, "EnumerationOutput_Scalar_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scalar"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scalar]"}, "EnumerationOutput_Scenario_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scenario"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scenario]"}, "EnumerationOutput_Table_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Table"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Table]"}, "EnumerationOutput_TimeSeries_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/TimeSeries"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[TimeSeries]"}, "EnumerationOutput_Unit_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Unit"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Unit]"}, "Equation": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Equation"}, "EquationCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "EquationCreateInput"}, "EquationFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "EquationFilter"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IamcModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__model__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRunFilter": {"properties": {"region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "IamcScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcUnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IndexSet": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Data"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "run__id", "created_at", "created_by"], "title": "IndexSet"}, "IndexSetInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["run_id", "name"], "title": "IndexSetInput"}, "Model": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Model"}, "ModelInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ModelInput"}, "OptimizationIndexSetFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationIndexSetFilter"}, "OptimizationParameterFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationParameterFilter"}, "OptimizationScalarFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id", "sqla_column": "unit__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "unit_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gt", "sqla_column": "unit__id"}, "unit_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lt", "sqla_column": "unit__id"}, "unit_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lte", "sqla_column": "unit__id"}, "unit_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Unit Id In", "sqla_column": "unit__id"}, "unit_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gte", "sqla_column": "unit__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationScalarFilter"}, "OptimizationTableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationTableFilter"}, "OptimizationVariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationVariableFilter"}, "Pagination": {"properties": {"limit": {"type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Limit", "default": 5000}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset", "default": 0}}, "type": "object", "title": "Pagination"}, "Parameter": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Parameter"}, "ParameterCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "ParameterCreateInput"}, "Region": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "hierarchy"], "title": "Region"}, "RegionInput": {"properties": {"name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}}, "type": "object", "required": ["name", "hierarchy"], "title": "RegionInput"}, "Run": {"properties": {"id": {"type": "integer", "title": "Id"}, "model": {"$ref": "#/components/schemas/Model"}, "model__id": {"type": "integer", "title": "Model Id"}, "scenario": {"$ref": "#/components/schemas/Scenario"}, "scenario__id": {"type": "integer", "title": "Scenario Id"}, "version": {"type": "integer", "title": "Version"}, "is_default": {"type": "boolean", "title": "Is Default"}}, "type": "object", "required": ["id", "model", "model__id", "scenario", "scenario__id", "version", "is_default"], "title": "Run"}, "RunInput": {"properties": {"model_name": {"type": "string", "title": "Model Name"}, "scenario_name": {"type": "string", "title": "Scenario Name"}}, "type": "object", "required": ["model_name", "scenario_name"], "title": "RunInput"}, "RunMetaEntry": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "dtype": {"type": "string", "title": "Dtype"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["id", "run__id", "key", "dtype", "value"], "title": "RunMetaEntry"}, "RunMetaEntryFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "dtype": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype", "sqla_column": "dtype"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key", "sqla_column": "key"}, "value_int": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int", "sqla_column": "value_int"}, "value_str": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str", "sqla_column": "value_str"}, "value_float": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float", "sqla_column": "value_float"}, "value_bool": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Value Bool", "sqla_column": "value_bool"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "dtype__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dtype In", "sqla_column": "dtype"}, "dtype__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Like", "sqla_column": "dtype"}, "dtype__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Ilike", "sqla_column": "dtype"}, "dtype__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Notlike", "sqla_column": "dtype"}, "dtype__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Notilike", "sqla_column": "dtype"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "key__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Key In", "sqla_column": "key"}, "key__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Like", "sqla_column": "key"}, "key__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Ilike", "sqla_column": "key"}, "key__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notlike", "sqla_column": "key"}, "key__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notilike", "sqla_column": "key"}, "value_int__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Int In", "sqla_column": "value_int"}, "value_int__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gt", "sqla_column": "value_int"}, "value_int__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lt", "sqla_column": "value_int"}, "value_int__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gte", "sqla_column": "value_int"}, "value_int__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lte", "sqla_column": "value_int"}, "value_str__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Value Str In", "sqla_column": "value_str"}, "value_str__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Like", "sqla_column": "value_str"}, "value_str__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Ilike", "sqla_column": "value_str"}, "value_str__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notlike", "sqla_column": "value_str"}, "value_str__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notilike", "sqla_column": "value_str"}, "value_float__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Float In", "sqla_column": "value_float"}, "value_float__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gt", "sqla_column": "value_float"}, "value_float__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lt", "sqla_column": "value_float"}, "value_float__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gte", "sqla_column": "value_float"}, "value_float__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lte", "sqla_column": "value_float"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__meta__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "RunMetaEntryInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["run__id", "key", "value"], "title": "RunMetaEntryInput"}, "Scalar": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit": {"$ref": "#/components/schemas/Unit"}, "unit__id": {"type": "integer", "title": "Unit Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "value", "unit", "unit__id", "run__id", "created_at", "created_by"], "title": "Scalar"}, "ScalarCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit_name": {"type": "string", "title": "Unit Name"}, "run_id": {"type": "integer", "title": "Run Id"}}, "type": "object", "required": ["name", "value", "unit_name", "run_id"], "title": "ScalarCreateInput"}, "ScalarUpdateInput": {"properties": {"value": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Value"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id"}}, "type": "object", "required": ["value", "unit_id"], "title": "ScalarUpdateInput"}, "Scenario": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Scenario"}, "ScenarioInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ScenarioInput"}, "Table": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Table"}, "TableCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "TableCreateInput"}, "TimeSeries": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["id", "run__id", "parameters"], "title": "TimeSeries"}, "TimeSeriesFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "TimeSeriesInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["run__id", "parameters"], "title": "TimeSeriesInput"}, "Unit": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Unit"}, "UnitInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "UnitInput"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "VariableCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"anyOf": [{"type": "string"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "VariableCreateInput"}, "VariableInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "VariableInput"}, "ixmp4__data__api__iamc__variable__Variable": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Variable"}, "ixmp4__data__api__optimization__variable__Variable": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Variable"}, "ixmp4__data__db__filters__model__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__region__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__run__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__scenario__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__unit__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__variable__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ModelFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RegionFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__UnitFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__VariableFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__variable__filter__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "ixmp4__data__db__meta__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "RunFilter"}, "ixmp4__data__db__model__filter__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcModelFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__model__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "model"}, "ixmp4__data__db__region__filter__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRegionFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__run__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRunFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__scenario__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "scenario"}, "ixmp4__data__db__scenario__filter__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcScenarioFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__unit__filter__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcUnitFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__server__rest__base__EnumerationOutput_Variable___1": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/ixmp4__data__api__iamc__variable__Variable"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Variable]"}, "ixmp4__server__rest__base__EnumerationOutput_Variable___2": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Variable]"}, "ixmp4__server__rest__optimization__equation__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__indexset__DataInput": {"properties": {"data": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}], "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__parameter__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__table__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__variable__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}}}} \ No newline at end of file diff --git a/ixmp4/core/run.py b/ixmp4/core/run.py index 008e2812..550e4626 100644 --- a/ixmp4/core/run.py +++ b/ixmp4/core/run.py @@ -4,7 +4,7 @@ import numpy as np import pandas as pd -# TODO Import this from typing when dropping Python 3.11 +# TODO Import this from typing when dropping Python 3.11 and 3.10 (Self) from typing_extensions import TypedDict, Unpack from ixmp4.data.abstract import Model as ModelModel @@ -73,27 +73,35 @@ def unset_as_default(self) -> None: """Unsets this run as the default version.""" self.backend.runs.unset_as_default_version(self._model.id) + def clone( + self, + model: str | None = None, + scenario: str | None = None, + keep_solution: bool = True, + ) -> "Run": + return Run( + _backend=self.backend, + _model=self.backend.runs.clone( + run_id=self.id, + model_name=model, + scenario_name=scenario, + keep_solution=keep_solution, + ), + ) + class RunRepository(BaseFacade): - def create( - self, - model: str, - scenario: str, - ) -> Run: + def create(self, model: str, scenario: str) -> Run: return Run( _backend=self.backend, _model=self.backend.runs.create(model, scenario) ) - def get( - self, - model: str, - scenario: str, - version: int | None = None, - ) -> Run: - if version is None: - _model = self.backend.runs.get_default_version(model, scenario) - else: - _model = self.backend.runs.get(model, scenario, version) + def get(self, model: str, scenario: str, version: int | None = None) -> Run: + _model = ( + self.backend.runs.get_default_version(model, scenario) + if version is None + else self.backend.runs.get(model, scenario, version) + ) return Run(_backend=self.backend, _model=_model) def list(self, **kwargs: Unpack[EnumerateKwargs]) -> list[Run]: diff --git a/ixmp4/data/abstract/run.py b/ixmp4/data/abstract/run.py index e79a4554..cfacde9d 100644 --- a/ixmp4/data/abstract/run.py +++ b/ixmp4/data/abstract/run.py @@ -226,3 +226,31 @@ def unset_as_default_version(self, id: int) -> None: """ ... + + def clone( + self, + run_id: int, + model_name: str | None = None, + scenario_name: str | None = None, + keep_solution: bool = True, + ) -> Run: + """Clone all data from one run to a new one. + + Parameters + ---------- + run_id: int + The unique integer id of the base run. + model_name: str | None + The new name of the model used in the new run, optional. + scenario_name: str | None + The new name of the scenario used in the new run, optional. + keep_solution: bool + Whether to keep the solution data from the base run. Optional, defaults to + `True`. + + Returns + ------- + :class:`ixmp4.data.abstract.Run`: + The clone of the base run. + """ + ... diff --git a/ixmp4/data/api/run.py b/ixmp4/data/api/run.py index 184f60c8..96f99133 100644 --- a/ixmp4/data/api/run.py +++ b/ixmp4/data/api/run.py @@ -1,5 +1,5 @@ # TODO Use `type` instead of TypeAlias when dropping Python 3.11 -from typing import ClassVar, TypeAlias, cast +from typing import Any, ClassVar, TypeAlias, cast import pandas as pd from pydantic import Field @@ -105,3 +105,26 @@ def unset_as_default_version(self, id: int) -> None: "POST", self.prefix + "/".join([str(id), "unset-as-default-version/"]), ) + + def clone( + self, + run_id: int, + model_name: str | None = None, + scenario_name: str | None = None, + keep_solution: bool = True, + ) -> Run: + # Can expect this endpoint, so cast should always be fine + res = cast( + dict[str, Any], + self._request( + "POST", + self.prefix + "clone/", + json={ + "run_id": run_id, + "model_name": model_name, + "scenario_name": scenario_name, + "keep_solution": keep_solution, + }, + ), + ) + return Run(**res) diff --git a/ixmp4/data/db/run/repository.py b/ixmp4/data/db/run/repository.py index 0df01566..d9e5d397 100644 --- a/ixmp4/data/db/run/repository.py +++ b/ixmp4/data/db/run/repository.py @@ -11,8 +11,10 @@ from ixmp4 import db from ixmp4.core.exceptions import Forbidden, IxmpError, NoDefaultRunVersion +from ixmp4.core.utils import substitute_type from ixmp4.data import abstract from ixmp4.data.auth.decorators import guard +from ixmp4.data.db.iamc.data import normalize_df from ixmp4.db import utils from .. import base @@ -183,3 +185,127 @@ def unset_as_default_version(self, id: int) -> None: run.is_default = False self.session.commit() + + @guard("edit") + def clone( + self, + run_id: int, + model_name: str | None = None, + scenario_name: str | None = None, + keep_solution: bool = True, + ) -> Run: + base_run = self.get_by_id(id=run_id) + run = self.create( + model_name=model_name if model_name else base_run.model.name, + scenario_name=scenario_name if scenario_name else base_run.scenario.name, + ) + + datapoints = normalize_df( + df=self.backend.iamc.datapoints.tabulate( + join_parameters=True, + join_runs=False, + run={"id": base_run.id, "default_only": False}, + ), + raw=False, + join_runs=False, + ) + if not datapoints.empty: + datapoints["run__id"] = run.id + # TODO This is essentially duplicating core/iamc/data/_get_or_create_ts, + # which we should probably avoid. + id_cols = ["region", "variable", "unit", "run__id"] + # create set of unqiue timeseries (if missing) + ts_df = datapoints[id_cols].drop_duplicates() + self.backend.iamc.timeseries.bulk_upsert(ts_df, create_related=True) + + # retrieve them again to get database ids + ts_df = self.backend.iamc.timeseries.tabulate( + join_parameters=True, + run={"id": run.id, "default_only": False}, + ) + ts_df = ts_df.rename(columns={"id": "time_series__id"}) + + # merge on the identity columns + datapoints = pd.merge( + datapoints, ts_df, how="left", on=id_cols, suffixes=(None, "_y") + ) + substitute_type(df=datapoints) + # TODO This function expects a pandera.DataFrame of a certain schema, even + # though the abstract layer annotates it as pd.DataFrame and it works with + # one. I'm not simply adjusting the type hint because the function might be + # called directly, in which case we would like to reject unvalidated + # pd.DataFrames, I think. However, in this case, the data were validated + # before and need not be checked again. + self.backend.iamc.datapoints.bulk_upsert(datapoints) # type: ignore[arg-type] + + for scalar in base_run.scalars: + self.backend.optimization.scalars.create( + run_id=run.id, + name=scalar.name, + value=scalar.value, + unit_name=scalar.unit.name, + ) + + for indexset in base_run.indexsets: + new_indexset = self.backend.optimization.indexsets.create( + run_id=run.id, name=indexset.name + ) + self.backend.optimization.indexsets.add_data( + indexset_id=new_indexset.id, data=indexset.data + ) + + for table in base_run.tables: + new_table = self.backend.optimization.tables.create( + run_id=run.id, + name=table.name, + constrained_to_indexsets=[ + column.indexset.name for column in table.columns + ], + column_names=[column.name for column in table.columns], + ) + self.backend.optimization.tables.add_data( + table_id=new_table.id, data=table.data + ) + + for parameter in base_run.parameters: + new_parameter = self.backend.optimization.parameters.create( + run_id=run.id, + name=parameter.name, + constrained_to_indexsets=[ + column.indexset.name for column in parameter.columns + ], + column_names=[column.name for column in parameter.columns], + ) + self.backend.optimization.parameters.add_data( + parameter_id=new_parameter.id, data=parameter.data + ) + + for equation in base_run.equations: + new_equation = self.backend.optimization.equations.create( + run_id=run.id, + name=equation.name, + constrained_to_indexsets=[ + column.indexset.name for column in equation.columns + ], + column_names=[column.name for column in equation.columns], + ) + if keep_solution: + self.backend.optimization.equations.add_data( + equation_id=new_equation.id, data=equation.data + ) + + for variable in base_run.variables: + new_variable = self.backend.optimization.variables.create( + run_id=run.id, + name=variable.name, + constrained_to_indexsets=[ + column.indexset.name for column in variable.columns + ], + column_names=[column.name for column in variable.columns], + ) + if keep_solution: + self.backend.optimization.variables.add_data( + variable_id=new_variable.id, data=variable.data + ) + + return run diff --git a/ixmp4/server/rest/run.py b/ixmp4/server/rest/run.py index ce180027..138cfacc 100644 --- a/ixmp4/server/rest/run.py +++ b/ixmp4/server/rest/run.py @@ -20,6 +20,13 @@ class RunInput(BaseModel): scenario_name: str +class CloneInput(BaseModel): + run_id: int + name_of_model: str | None = Field(None, alias="model_name") + scenario_name: str | None = Field(None) + keep_solution: bool = Field(True) + + @router.patch("/", response_model=EnumerationOutput[api.Run]) def query( filter: RunFilter = Body(RunFilter()), @@ -69,3 +76,11 @@ def get_by_id( backend: Backend = Depends(deps.get_backend), ) -> Run: return backend.runs.get_by_id(id) + + +@router.post("/clone/", response_model=api.Run) +def clone( + run: CloneInput, + backend: Backend = Depends(deps.get_backend), +) -> Run: + return backend.runs.clone(**run.model_dump(by_alias=True)) diff --git a/tests/core/test_run.py b/tests/core/test_run.py index 1a128555..b76d8a89 100644 --- a/tests/core/test_run.py +++ b/tests/core/test_run.py @@ -9,7 +9,7 @@ from ixmp4.core import Run from ixmp4.core.exceptions import IxmpError -from ..fixtures import FilterIamcDataset +from ..fixtures import FilterIamcDataset, SmallIamcDataset def _expected_runs_table(*row_default: Unpack[tuple[bool | None, ...]]) -> pd.DataFrame: @@ -21,8 +21,44 @@ def _expected_runs_table(*row_default: Unpack[tuple[bool | None, ...]]) -> pd.Da return pd.DataFrame(rows, columns=["model", "scenario", "version", "is_default"]) +def assert_cloned_run(original: Run, clone: Run, kept_solution: bool) -> None: + pdt.assert_frame_equal(original.iamc.tabulate(), clone.iamc.tabulate()) + for original_indexset, cloned_indexset in zip( + original.optimization.indexsets.list(), clone.optimization.indexsets.list() + ): + assert original_indexset.name == cloned_indexset.name + assert original_indexset.data == cloned_indexset.data + for original_scalar, cloned_scalar in zip( + original.optimization.scalars.list(), clone.optimization.scalars.list() + ): + assert original_scalar.name == cloned_scalar.name + assert original_scalar.value == cloned_scalar.value + assert original_scalar.unit.name == cloned_scalar.unit.name + for original_table, cloned_table in zip( + original.optimization.tables.list(), clone.optimization.tables.list() + ): + assert original_table.name == cloned_table.name + assert original_table.data == cloned_table.data + for original_parameter, cloned_parameter in zip( + original.optimization.parameters.list(), clone.optimization.parameters.list() + ): + assert original_parameter.name == cloned_parameter.name + assert original_parameter.data == cloned_parameter.data + for original_equation, cloned_equation in zip( + original.optimization.equations.list(), clone.optimization.equations.list() + ): + assert original_equation.name == cloned_equation.name + assert cloned_equation.data == (original_equation.data if kept_solution else {}) + for original_variable, cloned_variable in zip( + original.optimization.variables.list(), clone.optimization.variables.list() + ): + assert original_variable.name == cloned_variable.name + assert cloned_variable.data == (original_variable.data if kept_solution else {}) + + class TestCoreRun: filter = FilterIamcDataset() + small = SmallIamcDataset def test_run_notfound(self, platform: ixmp4.Platform) -> None: # no Run with that model and scenario name exists @@ -207,3 +243,56 @@ def test_run_remove_solution(self, platform: ixmp4.Platform) -> None: variable = run.optimization.variables.get("Variable") assert equation.data == {} assert variable.data == {} + + def test_run_clone(self, platform: ixmp4.Platform) -> None: + # Prepare test data and platform + test_data_annual = self.small.annual.copy() + # Define required regions and units in the database + self.small.load_regions(platform) + self.small.load_units(platform) + unit = platform.units.list()[0] # Test data currently only has one + test_data = {"Indexset": ["foo"], "values": [3.14], "units": [unit.name]} + test_solution = {"Indexset": ["foo"], "levels": [4], "marginals": [0.2]} + + # Prepare original run + run = platform.runs.create("Model", "Scenario") + run.iamc.add(test_data_annual, type=ixmp4.DataPoint.Type.ANNUAL) + indexset = run.optimization.indexsets.create("Indexset") + indexset.add(["foo", "bar"]) + run.optimization.scalars.create("Scalar", value=10, unit=unit.name) + run.optimization.tables.create( + "Table", constrained_to_indexsets=[indexset.name] + ).add({"Indexset": ["bar"]}) + run.optimization.parameters.create( + "Parameter", constrained_to_indexsets=[indexset.name] + ).add(test_data) + run.optimization.variables.create( + "Variable", constrained_to_indexsets=[indexset.name] + ).add(test_solution) + run.optimization.equations.create( + "Equation", constrained_to_indexsets=[indexset.name] + ).add(test_solution) + + # Test cloning while keeping the solution + clone_with_solution = run.clone() + assert_cloned_run(run, clone_with_solution, kept_solution=True) + + # Test cloning without keeping the solution + clone_without_solution = run.clone( + model="new model", scenario="new scenario", keep_solution=False + ) + assert_cloned_run(run, clone_without_solution, kept_solution=False) + + # Test working with cloned run + cloned_indexset = clone_with_solution.optimization.indexsets.get(indexset.name) + cloned_indexset.add("baz") + expected = indexset.data + # TODO If possible, it would be great to type hint data according to what it is + # so that something like this works (not just a generic union of lists): + expected.append("baz") # type: ignore[arg-type] + assert cloned_indexset.data == expected + + # Test cloning Run without iamc data + run = platform.runs.create("Model", "Scenario") + clone_without_iamc = run.clone() + assert clone_without_iamc.iamc.tabulate().empty From d51710814a06bd16e8666d4f9267dd9d08028580 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 14:29:41 +0100 Subject: [PATCH 15/36] Update openapi schema --- doc/source/openapi-v1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/openapi-v1.json b/doc/source/openapi-v1.json index 5eed78f7..474b0d6f 100644 --- a/doc/source/openapi-v1.json +++ b/doc/source/openapi-v1.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/iamc/datapoints/": {"patch": {"tags": ["iamc", "datapoints"], "summary": "Query", "description": "This endpoint is used to retrieve and optionally filter data.add()\n\nFilter parameters are provided as keyword arguments.\n\nThe available filters can be found here:\n:class:`ixmp4.data.db.iamc.datapoint.filter.DataPointFilter`.\n\nExamples\n--------\n\nFilter data points for a given model, scenario combination, and a number of years:\n\n.. code-block:: json\n\n {\n \"model\" : {\"name\": \"model 1\"},\n \"scenario\" : {\"name\": \"scenario 1\"},\n \"year__in\" : [2020, 2025]\n }\n\nReturn all data for a given variable:\n\n.. code-block:: json\n\n {\n \"variable\": {\"name\": \"Final Energy\"}\n }", "operationId": "query_iamc_datapoints__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "join_runs", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Join Runs"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataPointFilter", "default": {"run": {"default_only": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_DataPoint_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/datapoints/bulk/": {"post": {"tags": ["iamc", "datapoints"], "summary": "Bulk Upsert", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_upsert`", "operationId": "bulk_upsert_iamc_datapoints_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["iamc", "datapoints"], "summary": "Bulk Delete", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_delete`", "operationId": "bulk_delete_iamc_datapoints_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/": {"get": {"tags": ["docs"], "summary": "List Models", "operationId": "list_models_docs_models__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Models", "operationId": "set_models_docs_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Models", "operationId": "delete_models_docs_models__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/": {"get": {"tags": ["docs"], "summary": "List Regions", "operationId": "list_regions_docs_regions__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Regions", "operationId": "set_regions_docs_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Regions", "operationId": "delete_regions_docs_regions__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/": {"get": {"tags": ["docs"], "summary": "List Scenarios", "operationId": "list_scenarios_docs_scenarios__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scenarios", "operationId": "set_scenarios_docs_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scenarios", "operationId": "delete_scenarios_docs_scenarios__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/": {"get": {"tags": ["docs"], "summary": "List Units", "operationId": "list_units_docs_units__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Units", "operationId": "set_units_docs_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Units", "operationId": "delete_units_docs_units__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/": {"get": {"tags": ["docs"], "summary": "List Variables", "operationId": "list_variables_docs_iamc_variables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Variables", "operationId": "set_variables_docs_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Variables", "operationId": "delete_variables_docs_iamc_variables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/": {"get": {"tags": ["docs"], "summary": "List Indexsets", "operationId": "list_indexsets_docs_optimization_indexsets__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Indexsets", "operationId": "set_indexsets_docs_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Indexsets", "operationId": "delete_indexsets_docs_optimization_indexsets__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/": {"get": {"tags": ["docs"], "summary": "List Scalars", "operationId": "list_scalars_docs_optimization_scalars__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scalars", "operationId": "set_scalars_docs_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scalars", "operationId": "delete_scalars_docs_optimization_scalars__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/": {"get": {"tags": ["docs"], "summary": "List Tables", "operationId": "list_tables_docs_optimization_tables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Tables", "operationId": "set_tables_docs_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Tables", "operationId": "delete_tables_docs_optimization_tables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/parameters/": {"get": {"tags": ["docs"], "summary": "List Parameters", "operationId": "list_parameters_docs_optimization_parameters__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Parameters", "operationId": "set_parameters_docs_optimization_parameters__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/parameters/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Parameters", "operationId": "delete_parameters_docs_optimization_parameters__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/variables/": {"get": {"tags": ["docs"], "summary": "List Optimization Variables", "operationId": "list_optimization_variables_docs_optimization_variables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Optimization Variables", "operationId": "set_optimization_variables_docs_optimization_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/variables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Optimization Variables", "operationId": "delete_optimization_variables_docs_optimization_variables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/equations/": {"get": {"tags": ["docs"], "summary": "List Equations", "operationId": "list_equations_docs_optimization_equations__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Equations", "operationId": "set_equations_docs_optimization_equations__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/equations/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Equations", "operationId": "delete_equations_docs_optimization_equations__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/models/": {"patch": {"tags": ["iamc", "models"], "summary": "Query", "operationId": "query_iamc_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcModelFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/scenarios/": {"patch": {"tags": ["iamc", "scenarios"], "summary": "Query", "operationId": "query_iamc_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcScenarioFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/regions/": {"patch": {"tags": ["iamc", "regions"], "summary": "Query", "operationId": "query_iamc_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcRegionFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/units/": {"patch": {"tags": ["iamc", "units"], "summary": "Query", "operationId": "query_iamc_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcUnitFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/variables/": {"patch": {"tags": ["iamc", "variables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.variable.query`", "operationId": "query_iamc_variables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__iamc__variable__filter__VariableFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__base__EnumerationOutput_Variable___1"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "variables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.iamc.variable.create`", "operationId": "create_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VariableInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__iamc__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/": {"patch": {"tags": ["meta"], "summary": "Query", "operationId": "query_meta__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_run_index", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Run Index"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntryFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_RunMetaEntry_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["meta"], "summary": "Create", "operationId": "create_meta__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntryInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntry"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/{id}/": {"delete": {"tags": ["meta"], "summary": "Delete", "operationId": "delete_meta__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/bulk/": {"post": {"tags": ["meta"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_meta_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["meta"], "summary": "Bulk Delete", "operationId": "bulk_delete_meta_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/models/": {"patch": {"tags": ["models"], "summary": "Query", "description": ":func:`ixmp4.server.rest.model.query`", "operationId": "query_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__model__filter__ModelFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["models"], "summary": "Create", "description": ":func:`ixmp4.server.rest.model.create`", "operationId": "create_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Model"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/{id}/": {"get": {"tags": ["optimization", "equations"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.equation.get_by_id`", "operationId": "get_by_id_optimization_equations__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Equation"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/": {"patch": {"tags": ["optimization", "equations"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.equation.query`", "operationId": "query_optimization_equations__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EquationFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Equation_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "equations"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.equation.create`", "operationId": "create_optimization_equations__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EquationCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Equation"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/{equation_id}/data/": {"patch": {"tags": ["optimization", "equations"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.equation.add_data`", "operationId": "add_data_optimization_equations__equation_id__data__patch", "parameters": [{"name": "equation_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Equation Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__equation__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["optimization", "equations"], "summary": "Remove Data", "description": ":func:`ixmp4.server.rest.optimization.equation.remove_data`", "operationId": "remove_data_optimization_equations__equation_id__data__delete", "parameters": [{"name": "equation_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Equation Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.indexset.query`", "operationId": "query_optimization_indexsets__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationIndexSetFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_IndexSet_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "indexsets"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.indexset.create`", "operationId": "create_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSetInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSet"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/{indexset_id}/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.indexset.add_data`", "operationId": "add_data_optimization_indexsets__indexset_id___patch", "parameters": [{"name": "indexset_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Indexset Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__indexset__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/{id}/": {"get": {"tags": ["optimization", "parameters"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.parameter.get_by_id`", "operationId": "get_by_id_optimization_parameters__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Parameter"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/": {"patch": {"tags": ["optimization", "parameters"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.parameter.query`", "operationId": "query_optimization_parameters__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationParameterFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Parameter_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "parameters"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.parameter.create`", "operationId": "create_optimization_parameters__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ParameterCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Parameter"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/{parameter_id}/data/": {"patch": {"tags": ["optimization", "parameters"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.parameter.add_data`", "operationId": "add_data_optimization_parameters__parameter_id__data__patch", "parameters": [{"name": "parameter_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Parameter Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__parameter__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/{id}/": {"get": {"tags": ["optimization", "scalars"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.scalar.get_by_id`", "operationId": "get_by_id_optimization_scalars__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["optimization", "scalars"], "summary": "Update", "description": ":func:`ixmp4.server.rest.optimization.scalar.update`", "operationId": "update_optimization_scalars__id___patch", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarUpdateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/": {"patch": {"tags": ["optimization", "scalars"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.scalar.query`", "operationId": "query_optimization_scalars__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationScalarFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scalar_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "scalars"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.scalar.create`", "operationId": "create_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{id}/": {"get": {"tags": ["optimization", "tables"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.table.get_by_id`", "operationId": "get_by_id_optimization_tables__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/": {"patch": {"tags": ["optimization", "tables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.table.query`", "operationId": "query_optimization_tables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationTableFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Table_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "tables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.table.create`", "operationId": "create_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{table_id}/data/": {"patch": {"tags": ["optimization", "tables"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.table.add_data`", "operationId": "add_data_optimization_tables__table_id__data__patch", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Table Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__table__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/{id}/": {"get": {"tags": ["optimization", "variables"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.variable.get_by_id`", "operationId": "get_by_id_optimization_variables__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/": {"patch": {"tags": ["optimization", "variables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.variable.query`", "operationId": "query_optimization_variables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationVariableFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__base__EnumerationOutput_Variable___2"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "variables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.variable.create`", "operationId": "create_optimization_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VariableCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/{variable_id}/data/": {"patch": {"tags": ["optimization", "variables"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.variable.add_data`", "operationId": "add_data_optimization_variables__variable_id__data__patch", "parameters": [{"name": "variable_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Variable Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__variable__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["optimization", "variables"], "summary": "Remove Data", "description": ":func:`ixmp4.server.rest.optimization.variable.remove_data`", "operationId": "remove_data_optimization_variables__variable_id__data__delete", "parameters": [{"name": "variable_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Variable Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/": {"patch": {"tags": ["regions"], "summary": "Query", "description": ":func:`ixmp4.server.rest.region.query`", "operationId": "query_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__region__filter__RegionFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["regions"], "summary": "Create", "description": ":func:`ixmp4.server.rest.region.create`", "operationId": "create_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegionInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Region"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/{id}/": {"delete": {"tags": ["regions"], "summary": "Delete", "operationId": "delete_regions__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/": {"patch": {"tags": ["runs"], "summary": "Query", "operationId": "query_runs__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__run__filter__RunFilter", "default": {"default_only": true}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Run_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["runs"], "summary": "Create", "operationId": "create_runs__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/clone/": {"post": {"tags": ["runs"], "summary": "Clone", "operationId": "clone_runs_clone__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CloneInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/set-as-default-version/": {"post": {"tags": ["runs"], "summary": "Set As Default Version", "operationId": "set_as_default_version_runs__id__set_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/unset-as-default-version/": {"post": {"tags": ["runs"], "summary": "Unset As Default Version", "operationId": "unset_as_default_version_runs__id__unset_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/": {"get": {"tags": ["runs"], "summary": "Get By Id", "operationId": "get_by_id_runs__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/scenarios/": {"patch": {"tags": ["scenarios"], "summary": "Query", "description": ":func:`ixmp4.server.rest.scenario.query`", "operationId": "query_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__ScenarioFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["scenarios"], "summary": "Create", "description": ":func:`ixmp4.server.rest.scenario.create`", "operationId": "create_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScenarioInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scenario"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/": {"patch": {"tags": ["iamc", "timeseries"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.timeseries.query`", "operationId": "query_iamc_timeseries__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeriesFilter", "default": {"run": {"default_only": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_TimeSeries_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "timeseries"], "summary": "Create", "operationId": "create_iamc_timeseries__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeriesInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeries"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/{id}/": {"get": {"tags": ["iamc", "timeseries"], "summary": "Get By Id", "operationId": "get_by_id_iamc_timeseries__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeries"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/bulk/": {"post": {"tags": ["iamc", "timeseries"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_iamc_timeseries_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "create_related", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Create Related"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/": {"patch": {"tags": ["units"], "summary": "Query", "description": ":func:`ixmp4.server.rest.unit.query`", "operationId": "query_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__unit__filter__UnitFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["units"], "summary": "Create", "operationId": "create_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnitInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unit"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/{id}/": {"delete": {"tags": ["units"], "summary": "Delete", "operationId": "delete_units__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/APIInfo"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"APIInfo": {"properties": {"name": {"type": "string", "title": "Name"}, "version": {"type": "string", "title": "Version"}, "is_managed": {"type": "boolean", "title": "Is Managed"}, "manager_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manager Url"}, "utcnow": {"type": "string", "format": "date-time", "title": "Utcnow"}}, "type": "object", "required": ["name", "version", "is_managed", "manager_url", "utcnow"], "title": "APIInfo"}, "CloneInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "model_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Model Name"}, "scenario_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scenario Name"}, "keep_solution": {"type": "boolean", "title": "Keep Solution", "default": true}}, "type": "object", "required": ["run_id"], "title": "CloneInput"}, "Column": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "dtype": {"type": "string", "title": "Dtype"}, "equation__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Equation Id"}, "parameter__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parameter Id"}, "table__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Table Id"}, "variable__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Variable Id"}, "indexset": {"$ref": "#/components/schemas/IndexSet"}, "constrained_to_indexset": {"type": "integer", "title": "Constrained To Indexset"}, "unique": {"type": "boolean", "title": "Unique"}}, "type": "object", "required": ["id", "name", "dtype", "equation__id", "parameter__id", "table__id", "variable__id", "indexset", "constrained_to_indexset", "unique"], "title": "Column"}, "DataFrame": {"properties": {"index": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Index"}, "columns": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Columns"}, "dtypes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dtypes"}, "data": {"anyOf": [{"items": {"items": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}]}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Data"}}, "type": "object", "required": ["columns", "dtypes", "data"], "title": "DataFrame"}, "DataPoint": {"properties": {"id": {"type": "integer", "title": "Id"}, "time_series__id": {"type": "integer", "title": "Time Series Id"}, "value": {"type": "number", "title": "Value"}, "type": {"type": "string", "title": "Type"}, "step_category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Step Category"}, "step_year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Step Year"}, "step_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Step Datetime"}}, "type": "object", "required": ["id", "time_series__id", "value", "type", "step_category", "step_year", "step_datetime"], "title": "DataPoint"}, "DataPointFilter": {"properties": {"year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year", "sqla_column": "step_year"}, "time_series_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Time Series Id", "sqla_column": "time_series__id"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "year__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gt", "sqla_column": "step_year"}, "year__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lt", "sqla_column": "step_year"}, "year__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lte", "sqla_column": "step_year"}, "year__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Year In", "sqla_column": "step_year"}, "year__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gte", "sqla_column": "step_year"}, "time_series_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Time Series Id In", "sqla_column": "time_series__id"}}, "additionalProperties": false, "type": "object", "title": "run", "description": "This class is used for filtering data points.\n\nAll parameters are optional. Use the field name (or the field alias)\ndirectly for equality comparisons. For performing an SQL IN operation\nuse the field name followed by a double underscore and *in*.\n\nParameters\n----------\nstep_year : filters.Integer, Optional\n Filter for data point year, can also be called with \"year\"\ntime_series__id : filters.Id, Optional\n Filter for the id of the time series, can also be called with \"time_series_id\"\nregion : RegionFilter, Optional\n Filter for either region name or hierarchy\nunit : UnitFilter, Optional\n Filter for unit name\nvariable : VariableFilter, Optional\n Filter for variable name\nmodel : ModelFilter, Optional\n Filter for model name\nscenario : ScenarioFilter, Optional\n Filter for the scenario name\nrun : RunFilter, Optional\n Filter for the run, options are id or default_only\n\nExamples\n--------\n\nReturn all data points for a given year.\n\n>>> DataPointFilter(year=2020)\n\nReturn all data points a number of years\n\n>>> DataPointFilter(year__in=[2020, 2025])\n\nReturn all data point that map to a given variable\n\n>>> DataPointFilter(variable=VariableFilter(name=\"variable 1\"))\n\nNote that for actual use providing the filter parameters as key word arguments is\nsufficient. Calling an endpoint could look like this:\n\n>>> filter = {\"variable\": {\"name\": \"variable 1\"}, \"year\": 2020}\n>>> iamc.tabulate(**filter)"}, "Docs": {"properties": {"id": {"type": "integer", "title": "Id"}, "description": {"type": "string", "title": "Description"}, "dimension__id": {"type": "integer", "title": "Dimension Id"}}, "type": "object", "required": ["id", "description", "dimension__id"], "title": "Docs"}, "DocsInput": {"properties": {"dimension_id": {"type": "integer", "title": "Dimension Id"}, "description": {"type": "string", "title": "Description"}}, "type": "object", "required": ["dimension_id", "description"], "title": "DocsInput"}, "EnumerationOutput_DataPoint_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/DataPoint"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[DataPoint]"}, "EnumerationOutput_Docs_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Docs"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Docs]"}, "EnumerationOutput_Equation_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Equation"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Equation]"}, "EnumerationOutput_IndexSet_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/IndexSet"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[IndexSet]"}, "EnumerationOutput_Model_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Model"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Model]"}, "EnumerationOutput_Parameter_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Parameter"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Parameter]"}, "EnumerationOutput_Region_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Region"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Region]"}, "EnumerationOutput_RunMetaEntry_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/RunMetaEntry"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[RunMetaEntry]"}, "EnumerationOutput_Run_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Run"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Run]"}, "EnumerationOutput_Scalar_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scalar"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scalar]"}, "EnumerationOutput_Scenario_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scenario"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scenario]"}, "EnumerationOutput_Table_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Table"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Table]"}, "EnumerationOutput_TimeSeries_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/TimeSeries"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[TimeSeries]"}, "EnumerationOutput_Unit_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Unit"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Unit]"}, "Equation": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Equation"}, "EquationCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "EquationCreateInput"}, "EquationFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "EquationFilter"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IamcModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__model__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRunFilter": {"properties": {"region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "IamcScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcUnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IndexSet": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Data"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "run__id", "created_at", "created_by"], "title": "IndexSet"}, "IndexSetInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["run_id", "name"], "title": "IndexSetInput"}, "Model": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Model"}, "ModelInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ModelInput"}, "OptimizationIndexSetFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationIndexSetFilter"}, "OptimizationParameterFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationParameterFilter"}, "OptimizationScalarFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id", "sqla_column": "unit__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "unit_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gt", "sqla_column": "unit__id"}, "unit_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lt", "sqla_column": "unit__id"}, "unit_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lte", "sqla_column": "unit__id"}, "unit_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Unit Id In", "sqla_column": "unit__id"}, "unit_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gte", "sqla_column": "unit__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationScalarFilter"}, "OptimizationTableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationTableFilter"}, "OptimizationVariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationVariableFilter"}, "Pagination": {"properties": {"limit": {"type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Limit", "default": 5000}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset", "default": 0}}, "type": "object", "title": "Pagination"}, "Parameter": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Parameter"}, "ParameterCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "ParameterCreateInput"}, "Region": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "hierarchy"], "title": "Region"}, "RegionInput": {"properties": {"name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}}, "type": "object", "required": ["name", "hierarchy"], "title": "RegionInput"}, "Run": {"properties": {"id": {"type": "integer", "title": "Id"}, "model": {"$ref": "#/components/schemas/Model"}, "model__id": {"type": "integer", "title": "Model Id"}, "scenario": {"$ref": "#/components/schemas/Scenario"}, "scenario__id": {"type": "integer", "title": "Scenario Id"}, "version": {"type": "integer", "title": "Version"}, "is_default": {"type": "boolean", "title": "Is Default"}}, "type": "object", "required": ["id", "model", "model__id", "scenario", "scenario__id", "version", "is_default"], "title": "Run"}, "RunInput": {"properties": {"model_name": {"type": "string", "title": "Model Name"}, "scenario_name": {"type": "string", "title": "Scenario Name"}}, "type": "object", "required": ["model_name", "scenario_name"], "title": "RunInput"}, "RunMetaEntry": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "dtype": {"type": "string", "title": "Dtype"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["id", "run__id", "key", "dtype", "value"], "title": "RunMetaEntry"}, "RunMetaEntryFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "dtype": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype", "sqla_column": "dtype"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key", "sqla_column": "key"}, "value_int": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int", "sqla_column": "value_int"}, "value_str": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str", "sqla_column": "value_str"}, "value_float": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float", "sqla_column": "value_float"}, "value_bool": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Value Bool", "sqla_column": "value_bool"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "dtype__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dtype In", "sqla_column": "dtype"}, "dtype__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Like", "sqla_column": "dtype"}, "dtype__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Ilike", "sqla_column": "dtype"}, "dtype__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Notlike", "sqla_column": "dtype"}, "dtype__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Notilike", "sqla_column": "dtype"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "key__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Key In", "sqla_column": "key"}, "key__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Like", "sqla_column": "key"}, "key__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Ilike", "sqla_column": "key"}, "key__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notlike", "sqla_column": "key"}, "key__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notilike", "sqla_column": "key"}, "value_int__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Int In", "sqla_column": "value_int"}, "value_int__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gt", "sqla_column": "value_int"}, "value_int__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lt", "sqla_column": "value_int"}, "value_int__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gte", "sqla_column": "value_int"}, "value_int__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lte", "sqla_column": "value_int"}, "value_str__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Value Str In", "sqla_column": "value_str"}, "value_str__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Like", "sqla_column": "value_str"}, "value_str__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Ilike", "sqla_column": "value_str"}, "value_str__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notlike", "sqla_column": "value_str"}, "value_str__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notilike", "sqla_column": "value_str"}, "value_float__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Float In", "sqla_column": "value_float"}, "value_float__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gt", "sqla_column": "value_float"}, "value_float__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lt", "sqla_column": "value_float"}, "value_float__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gte", "sqla_column": "value_float"}, "value_float__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lte", "sqla_column": "value_float"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__meta__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "RunMetaEntryInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["run__id", "key", "value"], "title": "RunMetaEntryInput"}, "Scalar": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit": {"$ref": "#/components/schemas/Unit"}, "unit__id": {"type": "integer", "title": "Unit Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "value", "unit", "unit__id", "run__id", "created_at", "created_by"], "title": "Scalar"}, "ScalarCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit_name": {"type": "string", "title": "Unit Name"}, "run_id": {"type": "integer", "title": "Run Id"}}, "type": "object", "required": ["name", "value", "unit_name", "run_id"], "title": "ScalarCreateInput"}, "ScalarUpdateInput": {"properties": {"value": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Value"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id"}}, "type": "object", "required": ["value", "unit_id"], "title": "ScalarUpdateInput"}, "Scenario": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Scenario"}, "ScenarioInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ScenarioInput"}, "Table": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Table"}, "TableCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "TableCreateInput"}, "TimeSeries": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["id", "run__id", "parameters"], "title": "TimeSeries"}, "TimeSeriesFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "TimeSeriesInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["run__id", "parameters"], "title": "TimeSeriesInput"}, "Unit": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Unit"}, "UnitInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "UnitInput"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "VariableCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"anyOf": [{"type": "string"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "VariableCreateInput"}, "VariableInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "VariableInput"}, "ixmp4__data__api__iamc__variable__Variable": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Variable"}, "ixmp4__data__api__optimization__variable__Variable": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Variable"}, "ixmp4__data__db__filters__model__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__region__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__run__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__scenario__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__unit__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__variable__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ModelFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RegionFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__UnitFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__VariableFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__variable__filter__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "ixmp4__data__db__meta__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "RunFilter"}, "ixmp4__data__db__model__filter__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcModelFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__model__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "model"}, "ixmp4__data__db__region__filter__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRegionFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__run__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRunFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__scenario__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "scenario"}, "ixmp4__data__db__scenario__filter__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcScenarioFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__unit__filter__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcUnitFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__server__rest__base__EnumerationOutput_Variable___1": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/ixmp4__data__api__iamc__variable__Variable"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Variable]"}, "ixmp4__server__rest__base__EnumerationOutput_Variable___2": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Variable]"}, "ixmp4__server__rest__optimization__equation__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__indexset__DataInput": {"properties": {"data": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}], "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__parameter__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__table__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__variable__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}}}} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/iamc/datapoints/": {"patch": {"tags": ["iamc", "datapoints"], "summary": "Query", "description": "This endpoint is used to retrieve and optionally filter data.add()\n\nFilter parameters are provided as keyword arguments.\n\nThe available filters can be found here:\n:class:`ixmp4.data.db.iamc.datapoint.filter.DataPointFilter`.\n\nExamples\n--------\n\nFilter data points for a given model, scenario combination, and a number of years:\n\n.. code-block:: json\n\n {\n \"model\" : {\"name\": \"model 1\"},\n \"scenario\" : {\"name\": \"scenario 1\"},\n \"year__in\" : [2020, 2025]\n }\n\nReturn all data for a given variable:\n\n.. code-block:: json\n\n {\n \"variable\": {\"name\": \"Final Energy\"}\n }", "operationId": "query_iamc_datapoints__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "join_runs", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Join Runs"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataPointFilter", "default": {"run": {"default_only": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_DataPoint_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/datapoints/bulk/": {"post": {"tags": ["iamc", "datapoints"], "summary": "Bulk Upsert", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_upsert`", "operationId": "bulk_upsert_iamc_datapoints_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["iamc", "datapoints"], "summary": "Bulk Delete", "description": ":func:`ixmp4.server.rest.iamc.datapoint.bulk_delete`", "operationId": "bulk_delete_iamc_datapoints_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/": {"get": {"tags": ["docs"], "summary": "List Models", "operationId": "list_models_docs_models__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Models", "operationId": "set_models_docs_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/models/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Models", "operationId": "delete_models_docs_models__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/": {"get": {"tags": ["docs"], "summary": "List Regions", "operationId": "list_regions_docs_regions__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Regions", "operationId": "set_regions_docs_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/regions/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Regions", "operationId": "delete_regions_docs_regions__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/": {"get": {"tags": ["docs"], "summary": "List Scenarios", "operationId": "list_scenarios_docs_scenarios__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scenarios", "operationId": "set_scenarios_docs_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/scenarios/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scenarios", "operationId": "delete_scenarios_docs_scenarios__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/": {"get": {"tags": ["docs"], "summary": "List Units", "operationId": "list_units_docs_units__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Units", "operationId": "set_units_docs_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/units/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Units", "operationId": "delete_units_docs_units__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/": {"get": {"tags": ["docs"], "summary": "List Variables", "operationId": "list_variables_docs_iamc_variables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Variables", "operationId": "set_variables_docs_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/iamc/variables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Variables", "operationId": "delete_variables_docs_iamc_variables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/": {"get": {"tags": ["docs"], "summary": "List Indexsets", "operationId": "list_indexsets_docs_optimization_indexsets__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Indexsets", "operationId": "set_indexsets_docs_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/indexsets/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Indexsets", "operationId": "delete_indexsets_docs_optimization_indexsets__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/": {"get": {"tags": ["docs"], "summary": "List Scalars", "operationId": "list_scalars_docs_optimization_scalars__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Scalars", "operationId": "set_scalars_docs_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/scalars/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Scalars", "operationId": "delete_scalars_docs_optimization_scalars__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/": {"get": {"tags": ["docs"], "summary": "List Tables", "operationId": "list_tables_docs_optimization_tables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Tables", "operationId": "set_tables_docs_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/tables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Tables", "operationId": "delete_tables_docs_optimization_tables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/parameters/": {"get": {"tags": ["docs"], "summary": "List Parameters", "operationId": "list_parameters_docs_optimization_parameters__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Parameters", "operationId": "set_parameters_docs_optimization_parameters__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/parameters/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Parameters", "operationId": "delete_parameters_docs_optimization_parameters__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/variables/": {"get": {"tags": ["docs"], "summary": "List Optimization Variables", "operationId": "list_optimization_variables_docs_optimization_variables__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Optimization Variables", "operationId": "set_optimization_variables_docs_optimization_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/variables/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Optimization Variables", "operationId": "delete_optimization_variables_docs_optimization_variables__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/equations/": {"get": {"tags": ["docs"], "summary": "List Equations", "operationId": "list_equations_docs_optimization_equations__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "dimension_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dimension Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Docs_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["docs"], "summary": "Set Equations", "operationId": "set_equations_docs_optimization_equations__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocsInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Docs"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/docs/optimization/equations/{dimension_id}/": {"delete": {"tags": ["docs"], "summary": "Delete Equations", "operationId": "delete_equations_docs_optimization_equations__dimension_id___delete", "parameters": [{"name": "dimension_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Dimension Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/models/": {"patch": {"tags": ["iamc", "models"], "summary": "Query", "operationId": "query_iamc_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcModelFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/scenarios/": {"patch": {"tags": ["iamc", "scenarios"], "summary": "Query", "operationId": "query_iamc_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcScenarioFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/regions/": {"patch": {"tags": ["iamc", "regions"], "summary": "Query", "operationId": "query_iamc_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcRegionFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/units/": {"patch": {"tags": ["iamc", "units"], "summary": "Query", "operationId": "query_iamc_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IamcUnitFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/variables/": {"patch": {"tags": ["iamc", "variables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.variable.query`", "operationId": "query_iamc_variables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__iamc__variable__filter__VariableFilter", "default": {"run": {"default_only": true, "is_default": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__base__EnumerationOutput_Variable___1"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "variables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.iamc.variable.create`", "operationId": "create_iamc_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VariableInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__iamc__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/": {"patch": {"tags": ["meta"], "summary": "Query", "operationId": "query_meta__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_run_index", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Run Index"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntryFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_RunMetaEntry_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["meta"], "summary": "Create", "operationId": "create_meta__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntryInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunMetaEntry"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/{id}/": {"delete": {"tags": ["meta"], "summary": "Delete", "operationId": "delete_meta__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/meta/bulk/": {"post": {"tags": ["meta"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_meta_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["meta"], "summary": "Bulk Delete", "operationId": "bulk_delete_meta_bulk__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/models/": {"patch": {"tags": ["models"], "summary": "Query", "description": ":func:`ixmp4.server.rest.model.query`", "operationId": "query_models__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__model__filter__ModelFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Model_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["models"], "summary": "Create", "description": ":func:`ixmp4.server.rest.model.create`", "operationId": "create_models__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Model"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/{id}/": {"get": {"tags": ["optimization", "equations"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.equation.get_by_id`", "operationId": "get_by_id_optimization_equations__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Equation"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/": {"patch": {"tags": ["optimization", "equations"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.equation.query`", "operationId": "query_optimization_equations__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EquationFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Equation_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "equations"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.equation.create`", "operationId": "create_optimization_equations__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EquationCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Equation"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/equations/{equation_id}/data/": {"patch": {"tags": ["optimization", "equations"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.equation.add_data`", "operationId": "add_data_optimization_equations__equation_id__data__patch", "parameters": [{"name": "equation_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Equation Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__equation__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["optimization", "equations"], "summary": "Remove Data", "description": ":func:`ixmp4.server.rest.optimization.equation.remove_data`", "operationId": "remove_data_optimization_equations__equation_id__data__delete", "parameters": [{"name": "equation_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Equation Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.indexset.query`", "operationId": "query_optimization_indexsets__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationIndexSetFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_IndexSet_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "indexsets"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.indexset.create`", "operationId": "create_optimization_indexsets__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSetInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexSet"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/indexsets/{indexset_id}/": {"patch": {"tags": ["optimization", "indexsets"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.indexset.add_data`", "operationId": "add_data_optimization_indexsets__indexset_id___patch", "parameters": [{"name": "indexset_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Indexset Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__indexset__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/{id}/": {"get": {"tags": ["optimization", "parameters"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.parameter.get_by_id`", "operationId": "get_by_id_optimization_parameters__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Parameter"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/": {"patch": {"tags": ["optimization", "parameters"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.parameter.query`", "operationId": "query_optimization_parameters__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationParameterFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Parameter_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "parameters"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.parameter.create`", "operationId": "create_optimization_parameters__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ParameterCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Parameter"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/parameters/{parameter_id}/data/": {"patch": {"tags": ["optimization", "parameters"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.parameter.add_data`", "operationId": "add_data_optimization_parameters__parameter_id__data__patch", "parameters": [{"name": "parameter_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Parameter Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__parameter__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/{id}/": {"get": {"tags": ["optimization", "scalars"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.scalar.get_by_id`", "operationId": "get_by_id_optimization_scalars__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["optimization", "scalars"], "summary": "Update", "description": ":func:`ixmp4.server.rest.optimization.scalar.update`", "operationId": "update_optimization_scalars__id___patch", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarUpdateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/scalars/": {"patch": {"tags": ["optimization", "scalars"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.scalar.query`", "operationId": "query_optimization_scalars__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationScalarFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scalar_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "scalars"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.scalar.create`", "operationId": "create_optimization_scalars__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScalarCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scalar"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{id}/": {"get": {"tags": ["optimization", "tables"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.table.get_by_id`", "operationId": "get_by_id_optimization_tables__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/": {"patch": {"tags": ["optimization", "tables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.table.query`", "operationId": "query_optimization_tables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationTableFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Table_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "tables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.table.create`", "operationId": "create_optimization_tables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Table"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/tables/{table_id}/data/": {"patch": {"tags": ["optimization", "tables"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.table.add_data`", "operationId": "add_data_optimization_tables__table_id__data__patch", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Table Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__table__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/{id}/": {"get": {"tags": ["optimization", "variables"], "summary": "Get By Id", "description": ":func:`ixmp4.server.rest.optimization.variable.get_by_id`", "operationId": "get_by_id_optimization_variables__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/": {"patch": {"tags": ["optimization", "variables"], "summary": "Query", "description": ":func:`ixmp4.server.rest.optimization.variable.query`", "operationId": "query_optimization_variables__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OptimizationVariableFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__base__EnumerationOutput_Variable___2"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["optimization", "variables"], "summary": "Create", "description": ":func:`ixmp4.server.rest.optimization.variable.create`", "operationId": "create_optimization_variables__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VariableCreateInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/optimization/variables/{variable_id}/data/": {"patch": {"tags": ["optimization", "variables"], "summary": "Add Data", "description": ":func:`ixmp4.server.rest.optimization.variable.add_data`", "operationId": "add_data_optimization_variables__variable_id__data__patch", "parameters": [{"name": "variable_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Variable Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__server__rest__optimization__variable__DataInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["optimization", "variables"], "summary": "Remove Data", "description": ":func:`ixmp4.server.rest.optimization.variable.remove_data`", "operationId": "remove_data_optimization_variables__variable_id__data__delete", "parameters": [{"name": "variable_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Variable Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/": {"patch": {"tags": ["regions"], "summary": "Query", "description": ":func:`ixmp4.server.rest.region.query`", "operationId": "query_regions__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__region__filter__RegionFilter", "default": {}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Region_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["regions"], "summary": "Create", "description": ":func:`ixmp4.server.rest.region.create`", "operationId": "create_regions__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegionInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Region"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/regions/{id}/": {"delete": {"tags": ["regions"], "summary": "Delete", "operationId": "delete_regions__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/": {"patch": {"tags": ["runs"], "summary": "Query", "operationId": "query_runs__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__run__filter__RunFilter", "default": {"default_only": true}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Run_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["runs"], "summary": "Create", "operationId": "create_runs__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/set-as-default-version/": {"post": {"tags": ["runs"], "summary": "Set As Default Version", "operationId": "set_as_default_version_runs__id__set_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/unset-as-default-version/": {"post": {"tags": ["runs"], "summary": "Unset As Default Version", "operationId": "unset_as_default_version_runs__id__unset_as_default_version__post", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/{id}/": {"get": {"tags": ["runs"], "summary": "Get By Id", "operationId": "get_by_id_runs__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/runs/clone/": {"post": {"tags": ["runs"], "summary": "Clone", "operationId": "clone_runs_clone__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CloneInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/scenarios/": {"patch": {"tags": ["scenarios"], "summary": "Query", "description": ":func:`ixmp4.server.rest.scenario.query`", "operationId": "query_scenarios__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__ScenarioFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Scenario_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["scenarios"], "summary": "Create", "description": ":func:`ixmp4.server.rest.scenario.create`", "operationId": "create_scenarios__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScenarioInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Scenario"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/": {"patch": {"tags": ["iamc", "timeseries"], "summary": "Query", "description": ":func:`ixmp4.server.rest.iamc.timeseries.query`", "operationId": "query_iamc_timeseries__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "join_parameters", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Join Parameters"}}, {"name": "table", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeriesFilter", "default": {"run": {"default_only": true}}}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_TimeSeries_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["iamc", "timeseries"], "summary": "Create", "operationId": "create_iamc_timeseries__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeriesInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeries"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/{id}/": {"get": {"tags": ["iamc", "timeseries"], "summary": "Get By Id", "operationId": "get_by_id_iamc_timeseries__id___get", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TimeSeries"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/iamc/timeseries/bulk/": {"post": {"tags": ["iamc", "timeseries"], "summary": "Bulk Upsert", "operationId": "bulk_upsert_iamc_timeseries_bulk__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "create_related", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Create Related"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataFrame"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/": {"patch": {"tags": ["units"], "summary": "Query", "description": ":func:`ixmp4.server.rest.unit.query`", "operationId": "query_units__patch", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "table", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Table"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 10000, "minimum": 0, "default": 5000, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ixmp4__data__db__unit__filter__UnitFilter"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnumerationOutput_Unit_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["units"], "summary": "Create", "operationId": "create_units__post", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnitInput"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unit"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/units/{id}/": {"delete": {"tags": ["units"], "summary": "Delete", "operationId": "delete_units__id___delete", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}, {"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}, {"name": "authorization", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root__get", "parameters": [{"name": "platform", "in": "path", "required": true, "schema": {"type": "string", "title": "Platform"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/APIInfo"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"APIInfo": {"properties": {"name": {"type": "string", "title": "Name"}, "version": {"type": "string", "title": "Version"}, "is_managed": {"type": "boolean", "title": "Is Managed"}, "manager_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Manager Url"}, "utcnow": {"type": "string", "format": "date-time", "title": "Utcnow"}}, "type": "object", "required": ["name", "version", "is_managed", "manager_url", "utcnow"], "title": "APIInfo"}, "CloneInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "model_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Model Name"}, "scenario_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scenario Name"}, "keep_solution": {"type": "boolean", "title": "Keep Solution", "default": true}}, "type": "object", "required": ["run_id"], "title": "CloneInput"}, "Column": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "dtype": {"type": "string", "title": "Dtype"}, "equation__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Equation Id"}, "parameter__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parameter Id"}, "table__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Table Id"}, "variable__id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Variable Id"}, "indexset": {"$ref": "#/components/schemas/IndexSet"}, "constrained_to_indexset": {"type": "integer", "title": "Constrained To Indexset"}, "unique": {"type": "boolean", "title": "Unique"}}, "type": "object", "required": ["id", "name", "dtype", "equation__id", "parameter__id", "table__id", "variable__id", "indexset", "constrained_to_indexset", "unique"], "title": "Column"}, "DataFrame": {"properties": {"index": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Index"}, "columns": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Columns"}, "dtypes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dtypes"}, "data": {"anyOf": [{"items": {"items": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}]}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Data"}}, "type": "object", "required": ["columns", "dtypes", "data"], "title": "DataFrame"}, "DataPoint": {"properties": {"id": {"type": "integer", "title": "Id"}, "time_series__id": {"type": "integer", "title": "Time Series Id"}, "value": {"type": "number", "title": "Value"}, "type": {"type": "string", "title": "Type"}, "step_category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Step Category"}, "step_year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Step Year"}, "step_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Step Datetime"}}, "type": "object", "required": ["id", "time_series__id", "value", "type", "step_category", "step_year", "step_datetime"], "title": "DataPoint"}, "DataPointFilter": {"properties": {"year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year", "sqla_column": "step_year"}, "time_series_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Time Series Id", "sqla_column": "time_series__id"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__iamc__datapoint__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "year__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lte", "sqla_column": "step_year"}, "year__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Year In", "sqla_column": "step_year"}, "year__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Lt", "sqla_column": "step_year"}, "year__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gte", "sqla_column": "step_year"}, "year__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Gt", "sqla_column": "step_year"}, "time_series_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Time Series Id In", "sqla_column": "time_series__id"}}, "additionalProperties": false, "type": "object", "title": "run", "description": "This class is used for filtering data points.\n\nAll parameters are optional. Use the field name (or the field alias)\ndirectly for equality comparisons. For performing an SQL IN operation\nuse the field name followed by a double underscore and *in*.\n\nParameters\n----------\nstep_year : filters.Integer, Optional\n Filter for data point year, can also be called with \"year\"\ntime_series__id : filters.Id, Optional\n Filter for the id of the time series, can also be called with \"time_series_id\"\nregion : RegionFilter, Optional\n Filter for either region name or hierarchy\nunit : UnitFilter, Optional\n Filter for unit name\nvariable : VariableFilter, Optional\n Filter for variable name\nmodel : ModelFilter, Optional\n Filter for model name\nscenario : ScenarioFilter, Optional\n Filter for the scenario name\nrun : RunFilter, Optional\n Filter for the run, options are id or default_only\n\nExamples\n--------\n\nReturn all data points for a given year.\n\n>>> DataPointFilter(year=2020)\n\nReturn all data points a number of years\n\n>>> DataPointFilter(year__in=[2020, 2025])\n\nReturn all data point that map to a given variable\n\n>>> DataPointFilter(variable=VariableFilter(name=\"variable 1\"))\n\nNote that for actual use providing the filter parameters as key word arguments is\nsufficient. Calling an endpoint could look like this:\n\n>>> filter = {\"variable\": {\"name\": \"variable 1\"}, \"year\": 2020}\n>>> iamc.tabulate(**filter)"}, "Docs": {"properties": {"id": {"type": "integer", "title": "Id"}, "description": {"type": "string", "title": "Description"}, "dimension__id": {"type": "integer", "title": "Dimension Id"}}, "type": "object", "required": ["id", "description", "dimension__id"], "title": "Docs"}, "DocsInput": {"properties": {"dimension_id": {"type": "integer", "title": "Dimension Id"}, "description": {"type": "string", "title": "Description"}}, "type": "object", "required": ["dimension_id", "description"], "title": "DocsInput"}, "EnumerationOutput_DataPoint_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/DataPoint"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[DataPoint]"}, "EnumerationOutput_Docs_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Docs"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Docs]"}, "EnumerationOutput_Equation_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Equation"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Equation]"}, "EnumerationOutput_IndexSet_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/IndexSet"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[IndexSet]"}, "EnumerationOutput_Model_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Model"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Model]"}, "EnumerationOutput_Parameter_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Parameter"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Parameter]"}, "EnumerationOutput_Region_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Region"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Region]"}, "EnumerationOutput_RunMetaEntry_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/RunMetaEntry"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[RunMetaEntry]"}, "EnumerationOutput_Run_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Run"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Run]"}, "EnumerationOutput_Scalar_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scalar"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scalar]"}, "EnumerationOutput_Scenario_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Scenario"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Scenario]"}, "EnumerationOutput_Table_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Table"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Table]"}, "EnumerationOutput_TimeSeries_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/TimeSeries"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[TimeSeries]"}, "EnumerationOutput_Unit_": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/Unit"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Unit]"}, "Equation": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Equation"}, "EquationCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "EquationCreateInput"}, "EquationFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "EquationFilter"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IamcModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__model__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcRunFilter": {"properties": {"region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "IamcScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__scenario__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IamcUnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "IndexSet": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Data"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "run__id", "created_at", "created_by"], "title": "IndexSet"}, "IndexSetInput": {"properties": {"run_id": {"type": "integer", "title": "Run Id"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["run_id", "name"], "title": "IndexSetInput"}, "Model": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Model"}, "ModelInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ModelInput"}, "OptimizationIndexSetFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationIndexSetFilter"}, "OptimizationParameterFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationParameterFilter"}, "OptimizationScalarFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id", "sqla_column": "unit__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "unit_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lte", "sqla_column": "unit__id"}, "unit_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Unit Id In", "sqla_column": "unit__id"}, "unit_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Lt", "sqla_column": "unit__id"}, "unit_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gte", "sqla_column": "unit__id"}, "unit_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id Gt", "sqla_column": "unit__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationScalarFilter"}, "OptimizationTableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationTableFilter"}, "OptimizationVariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}}, "additionalProperties": false, "type": "object", "title": "OptimizationVariableFilter"}, "Pagination": {"properties": {"limit": {"type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Limit", "default": 5000}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset", "default": 0}}, "type": "object", "title": "Pagination"}, "Parameter": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Parameter"}, "ParameterCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "ParameterCreateInput"}, "Region": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "hierarchy"], "title": "Region"}, "RegionInput": {"properties": {"name": {"type": "string", "title": "Name"}, "hierarchy": {"type": "string", "title": "Hierarchy"}}, "type": "object", "required": ["name", "hierarchy"], "title": "RegionInput"}, "Run": {"properties": {"id": {"type": "integer", "title": "Id"}, "model": {"$ref": "#/components/schemas/Model"}, "model__id": {"type": "integer", "title": "Model Id"}, "scenario": {"$ref": "#/components/schemas/Scenario"}, "scenario__id": {"type": "integer", "title": "Scenario Id"}, "version": {"type": "integer", "title": "Version"}, "is_default": {"type": "boolean", "title": "Is Default"}}, "type": "object", "required": ["id", "model", "model__id", "scenario", "scenario__id", "version", "is_default"], "title": "Run"}, "RunInput": {"properties": {"model_name": {"type": "string", "title": "Model Name"}, "scenario_name": {"type": "string", "title": "Scenario Name"}}, "type": "object", "required": ["model_name", "scenario_name"], "title": "RunInput"}, "RunMetaEntry": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "dtype": {"type": "string", "title": "Dtype"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["id", "run__id", "key", "dtype", "value"], "title": "RunMetaEntry"}, "RunMetaEntryFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "dtype": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype", "sqla_column": "dtype"}, "run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id", "sqla_column": "run__id"}, "key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key", "sqla_column": "key"}, "value_int": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int", "sqla_column": "value_int"}, "value_str": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str", "sqla_column": "value_str"}, "value_float": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float", "sqla_column": "value_float"}, "value_bool": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Value Bool", "sqla_column": "value_bool"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "dtype__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dtype In", "sqla_column": "dtype"}, "dtype__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Like", "sqla_column": "dtype"}, "dtype__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Ilike", "sqla_column": "dtype"}, "dtype__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Notlike", "sqla_column": "dtype"}, "dtype__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dtype Notilike", "sqla_column": "dtype"}, "run_id__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lte", "sqla_column": "run__id"}, "run_id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Run Id In", "sqla_column": "run__id"}, "run_id__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Lt", "sqla_column": "run__id"}, "run_id__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gte", "sqla_column": "run__id"}, "run_id__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id Gt", "sqla_column": "run__id"}, "key__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Key In", "sqla_column": "key"}, "key__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Like", "sqla_column": "key"}, "key__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Ilike", "sqla_column": "key"}, "key__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notlike", "sqla_column": "key"}, "key__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key Notilike", "sqla_column": "key"}, "value_int__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Int In", "sqla_column": "value_int"}, "value_int__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gt", "sqla_column": "value_int"}, "value_int__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lt", "sqla_column": "value_int"}, "value_int__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Gte", "sqla_column": "value_int"}, "value_int__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Int Lte", "sqla_column": "value_int"}, "value_str__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Value Str In", "sqla_column": "value_str"}, "value_str__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Like", "sqla_column": "value_str"}, "value_str__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Ilike", "sqla_column": "value_str"}, "value_str__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notlike", "sqla_column": "value_str"}, "value_str__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Str Notilike", "sqla_column": "value_str"}, "value_float__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Value Float In", "sqla_column": "value_float"}, "value_float__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gt", "sqla_column": "value_float"}, "value_float__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lt", "sqla_column": "value_float"}, "value_float__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Gte", "sqla_column": "value_float"}, "value_float__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Value Float Lte", "sqla_column": "value_float"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__meta__filter__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "RunMetaEntryInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "key": {"type": "string", "title": "Key"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}], "title": "Value"}}, "type": "object", "required": ["run__id", "key", "value"], "title": "RunMetaEntryInput"}, "Scalar": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit": {"$ref": "#/components/schemas/Unit"}, "unit__id": {"type": "integer", "title": "Unit Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "value", "unit", "unit__id", "run__id", "created_at", "created_by"], "title": "Scalar"}, "ScalarCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"type": "number", "title": "Value"}, "unit_name": {"type": "string", "title": "Unit Name"}, "run_id": {"type": "integer", "title": "Run Id"}}, "type": "object", "required": ["name", "value", "unit_name", "run_id"], "title": "ScalarCreateInput"}, "ScalarUpdateInput": {"properties": {"value": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Value"}, "unit_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Id"}}, "type": "object", "required": ["value", "unit_id"], "title": "ScalarUpdateInput"}, "Scenario": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Scenario"}, "ScenarioInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ScenarioInput"}, "Table": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Table"}, "TableCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"items": {"type": "string"}, "type": "array", "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "TableCreateInput"}, "TimeSeries": {"properties": {"id": {"type": "integer", "title": "Id"}, "run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["id", "run__id", "parameters"], "title": "TimeSeries"}, "TimeSeriesFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true}, "sqla_column": "run"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "variable": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__variable__VariableFilter"}, {"type": "null"}], "sqla_column": "variable"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}}, "additionalProperties": false, "type": "object", "title": "unit"}, "TimeSeriesInput": {"properties": {"run__id": {"type": "integer", "title": "Run Id"}, "parameters": {"type": "object", "title": "Parameters"}}, "type": "object", "required": ["run__id", "parameters"], "title": "TimeSeriesInput"}, "Unit": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Unit"}, "UnitInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "UnitInput"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "VariableCreateInput": {"properties": {"name": {"type": "string", "title": "Name"}, "run_id": {"type": "integer", "title": "Run Id"}, "constrained_to_indexsets": {"anyOf": [{"type": "string"}, {"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Constrained To Indexsets"}, "column_names": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Column Names"}}, "type": "object", "required": ["name", "run_id", "constrained_to_indexsets", "column_names"], "title": "VariableCreateInput"}, "VariableInput": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "VariableInput"}, "ixmp4__data__api__iamc__variable__Variable": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name"], "title": "Variable"}, "ixmp4__data__api__optimization__variable__Variable": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "data": {"type": "object", "title": "Data"}, "columns": {"items": {"$ref": "#/components/schemas/Column"}, "type": "array", "title": "Columns"}, "run__id": {"type": "integer", "title": "Run Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "type": "object", "required": ["id", "name", "data", "columns", "run__id", "created_at", "created_by"], "title": "Variable"}, "ixmp4__data__db__filters__model__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__region__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__run__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__scenario__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__unit__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__filters__variable__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ModelFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RegionFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__ScenarioFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__UnitFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__datapoint__filter__VariableFilter": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}}, "additionalProperties": false, "type": "object", "title": "sqla_model"}, "ixmp4__data__db__iamc__variable__filter__VariableFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "region": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__region__RegionFilter"}, {"type": "null"}], "sqla_column": "region"}, "unit": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__unit__UnitFilter"}, {"type": "null"}], "sqla_column": "unit"}, "run": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__run__RunFilter"}, {"type": "null"}], "default": {"default_only": true, "is_default": true}, "sqla_column": "run"}}, "additionalProperties": false, "type": "object", "title": "run"}, "ixmp4__data__db__meta__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "RunFilter"}, "ixmp4__data__db__model__filter__ModelFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcModelFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__model__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "model"}, "ixmp4__data__db__region__filter__RegionFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "hierarchy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy", "sqla_column": "hierarchy"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "hierarchy__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Ilike", "sqla_column": "hierarchy"}, "hierarchy__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Hierarchy In", "sqla_column": "hierarchy"}, "hierarchy__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notlike", "sqla_column": "hierarchy"}, "hierarchy__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Like", "sqla_column": "hierarchy"}, "hierarchy__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hierarchy Notilike", "sqla_column": "hierarchy"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRegionFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__run__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcRunFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__scenario__filter__RunFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version", "sqla_column": "version"}, "default_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Default Only", "default": true, "sqla_column": "default_only"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default", "sqla_column": "is_default"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__model__ModelFilter"}, {"type": "null"}], "sqla_column": "model"}, "scenario": {"anyOf": [{"$ref": "#/components/schemas/ixmp4__data__db__filters__scenario__ScenarioFilter"}, {"type": "null"}], "sqla_column": "scenario"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "version__lte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lte", "sqla_column": "version"}, "version__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Version In", "sqla_column": "version"}, "version__lt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Lt", "sqla_column": "version"}, "version__gte": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gte", "sqla_column": "version"}, "version__gt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Version Gt", "sqla_column": "version"}}, "additionalProperties": false, "type": "object", "title": "scenario"}, "ixmp4__data__db__scenario__filter__ScenarioFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcScenarioFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__data__db__unit__filter__UnitFilter": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id", "sqla_column": "id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "sqla_column": "name"}, "id__in": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Id In", "sqla_column": "id"}, "name__ilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Ilike", "sqla_column": "name"}, "name__in": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Name In", "sqla_column": "name"}, "name__notlike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notlike", "sqla_column": "name"}, "name__like": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Like", "sqla_column": "name"}, "name__notilike": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Notilike", "sqla_column": "name"}, "iamc": {"anyOf": [{"$ref": "#/components/schemas/IamcUnitFilter"}, {"type": "boolean"}, {"type": "null"}], "title": "Iamc", "sqla_column": "iamc"}}, "additionalProperties": false, "type": "object", "title": "iamc"}, "ixmp4__server__rest__base__EnumerationOutput_Variable___1": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/ixmp4__data__api__iamc__variable__Variable"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Variable]"}, "ixmp4__server__rest__base__EnumerationOutput_Variable___2": {"properties": {"pagination": {"$ref": "#/components/schemas/Pagination"}, "total": {"type": "integer", "title": "Total"}, "results": {"anyOf": [{"$ref": "#/components/schemas/DataFrame"}, {"items": {"$ref": "#/components/schemas/ixmp4__data__api__optimization__variable__Variable"}, "type": "array"}], "title": "Results"}}, "type": "object", "required": ["pagination", "total", "results"], "title": "EnumerationOutput[Variable]"}, "ixmp4__server__rest__optimization__equation__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__indexset__DataInput": {"properties": {"data": {"anyOf": [{"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"type": "number"}, "type": "array"}, {"items": {"type": "integer"}, "type": "array"}, {"items": {"type": "string"}, "type": "array"}], "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__parameter__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__table__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}, "ixmp4__server__rest__optimization__variable__DataInput": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "DataInput"}}}} \ No newline at end of file From 2b85a87e4dc32cdff57db2307bb347563ac353f0 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 14:34:45 +0100 Subject: [PATCH 16/36] Remove outdated comment --- ixmp4/core/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ixmp4/core/run.py b/ixmp4/core/run.py index 550e4626..cf9e8e70 100644 --- a/ixmp4/core/run.py +++ b/ixmp4/core/run.py @@ -4,7 +4,7 @@ import numpy as np import pandas as pd -# TODO Import this from typing when dropping Python 3.11 and 3.10 (Self) +# TODO Import this from typing when dropping Python 3.11 from typing_extensions import TypedDict, Unpack from ixmp4.data.abstract import Model as ModelModel From 0975ce3d69ddc0921b2d4dbaf835dd0f666ec521 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 29 Nov 2024 14:37:33 +0100 Subject: [PATCH 17/36] Name helper file appropriately --- ixmp4/core/iamc/data.py | 2 +- ixmp4/data/db/iamc/{data.py => utils.py} | 0 ixmp4/data/db/run/repository.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename ixmp4/data/db/iamc/{data.py => utils.py} (100%) diff --git a/ixmp4/core/iamc/data.py b/ixmp4/core/iamc/data.py index d1a74e3e..6be06858 100644 --- a/ixmp4/core/iamc/data.py +++ b/ixmp4/core/iamc/data.py @@ -9,7 +9,7 @@ from ixmp4.data.abstract import Run from ixmp4.data.abstract.iamc.datapoint import EnumerateKwargs from ixmp4.data.backend import Backend -from ixmp4.data.db.iamc.data import ( +from ixmp4.data.db.iamc.utils import ( AddDataPointFrameSchema, RemoveDataPointFrameSchema, normalize_df, diff --git a/ixmp4/data/db/iamc/data.py b/ixmp4/data/db/iamc/utils.py similarity index 100% rename from ixmp4/data/db/iamc/data.py rename to ixmp4/data/db/iamc/utils.py diff --git a/ixmp4/data/db/run/repository.py b/ixmp4/data/db/run/repository.py index d9e5d397..2a92580d 100644 --- a/ixmp4/data/db/run/repository.py +++ b/ixmp4/data/db/run/repository.py @@ -14,7 +14,7 @@ from ixmp4.core.utils import substitute_type from ixmp4.data import abstract from ixmp4.data.auth.decorators import guard -from ixmp4.data.db.iamc.data import normalize_df +from ixmp4.data.db.iamc.utils import normalize_df from ixmp4.db import utils from .. import base From 02694e6a8bdb2ee1448254e82d04090d3dd16dd6 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Wed, 8 Jan 2025 09:04:19 +0100 Subject: [PATCH 18/36] Add test that run.clone uses auth system --- tests/test_auth.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_auth.py b/tests/test_auth.py index b0b17dc2..4c1624a4 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -10,6 +10,7 @@ from ixmp4.core.exceptions import Forbidden, InvalidCredentials from ixmp4.data.backend import SqlAlchemyBackend +from .core.test_run import assert_cloned_run from .fixtures import SmallIamcDataset @@ -235,6 +236,9 @@ def test_guards( # their property https://github.com/python/mypy/issues/3004 run.meta = {"meta": "test"} # type: ignore[assignment] + with pytest.raises(Forbidden): + _ = run.clone() + def test_run_audit_info(self, db_platform: ixmp4.Platform) -> None: backend = cast(SqlAlchemyBackend, db_platform.backend) @@ -312,6 +316,10 @@ def test_filters( ) run.meta = {"meta": "test"} # type: ignore[assignment] + # Test run.clone() uses auth() + clone_with_solution = run.clone() + assert_cloned_run(run, clone_with_solution, kept_solution=True) + else: with pytest.raises(Forbidden): _ = mp.runs.create(model, "Scenario") @@ -327,6 +335,9 @@ def test_filters( with pytest.raises(Forbidden): run.meta = {"meta": "test"} # type: ignore[assignment] + + with pytest.raises(Forbidden): + _ = run.clone() else: with pytest.raises((ixmp4.Run.NotFound, ixmp4.Run.NoDefaultVersion)): mp.runs.get(model, "Scenario") From d69ff7c0e9433c388afd5599bae152488dd72861 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Wed, 8 Jan 2025 09:05:19 +0100 Subject: [PATCH 19/36] Enhance readability of run.clone test --- tests/core/test_run.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/core/test_run.py b/tests/core/test_run.py index b76d8a89..7d5a1968 100644 --- a/tests/core/test_run.py +++ b/tests/core/test_run.py @@ -22,33 +22,47 @@ def _expected_runs_table(*row_default: Unpack[tuple[bool | None, ...]]) -> pd.Da def assert_cloned_run(original: Run, clone: Run, kept_solution: bool) -> None: + """Asserts that a Run and its clone contain the same data.""" + # Assert IAMC data are equal pdt.assert_frame_equal(original.iamc.tabulate(), clone.iamc.tabulate()) + + # Assert indexset names and data are equal for original_indexset, cloned_indexset in zip( original.optimization.indexsets.list(), clone.optimization.indexsets.list() ): assert original_indexset.name == cloned_indexset.name assert original_indexset.data == cloned_indexset.data + + # Assert scalar names and data are equal for original_scalar, cloned_scalar in zip( original.optimization.scalars.list(), clone.optimization.scalars.list() ): assert original_scalar.name == cloned_scalar.name assert original_scalar.value == cloned_scalar.value assert original_scalar.unit.name == cloned_scalar.unit.name + + # Assert table names and data are equal for original_table, cloned_table in zip( original.optimization.tables.list(), clone.optimization.tables.list() ): assert original_table.name == cloned_table.name assert original_table.data == cloned_table.data + + # Assert parameter names and data are equal for original_parameter, cloned_parameter in zip( original.optimization.parameters.list(), clone.optimization.parameters.list() ): assert original_parameter.name == cloned_parameter.name assert original_parameter.data == cloned_parameter.data + + # Assert equation names are equal and the solution is either equal or empty for original_equation, cloned_equation in zip( original.optimization.equations.list(), clone.optimization.equations.list() ): assert original_equation.name == cloned_equation.name assert cloned_equation.data == (original_equation.data if kept_solution else {}) + + # Assert variable names are equal and the solution is either equal or empty for original_variable, cloned_variable in zip( original.optimization.variables.list(), clone.optimization.variables.list() ): @@ -256,19 +270,27 @@ def test_run_clone(self, platform: ixmp4.Platform) -> None: # Prepare original run run = platform.runs.create("Model", "Scenario") + # Add IAMC data run.iamc.add(test_data_annual, type=ixmp4.DataPoint.Type.ANNUAL) + + # Create optimization items and add some data indexset = run.optimization.indexsets.create("Indexset") indexset.add(["foo", "bar"]) + run.optimization.scalars.create("Scalar", value=10, unit=unit.name) + run.optimization.tables.create( "Table", constrained_to_indexsets=[indexset.name] ).add({"Indexset": ["bar"]}) + run.optimization.parameters.create( "Parameter", constrained_to_indexsets=[indexset.name] ).add(test_data) + run.optimization.variables.create( "Variable", constrained_to_indexsets=[indexset.name] ).add(test_solution) + run.optimization.equations.create( "Equation", constrained_to_indexsets=[indexset.name] ).add(test_solution) From 12f2e5ffc528da22d68d6531f4c1fd58036f6c70 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Thu, 9 Jan 2025 13:42:23 +0100 Subject: [PATCH 20/36] Copy-paste tutorial from previous branch --- tutorial/transport/dantzig_model_linopy.py | 104 ++++ tutorial/transport/linopy_transport.ipynb | 482 ++++++++++++++++++ .../transport/linopy_transport_scenario.ipynb | 386 ++++++++++++++ tutorial/transport/utils.py | 53 ++ 4 files changed, 1025 insertions(+) create mode 100644 tutorial/transport/dantzig_model_linopy.py create mode 100644 tutorial/transport/linopy_transport.ipynb create mode 100644 tutorial/transport/linopy_transport_scenario.ipynb create mode 100644 tutorial/transport/utils.py diff --git a/tutorial/transport/dantzig_model_linopy.py b/tutorial/transport/dantzig_model_linopy.py new file mode 100644 index 00000000..0a55effe --- /dev/null +++ b/tutorial/transport/dantzig_model_linopy.py @@ -0,0 +1,104 @@ +import linopy +import pandas as pd + +from ixmp4.core import Parameter, Run + + +def create_parameter( + parameter: Parameter, index: pd.Index | list[pd.Index], name: str +) -> pd.Series: + if isinstance(index, list): + index = pd.MultiIndex.from_product(index) + + return pd.Series(data=parameter.values, index=index, name=name) + + +def create_dantzig_model(run: Run) -> linopy.Model: + """Creates new linopy.Model for Dantzig's problem based on ixmp4.Run.""" + m = linopy.Model() + i = pd.Index(run.optimization.indexsets.get("i").elements, name="Canning Plants") + j = pd.Index(run.optimization.indexsets.get("j").elements, name="Markets") + a = create_parameter( + parameter=run.optimization.parameters.get("a"), + index=i, + name="capacity of plant i in cases", + ) + b = create_parameter( + parameter=run.optimization.parameters.get("b"), + index=j, + name="demand at market j in cases", + ) + d = create_parameter( + parameter=run.optimization.parameters.get("d"), + index=[i, j], + name="distance in thousands of miles", + ) + f = run.optimization.scalars.get("f").value + + c = d * f / 1000 + c.name = "transport cost in thousands of dollars per case" + + x = m.add_variables(lower=0.0, coords=[i, j], name="Shipment quantities in cases") + + m.add_constraints( + lhs=x.sum(dim="Markets"), + sign="<=", + rhs=a, + name="Observe supply limit at plant i", + ) + + m.add_constraints( + lhs=x.sum(dim="Canning Plants"), + sign=">=", + rhs=b, + name="Satisfy demand at market j", + ) + + obj = c.to_xarray() * x + m.add_objective(obj) + + return m + + +def read_dantzig_solution(model: linopy.Model, run: Run) -> None: + """Reads the Dantzig solution from linopy.Model to ixmp4.Run.""" + # Handle objective + # TODO adding fake marginals here until Variables don't require this column anymore + # Can't add units if this column was not declared above. Better stored as Scalar + # maybe? + run.optimization.variables.get("z").add( + data={"levels": [model.objective.value], "marginals": [-0.0]} + ) + + # Handle shipment quantities + x_data: pd.DataFrame = model.solution.to_dataframe() + x_data.reset_index(inplace=True) + x_data.rename( + columns={ + "Shipment quantities in cases": "levels", + "Canning Plants": "i", + "Markets": "j", + }, + inplace=True, + ) + # x_data["units"] = "cases" + # TODO Again setting fake marginals until they are optional for variables + x_data["marginals"] = -0.0 + run.optimization.variables.get("x").add(data=x_data) + + # The following don't seem to be typed correctly by linopy + # Add supply data + supply_data = { + "i": run.optimization.indexsets.get("i").elements, + "levels": model.constraints["Observe supply limit at plant i"].data.rhs, # type: ignore + "marginals": model.constraints["Observe supply limit at plant i"].data.dual, # type: ignore + } + run.optimization.equations.get("supply").add(data=supply_data) + + # Add demand data + demand_data = { + "j": run.optimization.indexsets.get("j").elements, + "levels": model.constraints["Satisfy demand at market j"].data.rhs, # type: ignore + "marginals": model.constraints["Satisfy demand at market j"].data.dual, # type: ignore + } + run.optimization.equations.get("demand").add(data=demand_data) diff --git a/tutorial/transport/linopy_transport.ipynb b/tutorial/transport/linopy_transport.ipynb new file mode 100644 index 00000000..7d08bb9c --- /dev/null +++ b/tutorial/transport/linopy_transport.ipynb @@ -0,0 +1,482 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Tutorial 1

Solve Dantzig's Transport Problem using the *ix modeling platform* (ixmp4)\n", + "\n", + "\n", + "\n", + "## Aim and scope of the tutorial\n", + "\n", + "This tutorial takes you through the steps to import the data for a very simple optimization model\n", + "and solve it using the **ixmp4**-linopy interface.\n", + "\n", + "We use Dantzig's transport problem, which is also used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", + "This problem finds a least cost shipping schedule that meets requirements at markets and supplies at factories.\n", + "\n", + "If you are more familiar with GAMS, you can find the implementation in [transport.gms](transport.gms).\n", + "\n", + "For reference of the transport problem, see:\n", + "> Dantzig, G B, Chapter 3.3. In Linear Programming and Extensions. \n", + "> Princeton University Press, Princeton, New Jersey, 1963.\n", + "\n", + "> This formulation is described in detail in: \n", + "> Rosenthal, R E, Chapter 2: A GAMS Tutorial. \n", + "> In GAMS: A User's Guide. The Scientific Press, Redwood City, California, 1988.\n", + "\n", + "> see http://www.gams.com/mccarl/trnsport.gms\n", + "\n", + "## Tutorial outline\n", + "\n", + "The steps in the tutorial are the following:\n", + "\n", + "0. Launch an `ixmp4.Platform` instance and initialize a new `ixmp4.Run`.\n", + "0. Define the `Set`s and `Parameter`s in the scenario and save the data to the platform.\n", + "0. Initialize `Variable`s and `Equation`s to import the solution from GAMS.\n", + "0. Call GAMS to **solve the scenario** (export to GAMS input gdx, execute, read solution from output gdx).\n", + "0. Display the **solution** (variables and equations)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Launching the `Platform` and initializing a new `Run`\n", + "\n", + "A `Platform` is the connection to the database that holds all data and relevant additional information.\n", + "\n", + "A `Run` is an object that holds all relevant information for one quantification of a scenario. \n", + "A run is identified by a model name, a scenario name and a version number (assigned automatically)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You have to *register a new local database* before you can run the tutorial. \n", + "\n", + "Run the following in the command-line:\n", + "```\n", + "ixmp4 platforms add tutorial-test\n", + "```\n", + "\n", + "You can then check if the database was successfully created by running\n", + "```\n", + "ixmp4 platforms list\n", + "```\n", + "\n", + "After creating the database, you can connect to it via an `ixmp4.Platform` instance." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import ixmp4\n", + "\n", + "platform = ixmp4.Platform(\"transport-tutorial\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, we initialize a new `ixmp4.Run` in the database." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "run = platform.runs.create(model=\"transport problem\", scenario=\"standard\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Defining the `IndexSet`s\n", + "\n", + "An `IndexSet` defines a list of elements with a name. These `IndexSet`s can be used for \"indexed assignment\" of parameters, variables and equations. \n", + "The entries of these parameters, etc. are then validated against the elements of the linked `IndexSet`(s). \n", + "In database terms, a column of a parameter can be \"foreign-keyed\" onto an `IndexSet`.\n", + "\n", + "Below, we first show the data as they would be written in the GAMS tutorial ([transport.gms](transport.gms) in this folder). " + ] + }, + { + "cell_type": "raw", + "metadata": {}, + "source": [ + "Sets\n", + " i canning plants / seattle, san-diego /\n", + " j markets / new-york, chicago, topeka / ;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We now initialize these sets and assign the elements." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "i = run.optimization.indexsets.create(\"i\")\n", + "i.add([\"seattle\", \"san-diego\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can display the elements of any `IndexSet` as a Python list:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "i.elements" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "`IndexSet`s can be notated with documentation strings to record their meaning. These strings can then be used by linopy, too! " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# TODO We would need to implement this first, though, probably setting pd.Series.name\n", + "# to it." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "i.docs = \"Canning Plants\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For simplicity, the steps of creating an `IndexSet` and assigning elements can be done in one line." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "run.optimization.indexsets.create(\"j\").add([\"new-york\", \"chicago\", \"topeka\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Assigning the `Parameter`s\n", + "\n", + "Next, we define the parameters *capacity* and *demand*. The parameters are assigned on the indexsets *i* and *j*, respectively." + ] + }, + { + "cell_type": "raw", + "metadata": {}, + "source": [ + "Parameters\n", + " a(i) capacity of plant i in cases\n", + " / seattle 350\n", + " san-diego 600 /\n", + " b(j) demand at market j in cases\n", + " / new-york 325\n", + " chicago 300\n", + " topeka 275 / ;" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", + "from ixmp4.core import Unit\n", + "\n", + "# We only need to (and can!) define units once for each Platform\n", + "try:\n", + " cases = platform.units.get(\"cases\")\n", + "except Unit.NotFound:\n", + " cases = platform.units.create(\"cases\")\n", + "\n", + "# Capacity of plant i in cases\n", + "# Parameter data can be a dict...\n", + "a = run.optimization.parameters.create(name=\"a\", constrained_to_indexsets=[\"i\"])\n", + "a_data = {\n", + " \"i\": [\"seattle\", \"san-diego\"],\n", + " \"values\": [350, 600],\n", + " \"units\": [cases.name, cases.name],\n", + "}\n", + "a.add(data=a_data)\n", + "\n", + "# Demand at market j in cases\n", + "b = run.optimization.parameters.create(\"b\", constrained_to_indexsets=[\"j\"])\n", + "# ... or a pd.DataFrame\n", + "b_data = pd.DataFrame(\n", + " [\n", + " [\"new-york\", 325, cases.name],\n", + " [\"chicago\", 300, cases.name],\n", + " [\"topeka\", 275, cases.name],\n", + " ],\n", + " columns=[\"j\", \"values\", \"units\"],\n", + ")\n", + "b.add(b_data)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Notice how the `parameter.data` has three columns but has only been linked to one `IndexSet`? That's on purpose: Every `Parameter` needs to have (the columns) *values* and *units*, but these cannot be constrained to an `IndexSet`. The value(s) can be any number(s), but the units need to be known to the `Platform`.\n", + "\n", + "Here's how to access `parameter.data` to e.g. quickly confirm that *b* is set correctly:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "b.data" + ] + }, + { + "cell_type": "raw", + "metadata": {}, + "source": [ + "Table d(i,j) distance in thousands of miles\n", + " new-york chicago topeka\n", + " seattle 2.5 1.7 1.8\n", + " san-diego 2.5 1.8 1.4 ;" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "try:\n", + " km = platform.units.get(\"km\")\n", + "except Unit.NotFound:\n", + " km = platform.units.create(\"km\")\n", + "\n", + "# Distance in thousands of miles\n", + "d = run.optimization.parameters.create(\"d\", constrained_to_indexsets=[\"i\", \"j\"])\n", + "# You can start with some data ...\n", + "d_data = {\n", + " \"i\": [\"seattle\", \"seattle\", \"seattle\", \"san-diego\"],\n", + " \"j\": [\"new-york\", \"chicago\", \"topeka\", \"new-york\"],\n", + " \"values\": [2.5, 1.7, 1.8, 2.5],\n", + " \"units\": [km.name] * 4,\n", + "}\n", + "d.add(d_data)\n", + "\n", + "# ... and expand it later on:\n", + "d.add({\"i\": [\"san-diego\"], \"j\": [\"chicago\"], \"values\": [1.8], \"units\": [\"km\"]})\n", + "d.add({\"i\": [\"san-diego\"], \"j\": [\"topeka\"], \"values\": [1.4], \"units\": [\"km\"]})" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Every time you add data, though, **all** columns must be present!" + ] + }, + { + "cell_type": "raw", + "metadata": {}, + "source": [ + "Scalar f freight in dollars per case per thousand miles /90/ ; " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# cost per case per 1000 miles\n", + "\n", + "# TODO we could really use a units.get_or_create() function!\n", + "try:\n", + " unit_cost_per_case = platform.units.get(\"USD/km\")\n", + "except Unit.NotFound:\n", + " unit_cost_per_case = platform.units.create(\"USD/km\")\n", + "\n", + "f = run.optimization.scalars.create(name=\"f\", value=90, unit=unit_cost_per_case)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Defining `Variable`s and `Equation`s in the scenario\n", + "\n", + "The levels and marginals of these `Variable`s and `Equation`s will be imported to the scenario when reading the model solution." + ] + }, + { + "cell_type": "raw", + "metadata": {}, + "source": [ + "Variables\n", + " x(i,j) shipment quantities in cases\n", + " z total transportation costs in thousands of dollars ;\n", + " \n", + "Equations\n", + " cost define objective function\n", + " supply(i) observe supply limit at plant i\n", + " demand(j) satisfy demand at market j ;" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# initialize the decision variables and equations\n", + "z = run.optimization.variables.create(\"z\")\n", + "x = run.optimization.variables.create(\"x\", constrained_to_indexsets=[\"i\", \"j\"])\n", + "supply = run.optimization.equations.create(\"supply\", constrained_to_indexsets=[\"i\"])\n", + "demand = run.optimization.equations.create(\"demand\", constrained_to_indexsets=[\"j\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Solve the scenario\n", + "\n", + "In this tutorial, we solve the tutorial using the ``highs`` solver in linopy. \n", + "\n", + "The ``create_dantzig_model()`` function is a convenience shortcut for setting up a linopy model correctly for the dantzig scenario. Please see ``linopy_model.py`` for details.\n", + "\n", + "The solution data are stored with the model object automatically. ``store_dantzig_solution()`` then stores them in the ixmp4 objects." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from tutorial.transport.dantzig_model_linopy import (\n", + " create_dantzig_model,\n", + " read_dantzig_solution,\n", + ")\n", + "\n", + "linopy_model = create_dantzig_model(run=run)\n", + "linopy_model.solve(\"highs\")\n", + "\n", + "read_dantzig_solution(model=linopy_model, run=run)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Display and analyze the results" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display the objective value of the solution\n", + "z.levels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display the quantities transported from canning plants to demand locations\n", + "pd.DataFrame(x.data)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display the quantities and marginals (shadow prices) of the demand balance constraints\n", + "demand.data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display the quantities and marginals (shadow prices) of the supply balance constraints\n", + "supply.data" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.2" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/tutorial/transport/linopy_transport_scenario.ipynb b/tutorial/transport/linopy_transport_scenario.ipynb new file mode 100644 index 00000000..71c87053 --- /dev/null +++ b/tutorial/transport/linopy_transport_scenario.ipynb @@ -0,0 +1,386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Tutorial 2 for Python\n", + "\n", + "## Make a scenario of Dantzig's Transport Problem using the *ix modeling platform* (ixmp4)\n", + "\n", + "\n", + "\n", + "### Aim and scope of the tutorial\n", + "\n", + "This tutorial uses the transport problem scenario developed in the first tutorial and illustrates how the ixmp4 framework can be applied for scenario analysis in the sense often used in economic or environmental modeling: develop a baseline, create a clone from the baseline with altered parameters or assumptions, and solve the new model. Then, compare the results from the original and altered scenario versions.\n", + "\n", + "In particular, this tutorial will take you through the following steps:\n", + "\n", + "0. Launch an `ixmp4.Platform` instance and retrieve the `ixmp4.Run` instance of Dantzig's transport problem\n", + "0. Retrieve some data from the `Run` for illustration of filters\n", + "0. Make a clone of the baseline scenario, then check out the clone and make changes: \n", + " in this case, add a new demand location and transport costs to that city\n", + "0. Solve the new scenario\n", + "0. Display the solution of both the baseline and the new scenario" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Launching the `platform` and loading a `Run` from the `ixmp4` database instance\n", + "\n", + "We launch a platform instance and display all models/scenarios currently stored in the connected database instance. We use the same local database we created in [part 1](linopy_transport.ipynb), so please see there for how to create such a local database. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import ixmp4\n", + "\n", + "platform = ixmp4.Platform(\"transport-tutorial\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Tabulate all Runs in the database\n", + "# Per default, only \"default\" Runs are tabulated\n", + "platform.runs.tabulate(default_only=False)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Model and scenario name we used for Dantzig's transport problem in part 1\n", + "model = \"transport problem\"\n", + "scenario = \"standard\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you have run the first part of tutorial before, the existing `Run` should have appeared, and we can load it.\n", + "Uncomment and run the following lines as appropriate:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Load the default version of the Run created in the first tutorial\n", + "# run = platform.runs.get(model=model, scenario=scenario)\n", + "\n", + "# If you already solved this Run, remember to remove its solution!\n", + "# run.optimization.remove_solution()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If the `Run` did not appear (e.g. because you are starting with this tutorial), we can use a function that creates the `Run` from scratch in one step and solve it as usual:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from tutorial.transport.utils import create_default_dantzig_run\n", + "\n", + "run = create_default_dantzig_run(platform=platform)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from tutorial.transport.dantzig_model_linopy import (\n", + " create_dantzig_model,\n", + " read_dantzig_solution,\n", + ")\n", + "\n", + "linopy_model = create_dantzig_model(run=run)\n", + "linopy_model.solve(\"highs\")\n", + "\n", + "read_dantzig_solution(model=linopy_model, run=run)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Retrieve some data from the run for illustration of filters\n", + "\n", + "Before cloning a run and editing data, this section illustrates two-and-a-half methods to retrieve data for a parameter from a run." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Load the distance Parameter\n", + "d = run.optimization.parameters.get(\"d\")\n", + "d" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This is an `ixmp4.Parameter` object! It's useful to interact with if you want to edit the information stored in the database about it. You could e.g. add `.docs` to it so that you can always look up in the database what this object does.\n", + "For interacting with the modeling data, it's more useful to interact with the `.data` attribute, which stores the actual data: " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "d.data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This is a dictionary because that's easier to store in a database. For ease of access, you may want to convert it to a `pandas.DataFrame`:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", + "d_data = pd.DataFrame(d.data)\n", + "\n", + "# Show only the distances for connections from Seattle by filtering the pandas.DataFrame\n", + "d_data[d_data[\"i\"] == \"seattle\"]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# NOTE We currently don't support loading only specific parameter elements.\n", + "# We always load the whole parameter and can then select from the data as usual with\n", + "# e.g. pandas." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For faster access or more complex filtering, you can then use all familiar `pandas` features. For example, list only distances from Seattle to specific other cities:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "d_data.loc[(d_data[\"i\"] == \"seattle\") & (d_data[\"j\"].isin([\"chicago\", \"topeka\"]))]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Please note that `pandas` recommends to use [advanced indexing](https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#advanced-advanced-hierarchical) if you find yourself using more than three conditionals in `.loc[]`." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Make a clone of the baseline scenario, then check out the clone and edit the scenario\n", + "\n", + "For illustration of a scenario analysis workflow, we add a new demand location ``detroit`` and add a demand level and transport costs to that city.\n", + "Because the production capacity does not allow much slack for increased production, we also reduce the demand level in ``chicago``." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Create a new Run by cloning the existing one (without keeping the solution)\n", + "run_detroit = platform.runs.clone(\n", + " run_id=run.id, model=model, scenario=\"detroit\", keep_solution=False\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Reduce demand in chicago\n", + "run_detroit.optimization.parameters.get(\"b\").add(\n", + " {\"j\": [\"chicago\"], \"values\": [200], \"units\": [\"cases\"]}\n", + ")\n", + "\n", + "# Add a new city with demand and distances\n", + "run_detroit.optimization.indexsets.get(\"j\").add(\"detroit\")\n", + "run_detroit.optimization.parameters.get(\"b\").add(\n", + " {\"j\": [\"detroit\"], \"values\": [150], \"units\": [\"cases\"]}\n", + ")\n", + "run_detroit.optimization.parameters.get(\"d\").add(\n", + " {\n", + " \"i\": [\"seattle\", \"san-diego\"],\n", + " \"j\": [\"detroit\", \"detroit\"],\n", + " \"values\": [1.7, 1.9],\n", + " \"units\": [\"km\", \"km\"],\n", + " }\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Solve the new scenario" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "linopy_model_detroit = create_dantzig_model(run=run_detroit)\n", + "linopy_model_detroit.solve(\"highs\")\n", + "\n", + "read_dantzig_solution(model=linopy_model_detroit, run=run_detroit)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Display and analyze the results\n", + "\n", + "For comparison between the baseline `Run`, i.e., the original transport problem, and the \"detroit\" `Run`, we show the solution for both cases." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "jupyter": { + "name": "scen-z" + } + }, + "outputs": [], + "source": [ + "# Display the objective value of the solution in the baseline Run\n", + "run.optimization.variables.get(\"z\").levels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "jupyter": { + "name": "scen-detroit-z" + } + }, + "outputs": [], + "source": [ + "# Display the objective value of the solution in the \"detroit\" Run\n", + "run_detroit.optimization.variables.get(\"z\").levels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display quantities transported from canning plants to demand locations in \"baseline\"\n", + "pd.DataFrame(run.optimization.variables.get(\"x\").data)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display quantities transported from canning plants to demand locations in \"detroit\"\n", + "pd.DataFrame(run_detroit.optimization.variables.get(\"x\").data)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display quantities and marginals (=shadow prices) of the demand balance constraints\n", + "# in \"baseline\"\n", + "run.optimization.equations.get(\"demand\").data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Display quantities and marginals (=shadow prices) of the demand balance constraints\n", + "# in \"detroit\"\n", + "run_detroit.optimization.equations.get(\"demand\").data" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.2" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/tutorial/transport/utils.py b/tutorial/transport/utils.py new file mode 100644 index 00000000..4b81d037 --- /dev/null +++ b/tutorial/transport/utils.py @@ -0,0 +1,53 @@ +import pandas as pd + +import ixmp4 +from ixmp4.core import Run, Unit + + +def create_default_dantzig_run(platform: ixmp4.Platform) -> Run: + """Creates new ixmp4.Run holding all data for Dantzig's problem.""" + try: + cases = platform.units.get("cases") + km = platform.units.get("km") + unit_cost_per_case = platform.units.get("USD/km") + except Unit.NotFound: + cases = platform.units.create("cases") + km = platform.units.create("km") + unit_cost_per_case = platform.units.create("USD/km") + run = platform.runs.create(model="transport problem", scenario="standard") + run.set_as_default() + run.optimization.indexsets.create("i").add(["seattle", "san-diego"]) + run.optimization.indexsets.create("j").add(["new-york", "chicago", "topeka"]) + a_data = { + "i": ["seattle", "san-diego"], + "values": [350, 600], + "units": [cases.name, cases.name], + } + run.optimization.parameters.create(name="a", constrained_to_indexsets=["i"]).add( + data=a_data + ) + b_data = pd.DataFrame( + [ + ["new-york", 325, cases.name], + ["chicago", 300, cases.name], + ["topeka", 275, cases.name], + ], + columns=["j", "values", "units"], + ) + run.optimization.parameters.create("b", constrained_to_indexsets=["j"]).add(b_data) + d_data = { + "i": ["seattle", "seattle", "seattle", "san-diego", "san-diego", "san-diego"], + "j": ["new-york", "chicago", "topeka", "new-york", "chicago", "topeka"], + "values": [2.5, 1.7, 1.8, 2.5, 1.8, 1.4], + "units": [km.name] * 6, + } + run.optimization.parameters.create("d", constrained_to_indexsets=["i", "j"]).add( + d_data + ) + run.optimization.scalars.create(name="f", value=90, unit=unit_cost_per_case) + run.optimization.variables.create("z") + run.optimization.variables.create("x", constrained_to_indexsets=["i", "j"]) + run.optimization.equations.create("supply", constrained_to_indexsets=["i"]) + run.optimization.equations.create("demand", constrained_to_indexsets=["j"]) + + return run From d141d90e205050c0513bab2fc593683a7fa89096 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Thu, 9 Jan 2025 13:42:39 +0100 Subject: [PATCH 21/36] Add an explicit notebook 0 --- .../0_transport-tutorial_platform-setup.ipynb | 233 ++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 tutorial/transport/0_transport-tutorial_platform-setup.ipynb diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb new file mode 100644 index 00000000..a2902783 --- /dev/null +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -0,0 +1,233 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "9398de15-4422-46d5-815f-99bf4ef36673", + "metadata": {}, + "source": [ + "### Transport Tutorial - Notebook 0 \n", + "\n", + "# Set up an ixmp4 platform to solve *Dantzig's Transport Problem*\n", + "\n", + "\n", + "\n", + "## Aim and scope of this tutorial\n", + "\n", + "This tutorial takes you through the steps to solve a simple optimization model\n", + "using the **ixmp4** database management package and the **linopy** optimization package.\n", + "\n", + "We use **Dantzig's transport problem**, which is used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", + "This problem solves for a least-cost shipping schedule that meets demand constraints markets\n", + "and supply constraints at factories.\n", + "\n", + "For reference of the transport problem, see:\n", + "> Dantzig, G B, Chapter 3.3. In Linear Programming and Extensions. \n", + "> Princeton University Press, Princeton, New Jersey, 1963.\n", + "\n", + "## Tutorial outline\n", + "\n", + "This tutorial consists of three Jupyter notebooks\n", + "\n", + "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", + "1. Implement the **baseline version of the transport problem** and solve it\n", + "2. Create an **alternative scenario** and solve it " + ] + }, + { + "cell_type": "markdown", + "id": "6f4eb5bd-095c-4342-b02b-666cef908c6d", + "metadata": {}, + "source": [ + "## Setting up the database instance via the Command Line Interface (CLI)\n", + "\n", + "An **ixmp4.Platform** is the connection to a database instance that can hold scenario data\n", + "and relevant additional information.\n", + "\n", + "
\n", + "\n", + "You only need to run this notebook when you work through the the transport tutorial for the first time
\n", + "(or when you decided to delete the local database)!\n", + "\n", + "
\n", + "\n", + "Run the following in the command-line to create a new SQLite database instance:\n", + "```\n", + "ixmp4 platforms add transport-tutorial\n", + "```\n", + "The prompt will ask whether you want to create a local database instance.\n", + "\n", + "\n", + "You can then check if the database was successfully created by running:\n", + "```\n", + "ixmp4 platforms list\n", + "```\n", + "\n", + "The log output will show the locally available databases (on your computer) as well as \n", + "the ixmp4 databases hosted by the [IIASA Scenario Services](https://docs.ece.iiasa.ac.at) team.\n", + "\n", + "After creating the database, you can connect to it via an **ixmp4.Platform**." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c227a90c-ce5c-4d07-9bb6-53dfee00880b", + "metadata": {}, + "outputs": [], + "source": [ + "import ixmp4" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5c93c843-e30d-45fd-b01d-f2d3213d9f30", + "metadata": {}, + "outputs": [], + "source": [ + "platform = ixmp4.Platform(\"transport-tutorial\")" + ] + }, + { + "cell_type": "markdown", + "id": "b6209e20-9979-4f3b-b6b7-fe37a1c09366", + "metadata": {}, + "source": [ + "## Defining units in the database backend\n", + "\n", + "The **ixmp4** package requires that **units** are defined explicitly before adding that data.\n", + "\n", + "The transport tutorial uses the units \"cases\", \"km\" and \"USD/km\"." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9be63ed0-aca6-44e3-a6c6-d8fdf8ec2549", + "metadata": {}, + "outputs": [], + "source": [ + "for unit in [\"cases\", \"km\", \"USD/km\"]:\n", + " platform.units.create(unit)" + ] + }, + { + "cell_type": "markdown", + "id": "85c380fb-b29c-4f26-b70d-9d3cdaa42a99", + "metadata": {}, + "source": [ + "You can get a list of all units defined in the **ixmp4.Platform** using the `tabulate()` method." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "98f37ba9-7218-428e-953a-107534cbfc12", + "metadata": {}, + "outputs": [], + "source": [ + "platform.units.tabulate()" + ] + }, + { + "cell_type": "markdown", + "id": "5b67ad18-13d3-40b4-9502-f926e753cf07", + "metadata": {}, + "source": [ + "
\n", + "\n", + "Defining a unit again (i.e., already defined in the database) will raise an error!\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "1e7f631c-67d5-4170-858d-c96636c5e765", + "metadata": {}, + "source": [ + "One reason for defining units explicitly is so that we can assign doc-strings to the unit.\n", + "\n", + "First, we get a specific **ixmp4.Unit** from the platform. Then, we add a docstring. \n", + "Third, we illustrate how to retrieve the docstring. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "500b36df-c528-4109-bc62-ab326af34f5e", + "metadata": {}, + "outputs": [], + "source": [ + "cases = platform.units.get(\"cases\")\n", + "cases" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c1a395d-6c8a-489c-9aa8-39d24895ca51", + "metadata": {}, + "outputs": [], + "source": [ + "cases.docs = \"Unit of a good produced at plants and consumed at markets\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca1ccd87-03ac-4c29-bd45-0f253a7826c4", + "metadata": {}, + "outputs": [], + "source": [ + "cases.docs" + ] + }, + { + "cell_type": "markdown", + "id": "9bae066c-07c4-4550-8b40-5db2fb9a7049", + "metadata": {}, + "source": [ + "## Cleaning up after doing this tutorial\n", + "\n", + "You can use the **ixmp4** Command Line Interface (CLI) to remove the database related to this tutorial.\n", + "\n", + "Run the following in the command-line:\n", + "```\n", + "ixmp4 platforms delete transport-tutorial\n", + "```\n", + "\n", + "The prompt will ask whether you also want to delete the SQLite database file from your computer." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f01de27f-a27e-400b-bca9-3c2a0d59d9cf", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.2" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 33a8cf684f17e778fd6dfd16dab756004e8d78a0 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Thu, 9 Jan 2025 13:57:21 +0100 Subject: [PATCH 22/36] Minor fixes --- .../transport/0_transport-tutorial_platform-setup.ipynb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb index a2902783..6965bed2 100644 --- a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -63,9 +63,9 @@ "```\n", "\n", "The log output will show the locally available databases (on your computer) as well as \n", - "the ixmp4 databases hosted by the [IIASA Scenario Services](https://docs.ece.iiasa.ac.at) team.\n", + "the **ixmp4** databases hosted by the [IIASA Scenario Services](https://docs.ece.iiasa.ac.at) team.\n", "\n", - "After creating the database, you can connect to it via an **ixmp4.Platform**." + "After creating the database, you can connect to it via an **ixmp4.Platform** instance." ] }, { @@ -148,8 +148,7 @@ "source": [ "One reason for defining units explicitly is so that we can assign doc-strings to the unit.\n", "\n", - "First, we get a specific **ixmp4.Unit** from the platform. Then, we add a docstring. \n", - "Third, we illustrate how to retrieve the docstring. " + "First, we get a specific **ixmp4.Unit** from the platform. Then, we add a docstring. Third, we illustrate how to retrieve the docstring. " ] }, { From 8e1c1b447dee690d4b02fec3bbca3056aa197681 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Thu, 9 Jan 2025 13:58:59 +0100 Subject: [PATCH 23/36] Add reworked versions of the tutorial notebooks --- ...sport.ipynb => 1_transport-tutorial.ipynb} | 42 ++++++++++--------- ...ynb => 2_transport-tutorial_variant.ipynb} | 41 +++++++++++++----- 2 files changed, 53 insertions(+), 30 deletions(-) rename tutorial/transport/{linopy_transport.ipynb => 1_transport-tutorial.ipynb} (89%) rename tutorial/transport/{linopy_transport_scenario.ipynb => 2_transport-tutorial_variant.ipynb} (87%) diff --git a/tutorial/transport/linopy_transport.ipynb b/tutorial/transport/1_transport-tutorial.ipynb similarity index 89% rename from tutorial/transport/linopy_transport.ipynb rename to tutorial/transport/1_transport-tutorial.ipynb index 7d08bb9c..7bc1ee54 100644 --- a/tutorial/transport/linopy_transport.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -4,39 +4,43 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Tutorial 1

Solve Dantzig's Transport Problem using the *ix modeling platform* (ixmp4)\n", + "### Transport Tutorial - Notebook 1\n", "\n", - "\n", + "# Solve Dantzig's Transport Problem using ixmp4 and linopy\n", "\n", - "## Aim and scope of the tutorial\n", + "\n", "\n", - "This tutorial takes you through the steps to import the data for a very simple optimization model\n", - "and solve it using the **ixmp4**-linopy interface.\n", + "## Aim and scope of this tutorial\n", "\n", - "We use Dantzig's transport problem, which is also used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", - "This problem finds a least cost shipping schedule that meets requirements at markets and supplies at factories.\n", + "This tutorial takes you through the steps to solve a simple optimization model\n", + "using the **ixmp4** database management package and the **linopy** optimization package.\n", "\n", - "If you are more familiar with GAMS, you can find the implementation in [transport.gms](transport.gms).\n", + "We use **Dantzig's transport problem**, which is used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", + "This problem solves for a least-cost shipping schedule that meets demand constraints markets\n", + "and supply constraints at factories.\n", "\n", "For reference of the transport problem, see:\n", "> Dantzig, G B, Chapter 3.3. In Linear Programming and Extensions. \n", "> Princeton University Press, Princeton, New Jersey, 1963.\n", "\n", - "> This formulation is described in detail in: \n", - "> Rosenthal, R E, Chapter 2: A GAMS Tutorial. \n", - "> In GAMS: A User's Guide. The Scientific Press, Redwood City, California, 1988.\n", + "## Tutorial outline\n", "\n", - "> see http://www.gams.com/mccarl/trnsport.gms\n", + "This tutorial consists of three Jupyter notebooks\n", "\n", - "## Tutorial outline\n", + "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", + "1. Implement the **baseline version of the transport problem** and solve it\n", + "2. Create an **alternative scenario** and solve it " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", "\n", - "The steps in the tutorial are the following:\n", + "This notebook requires that you set up a database and defined the units as shown in **Notebook 0**.\n", "\n", - "0. Launch an `ixmp4.Platform` instance and initialize a new `ixmp4.Run`.\n", - "0. Define the `Set`s and `Parameter`s in the scenario and save the data to the platform.\n", - "0. Initialize `Variable`s and `Equation`s to import the solution from GAMS.\n", - "0. Call GAMS to **solve the scenario** (export to GAMS input gdx, execute, read solution from output gdx).\n", - "0. Display the **solution** (variables and equations)." + "
" ] }, { diff --git a/tutorial/transport/linopy_transport_scenario.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb similarity index 87% rename from tutorial/transport/linopy_transport_scenario.ipynb rename to tutorial/transport/2_transport-tutorial_variant.ipynb index 71c87053..f294d4fe 100644 --- a/tutorial/transport/linopy_transport_scenario.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -4,24 +4,43 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Tutorial 2 for Python\n", + "### Transport Tutorial - Notebook 2\n", "\n", - "## Make a scenario of Dantzig's Transport Problem using the *ix modeling platform* (ixmp4)\n", + "# Implement and solve a variation of Dantzig's Transport Problem\n", "\n", "\n", "\n", - "### Aim and scope of the tutorial\n", + "## Aim and scope of this tutorial\n", "\n", - "This tutorial uses the transport problem scenario developed in the first tutorial and illustrates how the ixmp4 framework can be applied for scenario analysis in the sense often used in economic or environmental modeling: develop a baseline, create a clone from the baseline with altered parameters or assumptions, and solve the new model. Then, compare the results from the original and altered scenario versions.\n", + "This tutorial takes you through the steps to solve a simple optimization model\n", + "using the **ixmp4** database management package and the **linopy** optimization package.\n", "\n", - "In particular, this tutorial will take you through the following steps:\n", + "We use **Dantzig's transport problem**, which is used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", + "This problem solves for a least-cost shipping schedule that meets demand constraints markets\n", + "and supply constraints at factories.\n", "\n", - "0. Launch an `ixmp4.Platform` instance and retrieve the `ixmp4.Run` instance of Dantzig's transport problem\n", - "0. Retrieve some data from the `Run` for illustration of filters\n", - "0. Make a clone of the baseline scenario, then check out the clone and make changes: \n", - " in this case, add a new demand location and transport costs to that city\n", - "0. Solve the new scenario\n", - "0. Display the solution of both the baseline and the new scenario" + "For reference of the transport problem, see:\n", + "> Dantzig, G B, Chapter 3.3. In Linear Programming and Extensions. \n", + "> Princeton University Press, Princeton, New Jersey, 1963.\n", + "\n", + "## Tutorial outline\n", + "\n", + "This tutorial consists of three Jupyter notebooks\n", + "\n", + "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", + "1. Implement the **baseline version of the transport problem** and solve it\n", + "2. Create an **alternative scenario** and solve it " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "This notebook requires that you created and solved the base transport problem as shown in **Notebook 1**.\n", + "\n", + "
" ] }, { From fece793f52376fbc3b57b24501c0d3eda1b99984 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Thu, 9 Jan 2025 14:07:41 +0100 Subject: [PATCH 24/36] Clean up the introduction --- tutorial/transport/0_transport-tutorial_platform-setup.ipynb | 2 +- tutorial/transport/1_transport-tutorial.ipynb | 2 +- tutorial/transport/2_transport-tutorial_variant.ipynb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb index 6965bed2..6d97e2ec 100644 --- a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -17,7 +17,7 @@ "using the **ixmp4** database management package and the **linopy** optimization package.\n", "\n", "We use **Dantzig's transport problem**, which is used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", - "This problem solves for a least-cost shipping schedule that meets demand constraints markets\n", + "This problem solves for a least-cost shipping schedule that meets demand constraints at several markets (cities)\n", "and supply constraints at factories.\n", "\n", "For reference of the transport problem, see:\n", diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index 7bc1ee54..b672607e 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -16,7 +16,7 @@ "using the **ixmp4** database management package and the **linopy** optimization package.\n", "\n", "We use **Dantzig's transport problem**, which is used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", - "This problem solves for a least-cost shipping schedule that meets demand constraints markets\n", + "This problem solves for a least-cost shipping schedule that meets demand constraints at several markets (cities)\n", "and supply constraints at factories.\n", "\n", "For reference of the transport problem, see:\n", diff --git a/tutorial/transport/2_transport-tutorial_variant.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb index f294d4fe..c0967e29 100644 --- a/tutorial/transport/2_transport-tutorial_variant.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -16,7 +16,7 @@ "using the **ixmp4** database management package and the **linopy** optimization package.\n", "\n", "We use **Dantzig's transport problem**, which is used as a [tutorial for linopy](https://linopy.readthedocs.io/en/latest/transport-tutorial.html).\n", - "This problem solves for a least-cost shipping schedule that meets demand constraints markets\n", + "This problem solves for a least-cost shipping schedule that meets demand constraints in several markets (cities)\n", "and supply constraints at factories.\n", "\n", "For reference of the transport problem, see:\n", From c4a7937eebbf4b06822d2e560ebfa05ccade6015 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 10 Jan 2025 11:42:02 +0100 Subject: [PATCH 25/36] Add necessary dependencies to the tutorial group --- poetry.lock | 556 ++++++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 2 + 2 files changed, 557 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 218c1e20..b2178ccf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -125,6 +125,57 @@ files = [ [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] +[[package]] +name = "bottleneck" +version = "1.4.2" +description = "Fast NumPy array functions written in C" +optional = false +python-versions = ">=3.9" +files = [ + {file = "Bottleneck-1.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:125436df93751a226eab1732783aa8f6125e88e779587aa61be071fb66e41f9d"}, + {file = "Bottleneck-1.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c6df9a60ec6ab88fec934ca864266ba95edd89c490af71dc9cd8afb2a54ebd9"}, + {file = "Bottleneck-1.4.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e2fe327dc2d0564e295a5857a252755103f8c6e05b07d3ff80a69afaa9f5065"}, + {file = "Bottleneck-1.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:6b7790ca8658cd69e3cc0d0e4ff0e9829d60849bf7945fbd7344fbce05b2bbb8"}, + {file = "Bottleneck-1.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6282fa925ac3768f66e3547f89a512376d3f9de7ef53bdd37aa29232fd864054"}, + {file = "Bottleneck-1.4.2-cp310-cp310-win32.whl", hash = "sha256:e56a206fbf48e3b8054a964398bf1ed843e9625d3c6bdbeb7898cb48bf97441b"}, + {file = "Bottleneck-1.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:eb0c611d15b0fd8f511d288e8964e4725b4b3b0d9d310880cf0ff6b8dd03c859"}, + {file = "Bottleneck-1.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b6902ebf3e85315b481bc084f10c5770f8240275ad1e039ac69c7c8d2013b040"}, + {file = "Bottleneck-1.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c2fd34b9b490204f95288f0dd35d37042486a95029617246c88c0f94a0ab49fe"}, + {file = "Bottleneck-1.4.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:122845e3106c85465551d4a9a3777841347cfedfbebb3aa985cca110e07030b1"}, + {file = "Bottleneck-1.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1f61658ebdf5a178298544336b65020730bf86cc092dab5f6579a99a86bd888b"}, + {file = "Bottleneck-1.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7c7d29c044a3511b36fd744503c3e697e279c273a8477a6d91a2831d04fd19e0"}, + {file = "Bottleneck-1.4.2-cp311-cp311-win32.whl", hash = "sha256:c663cbba8f52011fd82ee08c6a85c93b34b19e0e7ebba322d2d67809f34e0597"}, + {file = "Bottleneck-1.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:89651ef18c06616850203bf8875c958c5d316ea48d8ba60d9b450199d39ae391"}, + {file = "Bottleneck-1.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a74ddd0417f42eeaba37375f0fc065b28451e0fba45cb2f99e88880b10b3fa43"}, + {file = "Bottleneck-1.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:070d22f2f62ab81297380a89492cca931e4d9443fa4b84c2baeb52db09c3b1b4"}, + {file = "Bottleneck-1.4.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1fc4e7645bd425c05e05acd5541e9e09cb4179e71164e862f082561bf4509eac"}, + {file = "Bottleneck-1.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:037315c56605128a39f77d19af6a6019dc8c21a63694a4bfef3c026ed963be2e"}, + {file = "Bottleneck-1.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:99778329331d5fae8df19772a019e8b73ba4d9d1650f110cd995ab7657114db0"}, + {file = "Bottleneck-1.4.2-cp312-cp312-win32.whl", hash = "sha256:7363b3c8ce6ca433779cd7e96bcb94c0e516dcacadff0011adcbf0b3ac86bc9d"}, + {file = "Bottleneck-1.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:48c6b9d9287c4102b803fcb01ae66ae7ef6b310b711b4b7b7e23bf952894dc05"}, + {file = "Bottleneck-1.4.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c1c885ad02a6a8fa1f7ee9099f29b9d4c03eb1da2c7ab25839482d5cce739021"}, + {file = "Bottleneck-1.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7a1b023de1de3d84b18826462718fba548fed41870df44354f9ab6a414ea82f"}, + {file = "Bottleneck-1.4.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c9dbaf737b605b30c81611f2c1d197c2fd2e46c33f605876c1d332d3360c4fc"}, + {file = "Bottleneck-1.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7ebbcbe5d4062e37507b9a81e2aacdb1fcccc6193f7feff124ef2b5a6a5eb740"}, + {file = "Bottleneck-1.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:964f6ac4118ddab3bbbac79d4f726b093459be751baba73ee0aa364666e8068e"}, + {file = "Bottleneck-1.4.2-cp313-cp313-win32.whl", hash = "sha256:2db287f6ecdbb1c998085eca9b717fec2bfc48a4ab6ae070a9820ba8ab59c90b"}, + {file = "Bottleneck-1.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:26b5f0531f7044befaad95c20365dd666372e66bdacbfaf009ff65d60285534d"}, + {file = "Bottleneck-1.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:72d6aa95cdd782833d2589f81434fd865ba004b8938e07920b6ef02796ce8918"}, + {file = "Bottleneck-1.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b33e83665e7daf7f513fe1f7b04b13944d44b6635c45d5a9c89c9e5ed11811b6"}, + {file = "Bottleneck-1.4.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52248f3e0fead78c17912fb086a585c86f567019247d21c69e87645241b97b02"}, + {file = "Bottleneck-1.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:dce1a3c5ff89a56fb2678c9bda17b89f60f710d6002ab7cd72b7661bc3fae64d"}, + {file = "Bottleneck-1.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:48d2e101d99a9d72aa86da1a048d2094f4e1db0cf77519d1c33239f9d62da162"}, + {file = "Bottleneck-1.4.2-cp39-cp39-win32.whl", hash = "sha256:9d7b12936516f944e3d981a64038f99acb21f0e99f92fad16d9a468248c2b231"}, + {file = "Bottleneck-1.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:7b459d08f1f3e2da85db0a9e2d3e6e3541105f5866e9026dbca32dafc5106f2b"}, + {file = "bottleneck-1.4.2.tar.gz", hash = "sha256:fa8e8e1799dea5483ce6669462660f9d9a95649f6f98a80d315b84ec89f449f4"}, +] + +[package.dependencies] +numpy = "*" + +[package.extras] +doc = ["gitpython", "numpydoc", "sphinx"] + [[package]] name = "build" version = "1.2.2.post1" @@ -349,6 +400,17 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} +[[package]] +name = "cloudpickle" +version = "3.1.0" +description = "Pickler class to extend the standard pickle.Pickler functionality" +optional = false +python-versions = ">=3.8" +files = [ + {file = "cloudpickle-3.1.0-py3-none-any.whl", hash = "sha256:fe11acda67f61aaaec473e3afe030feb131d78a43461b718185363384f1ba12e"}, + {file = "cloudpickle-3.1.0.tar.gz", hash = "sha256:81a929b6e3c7335c863c771d673d105f02efdb89dfaba0c90495d1c64796601b"}, +] + [[package]] name = "colorama" version = "0.4.6" @@ -444,6 +506,35 @@ tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.1 [package.extras] toml = ["tomli"] +[[package]] +name = "dask" +version = "2024.12.1" +description = "Parallel PyData with Task Scheduling" +optional = false +python-versions = ">=3.10" +files = [ + {file = "dask-2024.12.1-py3-none-any.whl", hash = "sha256:1f32acddf1a6994e3af6734756f0a92467c47050bc29f3555bb9b140420e8e19"}, + {file = "dask-2024.12.1.tar.gz", hash = "sha256:bac809af21c2dd7eb06827bccbfc612504f3ee6435580e548af912828f823195"}, +] + +[package.dependencies] +click = ">=8.1" +cloudpickle = ">=3.0.0" +fsspec = ">=2021.09.0" +importlib_metadata = {version = ">=4.13.0", markers = "python_version < \"3.12\""} +packaging = ">=20.0" +partd = ">=1.4.0" +pyyaml = ">=5.3.1" +toolz = ">=0.10.0" + +[package.extras] +array = ["numpy (>=1.24)"] +complete = ["dask[array,dataframe,diagnostics,distributed]", "lz4 (>=4.3.2)", "pyarrow (>=14.0.1)"] +dataframe = ["dask-expr (>=1.1,<1.2)", "dask[array]", "pandas (>=2.0)"] +diagnostics = ["bokeh (>=3.1.0)", "jinja2 (>=2.10.3)"] +distributed = ["distributed (==2024.12.1)"] +test = ["pandas[test]", "pre-commit", "pytest", "pytest-cov", "pytest-rerunfailures", "pytest-timeout", "pytest-xdist"] + [[package]] name = "debugpy" version = "1.8.2" @@ -497,6 +588,20 @@ files = [ {file = "deepmerge-1.1.1.tar.gz", hash = "sha256:53a489dc9449636e480a784359ae2aab3191748c920649551c8e378622f0eca4"}, ] +[[package]] +name = "deprecation" +version = "2.1.0" +description = "A library to handle automated deprecations" +optional = false +python-versions = "*" +files = [ + {file = "deprecation-2.1.0-py2.py3-none-any.whl", hash = "sha256:a10811591210e1fb0e768a8c25517cabeabcba6f0bf96564f8ff45189f90b14a"}, + {file = "deprecation-2.1.0.tar.gz", hash = "sha256:72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff"}, +] + +[package.dependencies] +packaging = "*" + [[package]] name = "distlib" version = "0.3.8" @@ -594,6 +699,45 @@ docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1 testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)", "virtualenv (>=20.26.2)"] typing = ["typing-extensions (>=4.8)"] +[[package]] +name = "fsspec" +version = "2024.12.0" +description = "File-system specification" +optional = false +python-versions = ">=3.8" +files = [ + {file = "fsspec-2024.12.0-py3-none-any.whl", hash = "sha256:b520aed47ad9804237ff878b504267a3b0b441e97508bd6d2d8774e3db85cee2"}, + {file = "fsspec-2024.12.0.tar.gz", hash = "sha256:670700c977ed2fb51e0d9f9253177ed20cbde4a3e5c0283cc5385b5870c8533f"}, +] + +[package.extras] +abfs = ["adlfs"] +adl = ["adlfs"] +arrow = ["pyarrow (>=1)"] +dask = ["dask", "distributed"] +dev = ["pre-commit", "ruff"] +doc = ["numpydoc", "sphinx", "sphinx-design", "sphinx-rtd-theme", "yarl"] +dropbox = ["dropbox", "dropboxdrivefs", "requests"] +full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] +fuse = ["fusepy"] +gcs = ["gcsfs"] +git = ["pygit2"] +github = ["requests"] +gs = ["gcsfs"] +gui = ["panel"] +hdfs = ["pyarrow (>=1)"] +http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)"] +libarchive = ["libarchive-c"] +oci = ["ocifs"] +s3 = ["s3fs"] +sftp = ["paramiko"] +smb = ["smbprotocol"] +ssh = ["paramiko"] +test = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "numpy", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "requests"] +test-downstream = ["aiobotocore (>=2.5.4,<3.0.0)", "dask-expr", "dask[dataframe,test]", "moto[server] (>4,<5)", "pytest-timeout", "xarray"] +test-full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "cloudpickle", "dask", "distributed", "dropbox", "dropboxdrivefs", "fastparquet", "fusepy", "gcsfs", "jinja2", "kerchunk", "libarchive-c", "lz4", "notebook", "numpy", "ocifs", "pandas", "panel", "paramiko", "pyarrow", "pyarrow (>=1)", "pyftpdlib", "pygit2", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "python-snappy", "requests", "smbprotocol", "tqdm", "urllib3", "zarr", "zstandard"] +tqdm = ["tqdm"] + [[package]] name = "greenlet" version = "3.0.3" @@ -691,6 +835,82 @@ files = [ hpack = ">=4.0,<5" hyperframe = ">=6.0,<7" +[[package]] +name = "highspy" +version = "1.9.0" +description = "A thin set of pybind11 wrappers to HiGHS" +optional = false +python-versions = ">=3.8" +files = [ + {file = "highspy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:acb2258986344460ed6737608b944e556fd8c0e472bdc9455e7d76548abab8e3"}, + {file = "highspy-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b51baeba8d349fff7b904e5e9917af9e7f250dc705e228be00d8294b5d4fa913"}, + {file = "highspy-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e37d4fd6a7a64f85da9123a8d8ea24964f3c79f5e8b98ba938b6d64df03f147"}, + {file = "highspy-1.9.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ce4e2b7f96be5ac744d25ba42046b79ab8b3db74843834a05d0fe2aa8748c7b"}, + {file = "highspy-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15f450c94fa017691892141cbd2db9abd8587a5b2f04d6dd538b9a67d05567a1"}, + {file = "highspy-1.9.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6e84042f7fbec722f73f7faa01d3a0a9c05a05776c1deedb3548d0747bb59938"}, + {file = "highspy-1.9.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:016f6aaa1bd49ff13ae8af9e1c7688c344480b693f1ef11ee4fbe178247f68d2"}, + {file = "highspy-1.9.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0e3770bf7d01f9eef489b8c33a74345b2fcf3c78047da695f9607ddee3ec5fc9"}, + {file = "highspy-1.9.0-cp310-cp310-win32.whl", hash = "sha256:14bf840d5fce70800c53ed0b2ef701d5363c53d2b65c736130ca8e83869d70d9"}, + {file = "highspy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:aef7264845a4784b7f42e6fe15fe09aa4250d68efc51737c47c94f6d444e3ba0"}, + {file = "highspy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:244b72ff31bd0cfb736893aecf1b324f9155bab020414ad89710319fb3cda17a"}, + {file = "highspy-1.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:830da7691d39b0ef3266bdcdc805f15a215f1b91fe01cb2bb39ca9fb25e2fcfc"}, + {file = "highspy-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79a15b420cfe45b53e0a7b8e2096bfb407ae763f338cd2a43ba6acd987266697"}, + {file = "highspy-1.9.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:86977e537c2152e998c7e5d62a0a333507a314dae374daebad1dc2cdc5616d5e"}, + {file = "highspy-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:664048c40ad4ee6b8b7aa279a46803a448dff6079940b85cc5fbcc2d9fde1cce"}, + {file = "highspy-1.9.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d2fbec2a5c7ff42ed1fb9f54c4c5141fcaa070ed5884b7f966fde45921fb16c3"}, + {file = "highspy-1.9.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:2b97e07c5921a14a40cca32fcc8477853cc9a6e909b2f0ef44fb94d2be6d4e8e"}, + {file = "highspy-1.9.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:43d1612e9091a2fe07bad2e24dea12f0e67bb77014c59281407cd72fd704de5b"}, + {file = "highspy-1.9.0-cp311-cp311-win32.whl", hash = "sha256:95662940d87c9f3894e8e78a405f8701af7326e28db38b524ea19119821c3b8c"}, + {file = "highspy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:18827d2e7e2d1b013b2c5eac0923646942700ff5683a93c23c383370861d424d"}, + {file = "highspy-1.9.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9509c4cdb70171a21c98fadbcd85e4f53d54b3106258a009486816153eb29847"}, + {file = "highspy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73e430ebe85f4b6fbbebd98ae53d47b12cebfd8cbee6fffd17760efc8780ce36"}, + {file = "highspy-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04ed0b41e9e2e1ad4c2ce7580562cd6b45cf872d63f3c5e21e36e3d399eb9b2b"}, + {file = "highspy-1.9.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:37dc773702bcbf155e70b822b652fc9b96b2e190c70d1402de8711a177e75690"}, + {file = "highspy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57d2748e1c08d6d293402e2fb4cb6d44bfd4114dce438ae536a8cf8ddabe0e90"}, + {file = "highspy-1.9.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e0809e15532688f0d16c4e27dcf4bb0a67b3d7a548373710176ff1c375b55ca5"}, + {file = "highspy-1.9.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:2a3bcc624804c661edeed982dccc667abc7dabd3298633e6e3b2e1dab733953f"}, + {file = "highspy-1.9.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:be067a7a775811ddd03929ce8ba71d3d8dbce079e74afda0eb8155ddf85c74f2"}, + {file = "highspy-1.9.0-cp312-cp312-win32.whl", hash = "sha256:840ad28b3a937c3129e6efe40d3ed86391a6005d5878f832eadde222cd4c1895"}, + {file = "highspy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fcf93ef8e8440b8d900c21c33e5fc8e2041e7d54bb680bc617c5a8d71c084454"}, + {file = "highspy-1.9.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9eea8125342c2049e6e81c808e1995e78aa0ba09e505d7d0d78b5997f8c9240d"}, + {file = "highspy-1.9.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:22580ac1fbce24bae9fbb906d1967d6c6798401a1f134dfc46a5f87c58791e47"}, + {file = "highspy-1.9.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22c8217c05f3df3bf9326aba777b2808d4da5757f156e4a20058d360e6a002a6"}, + {file = "highspy-1.9.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:adbf983e661b651d1c27c9a9e7d63e5c8a311986b05e3944777752060ea41b1f"}, + {file = "highspy-1.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1804f7d5fbf404ebab22033728582b745a793b3c9015285eb2ab8bac97438e61"}, + {file = "highspy-1.9.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0cbf60020769bc0b1af5da8efa65f9f50397d9d441079133f76ad962524ed20f"}, + {file = "highspy-1.9.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:45d47d7c5421db8075fbef930f3a3a7e4e86f14f21ed74b6e50facdb65c3ea87"}, + {file = "highspy-1.9.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4c0e8004bef64df1537286e5dac5fb2f3ddc152ef205d3e2e8786bcaced08e92"}, + {file = "highspy-1.9.0-cp313-cp313-win32.whl", hash = "sha256:a77eb1e06278ef23ed5778a3c4e9348c57d917d9197c7d2cf30acea151089b59"}, + {file = "highspy-1.9.0-cp313-cp313-win_amd64.whl", hash = "sha256:9151e47745a3605617b200f173af46bd1aee5ef06083a17e9781d806ee9ed1fd"}, + {file = "highspy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:48ab910e7f5e200d0394679fc571efc74347e47de6a4710caa3a24b69ea652fd"}, + {file = "highspy-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:dd3da283550b75998a553f9bf639bf7580ec161afef840adf294c24d18a33d62"}, + {file = "highspy-1.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50e7a24be43126ef715fdd6ba03b1140186452f124c6c6597dafc9063220110a"}, + {file = "highspy-1.9.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdf5c320cc51912e8d92614de2d2e7df73f541dc82acd341bd4db8220dd54835"}, + {file = "highspy-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f64da580fa16dd9e21410ef5fb3e582dec4a84191396a2c3bdc4d8e4b73b403c"}, + {file = "highspy-1.9.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ba6f5a769868b17bfb6713fed4ec2a5edb534b96c8b0f5d95e2ff702bb55c540"}, + {file = "highspy-1.9.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:68bfa11f62a8c57cc56529cfc2bef51f10221b787360e096005912a90dc1cc83"}, + {file = "highspy-1.9.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c7b9381d2d63a637490389076f26df584b8f8e7835444eb36987818e32fed12b"}, + {file = "highspy-1.9.0-cp38-cp38-win32.whl", hash = "sha256:e86288464dbe7f7fd0d2e20e63c9923b27d021c253f467bf2161955db3de775e"}, + {file = "highspy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:4e965a51c0d950c1b4ecd621b7165df4841980d44e04cb61fc05093c1324f3eb"}, + {file = "highspy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4eadec66a5931e98414481aac8c56d3c900674d9434d3619e4c57803ea56c16f"}, + {file = "highspy-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f89ce39d4883322c5f10081bd9815413a64ddf6ce0b23523df5b483707b1acda"}, + {file = "highspy-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fbe7b71dd19355a66d0599d92ee35dabc0bbd2833f4a2abfe87bde919fc36b7"}, + {file = "highspy-1.9.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4781ce7bc53aa53f9e220ce7822bd020f0bf8736bac664ecddb7c2775690adc0"}, + {file = "highspy-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bcb38ed98d22cec0cd77d6beec173aa14eeda9d481da3b9773abecf74deab2a4"}, + {file = "highspy-1.9.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ed0fd4c1d530685fb3ee451f60a7631388fd3488bdf8c582349a56ecc7a338fa"}, + {file = "highspy-1.9.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:726d88cfec77ceeb2036af4c296a8831593f3cb472b929bec28d4b24170f1c0f"}, + {file = "highspy-1.9.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:34f2490d4185c469511f157ae8319479e5e7b70d81951938456ada36f267bb6f"}, + {file = "highspy-1.9.0-cp39-cp39-win32.whl", hash = "sha256:15ae4f987f95ebe254349f8c97cb62b8b44e24c191dcc53d250f0d9f10b8bfe3"}, + {file = "highspy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:5d2d8851a69f65cc4ff5a12d305f76e404b9218b5c12496dc833e7446b465837"}, + {file = "highspy-1.9.0.tar.gz", hash = "sha256:d9765753991c7a4d9bc8815a75fc4df6f5c58b50117e391e2c494cdf0eb1ed13"}, +] + +[package.dependencies] +numpy = "*" + +[package.extras] +test = ["numpy", "pytest"] + [[package]] name = "hpack" version = "4.0.0" @@ -1075,6 +1295,73 @@ files = [ {file = "latexcodec-3.0.0.tar.gz", hash = "sha256:917dc5fe242762cc19d963e6548b42d63a118028cdd3361d62397e3b638b6bc5"}, ] +[[package]] +name = "linopy" +version = "0.3.11" +description = "Linear optimization with N-D labeled arrays in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "linopy-0.3.11-py3-none-any.whl", hash = "sha256:6934d8e0772c6d118e63d5a79b718b87d8614bf8983af3866121a736d84b596b"}, + {file = "linopy-0.3.11.tar.gz", hash = "sha256:9d09fa31ca06ceae817bdf93191e6635c11fd4538c3b95f2b126423a4f3e7e13"}, +] + +[package.dependencies] +bottleneck = "*" +dask = ">=0.18.0" +deprecation = "*" +numexpr = "*" +numpy = "*" +polars = "*" +scipy = "*" +toolz = "*" +tqdm = "*" +xarray = ">=2023.9.0" + +[package.extras] +dev = ["gurobipy", "highspy", "netcdf4", "paramiko", "pre-commit", "pytest", "pytest-cov"] +docs = ["gurobipy", "ipykernel", "ipython", "matplotlib", "nbsphinx", "nbsphinx-link", "numpydoc", "sphinx", "sphinx-book-theme", "sphinx-rtd-theme"] +solvers = ["coptpy", "cplex", "gurobipy", "highspy (>=1.5.0)", "highspy (>=1.7.1)", "mindoptpy", "mosek", "pyscipopt", "xpress"] + +[[package]] +name = "linopy" +version = "0.4.4" +description = "Linear optimization with N-D labeled arrays in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "linopy-0.4.4-py3-none-any.whl", hash = "sha256:9f1a37a2d373b6e812e4b2150dfabff6acc0e9ae335606e6654e8b0a6a68b91e"}, + {file = "linopy-0.4.4.tar.gz", hash = "sha256:9909cc63e8e849a7116f76f2818f7f07924e74c266c73a5d035ff478b3ba6801"}, +] + +[package.dependencies] +bottleneck = "*" +dask = ">=0.18.0" +deprecation = "*" +numexpr = "*" +numpy = "<2.0" +polars = "*" +scipy = "*" +toolz = "*" +tqdm = "*" +xarray = ">=2024.2.0" + +[package.extras] +dev = ["gurobipy", "highspy", "mypy", "netcdf4", "paramiko", "pre-commit", "pytest", "pytest-cov", "types-paramiko"] +docs = ["gurobipy (==11.0.2)", "ipykernel (==6.29.5)", "ipython (==8.26.0)", "matplotlib (==3.9.1)", "nbsphinx (==0.9.4)", "nbsphinx-link (==1.3.0)", "numpydoc (==1.7.0)", "sphinx (==7.3.7)", "sphinx_book_theme (==1.1.3)", "sphinx_rtd_theme (==2.0.0)"] +solvers = ["coptpy (!=7.2.1)", "cplex", "gurobipy", "highspy (>=1.5.0)", "highspy (>=1.7.1)", "mindoptpy", "mosek", "pyscipopt", "xpress"] + +[[package]] +name = "locket" +version = "1.0.0" +description = "File-based locks for Python on Linux and Windows" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "locket-1.0.0-py2.py3-none-any.whl", hash = "sha256:b6c819a722f7b6bd955b80781788e4a66a55628b858d347536b7e81325a3a5e3"}, + {file = "locket-1.0.0.tar.gz", hash = "sha256:5c0d4c052a8bbbf750e056a8e65ccd309086f4f0f18a2eac306a8dfa4112a632"}, +] + [[package]] name = "mako" version = "1.3.5" @@ -1320,6 +1607,99 @@ files = [ {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, ] +[[package]] +name = "numexpr" +version = "2.10.2" +description = "Fast numerical expression evaluator for NumPy" +optional = false +python-versions = ">=3.9" +files = [ + {file = "numexpr-2.10.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5b0e82d2109c1d9e63fcd5ea177d80a11b881157ab61178ddbdebd4c561ea46"}, + {file = "numexpr-2.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3fc2b8035a0c2cdc352e58c3875cb668836018065cbf5752cb531015d9a568d8"}, + {file = "numexpr-2.10.2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0db5ff5183935d1612653559c319922143e8fa3019007696571b13135f216458"}, + {file = "numexpr-2.10.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15f59655458056fdb3a621b1bb8e071581ccf7e823916c7568bb7c9a3e393025"}, + {file = "numexpr-2.10.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ce8cccf944339051e44a49a124a06287fe3066d0acbff33d1aa5aee10a96abb7"}, + {file = "numexpr-2.10.2-cp310-cp310-win32.whl", hash = "sha256:ba85371c9a8d03e115f4dfb6d25dfbce05387002b9bc85016af939a1da9624f0"}, + {file = "numexpr-2.10.2-cp310-cp310-win_amd64.whl", hash = "sha256:deb64235af9eeba59fcefa67e82fa80cfc0662e1b0aa373b7118a28da124d51d"}, + {file = "numexpr-2.10.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6b360eb8d392483410fe6a3d5a7144afa298c9a0aa3e9fe193e89590b47dd477"}, + {file = "numexpr-2.10.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d9a42f5c24880350d88933c4efee91b857c378aaea7e8b86221fff569069841e"}, + {file = "numexpr-2.10.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:83fcb11988b57cc25b028a36d285287d706d1f536ebf2662ea30bd990e0de8b9"}, + {file = "numexpr-2.10.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4213a92efa9770bc28e3792134e27c7e5c7e97068bdfb8ba395baebbd12f991b"}, + {file = "numexpr-2.10.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebdbef5763ca057eea0c2b5698e4439d084a0505d9d6e94f4804f26e8890c45e"}, + {file = "numexpr-2.10.2-cp311-cp311-win32.whl", hash = "sha256:3bf01ec502d89944e49e9c1b5cc7c7085be8ca2eb9dd46a0eafd218afbdbd5f5"}, + {file = "numexpr-2.10.2-cp311-cp311-win_amd64.whl", hash = "sha256:e2d0ae24b0728e4bc3f1d3f33310340d67321d36d6043f7ce26897f4f1042db0"}, + {file = "numexpr-2.10.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b5323a46e75832334f1af86da1ef6ff0add00fbacdd266250be872b438bdf2be"}, + {file = "numexpr-2.10.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a42963bd4c62d8afa4f51e7974debfa39a048383f653544ab54f50a2f7ec6c42"}, + {file = "numexpr-2.10.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5191ba8f2975cb9703afc04ae845a929e193498c0e8bcd408ecb147b35978470"}, + {file = "numexpr-2.10.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:97298b14f0105a794bea06fd9fbc5c423bd3ff4d88cbc618860b83eb7a436ad6"}, + {file = "numexpr-2.10.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f9d7805ccb6be2d3b0f7f6fad3707a09ac537811e8e9964f4074d28cb35543db"}, + {file = "numexpr-2.10.2-cp312-cp312-win32.whl", hash = "sha256:cb845b2d4f9f8ef0eb1c9884f2b64780a85d3b5ae4eeb26ae2b0019f489cd35e"}, + {file = "numexpr-2.10.2-cp312-cp312-win_amd64.whl", hash = "sha256:57b59cbb5dcce4edf09cd6ce0b57ff60312479930099ca8d944c2fac896a1ead"}, + {file = "numexpr-2.10.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a37d6a51ec328c561b2ca8a2bef07025642eca995b8553a5267d0018c732976d"}, + {file = "numexpr-2.10.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:81d1dde7dd6166d8ff5727bb46ab42a6b0048db0e97ceb84a121334a404a800f"}, + {file = "numexpr-2.10.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5b3f814437d5a10797f8d89d2037cca2c9d9fa578520fc911f894edafed6ea3e"}, + {file = "numexpr-2.10.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9309f2e43fe6e4560699ef5c27d7a848b3ff38549b6b57194207cf0e88900527"}, + {file = "numexpr-2.10.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ebb73b93f5c4d6994f357fa5a47a9f7a5485577e633b3c46a603cb01445bbb19"}, + {file = "numexpr-2.10.2-cp313-cp313-win32.whl", hash = "sha256:ec04c9a3c050c175348801e27c18c68d28673b7bfb865ef88ce333be523bbc01"}, + {file = "numexpr-2.10.2-cp313-cp313-win_amd64.whl", hash = "sha256:d7a3fc83c959288544db3adc70612475d8ad53a66c69198105c74036182d10dd"}, + {file = "numexpr-2.10.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0495f8111c3633e265248709b8b3b521bbfa646ba384909edd10e2b9a588a83a"}, + {file = "numexpr-2.10.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2aa05ac71bee3b1253e73173c4d7fa96a09a18970c0226f1c2c07a71ffe988dc"}, + {file = "numexpr-2.10.2-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3a23c3002ab330056fbdd2785871937a6f2f2fa85d06c8d0ff74ea8418119d1"}, + {file = "numexpr-2.10.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a018a7d81326f4c73d8b5aee61794d7d8514512f43957c0db61eb2a8a86848c7"}, + {file = "numexpr-2.10.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:037859b17a0abe2b489d4c2cfdadd2bf458ec80dd83f338ea5544c7987e06b85"}, + {file = "numexpr-2.10.2-cp39-cp39-win32.whl", hash = "sha256:eb278ccda6f893a312aa0452701bb17d098b7b14eb7c9381517d509cce0a39a3"}, + {file = "numexpr-2.10.2-cp39-cp39-win_amd64.whl", hash = "sha256:734b64c6d6a597601ce9d0ef7b666e678ec015b446f1d1412c23903c021436c3"}, + {file = "numexpr-2.10.2.tar.gz", hash = "sha256:b0aff6b48ebc99d2f54f27b5f73a58cb92fde650aeff1b397c71c8788b4fff1a"}, +] + +[package.dependencies] +numpy = ">=1.23.0" + +[[package]] +name = "numpy" +version = "1.26.4" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"}, + {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"}, + {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4"}, + {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f"}, + {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a"}, + {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2"}, + {file = "numpy-1.26.4-cp310-cp310-win32.whl", hash = "sha256:bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07"}, + {file = "numpy-1.26.4-cp310-cp310-win_amd64.whl", hash = "sha256:b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5"}, + {file = "numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71"}, + {file = "numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef"}, + {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e"}, + {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5"}, + {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a"}, + {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a"}, + {file = "numpy-1.26.4-cp311-cp311-win32.whl", hash = "sha256:1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20"}, + {file = "numpy-1.26.4-cp311-cp311-win_amd64.whl", hash = "sha256:cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2"}, + {file = "numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218"}, + {file = "numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b"}, + {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b"}, + {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed"}, + {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a"}, + {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0"}, + {file = "numpy-1.26.4-cp312-cp312-win32.whl", hash = "sha256:50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110"}, + {file = "numpy-1.26.4-cp312-cp312-win_amd64.whl", hash = "sha256:08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818"}, + {file = "numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c"}, + {file = "numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be"}, + {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764"}, + {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3"}, + {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd"}, + {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c"}, + {file = "numpy-1.26.4-cp39-cp39-win32.whl", hash = "sha256:a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6"}, + {file = "numpy-1.26.4-cp39-cp39-win_amd64.whl", hash = "sha256:3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0"}, + {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"}, +] + [[package]] name = "numpy" version = "2.0.0" @@ -1554,6 +1934,24 @@ files = [ qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] testing = ["docopt", "pytest"] +[[package]] +name = "partd" +version = "1.4.2" +description = "Appendable key-value storage" +optional = false +python-versions = ">=3.9" +files = [ + {file = "partd-1.4.2-py3-none-any.whl", hash = "sha256:978e4ac767ec4ba5b86c6eaa52e5a2a3bc748a2ca839e8cc798f1cc6ce6efb0f"}, + {file = "partd-1.4.2.tar.gz", hash = "sha256:d022c33afbdc8405c226621b015e8067888173d85f7f5ecebb3cafed9a20f02c"}, +] + +[package.dependencies] +locket = "*" +toolz = "*" + +[package.extras] +complete = ["blosc", "numpy (>=1.20.0)", "pandas (>=1.3)", "pyzmq"] + [[package]] name = "pexpect" version = "4.9.0" @@ -1610,6 +2008,48 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "polars" +version = "1.19.0" +description = "Blazingly fast DataFrame library" +optional = false +python-versions = ">=3.9" +files = [ + {file = "polars-1.19.0-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:51c01837268a1aa41785e60ed7d3363d4b52f652ab0eef4981f887bdfa2e9ca7"}, + {file = "polars-1.19.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:20f8235e810f6ee795d7a215a3560945e6a1b57d017f87ba0c8542dced1fc665"}, + {file = "polars-1.19.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be0ea51f7b3553652bf0d53f3b925e969a898d4feb9980acecf8e3037d696903"}, + {file = "polars-1.19.0-cp39-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:30305ef4e1b634c67a5d985832296fade9908482c5b1abb0100800808b2d090e"}, + {file = "polars-1.19.0-cp39-abi3-win_amd64.whl", hash = "sha256:de4aa45e24f8f94a1da9cc6031a7db6fa65ac7de8246fac0bc581ebb427d0643"}, + {file = "polars-1.19.0-cp39-abi3-win_arm64.whl", hash = "sha256:d7ca7aeb63fa22c0a00f6cfa95dd5252c249e83dd4d1b954583a59f97a8e407b"}, + {file = "polars-1.19.0.tar.gz", hash = "sha256:b52ada5c43fcdadf64f282522198c5549ee4e46ea57d236a4d7e572643070d9d"}, +] + +[package.extras] +adbc = ["adbc-driver-manager[dbapi]", "adbc-driver-sqlite[dbapi]"] +all = ["polars[async,cloudpickle,database,deltalake,excel,fsspec,graph,iceberg,numpy,pandas,plot,pyarrow,pydantic,style,timezone]"] +async = ["gevent"] +calamine = ["fastexcel (>=0.9)"] +cloudpickle = ["cloudpickle"] +connectorx = ["connectorx (>=0.3.2)"] +database = ["nest-asyncio", "polars[adbc,connectorx,sqlalchemy]"] +deltalake = ["deltalake (>=0.19.0)"] +excel = ["polars[calamine,openpyxl,xlsx2csv,xlsxwriter]"] +fsspec = ["fsspec"] +gpu = ["cudf-polars-cu12"] +graph = ["matplotlib"] +iceberg = ["pyiceberg (>=0.5.0)"] +numpy = ["numpy (>=1.16.0)"] +openpyxl = ["openpyxl (>=3.0.0)"] +pandas = ["pandas", "polars[pyarrow]"] +plot = ["altair (>=5.4.0)"] +pyarrow = ["pyarrow (>=7.0.0)"] +pydantic = ["pydantic"] +sqlalchemy = ["polars[pandas]", "sqlalchemy"] +style = ["great-tables (>=0.8.0)"] +timezone = ["tzdata"] +xlsx2csv = ["xlsx2csv (>=0.8.0)"] +xlsxwriter = ["xlsxwriter"] + [[package]] name = "pre-commit" version = "3.7.1" @@ -2539,6 +2979,63 @@ files = [ {file = "ruff-0.5.0.tar.gz", hash = "sha256:eb641b5873492cf9bd45bc9c5ae5320648218e04386a5f0c264ad6ccce8226a1"}, ] +[[package]] +name = "scipy" +version = "1.15.0" +description = "Fundamental algorithms for scientific computing in Python" +optional = false +python-versions = ">=3.10" +files = [ + {file = "scipy-1.15.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:aeac60d3562a7bf2f35549bdfdb6b1751c50590f55ce7322b4b2fc821dc27fca"}, + {file = "scipy-1.15.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:5abbdc6ede5c5fed7910cf406a948e2c0869231c0db091593a6b2fa78be77e5d"}, + {file = "scipy-1.15.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:eb1533c59f0ec6c55871206f15a5c72d1fae7ad3c0a8ca33ca88f7c309bbbf8c"}, + {file = "scipy-1.15.0-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:de112c2dae53107cfeaf65101419662ac0a54e9a088c17958b51c95dac5de56d"}, + {file = "scipy-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2240e1fd0782e62e1aacdc7234212ee271d810f67e9cd3b8d521003a82603ef8"}, + {file = "scipy-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d35aef233b098e4de88b1eac29f0df378278e7e250a915766786b773309137c4"}, + {file = "scipy-1.15.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1b29e4fc02e155a5fd1165f1e6a73edfdd110470736b0f48bcbe48083f0eee37"}, + {file = "scipy-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:0e5b34f8894f9904cc578008d1a9467829c1817e9f9cb45e6d6eeb61d2ab7731"}, + {file = "scipy-1.15.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:46e91b5b16909ff79224b56e19cbad65ca500b3afda69225820aa3afbf9ec020"}, + {file = "scipy-1.15.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:82bff2eb01ccf7cea8b6ee5274c2dbeadfdac97919da308ee6d8e5bcbe846443"}, + {file = "scipy-1.15.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:9c8254fe21dd2c6c8f7757035ec0c31daecf3bb3cffd93bc1ca661b731d28136"}, + {file = "scipy-1.15.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:c9624eeae79b18cab1a31944b5ef87aa14b125d6ab69b71db22f0dbd962caf1e"}, + {file = "scipy-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d13bbc0658c11f3d19df4138336e4bce2c4fbd78c2755be4bf7b8e235481557f"}, + {file = "scipy-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdca4c7bb8dc41307e5f39e9e5d19c707d8e20a29845e7533b3bb20a9d4ccba0"}, + {file = "scipy-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6f376d7c767731477bac25a85d0118efdc94a572c6b60decb1ee48bf2391a73b"}, + {file = "scipy-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:61513b989ee8d5218fbeb178b2d51534ecaddba050db949ae99eeb3d12f6825d"}, + {file = "scipy-1.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5beb0a2200372b7416ec73fdae94fe81a6e85e44eb49c35a11ac356d2b8eccc6"}, + {file = "scipy-1.15.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:fde0f3104dfa1dfbc1f230f65506532d0558d43188789eaf68f97e106249a913"}, + {file = "scipy-1.15.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:35c68f7044b4e7ad73a3e68e513dda946989e523df9b062bd3cf401a1a882192"}, + {file = "scipy-1.15.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:52475011be29dfcbecc3dfe3060e471ac5155d72e9233e8d5616b84e2b542054"}, + {file = "scipy-1.15.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5972e3f96f7dda4fd3bb85906a17338e65eaddfe47f750e240f22b331c08858e"}, + {file = "scipy-1.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe00169cf875bed0b3c40e4da45b57037dc21d7c7bf0c85ed75f210c281488f1"}, + {file = "scipy-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:161f80a98047c219c257bf5ce1777c574bde36b9d962a46b20d0d7e531f86863"}, + {file = "scipy-1.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:327163ad73e54541a675240708244644294cb0a65cca420c9c79baeb9648e479"}, + {file = "scipy-1.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0fcb16eb04d84670722ce8d93b05257df471704c913cb0ff9dc5a1c31d1e9422"}, + {file = "scipy-1.15.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:767e8cf6562931f8312f4faa7ddea412cb783d8df49e62c44d00d89f41f9bbe8"}, + {file = "scipy-1.15.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:37ce9394cdcd7c5f437583fc6ef91bd290014993900643fdfc7af9b052d1613b"}, + {file = "scipy-1.15.0-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:6d26f17c64abd6c6c2dfb39920f61518cc9e213d034b45b2380e32ba78fde4c0"}, + {file = "scipy-1.15.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e2448acd79c6374583581a1ded32ac71a00c2b9c62dfa87a40e1dd2520be111"}, + {file = "scipy-1.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36be480e512d38db67f377add5b759fb117edd987f4791cdf58e59b26962bee4"}, + {file = "scipy-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ccb6248a9987193fe74363a2d73b93bc2c546e0728bd786050b7aef6e17db03c"}, + {file = "scipy-1.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:952d2e9eaa787f0a9e95b6e85da3654791b57a156c3e6609e65cc5176ccfe6f2"}, + {file = "scipy-1.15.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:b1432102254b6dc7766d081fa92df87832ac25ff0b3d3a940f37276e63eb74ff"}, + {file = "scipy-1.15.0-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:4e08c6a36f46abaedf765dd2dfcd3698fa4bd7e311a9abb2d80e33d9b2d72c34"}, + {file = "scipy-1.15.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:ec915cd26d76f6fc7ae8522f74f5b2accf39546f341c771bb2297f3871934a52"}, + {file = "scipy-1.15.0-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:351899dd2a801edd3691622172bc8ea01064b1cada794f8641b89a7dc5418db6"}, + {file = "scipy-1.15.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9baff912ea4f78a543d183ed6f5b3bea9784509b948227daaf6f10727a0e2e5"}, + {file = "scipy-1.15.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cd9d9198a7fd9a77f0eb5105ea9734df26f41faeb2a88a0e62e5245506f7b6df"}, + {file = "scipy-1.15.0-cp313-cp313t-win_amd64.whl", hash = "sha256:129f899ed275c0515d553b8d31696924e2ca87d1972421e46c376b9eb87de3d2"}, + {file = "scipy-1.15.0.tar.gz", hash = "sha256:300742e2cc94e36a2880ebe464a1c8b4352a7b0f3e36ec3d2ac006cdbe0219ac"}, +] + +[package.dependencies] +numpy = ">=1.23.5,<2.5" + +[package.extras] +dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodestyle", "pydevtool", "rich-click", "ruff (>=0.0.292)", "types-psutil", "typing_extensions"] +doc = ["intersphinx_registry", "jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.16.5)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<8.0.0)", "sphinx-copybutton", "sphinx-design (>=0.4.0)"] +test = ["Cython", "array-api-strict (>=2.0,<2.1.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] + [[package]] name = "setuptools" version = "70.1.1" @@ -3034,6 +3531,17 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] +[[package]] +name = "toolz" +version = "1.0.0" +description = "List processing tools and functional utilities" +optional = false +python-versions = ">=3.8" +files = [ + {file = "toolz-1.0.0-py3-none-any.whl", hash = "sha256:292c8f1c4e7516bf9086f8850935c799a874039c8bcf959d47b600e4c44a6236"}, + {file = "toolz-1.0.0.tar.gz", hash = "sha256:2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02"}, +] + [[package]] name = "tornado" version = "6.4.1" @@ -3054,6 +3562,27 @@ files = [ {file = "tornado-6.4.1.tar.gz", hash = "sha256:92d3ab53183d8c50f8204a51e6f91d18a15d5ef261e84d452800d4ff6fc504e9"}, ] +[[package]] +name = "tqdm" +version = "4.67.1" +description = "Fast, Extensible Progress Meter" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2"}, + {file = "tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +dev = ["nbval", "pytest (>=6)", "pytest-asyncio (>=0.24)", "pytest-cov", "pytest-timeout"] +discord = ["requests"] +notebook = ["ipywidgets (>=6)"] +slack = ["slack-sdk"] +telegram = ["requests"] + [[package]] name = "traitlets" version = "5.14.3" @@ -3543,6 +4072,31 @@ files = [ {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, ] +[[package]] +name = "xarray" +version = "2025.1.1" +description = "N-D labeled arrays and datasets in Python" +optional = false +python-versions = ">=3.10" +files = [ + {file = "xarray-2025.1.1-py3-none-any.whl", hash = "sha256:8a69d17c1e4ad09664fd0bc2dbb398e7368eda25bd19456fb919a6eb6490fb72"}, + {file = "xarray-2025.1.1.tar.gz", hash = "sha256:1a3011d00ca92a94ba31b297c2eccd310b87a7dacf5acc8d0468385d4a834342"}, +] + +[package.dependencies] +numpy = ">=1.24" +packaging = ">=23.2" +pandas = ">=2.1" + +[package.extras] +accel = ["bottleneck", "flox", "numba (>=0.54)", "numbagg", "opt_einsum", "scipy"] +complete = ["xarray[accel,etc,io,parallel,viz]"] +dev = ["hypothesis", "jinja2", "mypy", "pre-commit", "pytest", "pytest-cov", "pytest-env", "pytest-timeout", "pytest-xdist", "ruff (>=0.8.0)", "sphinx", "sphinx_autosummary_accessors", "xarray[complete]"] +etc = ["sparse"] +io = ["cftime", "fsspec", "h5netcdf", "netCDF4", "pooch", "pydap", "scipy", "zarr"] +parallel = ["dask[complete]"] +viz = ["cartopy", "matplotlib", "nc-time-axis", "seaborn"] + [[package]] name = "zipp" version = "3.19.2" @@ -3561,4 +4115,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.10, <3.14" -content-hash = "87c22be1bda398513036f2bcf4e3d9defcbbcfde34b601a8d9cf0a2d03516610" +content-hash = "29d6879b679f2916369ca7a2f9cb286f5ed2f98fb80cf8339a86f9e912148105" diff --git a/pyproject.toml b/pyproject.toml index 6d729319..e8fb8bdf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,9 @@ types-toml = ">=0.10.8.7" optional = true [tool.poetry.group.tutorial.dependencies] +highspy = ">=1.7.2" ipykernel = ">=6.27.1" +linopy = ">=0.3.10" [tool.poetry.scripts] ixmp4 = "ixmp4.__main__:app" From f2084074457c6abdc45e27cc22d06bdd63329851 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 10 Jan 2025 11:45:41 +0100 Subject: [PATCH 26/36] Clean up based on current API/mypy config --- .../0_transport-tutorial_platform-setup.ipynb | 49 +++++------- tutorial/transport/1_transport-tutorial.ipynb | 77 +++++++------------ .../2_transport-tutorial_variant.ipynb | 47 ++++++++--- tutorial/transport/dantzig_model_linopy.py | 28 ++++--- 4 files changed, 100 insertions(+), 101 deletions(-) diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb index 6d97e2ec..2f98c375 100644 --- a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -7,7 +7,7 @@ "source": [ "### Transport Tutorial - Notebook 0 \n", "\n", - "# Set up an ixmp4 platform to solve *Dantzig's Transport Problem*\n", + "# Set up an **ixmp4** platform to solve *Dantzig's Transport Problem*\n", "\n", "\n", "\n", @@ -26,7 +26,7 @@ "\n", "## Tutorial outline\n", "\n", - "This tutorial consists of three Jupyter notebooks\n", + "This tutorial consists of three Jupyter notebooks:\n", "\n", "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", "1. Implement the **baseline version of the transport problem** and solve it\n", @@ -45,7 +45,7 @@ "\n", "
\n", "\n", - "You only need to run this notebook when you work through the the transport tutorial for the first time
\n", + "You only need to run this notebook when you work through the transport tutorial for the first time
\n", "(or when you decided to delete the local database)!\n", "\n", "
\n", @@ -54,7 +54,7 @@ "```\n", "ixmp4 platforms add transport-tutorial\n", "```\n", - "The prompt will ask whether you want to create a local database instance.\n", + "The prompt will ask whether you really want to create a local database instance, answer `yes` or `y`.\n", "\n", "\n", "You can then check if the database was successfully created by running:\n", @@ -68,16 +68,6 @@ "After creating the database, you can connect to it via an **ixmp4.Platform** instance." ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "c227a90c-ce5c-4d07-9bb6-53dfee00880b", - "metadata": {}, - "outputs": [], - "source": [ - "import ixmp4" - ] - }, { "cell_type": "code", "execution_count": null, @@ -85,6 +75,8 @@ "metadata": {}, "outputs": [], "source": [ + "import ixmp4\n", + "\n", "platform = ixmp4.Platform(\"transport-tutorial\")" ] }, @@ -93,9 +85,9 @@ "id": "b6209e20-9979-4f3b-b6b7-fe37a1c09366", "metadata": {}, "source": [ - "## Defining units in the database backend\n", + "## Defining `Unit`s in the database backend\n", "\n", - "The **ixmp4** package requires that **units** are defined explicitly before adding that data.\n", + "The **ixmp4** package requires that `Unit`s are defined explicitly before adding data using them.\n", "\n", "The transport tutorial uses the units \"cases\", \"km\" and \"USD/km\"." ] @@ -116,7 +108,7 @@ "id": "85c380fb-b29c-4f26-b70d-9d3cdaa42a99", "metadata": {}, "source": [ - "You can get a list of all units defined in the **ixmp4.Platform** using the `tabulate()` method." + "You can get a list of all `Unit`s defined in the **ixmp4.Platform** using the `tabulate()` method." ] }, { @@ -136,7 +128,7 @@ "source": [ "
\n", "\n", - "Defining a unit again (i.e., already defined in the database) will raise an error!\n", + "Defining a `Unit` again (i.e., creating one that is already defined in the database) will raise an error!\n", "\n", "
" ] @@ -146,9 +138,9 @@ "id": "1e7f631c-67d5-4170-858d-c96636c5e765", "metadata": {}, "source": [ - "One reason for defining units explicitly is so that we can assign doc-strings to the unit.\n", + "One reason for defining `Unit`s explicitly is so that we can assign doc-strings to them.\n", "\n", - "First, we get a specific **ixmp4.Unit** from the platform. Then, we add a docstring. Third, we illustrate how to retrieve the docstring. " + "First, we get a specific `ixmp4.Unit` from the platform. Then, we add a docstring. Third, we illustrate how to retrieve the docstring. " ] }, { @@ -191,21 +183,20 @@ "\n", "You can use the **ixmp4** Command Line Interface (CLI) to remove the database related to this tutorial.\n", "\n", + "
\n", + "\n", + "You still need this database in order to run Notebook 1 and Notebook 2, so don't do this right away!\n", + "\n", + "
\n", + "\n", "Run the following in the command-line:\n", "```\n", "ixmp4 platforms delete transport-tutorial\n", "```\n", "\n", - "The prompt will ask whether you also want to delete the SQLite database file from your computer." + "The prompt will ask whether you also want to delete the SQLite database file from your computer, \n", + "answer `y` for a complete deletion." ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f01de27f-a27e-400b-bca9-3c2a0d59d9cf", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index b672607e..3a83d6b3 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -6,7 +6,7 @@ "source": [ "### Transport Tutorial - Notebook 1\n", "\n", - "# Solve Dantzig's Transport Problem using ixmp4 and linopy\n", + "# Solve *Dantzig's Transport Problem* using **ixmp4** and **linopy**\n", "\n", "\n", "\n", @@ -25,7 +25,7 @@ "\n", "## Tutorial outline\n", "\n", - "This tutorial consists of three Jupyter notebooks\n", + "This tutorial consists of three Jupyter notebooks:\n", "\n", "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", "1. Implement the **baseline version of the transport problem** and solve it\n", @@ -38,7 +38,7 @@ "source": [ "
\n", "\n", - "This notebook requires that you set up a database and defined the units as shown in **Notebook 0**.\n", + "This notebook requires that you set up a database and defined the units as shown in [**Notebook 0**](0_transport-tutorial_platform-setup.ipynb).\n", "\n", "
" ] @@ -52,26 +52,9 @@ "A `Platform` is the connection to the database that holds all data and relevant additional information.\n", "\n", "A `Run` is an object that holds all relevant information for one quantification of a scenario. \n", - "A run is identified by a model name, a scenario name and a version number (assigned automatically)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "You have to *register a new local database* before you can run the tutorial. \n", - "\n", - "Run the following in the command-line:\n", - "```\n", - "ixmp4 platforms add tutorial-test\n", - "```\n", + "A `Run` is identified by a model name, a scenario name and a version number (assigned automatically).\n", "\n", - "You can then check if the database was successfully created by running\n", - "```\n", - "ixmp4 platforms list\n", - "```\n", - "\n", - "After creating the database, you can connect to it via an `ixmp4.Platform` instance." + "As the first step, connect to the local database created in [Notebook 0](0_transport-tutorial_platform-setup.ipynb)." ] }, { @@ -107,9 +90,9 @@ "source": [ "## Defining the `IndexSet`s\n", "\n", - "An `IndexSet` defines a list of elements with a name. These `IndexSet`s can be used for \"indexed assignment\" of parameters, variables and equations. \n", - "The entries of these parameters, etc. are then validated against the elements of the linked `IndexSet`(s). \n", - "In database terms, a column of a parameter can be \"foreign-keyed\" onto an `IndexSet`.\n", + "An `IndexSet` defines a list of elements with a name. These `IndexSet`s can be used for \"indexed assignment\" of `Parameter`s, `Variable`s and `Equation`s. \n", + "The entries of these `Parameter`s, etc. are then validated against the elements of the linked `IndexSet`(s). \n", + "In database terms, a column of a `Parameter` is \"foreign-keyed\" onto an `IndexSet`.\n", "\n", "Below, we first show the data as they would be written in the GAMS tutorial ([transport.gms](transport.gms) in this folder). " ] @@ -127,7 +110,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We now initialize these sets and assign the elements." + "We now initialize these sets and add the data." ] }, { @@ -144,7 +127,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can display the elements of any `IndexSet` as a Python list:" + "We can display the data of any `IndexSet` as a Python list:" ] }, { @@ -153,14 +136,14 @@ "metadata": {}, "outputs": [], "source": [ - "i.elements" + "i.data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "`IndexSet`s can be notated with documentation strings to record their meaning. These strings can then be used by linopy, too! " + "`IndexSet`s can be annotated with documentation strings to record their meaning. These strings can then be used by **linopy**, too! " ] }, { @@ -186,7 +169,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "For simplicity, the steps of creating an `IndexSet` and assigning elements can be done in one line." + "For brevity, the steps of creating an `IndexSet` and adding data can be done in one line." ] }, { @@ -229,16 +212,11 @@ "source": [ "import pandas as pd\n", "\n", - "from ixmp4.core import Unit\n", - "\n", - "# We only need to (and can!) define units once for each Platform\n", - "try:\n", - " cases = platform.units.get(\"cases\")\n", - "except Unit.NotFound:\n", - " cases = platform.units.create(\"cases\")\n", + "# Load the relevant unit defined in Notebook 0\n", + "cases = platform.units.get(\"cases\")\n", "\n", "# Capacity of plant i in cases\n", - "# Parameter data can be a dict...\n", + "# Parameter data can be a dict ...\n", "a = run.optimization.parameters.create(name=\"a\", constrained_to_indexsets=[\"i\"])\n", "a_data = {\n", " \"i\": [\"seattle\", \"san-diego\"],\n", @@ -295,10 +273,7 @@ "metadata": {}, "outputs": [], "source": [ - "try:\n", - " km = platform.units.get(\"km\")\n", - "except Unit.NotFound:\n", - " km = platform.units.create(\"km\")\n", + "km = platform.units.get(\"km\")\n", "\n", "# Distance in thousands of miles\n", "d = run.optimization.parameters.create(\"d\", constrained_to_indexsets=[\"i\", \"j\"])\n", @@ -337,12 +312,7 @@ "outputs": [], "source": [ "# cost per case per 1000 miles\n", - "\n", - "# TODO we could really use a units.get_or_create() function!\n", - "try:\n", - " unit_cost_per_case = platform.units.get(\"USD/km\")\n", - "except Unit.NotFound:\n", - " unit_cost_per_case = platform.units.create(\"USD/km\")\n", + "unit_cost_per_case = platform.units.get(\"USD/km\")\n", "\n", "f = run.optimization.scalars.create(name=\"f\", value=90, unit=unit_cost_per_case)" ] @@ -370,6 +340,15 @@ " demand(j) satisfy demand at market j ;" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here, *supply* can only come from the factories in `IndexSet` *i*, while *demand* needs to be met at the markets in `IndexSet` *j*.\n", + "\n", + "Shipment happens from a factory to a market, so *x* needs to be assigned to both *i* and *j*." + ] + }, { "cell_type": "code", "execution_count": null, @@ -391,7 +370,7 @@ "\n", "In this tutorial, we solve the tutorial using the ``highs`` solver in linopy. \n", "\n", - "The ``create_dantzig_model()`` function is a convenience shortcut for setting up a linopy model correctly for the dantzig scenario. Please see ``linopy_model.py`` for details.\n", + "The ``create_dantzig_model()`` function is a convenience shortcut for setting up a linopy model correctly for the dantzig scenario. Please see ``dantzig_model_linopy.py`` for details.\n", "\n", "The solution data are stored with the model object automatically. ``store_dantzig_solution()`` then stores them in the ixmp4 objects." ] diff --git a/tutorial/transport/2_transport-tutorial_variant.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb index c0967e29..9992cab0 100644 --- a/tutorial/transport/2_transport-tutorial_variant.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -6,7 +6,7 @@ "source": [ "### Transport Tutorial - Notebook 2\n", "\n", - "# Implement and solve a variation of Dantzig's Transport Problem\n", + "# Implement and solve a variation of *Dantzig's Transport Problem*\n", "\n", "\n", "\n", @@ -25,7 +25,7 @@ "\n", "## Tutorial outline\n", "\n", - "This tutorial consists of three Jupyter notebooks\n", + "This tutorial consists of three Jupyter notebooks:\n", "\n", "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", "1. Implement the **baseline version of the transport problem** and solve it\n", @@ -38,7 +38,7 @@ "source": [ "
\n", "\n", - "This notebook requires that you created and solved the base transport problem as shown in **Notebook 1**.\n", + "This notebook requires that you created and solved the base transport problem as shown in [**Notebook 1**](1_transport-tutorial.ipynb).\n", "\n", "
" ] @@ -47,9 +47,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Launching the `platform` and loading a `Run` from the `ixmp4` database instance\n", + "### Launching the platform and loading a `Run` from the **ixmp4** database instance\n", "\n", - "We launch a platform instance and display all models/scenarios currently stored in the connected database instance. We use the same local database we created in [part 1](linopy_transport.ipynb), so please see there for how to create such a local database. " + "We launch a platform instance and display all models/scenarios currently stored in the connected database instance. We use the same local database we created in [Notebook 0](0_transport-tutorial_platform-setup.ipynb), so please see there for how to create such a database. " ] }, { @@ -63,6 +63,25 @@ "platform = ixmp4.Platform(\"transport-tutorial\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To see which `Run` we can work on, we want to list all `Run`s available on this platform.\n", + "\n", + "A platform can hold different versions of the same `Run`. One of these versions is usually assigned as the \"default version\". \n", + "\n", + "Whenever you load a `Run` from the platform, this \"default version\" is returned (unless you specifically ask for another).\n", + "\n", + "Similarly, when you list all `Run` available from a platform, it shows only the \"default versions\" of the `Run`s per default.\n", + "\n", + "Since this tutorial is only dealing with one `Run` and just one version of said `Run`, we have not declared it the \"default version\".\n", + "\n", + "Thus, when listing or tabulating the available `Run`s, we need to specify that we also want to see non-default versions.\n", + "\n", + "Here, we are using `tabulate()` to get an immediate tabular overview. Using `list()` instead would grant us immediate access to the `Run` objects." + ] + }, { "cell_type": "code", "execution_count": null, @@ -70,7 +89,6 @@ "outputs": [], "source": [ "# Tabulate all Runs in the database\n", - "# Per default, only \"default\" Runs are tabulated\n", "platform.runs.tabulate(default_only=False)" ] }, @@ -124,6 +142,13 @@ "run = create_default_dantzig_run(platform=platform)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We solve the `Run` as we did in [Notebook 1](1_transport-tutorial.ipynb)." + ] + }, { "cell_type": "code", "execution_count": null, @@ -145,9 +170,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Retrieve some data from the run for illustration of filters\n", + "### Retrieve some data from the `Run` for illustration of filters\n", "\n", - "Before cloning a run and editing data, this section illustrates two-and-a-half methods to retrieve data for a parameter from a run." + "Before cloning a `Run` and editing data, this section illustrates two-and-a-half methods to retrieve data for a `Parameter` from a `Run`." ] }, { @@ -250,9 +275,7 @@ "outputs": [], "source": [ "# Create a new Run by cloning the existing one (without keeping the solution)\n", - "run_detroit = platform.runs.clone(\n", - " run_id=run.id, model=model, scenario=\"detroit\", keep_solution=False\n", - ")" + "run_detroit = run.clone(model=model, scenario=\"detroit\", keep_solution=False)" ] }, { @@ -285,7 +308,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Solve the new scenario" + "### Solve the new `Run`" ] }, { diff --git a/tutorial/transport/dantzig_model_linopy.py b/tutorial/transport/dantzig_model_linopy.py index 0a55effe..22f665be 100644 --- a/tutorial/transport/dantzig_model_linopy.py +++ b/tutorial/transport/dantzig_model_linopy.py @@ -5,8 +5,10 @@ def create_parameter( - parameter: Parameter, index: pd.Index | list[pd.Index], name: str -) -> pd.Series: + parameter: Parameter, + index: "pd.Index[str]" | list["pd.Index[str]"], + name: str, +) -> "pd.Series[float]": if isinstance(index, list): index = pd.MultiIndex.from_product(index) @@ -16,8 +18,12 @@ def create_parameter( def create_dantzig_model(run: Run) -> linopy.Model: """Creates new linopy.Model for Dantzig's problem based on ixmp4.Run.""" m = linopy.Model() - i = pd.Index(run.optimization.indexsets.get("i").elements, name="Canning Plants") - j = pd.Index(run.optimization.indexsets.get("j").elements, name="Markets") + i = pd.Index( + run.optimization.indexsets.get("i").data, name="Canning Plants" + ).astype("string") + j = pd.Index(run.optimization.indexsets.get("j").data, name="Markets").astype( + "string" + ) a = create_parameter( parameter=run.optimization.parameters.get("a"), index=i, @@ -71,7 +77,7 @@ def read_dantzig_solution(model: linopy.Model, run: Run) -> None: ) # Handle shipment quantities - x_data: pd.DataFrame = model.solution.to_dataframe() + x_data = model.solution.to_dataframe() x_data.reset_index(inplace=True) x_data.rename( columns={ @@ -89,16 +95,16 @@ def read_dantzig_solution(model: linopy.Model, run: Run) -> None: # The following don't seem to be typed correctly by linopy # Add supply data supply_data = { - "i": run.optimization.indexsets.get("i").elements, - "levels": model.constraints["Observe supply limit at plant i"].data.rhs, # type: ignore - "marginals": model.constraints["Observe supply limit at plant i"].data.dual, # type: ignore + "i": run.optimization.indexsets.get("i").data, + "levels": model.constraints["Observe supply limit at plant i"].data.rhs, + "marginals": model.constraints["Observe supply limit at plant i"].data.dual, } run.optimization.equations.get("supply").add(data=supply_data) # Add demand data demand_data = { - "j": run.optimization.indexsets.get("j").elements, - "levels": model.constraints["Satisfy demand at market j"].data.rhs, # type: ignore - "marginals": model.constraints["Satisfy demand at market j"].data.dual, # type: ignore + "j": run.optimization.indexsets.get("j").data, + "levels": model.constraints["Satisfy demand at market j"].data.rhs, + "marginals": model.constraints["Satisfy demand at market j"].data.dual, } run.optimization.equations.get("demand").add(data=demand_data) From f8aee2ea6f5053ea16d70f8ced7e6e0068411452 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 10 Jan 2025 11:58:01 +0100 Subject: [PATCH 27/36] Bump mypy version --- .pre-commit-config.yaml | 2 +- poetry.lock | 164 +++++++++++----------------------------- 2 files changed, 45 insertions(+), 121 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b28cd653..632b08dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v1.14.1 hooks: - id: mypy entry: bash -c "poetry run mypy ." diff --git a/poetry.lock b/poetry.lock index b2178ccf..164f1863 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1295,34 +1295,6 @@ files = [ {file = "latexcodec-3.0.0.tar.gz", hash = "sha256:917dc5fe242762cc19d963e6548b42d63a118028cdd3361d62397e3b638b6bc5"}, ] -[[package]] -name = "linopy" -version = "0.3.11" -description = "Linear optimization with N-D labeled arrays in Python" -optional = false -python-versions = ">=3.9" -files = [ - {file = "linopy-0.3.11-py3-none-any.whl", hash = "sha256:6934d8e0772c6d118e63d5a79b718b87d8614bf8983af3866121a736d84b596b"}, - {file = "linopy-0.3.11.tar.gz", hash = "sha256:9d09fa31ca06ceae817bdf93191e6635c11fd4538c3b95f2b126423a4f3e7e13"}, -] - -[package.dependencies] -bottleneck = "*" -dask = ">=0.18.0" -deprecation = "*" -numexpr = "*" -numpy = "*" -polars = "*" -scipy = "*" -toolz = "*" -tqdm = "*" -xarray = ">=2023.9.0" - -[package.extras] -dev = ["gurobipy", "highspy", "netcdf4", "paramiko", "pre-commit", "pytest", "pytest-cov"] -docs = ["gurobipy", "ipykernel", "ipython", "matplotlib", "nbsphinx", "nbsphinx-link", "numpydoc", "sphinx", "sphinx-book-theme", "sphinx-rtd-theme"] -solvers = ["coptpy", "cplex", "gurobipy", "highspy (>=1.5.0)", "highspy (>=1.7.1)", "mindoptpy", "mosek", "pyscipopt", "xpress"] - [[package]] name = "linopy" version = "0.4.4" @@ -1523,49 +1495,55 @@ files = [ [[package]] name = "mypy" -version = "1.13.0" +version = "1.14.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, - {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, - {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, - {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, - {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, - {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, - {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, - {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, - {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, - {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, - {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, - {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, - {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, - {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, - {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, - {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, - {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, - {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, - {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, - {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, - {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, - {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, -] - -[package.dependencies] -mypy-extensions = ">=1.0.0" + {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, + {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, + {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d"}, + {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b"}, + {file = "mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427"}, + {file = "mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f"}, + {file = "mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c"}, + {file = "mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1"}, + {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8"}, + {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f"}, + {file = "mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1"}, + {file = "mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae"}, + {file = "mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14"}, + {file = "mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9"}, + {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11"}, + {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e"}, + {file = "mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89"}, + {file = "mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b"}, + {file = "mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255"}, + {file = "mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34"}, + {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a"}, + {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9"}, + {file = "mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd"}, + {file = "mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107"}, + {file = "mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31"}, + {file = "mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6"}, + {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319"}, + {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac"}, + {file = "mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b"}, + {file = "mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837"}, + {file = "mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35"}, + {file = "mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc"}, + {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9"}, + {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb"}, + {file = "mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60"}, + {file = "mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c"}, + {file = "mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1"}, + {file = "mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6"}, +] + +[package.dependencies] +mypy_extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.6.0" +typing_extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] @@ -1700,60 +1678,6 @@ files = [ {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"}, ] -[[package]] -name = "numpy" -version = "2.0.0" -description = "Fundamental package for array computing in Python" -optional = false -python-versions = ">=3.9" -files = [ - {file = "numpy-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:04494f6ec467ccb5369d1808570ae55f6ed9b5809d7f035059000a37b8d7e86f"}, - {file = "numpy-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2635dbd200c2d6faf2ef9a0d04f0ecc6b13b3cad54f7c67c61155138835515d2"}, - {file = "numpy-2.0.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:0a43f0974d501842866cc83471bdb0116ba0dffdbaac33ec05e6afed5b615238"}, - {file = "numpy-2.0.0-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:8d83bb187fb647643bd56e1ae43f273c7f4dbcdf94550d7938cfc32566756514"}, - {file = "numpy-2.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79e843d186c8fb1b102bef3e2bc35ef81160ffef3194646a7fdd6a73c6b97196"}, - {file = "numpy-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d7696c615765091cc5093f76fd1fa069870304beaccfd58b5dcc69e55ef49c1"}, - {file = "numpy-2.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b4c76e3d4c56f145d41b7b6751255feefae92edbc9a61e1758a98204200f30fc"}, - {file = "numpy-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:acd3a644e4807e73b4e1867b769fbf1ce8c5d80e7caaef0d90dcdc640dfc9787"}, - {file = "numpy-2.0.0-cp310-cp310-win32.whl", hash = "sha256:cee6cc0584f71adefe2c908856ccc98702baf95ff80092e4ca46061538a2ba98"}, - {file = "numpy-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:ed08d2703b5972ec736451b818c2eb9da80d66c3e84aed1deeb0c345fefe461b"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ad0c86f3455fbd0de6c31a3056eb822fc939f81b1618f10ff3406971893b62a5"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e7f387600d424f91576af20518334df3d97bc76a300a755f9a8d6e4f5cadd289"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:34f003cb88b1ba38cb9a9a4a3161c1604973d7f9d5552c38bc2f04f829536609"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:b6f6a8f45d0313db07d6d1d37bd0b112f887e1369758a5419c0370ba915b3871"}, - {file = "numpy-2.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f64641b42b2429f56ee08b4f427a4d2daf916ec59686061de751a55aafa22e4"}, - {file = "numpy-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7039a136017eaa92c1848152827e1424701532ca8e8967fe480fe1569dae581"}, - {file = "numpy-2.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46e161722e0f619749d1cd892167039015b2c2817296104487cd03ed4a955995"}, - {file = "numpy-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0e50842b2295ba8414c8c1d9d957083d5dfe9e16828b37de883f51fc53c4016f"}, - {file = "numpy-2.0.0-cp311-cp311-win32.whl", hash = "sha256:2ce46fd0b8a0c947ae047d222f7136fc4d55538741373107574271bc00e20e8f"}, - {file = "numpy-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:fbd6acc766814ea6443628f4e6751d0da6593dae29c08c0b2606164db026970c"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:354f373279768fa5a584bac997de6a6c9bc535c482592d7a813bb0c09be6c76f"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4d2f62e55a4cd9c58c1d9a1c9edaedcd857a73cb6fda875bf79093f9d9086f85"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:1e72728e7501a450288fc8e1f9ebc73d90cfd4671ebbd631f3e7857c39bd16f2"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:84554fc53daa8f6abf8e8a66e076aff6ece62de68523d9f665f32d2fc50fd66e"}, - {file = "numpy-2.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c73aafd1afca80afecb22718f8700b40ac7cab927b8abab3c3e337d70e10e5a2"}, - {file = "numpy-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49d9f7d256fbc804391a7f72d4a617302b1afac1112fac19b6c6cec63fe7fe8a"}, - {file = "numpy-2.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0ec84b9ba0654f3b962802edc91424331f423dcf5d5f926676e0150789cb3d95"}, - {file = "numpy-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:feff59f27338135776f6d4e2ec7aeeac5d5f7a08a83e80869121ef8164b74af9"}, - {file = "numpy-2.0.0-cp312-cp312-win32.whl", hash = "sha256:c5a59996dc61835133b56a32ebe4ef3740ea5bc19b3983ac60cc32be5a665d54"}, - {file = "numpy-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:a356364941fb0593bb899a1076b92dfa2029f6f5b8ba88a14fd0984aaf76d0df"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e61155fae27570692ad1d327e81c6cf27d535a5d7ef97648a17d922224b216de"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4554eb96f0fd263041baf16cf0881b3f5dafae7a59b1049acb9540c4d57bc8cb"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_14_0_arm64.whl", hash = "sha256:903703372d46bce88b6920a0cd86c3ad82dae2dbef157b5fc01b70ea1cfc430f"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:3e8e01233d57639b2e30966c63d36fcea099d17c53bf424d77f088b0f4babd86"}, - {file = "numpy-2.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cde1753efe513705a0c6d28f5884e22bdc30438bf0085c5c486cdaff40cd67a"}, - {file = "numpy-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:821eedb7165ead9eebdb569986968b541f9908979c2da8a4967ecac4439bae3d"}, - {file = "numpy-2.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9a1712c015831da583b21c5bfe15e8684137097969c6d22e8316ba66b5baabe4"}, - {file = "numpy-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9c27f0946a3536403efb0e1c28def1ae6730a72cd0d5878db38824855e3afc44"}, - {file = "numpy-2.0.0-cp39-cp39-win32.whl", hash = "sha256:63b92c512d9dbcc37f9d81b123dec99fdb318ba38c8059afc78086fe73820275"}, - {file = "numpy-2.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:3f6bed7f840d44c08ebdb73b1825282b801799e325bcbdfa6bc5c370e5aecc65"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9416a5c2e92ace094e9f0082c5fd473502c91651fb896bc17690d6fc475128d6"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-macosx_14_0_x86_64.whl", hash = "sha256:17067d097ed036636fa79f6a869ac26df7db1ba22039d962422506640314933a"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38ecb5b0582cd125f67a629072fed6f83562d9dd04d7e03256c9829bdec027ad"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cef04d068f5fb0518a77857953193b6bb94809a806bd0a14983a8f12ada060c9"}, - {file = "numpy-2.0.0.tar.gz", hash = "sha256:cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864"}, -] - [[package]] name = "openpyxl" version = "3.1.4" From 38ec93a6047a891a89fd7bc66660bf3ed242c066 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Fri, 10 Jan 2025 12:03:25 +0100 Subject: [PATCH 28/36] Install tutorial dependencies for pre-commit --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 9008b891..ba776217 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -194,7 +194,7 @@ jobs: #------------------------------------------------ - name: Install dependencies if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root --with dev,server + run: poetry install --no-interaction --no-root --with dev,server,tutorial #------------------------ # install root project From 34dbe65b0d090417f21852f4a655cc9ea515359c Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Fri, 10 Jan 2025 10:10:38 +0100 Subject: [PATCH 29/36] Harmonize the notebook intro --- .../0_transport-tutorial_platform-setup.ipynb | 6 ++--- tutorial/transport/1_transport-tutorial.ipynb | 27 ++++++++++++------- .../2_transport-tutorial_variant.ipynb | 16 ++++++++--- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb index 2f98c375..487138b0 100644 --- a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -40,8 +40,8 @@ "source": [ "## Setting up the database instance via the Command Line Interface (CLI)\n", "\n", - "An **ixmp4.Platform** is the connection to a database instance that can hold scenario data\n", - "and relevant additional information.\n", + "An [**ixmp4.Platform**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/platform.html#ixmp4.core.platform.Platform)\n", + "is the connection to a database instance that can hold scenario data and relevant additional information.\n", "\n", "
\n", "\n", @@ -50,7 +50,7 @@ "\n", "
\n", "\n", - "Run the following in the command-line to create a new SQLite database instance:\n", + "Run the following in the command-line to create a new SQLite database instance called `transport-tutorial`:\n", "```\n", "ixmp4 platforms add transport-tutorial\n", "```\n", diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index 3a83d6b3..4ee3876b 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -47,14 +47,19 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Launching the `Platform` and initializing a new `Run`\n", + "## The platform as a connection to the database\n", "\n", - "A `Platform` is the connection to the database that holds all data and relevant additional information.\n", - "\n", - "A `Run` is an object that holds all relevant information for one quantification of a scenario. \n", - "A `Run` is identified by a model name, a scenario name and a version number (assigned automatically).\n", - "\n", - "As the first step, connect to the local database created in [Notebook 0](0_transport-tutorial_platform-setup.ipynb)." + "An [**ixmp4.Platform**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/platform.html#ixmp4.core.platform.Platform)\n", + "is the connection to a database instance that can hold scenario data and relevant additional information." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import ixmp4" ] }, { @@ -63,8 +68,6 @@ "metadata": {}, "outputs": [], "source": [ - "import ixmp4\n", - "\n", "platform = ixmp4.Platform(\"transport-tutorial\")" ] }, @@ -72,7 +75,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now, we initialize a new `ixmp4.Run` in the database." + "An [**ixmp4.Run**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/run.html#ixmp4.core.run.Run)\n", + "is an object that holds all relevant information for one quantification of a \"scenario\". \n", + "A run is identified by a *model name*, a *scenario name* and an automatically assigned *version number*.\n", + "\n", + "As a first step to solve the **transport problem**, we create a new run." ] }, { diff --git a/tutorial/transport/2_transport-tutorial_variant.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb index 9992cab0..b5cc1bd5 100644 --- a/tutorial/transport/2_transport-tutorial_variant.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -47,9 +47,19 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Launching the platform and loading a `Run` from the **ixmp4** database instance\n", + "## The platform as a connection to the database\n", "\n", - "We launch a platform instance and display all models/scenarios currently stored in the connected database instance. We use the same local database we created in [Notebook 0](0_transport-tutorial_platform-setup.ipynb), so please see there for how to create such a database. " + "An [**ixmp4.Platform**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/platform.html#ixmp4.core.platform.Platform)\n", + "is the connection to a database instance that can hold scenario data and relevant additional information." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import ixmp4" ] }, { @@ -58,8 +68,6 @@ "metadata": {}, "outputs": [], "source": [ - "import ixmp4\n", - "\n", "platform = ixmp4.Platform(\"transport-tutorial\")" ] }, From e2dd1e83220d32f092b04e7f001e9f1554ab1035 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Mon, 13 Jan 2025 15:23:47 +0100 Subject: [PATCH 30/36] Remove the Python logo --- .../0_transport-tutorial_platform-setup.ipynb | 2 -- tutorial/transport/1_transport-tutorial.ipynb | 2 -- .../2_transport-tutorial_variant.ipynb | 2 -- tutorial/transport/_static/python.png | Bin 11155 -> 0 bytes 4 files changed, 6 deletions(-) delete mode 100644 tutorial/transport/_static/python.png diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb index 487138b0..72dda2d3 100644 --- a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -9,8 +9,6 @@ "\n", "# Set up an **ixmp4** platform to solve *Dantzig's Transport Problem*\n", "\n", - "\n", - "\n", "## Aim and scope of this tutorial\n", "\n", "This tutorial takes you through the steps to solve a simple optimization model\n", diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index 4ee3876b..f6cdd812 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -8,8 +8,6 @@ "\n", "# Solve *Dantzig's Transport Problem* using **ixmp4** and **linopy**\n", "\n", - "\n", - "\n", "## Aim and scope of this tutorial\n", "\n", "This tutorial takes you through the steps to solve a simple optimization model\n", diff --git a/tutorial/transport/2_transport-tutorial_variant.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb index b5cc1bd5..e3b958c8 100644 --- a/tutorial/transport/2_transport-tutorial_variant.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -8,8 +8,6 @@ "\n", "# Implement and solve a variation of *Dantzig's Transport Problem*\n", "\n", - "\n", - "\n", "## Aim and scope of this tutorial\n", "\n", "This tutorial takes you through the steps to solve a simple optimization model\n", diff --git a/tutorial/transport/_static/python.png b/tutorial/transport/_static/python.png deleted file mode 100644 index 738f6ed41f499d1f57fd4db356dc1d64769bf725..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11155 zcmdUVWn5IzyDmd_NQaal2t$J+ol*jVbf+L4(%q$k_$O4P6i{-=p&38~1f+zaLz)mfY@00XQM~#e_i5LqDi%dgZMIQ?b+Z22sAjAis zmi_Vf!5>^-B@F{Y@Cqe#NCdx$ywpv7v9O2_{=Fee<>J}kB;6}jlUK?0TYDc*cSnbpw(L({`Zxx7`ndYC zYn!l(3JZ%T_?Hi3VX(%->L@DUDIuIY)C`>CCbyk_-T<}6^)I*C_H@QqdIY1*i>j@X(n9|*#px% zxcYZq+^^6(T%6O_J8ke+2j`4c&-7?jhPr8u#C44H+_G1AD~D4&%N_=2YL#@cHE7OK zpyP7k(<5fmZeax#@G6*@+Q+A)qM{xhK7TKgZV~f=$6MSsIlVkN0Et% zT?Hs9z6@e$he33Oa=hAq-Vxh^)RKw0WgQ9I&5eHcPSa z2n^f&Ex<7Up(}Uv?o?(o_s;+zEAc6Yn)s0qzWkEcM?pE^Ycjuc%sa<=g3WEPM~DsL zn}#<-$ug0df`6)CExWk39F2J*f0a+R3HXsLNCZo>w(frpJPX)YT+hAxu2mj9E-srs zraMl*E0(s{ZkRHR1#PyJa5f2b1tA06p-rs&qqFs6jc?mAIMdd&0JN=s3MJZ%5=r(#P zs14&N0d&CYtM&Z9aW6V<`Ij+I!6=n~qpBjRrm0uy?4AV7#U~|%6MPumooWuE&J=uj zaN;Ypa-!9&9F!I57(sTB`<~WINrn{1`g&6L@L+$hYxAx-PBH=C6l;zcYD}nnodc#+Y2{I zi)?l+dgfhM8&mAb$=Qc~xX>~+%&)USwNpvbLsPiGFb*CRM-hh(E9dHv#6&8h=Te)R zJEsx_<_x?#?5&2uM)ub!Rb9H{$=q*;hKBrha3Y(U9{)#^d$W1Z3^_N)vcA49Ge9bJ z>cHLCl!9D(NQ!aZvqDBXe(YOJEuk~o_oj1J3Q0Y#XBl|JmKW9zgtxdd?NRvkI}-KG zFyoPXv7eKhTe*9SgL7y z8+TP=+-z+jMfypQ6!kRdKpGd($6~+M;!-~1I3+eSTEX~ouER#{-+#v(3;6higzmLQ zI!gYBUM9SLCj%e2xzS)lUYh(;m)UlgdScT|YU%0uWDb7s^7oT(CS>t-a>FMueeX+# zIZY6vEWcWwCSr(9SY4e3+B4^f-l(Yj`D7tTU}&gUg*3l3FhsX*3u`dcr1#mpkk2`s9_OmVhs%LJ~HlzRG={VIOP~j&< zF9x=8(crl#Cv!X~h815%PqH)-N3_BU8~ky!Bb0Rj-Y|57Hp4u}^57Wvt9aI^NZMba z0{bguPoSKIenRj2v780vg17%XV37-L92Ov^P&WF@klFfoVc=DfH;xli7K^p3TwrYe z2zF*jwmkxbi18>K06-^jV^O|XI&LGa!L`90WaP~M+7nK z3KxW(l2EzSwY9YZlZMV@SyQ6F%&;qL9dpK#BS<`Ti_C(T3jr8Z#FH1Q?;OFG;R8ka zhw2MEa3>*~4RCxuu~e~&Y()0JKp5&y;^0qeCX@^#G0CiNotu3EoNXwOd2tm)YxV3j z(lIczeo`Bpv;Zo(D#q5o1l~VNkzNR&oQO631~ek_-)t!yDLFxC8zLc5 zzA5u31+Ya2zcit^Nxv}OJ*_AGdSw$c9`klgjEsz>d8(Gk>ekk|>WH)mHd3*8=+W}S z&V}WA4{SOyBldbTGH^Hz=c-m1#Z;n3{BAGhi^pH~)sU*{r46iI92MyQx55{c@`-C} zT^TB)l4KD$G1mp|3m;X->n1xGC~LJiwfC;AIXZvL{I-aP>c{V1 zsz32=_SwbP=?G;_*$}kfQu?w>C;6mTtb{}AvcWhtZTPESx6$O$RUA^tuIQ$CpebjY zj>zP9@9pN|?fd%qEFCPQ^~T(-i{wF1-!(k z`-`a-g7lhU9)mW9|81MIRw-f*z@rpc2!>=bva$6}O=Wvpj*pMOEx7kIxzNVPNB>*7 zddORr$75!Ovs!Ido+LaeDJku}eKoJ2-j4~pJVndC`d+$yRy+9y=s>6(g{q#Cv+4fe zzBY)>aizk%$z#D)G;*g7J*y6D5;B(qi%Zkirt6P`<`RTYG*I4)_jyJR>5vg*t>+}> zh?)u8FgKZwhBh=NN?H!jt+}>#A$C-pth6+qseA|R`Vn7MPgq2R>LS5Do6Vm_po$&Z zwe!Ht#3Ztimw}l%MK=3eX|hifi`juN%D}MRbHASkxgYJ*^xCdkQn#--cQ6dGBXtd!;Q{7Z#=SG+NOv)u}7RIr5kUmrY_hhczpV+bhX^-HpX+upA9rm9`+ z_gv)u?CrH@e)9SU?+lr^1P8NSV0x2V{SiC`-S!fa}4 zs!R>|7`fxmok4%BoTca*I5a$L@8KbsX`^2@AuKCKq4fB{H_$u1?(f( z{O8ZAMfyac<>uziWG;H)`;*M^DBAUp!^N9joe@QNNv^s#>Q8#`fgNli2%_RmL7|3Y~F($YK0$_>JM_V5$!&47OT*GWU= zkHrNBd_>x$f>{H74x%|&C_6j5F7J*$+Siw-yC|(lS~BjfSIvGeJD>x1*_P_fDkL~8 zPMnO##i3BB&F#&?h6X;7Ns|TnC1xLU^;oB5ydvTrI`}RL2}yQd9(}MUP>wXmrV@p6 zRIux}g;XvLUK(O>s2AyXZGansg8`WN)m7{M@VAW8(!Lk9@2ulw2Eo3>FT1T*P6pN! zOiUmHU*KgMk+j0NMDq!-Pr^tmZD$Axz8BgvN^2Mk&bBFIoQF$favsVGG9TG0$1l9Z z#l^+o!3+HHHR8(m8mL!lr8mtK5fO_fnG#`< zde!&H#d7Fl97^-AhZf4@cn=0!u zrM=~{%x9PM7wAUHcOVbEbTcco@grS@u#i?i@+r^bETDAvnxZw*xj+av*`(jOx(fY< zA|G9PMuVsJmSyYl5Be0i-4@%-i=7gK7mIIG&j2h%Et|xDl;CBK>o8Be-1_7|6hZ^QY0%k>W2r15CN)sSO|r zG<_?7tDQhyp}Y0UEYRwiP#cAKAeV+xwaJgw)vqJO2b{@0g# z$t%Qi-#lSPKl8alO$V|;w88(?i9>~lwH%(=b6%R*8zm#dj5bqcpjpdP)%FF8a@-l3 zO;)5f$e|-#&STis{l);TbgpI0LuqN|i}Nq{FBTYTntRh|qu*y3f6|S`&a6JoGbVf~ z+Zf9b#UZ!ftcsnf97yC9I_ulpz|^Vjnb&qJ-g(LdNss8{dH;vxc;5VcL#)mnp0ZK6?0&wiA0N{x)J z>Q3Y+Q!}odH?gd-6`;gzrznt(#X8vGCU#V6ZQ7-UE%~-0&*xDM;*{n^L(a#iw6E}? zuF~a@fdZYXAoHCemwPi`sMdZh(WFXx%t58}WYmYh^?9L{DP(ER4Pk{Gf=To#2fsR< zMI6wZAhfwdNTNX~iN)IGC{E#!+i0F^kWQuV(0;2tJJZnCPOgoatFCZoMq2w5nl!MM zf%FE;VtG}YUn4!Xl2?pgg8PV5%7TZfMqHbkFJwvKWT5uz_{)L_{z7+FE(;1FGg4Do zsoGaT=nqToKCMcLrax(>X%ny^19B`|0ih#J4rQk=_AF<;$V}u?Cyzs9t*%Xb&ymuj z*0A}(q5?E`-yKR$mEdQe>7Kqxb{_T|i${K8QYyY5U(WhD{9I-dJCl2*!q~qkQFjDlMf{X*VdnFNCEjvo>D@MGW zpG$Ss=W&5;|JQ5tBzxWa4lWxCeI%r;tzvoMz8cg<_UPu) z8}8TW!D5>$c{~_m|MK`)KcNEYj?(*zm0Vq}JKHYxOt%%!NR*8z zK*{-0H#Q`HiCRfT>Gkt-c1T5SMJ~MGyNPcE?vWRXheaTNbW{HZz5uhhrq@H*>1N&= zUBI&XsqIa*OP1V1A1~WMLjxxI4Yho75E)k=7KLL(0jUrWmdJbL>MNCHKF_&7QPeur zncB)0f|;vrSh=#Un7B9genJ}|ie+K#<31kDJ#z`b8*i#MTc0`1Bn_G06LwYn98V?l(+Liy>2KV`-1>fAPS}9mjZr$ahJ2L@%t8nnEBKM zm$iW)j^4ZaR_82~Jx91mbWeH|+?7_5#Q*`=w<-55-1cJWdHzzE)3J5o6N=ORC?+R8IT=}^ZmrK(L9fB^a4pJ zcQev*xVhg}(uN^UWVbn=un)5Mj%D6$De2v|L_qK^+m1RIo&l6w!0y@q#~wn&W>e90%rI>trS>cphP^w%6^PSM@YwmOM$xBW1rW#EqezS>??OK=FYUQ-aQ$p-?# z%qZrLEdd5RBD37ygtMD?tc2Ud#KO+B3F>!|T%xNReyz`gaAx)4f5q4?Te1VsWcP+b zP*58SKO)-rjp7x>_+ixg9y}apE)eJ2En(oX>a7i}Kd=NN_Ewj)L|!IR)3)s(os8!} z`z!DwkDkMBww~M&|Ct$mg32(qz~f8Ao7zpO$XGfD+_(E$2)mJ*ziaC%%k~r^5a5OS z=i26%iM!b${DBI-q$W@9ev6=PJdIgD$Z2c;hMkT)v_(?;d)+IH;tD2+R=izd&(K7- z5Q$?k)C9vM{06qg;E@jJ3ZUMTEnh-0 z7+|Zsh(hDF!s6B1*hzFkOBBUKMgN)?v&qAoD@ii!`#As2B>F{~lGmm_qaF|1 z{eZWQuZv#pkYnIQ+jI=AA%eI}4$kf{zaQAjF-7j`T*F3z35IVdxT=KI(5NOga;s<; z%DZ|KRDc4sz~_GqP|>%M(uE4N9QCaSvig-OR?=`Q}IiswKD>u5B~)1baHyi zj#ZbCkc(qNQvNH zx}BztxAiVn*Kf4ct3NB(mGmtLR#~wl4^|9*vhL-)^?sR9AC|j3V)pZ%gINcKK7L)X zQ5lgg`)`M?>ltrBhM@kns|554xhdy{y%3!#uq|HS;oTvg1`at)BwoUi2aropUIixq z@VWsxn@h0wpr(F6qHk&&P3$t+3&YmWKJN9GBQ?8s!NIMezj^#Lu=eE<=h&wrRIr<^ zCDN}Tw_K@!QrVUF0gz1{sBrIMr>_NpaP;zz6n&ZBCzcW{yId`>><2bYvQl`^sz@%g zssV3B)S>jkm6SW{S`G+KY1~qw)Ulgfc4m1h!8KS*f4)Dbf`9$4|NSgeqhvhiM8_RW z{-?Ezl9I%v0frrj4`sj?#hAqtFIt@vvMYupLsP>QdDYp8@4%vQzgo@WVM((=Dn|Y8 zPPiC;+X0{@_JqKZA~oh21-BMohLT(!MxdnBg|vc7dKiF0cFsiHM9M~~dkYVy<4N1F zfj5NzGPkP5gSxt7MZ&}1^kJ*ZV;h<5Qj@vtv*1)v?LyQ`#-ldulga}Hm=2t;nb_Dc z0^`o&oD^msi_gimG}F0gh+l?*v{3OfjbldstomY;9_H3&8D9?_F@3m$_192W9tTV~ zD?{uyjpI^^ME$FC_-2Q!H#m)rCs63AU=Dn|1oarOd!_DpkZz8JFlPP(W#g2hF#KQ1 zNliHdPdYCrAMSKV008Op>%FnrH5S-N&{Gr04^-f2KHWc)3Hy>)7r}w7*ZIren8;&MRmC4z?$sRwM5WBBG{JH-E?^~&h!!l@TEEhBB4M+Rh@7b=h`%(<&BQ|=Y0^C&70UFZF79n%8TxV7h54L7t zl(|;9k)5bxhW~NjuufZXv-z$5_t>qiEt9S{P*6aRZlk3(3jJ)|+@5aQCG+G4a@NV~ zfOEwqC1D|opu8%A9xk{@RS#ANh~T1#;1`XN9o@@}s-L>@gtW;I!H zYFRpej0cZ|!A#7;!IX~p24FGPH%D15R-7v1;s8LnJeAZ;kF~4r>)%^_`MiT!_^A)Y zT#}l6puEn_YR~#x&@mZLEAZ=Zg}tPGMIm~6ZH3OBmA$(^NuGe&W>{xAm7cVpUZ^8$ z^t{tuIO=TU;X&@}>zn4t_~9u&0OK%w^X|sS6DYqwE)wAQR>~Ck4VpKc;Q!!aYKj45 z>^F!qB&q_FJ@f*AeGaDnEXm{IWX+YzT7>uN;J+j(8uB-GunubX2q5f5rUvJG75 z4yLsCW@;3_1TzVM>X1O+llKZ2-RgX*dUn=SvdNKn;yj&fk9}}~ZK3QkFa~^apppmo zAwgGuFP(W90R60U@6*sxvIGTKPde8>*e2}F&?WgP)65Wu7C!V&&tp@nso+@w$?!8Q za=EKq8^}PU@)XQFXLyxH!49MZ%F;PA^u~zh{X7VUCnVb|G?eA}^XFYCZS?k1XUscX z=zB()zwJSlO}~-V_PutpRnP$-?VVC5O{8Dz#daB0ol7IYqMmAN_s|7`hDZ6vmt{n5 zd7@j}uF=)FZYX7HtLLNKD}UOOVQA-TlOY0g&kPBbDP`49tT^gv3e;a06u)hp5f?!tnqxQo$>h$Y_Yd!!E>Ra;(`;-kG z5N$sx5?bCW$+HUJpY7%TtOFnq;?hz(fB%Q+K|$WP%mvF`X|&aII04IN%c;wA=lo|K z^71Kp?XcL43%{Ho?Ox3lpozlRMpKISOPA=@4`(rza&m-ohqg9auuBxTD$upnRW49e zt#527e^{;H)%-?17Xu(FN&g)N1H;`5O{JDsQe>)n`MjFQPQK*xXWtEod+ezGr`?7l zrWi4`dVD^KM*xcRg7TEi;f-p~#dZW{m#b#RhQULu{N<9xjVEHQ<1LTP?v1ZPuyx(O z)8~)5xu?4sQa-DR8$uYD`k7`I-4h(u%rzs5VfJf7k2YfcuW+4zK>eSOeb9lLX9~eP z)x9#-n9Gj|1y-o`48Sv({Ko|tb*^i7`dDlm6f`a3z?U4|uTjn6`A%cD2HHFJkg?ytyVyh~-vOPTAG9!ry7V7c+>fCh(1f+Hk)@?!8Z?fwQQ;3^ zo&hN4Qx$~yYyFWsTC%Rho%uJq%fHohvE|wmp-CfAIj5~+Yu~4tE}1~gEOcU}o9|DB zMzWJFQjUTkp!snmI zUqF*PkB(|KP&+-Gg}k8mqX|Z^wnwx6bAHS6y@pG7PpMT0_wR%+eEpDEh)B!ey4$8$ zc1yxMV4b{Qh ziUs%fkiuHl<1=%$o`pwx^xNoWPhBIytd#E(Ds>A$GW|aVhSa_Q2z=pv#>~p%UVxkH zsq^D{)Wdja^6w;S9 zHXR-wGMFi=plFqi#@uE*F1WttLWhG%Z!dliUBH93wtfc>t&FqL1&*uy{k2x(g|HK% zqf$-kj?<`Jp@`HPF846$O14)JP4Q!fEm6W=Pu?fRX$&V1+~P-ETfg$ypHN+zxZRwq zljwvEZ7PmQVrm^q1tx02N zwy`Fxkl~of5w)I6d0`Z7Htr2wdkR842O(8*TNeAp?ufnN(~}~0?2pSX9v;5~I`!T| z2P8w!yna-0a@zH27N5vtSKg2Y9v3ZO>l;G`tcJHw*T#o#=eDcm7v%e`pxYmdUw$*- z`({+u4j-&ecVqzy=fT^%y6uhcHErX`vt*Qu$snB>HZXbx9~xx)m+E*swOy99z)+P>B% zknhO+hM>B~ouAu`x!7M{5`t6(EKaEa!OfKTtqL$&dZZh$FszWhtCbfcW;gqYS^iOs zL(_!sWej4oq>(%`MyUWxBR$mko^>kdet`_gEWT4G(~*W44}fl`7F44OfXDI>J~u&X z7H}itbxz~8MKE-mgH2EAfoQ%4k1OF*XRXRflYBI@oe)=LW5b?1x5 znf6DO0iyqTW$B40Xo>V*?W1xKMfu*C)tmJU4nCc22j21BJ1Wqv1fLF~jD0n8C3JVF zl5G3TsutRb#ea*_leM+~A=TwCF>f01dBBdHrGaX2DjszP z9HjbqasZqp|1VBetD^Y-!J;Z7LB>o_EjRYYJ;Fl7lZoVI0ADB!?D?~8Vq8gf%p`uN zuSg=`1i*kM5?2XxQ`Y@$Z|_97L>|E)k=3>_j^7DqQKZ&@>taJ{it|f?rU{o1eq^=G zH@LJ$llW1~g|V`#WpY9$|4Y~o`X6g(`3`wZ*8>?Me7+LTf=#)qYtGiL_v5aoVRvVT zKDS?9{RWNlKc1wf*IW$ctx6fzOD?mgj6S$OHr&q9d_i#!7V{kiP+qLPVWbwIqi(}c zbCJKIwMSj9qHKg}YLlC7FrJ^^lv2P8TbNsJ-fc)tO#H^iP-C~sT#4J2=J~BgCP3m+Qyf&L&|26GI@^z zBpadt^~i(NRPT7J!e=|EMvk7y!o%^pVYgS(y@hHws%GDJwgLYuyW-%Dg~KN>7F2Om z)SnYsxt>mAlH$wQ3kGkRXEUNbAnM{4)9`E7>r=?iD3D1f!mp-qRhXd6ef*FTgRb6j zyu!{yg>&&cQt=nfBi=dJ7NjPCjR#yH?=;Rk_t^)p9^(my1eN4Fu)2DfhkVY7 z-z(n`n{N$z9=Ml28w!OZV>c{_2K#-acx0lPR%ofH&^SEpYD3`?9MRh0aJl_#m`9_~ zJiCvCE!>zPS+Ig~)kXPT5liE196*-?wfxho=-18&pScanKhd$@t-^7yGW8E;dG1tN z3`jhhJiT!-QN{-Ep}gP-jQdxWbq19ylM6a+l{a=eUej z`3{TZ`gC4IM%eEE_=(KQlUUwYMuf3~aQhhia&~#*aM>sA#yHJ8zR>Z|&Hy%GM4*wx zWT3PB%T<0(Ieif>S)R17_^UCFtLorKfdZhQ-T6lhA~eaZ!h1k{rz5v`lHVih*G3>v z5yjp#2~w5r_d!LrvD$|ux_8$YzXD5D2k4$H%r@qrbbWq-SvWCY5l| Date: Mon, 13 Jan 2025 16:03:41 +0100 Subject: [PATCH 31/36] Streamline setting up the problem structure --- tutorial/transport/1_transport-tutorial.ipynb | 162 +++++++++++++----- 1 file changed, 117 insertions(+), 45 deletions(-) diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index f6cdd812..0bbc152d 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -93,13 +93,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Defining the `IndexSet`s\n", + "## Defining the structure of the optimization problem\n", "\n", - "An `IndexSet` defines a list of elements with a name. These `IndexSet`s can be used for \"indexed assignment\" of `Parameter`s, `Variable`s and `Equation`s. \n", - "The entries of these `Parameter`s, etc. are then validated against the elements of the linked `IndexSet`(s). \n", - "In database terms, a column of a `Parameter` is \"foreign-keyed\" onto an `IndexSet`.\n", + "### The IndexSets\n", "\n", - "Below, we first show the data as they would be written in the GAMS tutorial ([transport.gms](transport.gms) in this folder). " + "An **IndexSet** defines a list of elements with a name. These sets can be used for \"indexed assignment\" of parameters, variables and equations. \n", + "The entries of these parameters, etc. are then validated against the elements of the linked set. \n", + "In database terms, a column of a parameter, etc. can be \"foreign-keyed\" onto an set.\n", + "\n", + "Below, we first show the data as they would be written in the linopy tutorial." ] }, { @@ -132,7 +134,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can display the data of any `IndexSet` as a Python list:" + "We can display the elements of any **IndexSet** as a Python list:" ] }, { @@ -148,7 +150,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "`IndexSet`s can be annotated with documentation strings to record their meaning. These strings can then be used by **linopy**, too! " + "An **IndexSet** can have a docstring as a means for documentation." ] }, { @@ -157,8 +159,16 @@ "metadata": {}, "outputs": [], "source": [ - "# TODO We would need to implement this first, though, probably setting pd.Series.name\n", - "# to it." + "i.docs = \"Canning Plants\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For simplicity, the steps of creating an **IndexSet** and assigning elements can be done in one line.\n", + "\n", + "We illustrate this for the second index-set of the transport problem." ] }, { @@ -167,14 +177,14 @@ "metadata": {}, "outputs": [], "source": [ - "i.docs = \"Canning Plants\"" + "run.optimization.indexsets.create(\"j\").add([\"new-york\", \"chicago\", \"topeka\"])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "For brevity, the steps of creating an `IndexSet` and adding data can be done in one line." + "To add the docstring, we now have to explicitly get the index-set *j* and add the documentation." ] }, { @@ -183,16 +193,19 @@ "metadata": {}, "outputs": [], "source": [ - "run.optimization.indexsets.create(\"j\").add([\"new-york\", \"chicago\", \"topeka\"])" + "run.optimization.indexsets.get(\"j\").docs = \"Markets\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Assigning the `Parameter`s\n", + "### Parameters of the optimization problem\n", + "\n", + "A **Parameter** is a table with a number of index columns (each constrained to an **IndexSet**) as well as *units* and *values* columns.\n", "\n", - "Next, we define the parameters *capacity* and *demand*. The parameters are assigned on the indexsets *i* and *j*, respectively." + "As a next step to solving the transport problem, we define the parameters *capacity* and *demand*.\n", + "The parameters are assigned on the indexsets *i* and *j*, respectively." ] }, { @@ -209,35 +222,54 @@ " topeka 275 / ;" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The parameter data can be assigned as a dictionary." + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "import pandas as pd\n", - "\n", - "# Load the relevant unit defined in Notebook 0\n", - "cases = platform.units.get(\"cases\")\n", - "\n", - "# Capacity of plant i in cases\n", - "# Parameter data can be a dict ...\n", "a = run.optimization.parameters.create(name=\"a\", constrained_to_indexsets=[\"i\"])\n", + "a.docs = \"Capacity of plant i\"\n", + "\n", "a_data = {\n", " \"i\": [\"seattle\", \"san-diego\"],\n", " \"values\": [350, 600],\n", - " \"units\": [cases.name, cases.name],\n", + " \"units\": [\"cases\", \"cases\"],\n", "}\n", - "a.add(data=a_data)\n", + "a.add(data=a_data)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Alternatively, the parameter data can be passed as a **pandas.DataFrame**." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", "\n", - "# Demand at market j in cases\n", "b = run.optimization.parameters.create(\"b\", constrained_to_indexsets=[\"j\"])\n", - "# ... or a pd.DataFrame\n", + "b.docs = \"Demand at market j\"\n", + "\n", "b_data = pd.DataFrame(\n", " [\n", - " [\"new-york\", 325, cases.name],\n", - " [\"chicago\", 300, cases.name],\n", - " [\"topeka\", 275, cases.name],\n", + " [\"new-york\", 325, \"cases\"],\n", + " [\"chicago\", 300, \"cases\"],\n", + " [\"topeka\", 275, \"cases\"],\n", " ],\n", " columns=[\"j\", \"values\", \"units\"],\n", ")\n", @@ -248,7 +280,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Notice how the `parameter.data` has three columns but has only been linked to one `IndexSet`? That's on purpose: Every `Parameter` needs to have (the columns) *values* and *units*, but these cannot be constrained to an `IndexSet`. The value(s) can be any number(s), but the units need to be known to the `Platform`.\n", + "Notice how the data has three columns but has only been linked to one **IndexSet**? That's on purpose: Every **Parameter** needs to have (the columns) *values* and *units*. The value(s) can be any number(s), but the units have to be defined a-priori in the **ixmp4.Platform**.\n", "\n", "Here's how to access `parameter.data` to e.g. quickly confirm that *b* is set correctly:" ] @@ -262,6 +294,13 @@ "b.data" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We now turn to a multi-dimensional parameter..." + ] + }, { "cell_type": "raw", "metadata": {}, @@ -272,26 +311,46 @@ " san-diego 2.5 1.8 1.4 ;" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It is possible to add data to a parameter in several steps...\n", + "\n", + "Here, we first define the parameter *d* and add four datapoints." + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "km = platform.units.get(\"km\")\n", - "\n", - "# Distance in thousands of miles\n", "d = run.optimization.parameters.create(\"d\", constrained_to_indexsets=[\"i\", \"j\"])\n", - "# You can start with some data ...\n", + "d.docs = \"Distance between cities\"\n", + "\n", "d_data = {\n", " \"i\": [\"seattle\", \"seattle\", \"seattle\", \"san-diego\"],\n", " \"j\": [\"new-york\", \"chicago\", \"topeka\", \"new-york\"],\n", " \"values\": [2.5, 1.7, 1.8, 2.5],\n", - " \"units\": [km.name] * 4,\n", + " \"units\": [\"km\", \"km\", \"km\", \"km\"]\n", "}\n", - "d.add(d_data)\n", - "\n", - "# ... and expand it later on:\n", + "d.add(d_data)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, we add the two other datapoints. This step-by-step manipulation of parameter data can be helpful in large models." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "d.add({\"i\": [\"san-diego\"], \"j\": [\"chicago\"], \"values\": [1.8], \"units\": [\"km\"]})\n", "d.add({\"i\": [\"san-diego\"], \"j\": [\"topeka\"], \"values\": [1.4], \"units\": [\"km\"]})" ] @@ -300,7 +359,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Every time you add data, though, **all** columns must be present!" + "
\n", + "\n", + "Every time you add data, **all** columns of the parameter must be present!\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Scalars\n", + "\n", + "Another type of input data for optimization problems is a **Scalar**. These are not linked to an **IndexSet**, but consist of only a value and a unit (and a docstring)." ] }, { @@ -316,19 +388,19 @@ "metadata": {}, "outputs": [], "source": [ - "# cost per case per 1000 miles\n", - "unit_cost_per_case = platform.units.get(\"USD/km\")\n", - "\n", - "f = run.optimization.scalars.create(name=\"f\", value=90, unit=unit_cost_per_case)" + "f = run.optimization.scalars.create(name=\"f\", value=90, unit=\"USD/km\")\n", + "f.docs = \"Freight\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Defining `Variable`s and `Equation`s in the scenario\n", + "### Defining the solution structure\n", "\n", - "The levels and marginals of these `Variable`s and `Equation`s will be imported to the scenario when reading the model solution." + "The solution of an optimization problem are a list of **Variable** and **Equation** objects.\n", + "\n", + "We first define the variables and equations in the **ixmp4.Run**. The values of the solution (level and marginal, mathematically speaking) are read from the **linopy** output after solving the problem." ] }, { @@ -360,9 +432,9 @@ "metadata": {}, "outputs": [], "source": [ - "# initialize the decision variables and equations\n", "z = run.optimization.variables.create(\"z\")\n", "x = run.optimization.variables.create(\"x\", constrained_to_indexsets=[\"i\", \"j\"])\n", + "\n", "supply = run.optimization.equations.create(\"supply\", constrained_to_indexsets=[\"i\"])\n", "demand = run.optimization.equations.create(\"demand\", constrained_to_indexsets=[\"j\"])" ] From 1e490ef153ac03a4b3145b3a0a748e77377bece1 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Mon, 13 Jan 2025 16:23:35 +0100 Subject: [PATCH 32/36] Update solving the model and reading the solution and set as default --- tutorial/transport/1_transport-tutorial.ipynb | 67 ++++++++++++++++--- 1 file changed, 56 insertions(+), 11 deletions(-) diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index 0bbc152d..e67b4f7f 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -432,8 +432,8 @@ "metadata": {}, "outputs": [], "source": [ - "z = run.optimization.variables.create(\"z\")\n", "x = run.optimization.variables.create(\"x\", constrained_to_indexsets=[\"i\", \"j\"])\n", + "z = run.optimization.variables.create(\"z\")\n", "\n", "supply = run.optimization.equations.create(\"supply\", constrained_to_indexsets=[\"i\"])\n", "demand = run.optimization.equations.create(\"demand\", constrained_to_indexsets=[\"j\"])" @@ -443,13 +443,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Solve the scenario\n", + "## Solve the scenario\n", "\n", - "In this tutorial, we solve the tutorial using the ``highs`` solver in linopy. \n", + "In this tutorial, we solve the tutorial using the open-source solver *highs* in **linopy**. \n", "\n", - "The ``create_dantzig_model()`` function is a convenience shortcut for setting up a linopy model correctly for the dantzig scenario. Please see ``dantzig_model_linopy.py`` for details.\n", + "The ``create_dantzig_model()`` function is a convenience shortcut to retrieve the data from the **ixmp4.Run**\n", + "and set up a linopy model correctly to solve the transport problem. Please see ``linopy_model.py`` for details.\n", "\n", - "The solution data are stored with the model object automatically. ``store_dantzig_solution()`` then stores them in the ixmp4 objects." + "The solution of the transport problem is stored with the model object automatically.\n", + "The function ``store_dantzig_solution()`` reads the solution and stores it in the respective **Variable** and **Equation** objects of the **ixmp4.Run**." ] }, { @@ -463,9 +465,9 @@ " read_dantzig_solution,\n", ")\n", "\n", + "\n", "linopy_model = create_dantzig_model(run=run)\n", "linopy_model.solve(\"highs\")\n", - "\n", "read_dantzig_solution(model=linopy_model, run=run)" ] }, @@ -473,7 +475,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Display and analyze the results" + "## Display and analyze the results\n", + "\n", + "We can now retrieve and display the components of the solution.\n", + "\n", + "First, the variable *z* is the total cost of satisfying the demand at all markets." ] }, { @@ -482,27 +488,38 @@ "metadata": {}, "outputs": [], "source": [ - "# Display the objective value of the solution\n", "z.levels" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The variable *x* shows the least-cost (optimal) shipment from plants to markets." + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "# Display the quantities transported from canning plants to demand locations\n", "pd.DataFrame(x.data)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The levels and marginals of the **Equation** show the shipped quantities and shadow prices (\"dual variables\") of the least-cost solution." + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "# Display the quantities and marginals (shadow prices) of the demand balance constraints\n", "demand.data" ] }, @@ -512,9 +529,37 @@ "metadata": {}, "outputs": [], "source": [ - "# Display the quantities and marginals (shadow prices) of the supply balance constraints\n", "supply.data" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setting a default version of a run\n", + "\n", + "The key benefit of **ixmp4** is handling a large number of scenarios - aka **ixmp4.Run** objects - in a database.\n", + "Each run is identified by a *model name*, a *scenario name* and an automatically assigned *version number*.\n", + "\n", + "For every model-scenario combination, we can assign one run as the *default version*.\n", + "This allows to keep previous versions in the database (for easy reference and comparison) but have a well-defined approach to get the \"right\" version (e.g., the latest version of a scenario)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "run.set_as_default()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { From e9c95ad485f17f0e19a6095964c9b5902a97553a Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Mon, 13 Jan 2025 20:04:24 +0100 Subject: [PATCH 33/36] Rework notebook 2 --- tutorial/transport/1_transport-tutorial.ipynb | 4 +- .../2_transport-tutorial_variant.ipynb | 264 +++++++++++------- 2 files changed, 172 insertions(+), 96 deletions(-) diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index e67b4f7f..9f19dcf0 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -479,7 +479,7 @@ "\n", "We can now retrieve and display the components of the solution.\n", "\n", - "First, the variable *z* is the total cost of satisfying the demand at all markets." + "First, the variable *z* is the objective value of the transport problem: the minimum total cost of satisfying the demand at all markets." ] }, { @@ -538,7 +538,7 @@ "source": [ "## Setting a default version of a run\n", "\n", - "The key benefit of **ixmp4** is handling a large number of scenarios - aka **ixmp4.Run** objects - in a database.\n", + "The key benefit of **ixmp4** is handling a large number of scenarios - aka **ixmp4.Run** objects - in a version-controlled database.\n", "Each run is identified by a *model name*, a *scenario name* and an automatically assigned *version number*.\n", "\n", "For every model-scenario combination, we can assign one run as the *default version*.\n", diff --git a/tutorial/transport/2_transport-tutorial_variant.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb index e3b958c8..daf00c02 100644 --- a/tutorial/transport/2_transport-tutorial_variant.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -57,7 +57,8 @@ "metadata": {}, "outputs": [], "source": [ - "import ixmp4" + "import ixmp4\n", + "import pandas as pd" ] }, { @@ -73,19 +74,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "To see which `Run` we can work on, we want to list all `Run`s available on this platform.\n", - "\n", - "A platform can hold different versions of the same `Run`. One of these versions is usually assigned as the \"default version\". \n", - "\n", - "Whenever you load a `Run` from the platform, this \"default version\" is returned (unless you specifically ask for another).\n", - "\n", - "Similarly, when you list all `Run` available from a platform, it shows only the \"default versions\" of the `Run`s per default.\n", - "\n", - "Since this tutorial is only dealing with one `Run` and just one version of said `Run`, we have not declared it the \"default version\".\n", - "\n", - "Thus, when listing or tabulating the available `Run`s, we need to specify that we also want to see non-default versions.\n", - "\n", - "Here, we are using `tabulate()` to get an immediate tabular overview. Using `list()` instead would grant us immediate access to the `Run` objects." + "As a first step, we list all scenarios (aka [**ixmp4.Run**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/run.html#ixmp4.core.run.Run) instances)\n", + "available in the platform connected to the database instance." ] }, { @@ -94,27 +84,28 @@ "metadata": {}, "outputs": [], "source": [ - "# Tabulate all Runs in the database\n", - "platform.runs.tabulate(default_only=False)" + "platform.runs.tabulate()" ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "# Model and scenario name we used for Dantzig's transport problem in part 1\n", - "model = \"transport problem\"\n", - "scenario = \"standard\"" + "
\n", + "\n", + "If you are running this tutorial for the first time, you will only see the *standard* scenario of the *transport problem*. \n", + "If you have already done some experimentation in the `transport-tutorial` platform, you will see more scenarios.\n", + "\n", + "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "If you have run the first part of tutorial before, the existing `Run` should have appeared, and we can load it.\n", - "Uncomment and run the following lines as appropriate:" + "## Retrieve a run from the platform\n", + "\n", + "As a first step in this notebook, you can load the **ixmp4.Run** that you created in Notebook 1." ] }, { @@ -123,18 +114,14 @@ "metadata": {}, "outputs": [], "source": [ - "# Load the default version of the Run created in the first tutorial\n", - "# run = platform.runs.get(model=model, scenario=scenario)\n", - "\n", - "# If you already solved this Run, remember to remove its solution!\n", - "# run.optimization.remove_solution()" + "run = platform.runs.get(model=\"transport problem\", scenario=\"standard\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "If the `Run` did not appear (e.g. because you are starting with this tutorial), we can use a function that creates the `Run` from scratch in one step and solve it as usual:" + "You can check that this is indeed the version shown above by comparing the *version number*." ] }, { @@ -143,16 +130,15 @@ "metadata": {}, "outputs": [], "source": [ - "from tutorial.transport.utils import create_default_dantzig_run\n", - "\n", - "run = create_default_dantzig_run(platform=platform)" + "run.version" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "We solve the `Run` as we did in [Notebook 1](1_transport-tutorial.ipynb)." + "You can check that the solution from Notebook 1 was indeed saved by inspecting an **ixmp4.Variable**. \n", + "The `data` of any optimization object is stored internally as a dictionary." ] }, { @@ -161,24 +147,17 @@ "metadata": {}, "outputs": [], "source": [ - "from tutorial.transport.dantzig_model_linopy import (\n", - " create_dantzig_model,\n", - " read_dantzig_solution,\n", - ")\n", - "\n", - "linopy_model = create_dantzig_model(run=run)\n", - "linopy_model.solve(\"highs\")\n", - "\n", - "read_dantzig_solution(model=linopy_model, run=run)" + "run.optimization.variables.get(\"z\").data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Retrieve some data from the `Run` for illustration of filters\n", + "For instances of a **Variable** or a **Parameter** that have multiple dimensions,\n", + "you can use **pandas** for filtering and inspecting the data.\n", "\n", - "Before cloning a `Run` and editing data, this section illustrates two-and-a-half methods to retrieve data for a `Parameter` from a `Run`." + "The following cell shows the data for a using the distance parameter *d* and cast the `data` to a **pandas.DataFrame**." ] }, { @@ -187,17 +166,24 @@ "metadata": {}, "outputs": [], "source": [ - "# Load the distance Parameter\n", "d = run.optimization.parameters.get(\"d\")\n", - "d" + "distance = pd.DataFrame(d.data)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "distance[distance[\"i\"] == \"seattle\"]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "This is an `ixmp4.Parameter` object! It's useful to interact with if you want to edit the information stored in the database about it. You could e.g. add `.docs` to it so that you can always look up in the database what this object does.\n", - "For interacting with the modeling data, it's more useful to interact with the `.data` attribute, which stores the actual data: " + "You can also combine filters for more elaborate queries." ] }, { @@ -206,28 +192,28 @@ "metadata": {}, "outputs": [], "source": [ - "d.data" + "distance.loc[(distance[\"i\"] == \"seattle\") & (distance[\"j\"].isin([\"chicago\", \"topeka\"]))]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "This is a dictionary because that's easier to store in a database. For ease of access, you may want to convert it to a `pandas.DataFrame`:" + "Please note that **pandas** recommends to use [advanced indexing](https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#advanced-advanced-hierarchical) if you find yourself using more than three conditionals in `.loc[]`." ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "import pandas as pd\n", + "## Make a clone of the baseline scenario\n", "\n", - "d_data = pd.DataFrame(d.data)\n", + "For illustration of a typical scenario analysis workflow, we create a copy of the standard transportation problem\n", + "and make two modifications:\n", + "- Add a new demand location *detroit* and add a demand-level and freight costs to that city.\n", + "- Reduce the demand level in *chicago* to ensure a feasible problem, because the total production capacity does not allow much slack for increased production.\n", "\n", - "# Show only the distances for connections from Seattle by filtering the pandas.DataFrame\n", - "d_data[d_data[\"i\"] == \"seattle\"]" + "The next cell creates a copy (`clone()`) of the standard transportation problem." ] }, { @@ -236,16 +222,14 @@ "metadata": {}, "outputs": [], "source": [ - "# NOTE We currently don't support loading only specific parameter elements.\n", - "# We always load the whole parameter and can then select from the data as usual with\n", - "# e.g. pandas." + "run_detroit = run.clone(scenario=\"detroit\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "For faster access or more complex filtering, you can then use all familiar `pandas` features. For example, list only distances from Seattle to specific other cities:" + "Because the cell above did not specify a *model name*, the clone kept the original model name." ] }, { @@ -254,34 +238,33 @@ "metadata": {}, "outputs": [], "source": [ - "d_data.loc[(d_data[\"i\"] == \"seattle\") & (d_data[\"j\"].isin([\"chicago\", \"topeka\"]))]" + "run_detroit.model.name" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Please note that `pandas` recommends to use [advanced indexing](https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#advanced-advanced-hierarchical) if you find yourself using more than three conditionals in `.loc[]`." + "We now modify the structure and parameters of the *detroit* scenario.\n", + "First, we reduce the demand in *chicago* to ensure a feasible problem.." ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ - "### Make a clone of the baseline scenario, then check out the clone and edit the scenario\n", - "\n", - "For illustration of a scenario analysis workflow, we add a new demand location ``detroit`` and add a demand level and transport costs to that city.\n", - "Because the production capacity does not allow much slack for increased production, we also reduce the demand level in ``chicago``." + "run_detroit.optimization.parameters.get(\"b\").add(\n", + " {\"j\": [\"chicago\"], \"values\": [200], \"units\": [\"cases\"]}\n", + ")" ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "# Create a new Run by cloning the existing one (without keeping the solution)\n", - "run_detroit = run.clone(model=model, scenario=\"detroit\", keep_solution=False)" + "Now, we add a new market *detroit* and add all relevant parameters." ] }, { @@ -290,12 +273,6 @@ "metadata": {}, "outputs": [], "source": [ - "# Reduce demand in chicago\n", - "run_detroit.optimization.parameters.get(\"b\").add(\n", - " {\"j\": [\"chicago\"], \"values\": [200], \"units\": [\"cases\"]}\n", - ")\n", - "\n", - "# Add a new city with demand and distances\n", "run_detroit.optimization.indexsets.get(\"j\").add(\"detroit\")\n", "run_detroit.optimization.parameters.get(\"b\").add(\n", " {\"j\": [\"detroit\"], \"values\": [150], \"units\": [\"cases\"]}\n", @@ -314,7 +291,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Solve the new `Run`" + "### Solve the new scenario\n", + "\n", + "Now, we create a **linopy** model, solve it, and read the solution to store it\n", + "in the respective **Variable** and **Equation** objects of the **ixmp4.Run**." ] }, { @@ -323,9 +303,14 @@ "metadata": {}, "outputs": [], "source": [ + "from tutorial.transport.dantzig_model_linopy import (\n", + " create_dantzig_model,\n", + " read_dantzig_solution,\n", + ")\n", + "\n", + "\n", "linopy_model_detroit = create_dantzig_model(run=run_detroit)\n", "linopy_model_detroit.solve(\"highs\")\n", - "\n", "read_dantzig_solution(model=linopy_model_detroit, run=run_detroit)" ] }, @@ -333,9 +318,29 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Display and analyze the results\n", + "## Setting a default version of the scenario\n", "\n", - "For comparison between the baseline `Run`, i.e., the original transport problem, and the \"detroit\" `Run`, we show the solution for both cases." + "As in Notebook 1, we set the *detroit* scenario as the default version so that we can easily retrieve it later." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "run_detroit.set_as_default()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Display and analyze the results\n", + "\n", + "We can now compare the *standard* instance of the *transport problem* and the *detroit* scenario.\n", + "\n", + "The next two cells show the objective values of the two runs." ] }, { @@ -348,7 +353,6 @@ }, "outputs": [], "source": [ - "# Display the objective value of the solution in the baseline Run\n", "run.optimization.variables.get(\"z\").levels" ] }, @@ -362,17 +366,24 @@ }, "outputs": [], "source": [ - "# Display the objective value of the solution in the \"detroit\" Run\n", "run_detroit.optimization.variables.get(\"z\").levels" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You see that the *detroit* scenario has higher total cost.\n", + "\n", + "The next two cells compare the optimal assignment of shipments from plants to markets in the two runs." + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "# Display quantities transported from canning plants to demand locations in \"baseline\"\n", "pd.DataFrame(run.optimization.variables.get(\"x\").data)" ] }, @@ -382,7 +393,6 @@ "metadata": {}, "outputs": [], "source": [ - "# Display quantities transported from canning plants to demand locations in \"detroit\"\n", "pd.DataFrame(run_detroit.optimization.variables.get(\"x\").data)" ] }, @@ -392,9 +402,18 @@ "metadata": {}, "outputs": [], "source": [ - "# Display quantities and marginals (=shadow prices) of the demand balance constraints\n", - "# in \"baseline\"\n", - "run.optimization.equations.get(\"demand\").data" + "run_detroit.optimization.equations.get(\"demand\").data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Scenario version management\n", + "\n", + "As above, you can now list all scenarios available in the database instance to which the **ixmp4.Platform** is connected.\n", + "\n", + "You should now see (at least) two scenarios." ] }, { @@ -403,10 +422,67 @@ "metadata": {}, "outputs": [], "source": [ - "# Display quantities and marginals (=shadow prices) of the demand balance constraints\n", - "# in \"detroit\"\n", - "run_detroit.optimization.equations.get(\"demand\").data" + "platform.runs.tabulate()" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When developing scenarios, we often make minor variations to numerous scenarios, and changing the *scenario name* every time is not practical.\n", + "\n", + "The **ixmp4** package provides a more efficient approach to scenario version management: Every time that you *create* a new run or *clone* an existing run and the *model-scenario-name* combination already exists, a new *version* will be created.\n", + "\n", + "You can get a specific *version* by including the version number in the call to get an **ixmp4.Run** like\n", + "\n", + "```python\n", + "platforms.runs.get(model, scenario, version)\n", + "```\n", + "\n", + "You also can assign one of the versions as *default*, so that this run will be retrieved when you call\n", + "\n", + "```python\n", + "platforms.runs.get(model, scenario)\n", + "```\n", + "\n", + "without a version number.\n", + "\n", + "All versions will be kept in the database and are accessible via the **ixmp4.Platform**.\n", + "\n", + "If you have run this tutorial multiple times, you can tabulate all runs - including the non-default versions - as illustrated below." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "platform.runs.tabulate(default_only=False)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Cleaning up after doing this tutorial\n", + "\n", + "You can use the **ixmp4** Command Line Interface (CLI) to remove the database related to this tutorial.\n", + "\n", + "Run the following in the command-line:\n", + "```\n", + "ixmp4 platforms delete transport-tutorial\n", + "```\n", + "\n", + "The prompt will ask whether you also want to delete the SQLite database file from your computer." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { From bdc11a6e7490d1550e9e03ede9f707ccd85e1347 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Tue, 14 Jan 2025 10:08:10 +0100 Subject: [PATCH 34/36] Fix units and harmonize documentation --- .../0_transport-tutorial_platform-setup.ipynb | 26 ++++++++++++------- tutorial/transport/1_transport-tutorial.ipynb | 16 ++++++------ .../2_transport-tutorial_variant.ipynb | 4 +-- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb index 72dda2d3..eebbd1d0 100644 --- a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -83,11 +83,11 @@ "id": "b6209e20-9979-4f3b-b6b7-fe37a1c09366", "metadata": {}, "source": [ - "## Defining `Unit`s in the database backend\n", + "## Defining units in the platform and database\n", "\n", - "The **ixmp4** package requires that `Unit`s are defined explicitly before adding data using them.\n", + "The **ixmp4** package requires that units are defined explicitly before adding data using them.\n", "\n", - "The transport tutorial uses the units \"cases\", \"km\" and \"USD/km\"." + "The transport tutorial uses the units \"cases\", \"1000 miles\" and \"dollars per case per 1000 miles\"." ] }, { @@ -97,7 +97,7 @@ "metadata": {}, "outputs": [], "source": [ - "for unit in [\"cases\", \"km\", \"USD/km\"]:\n", + "for unit in [\"cases\", \"1000 miles\", \"dollars per case per 1000 miles\"]:\n", " platform.units.create(unit)" ] }, @@ -126,7 +126,7 @@ "source": [ "
\n", "\n", - "Defining a `Unit` again (i.e., creating one that is already defined in the database) will raise an error!\n", + "Defining an **ixmp4.Unit** again (i.e., creating one that is already defined in the database) will raise an error!\n", "\n", "
" ] @@ -136,9 +136,9 @@ "id": "1e7f631c-67d5-4170-858d-c96636c5e765", "metadata": {}, "source": [ - "One reason for defining `Unit`s explicitly is so that we can assign doc-strings to them.\n", + "One reason for defining units explicitly is so that we can assign docstrings to them.\n", "\n", - "First, we get a specific `ixmp4.Unit` from the platform. Then, we add a docstring. Third, we illustrate how to retrieve the docstring. " + "First, we get a specific **ixmp4.Unit** from the platform. Then, we add a docstring. Third, we illustrate how to retrieve the docstring. " ] }, { @@ -159,7 +159,7 @@ "metadata": {}, "outputs": [], "source": [ - "cases.docs = \"Unit of a good produced at plants and consumed at markets\"" + "cases.docs = \"Unit of a good produced at canning plants and consumed at markets\"" ] }, { @@ -189,12 +189,20 @@ "\n", "Run the following in the command-line:\n", "```\n", - "ixmp4 platforms delete transport-tutorial\n", + "ixmp4 platforms remove transport-tutorial\n", "```\n", "\n", "The prompt will ask whether you also want to delete the SQLite database file from your computer, \n", "answer `y` for a complete deletion." ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9395354e-2a0a-45f1-b819-34af7d925805", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index 9f19dcf0..72c64cdd 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -159,7 +159,7 @@ "metadata": {}, "outputs": [], "source": [ - "i.docs = \"Canning Plants\"" + "i.docs = \"Canning plants\"" ] }, { @@ -236,7 +236,7 @@ "outputs": [], "source": [ "a = run.optimization.parameters.create(name=\"a\", constrained_to_indexsets=[\"i\"])\n", - "a.docs = \"Capacity of plant i\"\n", + "a.docs = \"Capacity of canning plant i\"\n", "\n", "a_data = {\n", " \"i\": [\"seattle\", \"san-diego\"],\n", @@ -333,7 +333,7 @@ " \"i\": [\"seattle\", \"seattle\", \"seattle\", \"san-diego\"],\n", " \"j\": [\"new-york\", \"chicago\", \"topeka\", \"new-york\"],\n", " \"values\": [2.5, 1.7, 1.8, 2.5],\n", - " \"units\": [\"km\", \"km\", \"km\", \"km\"]\n", + " \"units\": [\"1000 miles\", \"1000 miles\", \"1000 miles\", \"1000 miles\"],\n", "}\n", "d.add(d_data)" ] @@ -351,8 +351,8 @@ "metadata": {}, "outputs": [], "source": [ - "d.add({\"i\": [\"san-diego\"], \"j\": [\"chicago\"], \"values\": [1.8], \"units\": [\"km\"]})\n", - "d.add({\"i\": [\"san-diego\"], \"j\": [\"topeka\"], \"values\": [1.4], \"units\": [\"km\"]})" + "d.add({\"i\": [\"san-diego\"], \"j\": [\"chicago\"], \"values\": [1.8], \"units\": [\"1000 miles\"]})\n", + "d.add({\"i\": [\"san-diego\"], \"j\": [\"topeka\"], \"values\": [1.4], \"units\": [\"1000 miles\"]})" ] }, { @@ -388,7 +388,7 @@ "metadata": {}, "outputs": [], "source": [ - "f = run.optimization.scalars.create(name=\"f\", value=90, unit=\"USD/km\")\n", + "f = run.optimization.scalars.create(name=\"f\", value=90, unit=\"dollars per case per 1000 miles\")\n", "f.docs = \"Freight\"" ] }, @@ -421,9 +421,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Here, *supply* can only come from the factories in `IndexSet` *i*, while *demand* needs to be met at the markets in `IndexSet` *j*.\n", + "Here, *supply* can only come from the canning plant in **IndexSet** *i*, while *demand* needs to be met at the markets in **IndexSet** *j*.\n", "\n", - "Shipment happens from a factory to a market, so *x* needs to be assigned to both *i* and *j*." + "Shipment is defined from a canning plant to a market, so *x* needs to be assigned to both *i* and *j*." ] }, { diff --git a/tutorial/transport/2_transport-tutorial_variant.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb index daf00c02..e8b1b2d7 100644 --- a/tutorial/transport/2_transport-tutorial_variant.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -157,7 +157,7 @@ "For instances of a **Variable** or a **Parameter** that have multiple dimensions,\n", "you can use **pandas** for filtering and inspecting the data.\n", "\n", - "The following cell shows the data for a using the distance parameter *d* and cast the `data` to a **pandas.DataFrame**." + "The following cell shows the data for a using the distance parameter *d* and cast the `Parameter.data` to a **pandas.DataFrame**." ] }, { @@ -471,7 +471,7 @@ "\n", "Run the following in the command-line:\n", "```\n", - "ixmp4 platforms delete transport-tutorial\n", + "ixmp4 platforms remove transport-tutorial\n", "```\n", "\n", "The prompt will ask whether you also want to delete the SQLite database file from your computer." From ccf12ac88e6d9229ce2ff942fceee9e2ce180ef5 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Tue, 14 Jan 2025 12:36:37 +0100 Subject: [PATCH 35/36] =?UTF-8?q?=F0=9F=90=9B=20fix(tutorials):=20Ensure?= =?UTF-8?q?=20parameters=20&=20indexsets=20are=20aligned?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tutorial/transport/dantzig_model_linopy.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tutorial/transport/dantzig_model_linopy.py b/tutorial/transport/dantzig_model_linopy.py index 22f665be..3cfaffd3 100644 --- a/tutorial/transport/dantzig_model_linopy.py +++ b/tutorial/transport/dantzig_model_linopy.py @@ -6,13 +6,19 @@ def create_parameter( parameter: Parameter, - index: "pd.Index[str]" | list["pd.Index[str]"], + index: "pd.Index[str] | list[pd.Index[str]]", + index_name: str | list[str], name: str, ) -> "pd.Series[float]": if isinstance(index, list): index = pd.MultiIndex.from_product(index) - return pd.Series(data=parameter.values, index=index, name=name) + # Ensure parameter.data are aligned with the index + sorted_values = ( + pd.DataFrame(parameter.data).set_index(index_name).loc[index.values]["values"] + ) + + return pd.Series(data=sorted_values, index=index, name=name) def create_dantzig_model(run: Run) -> linopy.Model: @@ -27,16 +33,19 @@ def create_dantzig_model(run: Run) -> linopy.Model: a = create_parameter( parameter=run.optimization.parameters.get("a"), index=i, + index_name="i", name="capacity of plant i in cases", ) b = create_parameter( parameter=run.optimization.parameters.get("b"), index=j, + index_name="j", name="demand at market j in cases", ) d = create_parameter( parameter=run.optimization.parameters.get("d"), index=[i, j], + index_name=["i", "j"], name="distance in thousands of miles", ) f = run.optimization.scalars.get("f").value From 4cc277da6f75f60eae6da812ff118edb00e66812 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Tue, 14 Jan 2025 12:38:15 +0100 Subject: [PATCH 36/36] =?UTF-8?q?=E2=9C=A8=20feat(tutorials):=20Clean=20up?= =?UTF-8?q?=20&=20make=20consistent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0_transport-tutorial_platform-setup.ipynb | 20 +-- tutorial/transport/1_transport-tutorial.ipynb | 120 ++++++++---------- .../2_transport-tutorial_variant.ipynb | 89 ++++++------- 3 files changed, 100 insertions(+), 129 deletions(-) diff --git a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb index eebbd1d0..098459a2 100644 --- a/tutorial/transport/0_transport-tutorial_platform-setup.ipynb +++ b/tutorial/transport/0_transport-tutorial_platform-setup.ipynb @@ -26,7 +26,7 @@ "\n", "This tutorial consists of three Jupyter notebooks:\n", "\n", - "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", + "0. Set up an `ixmp4.Platform` to store the scenario input data and solution\n", "1. Implement the **baseline version of the transport problem** and solve it\n", "2. Create an **alternative scenario** and solve it " ] @@ -83,7 +83,7 @@ "id": "b6209e20-9979-4f3b-b6b7-fe37a1c09366", "metadata": {}, "source": [ - "## Defining units in the platform and database\n", + "## Defining units in the `Platform` and database\n", "\n", "The **ixmp4** package requires that units are defined explicitly before adding data using them.\n", "\n", @@ -92,7 +92,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "9be63ed0-aca6-44e3-a6c6-d8fdf8ec2549", "metadata": {}, "outputs": [], @@ -154,7 +154,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "6c1a395d-6c8a-489c-9aa8-39d24895ca51", "metadata": {}, "outputs": [], @@ -195,19 +195,11 @@ "The prompt will ask whether you also want to delete the SQLite database file from your computer, \n", "answer `y` for a complete deletion." ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9395354e-2a0a-45f1-b819-34af7d925805", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -221,7 +213,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/tutorial/transport/1_transport-tutorial.ipynb b/tutorial/transport/1_transport-tutorial.ipynb index 72c64cdd..73dbb0c3 100644 --- a/tutorial/transport/1_transport-tutorial.ipynb +++ b/tutorial/transport/1_transport-tutorial.ipynb @@ -25,7 +25,7 @@ "\n", "This tutorial consists of three Jupyter notebooks:\n", "\n", - "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", + "0. Set up an `ixmp4.Platform` to store the scenario input data and solution\n", "1. Implement the **baseline version of the transport problem** and solve it\n", "2. Create an **alternative scenario** and solve it " ] @@ -45,7 +45,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## The platform as a connection to the database\n", + "## The `Platform` as a connection to the database\n", "\n", "An [**ixmp4.Platform**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/platform.html#ixmp4.core.platform.Platform)\n", "is the connection to a database instance that can hold scenario data and relevant additional information." @@ -57,15 +57,8 @@ "metadata": {}, "outputs": [], "source": [ - "import ixmp4" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ + "import ixmp4\n", + "\n", "platform = ixmp4.Platform(\"transport-tutorial\")" ] }, @@ -75,14 +68,14 @@ "source": [ "An [**ixmp4.Run**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/run.html#ixmp4.core.run.Run)\n", "is an object that holds all relevant information for one quantification of a \"scenario\". \n", - "A run is identified by a *model name*, a *scenario name* and an automatically assigned *version number*.\n", + "A `Run` is identified by a *model name*, a *scenario name* and an automatically assigned *version number*.\n", "\n", - "As a first step to solve the **transport problem**, we create a new run." + "As a first step to solve the **transport problem**, we create a new `Run`." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -95,13 +88,13 @@ "source": [ "## Defining the structure of the optimization problem\n", "\n", - "### The IndexSets\n", + "### The `IndexSet`s\n", "\n", - "An **IndexSet** defines a list of elements with a name. These sets can be used for \"indexed assignment\" of parameters, variables and equations. \n", - "The entries of these parameters, etc. are then validated against the elements of the linked set. \n", - "In database terms, a column of a parameter, etc. can be \"foreign-keyed\" onto an set.\n", + "An `IndexSet` defines a list of elements with a name. These sets can be used for \"indexed assignment\" of `Parameter`s, `Variable`s and `Equation`s. \n", + "The entries of these `Parameter`s, etc. are then validated against the elements of the linked set. \n", + "In database terms, a column of a `Parameter`, etc. is \"foreign-keyed\" onto a `IndexSet`.\n", "\n", - "Below, we first show the data as they would be written in the linopy tutorial." + "Below, we first show the data as they would be written in the **GAMS** tutorial." ] }, { @@ -122,7 +115,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -134,7 +127,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can display the elements of any **IndexSet** as a Python list:" + "We can display the data (a.k.a elements) of any `IndexSet` as a Python list:" ] }, { @@ -150,12 +143,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "An **IndexSet** can have a docstring as a means for documentation." + "An `IndexSet` can have a docstring as a means for documentation." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -166,14 +159,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "For simplicity, the steps of creating an **IndexSet** and assigning elements can be done in one line.\n", + "For simplicity, the steps of creating an `IndexSet` and assigning elements can be done in one line.\n", "\n", - "We illustrate this for the second index-set of the transport problem." + "We illustrate this for the second `IndexSet` of the transport problem." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -184,12 +177,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "To add the docstring, we now have to explicitly get the index-set *j* and add the documentation." + "To add the docstring, we now have to explicitly get the `IndexSet` *j* and add the documentation." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -202,10 +195,10 @@ "source": [ "### Parameters of the optimization problem\n", "\n", - "A **Parameter** is a table with a number of index columns (each constrained to an **IndexSet**) as well as *units* and *values* columns.\n", + "A `Parameter` is a table with a number of index columns (each constrained to an `IndexSet`) as well as *units* and *values* columns.\n", "\n", "As a next step to solving the transport problem, we define the parameters *capacity* and *demand*.\n", - "The parameters are assigned on the indexsets *i* and *j*, respectively." + "The parameters are assigned on the `IndexSet`s *i* and *j*, respectively." ] }, { @@ -226,12 +219,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The parameter data can be assigned as a dictionary." + "The data of the `Parameter` can be assigned as a dictionary." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -250,18 +243,17 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Alternatively, the parameter data can be passed as a **pandas.DataFrame**." + "Alternatively, the data can be passed as a `pandas.DataFrame`." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", - "\n", "b = run.optimization.parameters.create(\"b\", constrained_to_indexsets=[\"j\"])\n", "b.docs = \"Demand at market j\"\n", "\n", @@ -280,7 +272,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Notice how the data has three columns but has only been linked to one **IndexSet**? That's on purpose: Every **Parameter** needs to have (the columns) *values* and *units*. The value(s) can be any number(s), but the units have to be defined a-priori in the **ixmp4.Platform**.\n", + "Notice how the data has three columns but has only been linked to one `IndexSet`? That's on purpose: Every `Parameter` needs to have (the columns) *values* and *units*. The value(s) can be any number(s), but the units have to be defined a-priori in the `ixmp4.Platform`.\n", "\n", "Here's how to access `parameter.data` to e.g. quickly confirm that *b* is set correctly:" ] @@ -315,14 +307,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "It is possible to add data to a parameter in several steps...\n", + "It is possible to add data to a `Parameter` in several steps...\n", "\n", "Here, we first define the parameter *d* and add four datapoints." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -347,7 +339,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -361,7 +353,7 @@ "source": [ "
\n", "\n", - "Every time you add data, **all** columns of the parameter must be present!\n", + "Every time you add data, **all** columns of the `Parameter` must be present!\n", "\n", "
" ] @@ -372,7 +364,7 @@ "source": [ "### Scalars\n", "\n", - "Another type of input data for optimization problems is a **Scalar**. These are not linked to an **IndexSet**, but consist of only a value and a unit (and a docstring)." + "Another type of input data for optimization problems is a `Scalar`. These are not linked to an `IndexSet`, but consist of only a *value* and a *unit* (and a docstring)." ] }, { @@ -384,11 +376,13 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ - "f = run.optimization.scalars.create(name=\"f\", value=90, unit=\"dollars per case per 1000 miles\")\n", + "f = run.optimization.scalars.create(\n", + " name=\"f\", value=90, unit=\"dollars per case per 1000 miles\"\n", + ")\n", "f.docs = \"Freight\"" ] }, @@ -398,9 +392,9 @@ "source": [ "### Defining the solution structure\n", "\n", - "The solution of an optimization problem are a list of **Variable** and **Equation** objects.\n", + "The solution of an optimization problem is a list of `Variable` and `Equation` objects.\n", "\n", - "We first define the variables and equations in the **ixmp4.Run**. The values of the solution (level and marginal, mathematically speaking) are read from the **linopy** output after solving the problem." + "We first define the `Variable`s and `Equation`s in the `ixmp4.Run`. The values of the solution (level and marginal, mathematically speaking) are read from the **linopy** output after solving the problem." ] }, { @@ -421,14 +415,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Here, *supply* can only come from the canning plant in **IndexSet** *i*, while *demand* needs to be met at the markets in **IndexSet** *j*.\n", + "Here, *supply* can only come from the canning plant in `IndexSet` *i*, while *demand* needs to be met at the markets in `IndexSet` *j*.\n", "\n", "Shipment is defined from a canning plant to a market, so *x* needs to be assigned to both *i* and *j*." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -445,13 +439,13 @@ "source": [ "## Solve the scenario\n", "\n", - "In this tutorial, we solve the tutorial using the open-source solver *highs* in **linopy**. \n", + "In this tutorial, we solve the tutorial using the open-source solver [*highs*](https://github.com/ERGO-Code/HiGHS) in **linopy**. \n", "\n", - "The ``create_dantzig_model()`` function is a convenience shortcut to retrieve the data from the **ixmp4.Run**\n", - "and set up a linopy model correctly to solve the transport problem. Please see ``linopy_model.py`` for details.\n", + "The ``create_dantzig_model()`` function is a convenience shortcut to retrieve the data from the `ixmp4.Run`\n", + "and set up a **linopy** model correctly to solve the transport problem. Please see ``linopy_model.py`` for details.\n", "\n", "The solution of the transport problem is stored with the model object automatically.\n", - "The function ``store_dantzig_solution()`` reads the solution and stores it in the respective **Variable** and **Equation** objects of the **ixmp4.Run**." + "The function ``store_dantzig_solution()`` reads the solution and stores it in the respective `Variable` and `Equation` objects of the `ixmp4.Run`." ] }, { @@ -465,7 +459,6 @@ " read_dantzig_solution,\n", ")\n", "\n", - "\n", "linopy_model = create_dantzig_model(run=run)\n", "linopy_model.solve(\"highs\")\n", "read_dantzig_solution(model=linopy_model, run=run)" @@ -511,7 +504,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The levels and marginals of the **Equation** show the shipped quantities and shadow prices (\"dual variables\") of the least-cost solution." + "The levels and marginals of the `Equation`s show the shipped quantities and shadow prices (\"dual variables\") of the least-cost solution." ] }, { @@ -536,36 +529,29 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Setting a default version of a run\n", + "## Setting a default version of a `Run`\n", "\n", - "The key benefit of **ixmp4** is handling a large number of scenarios - aka **ixmp4.Run** objects - in a version-controlled database.\n", - "Each run is identified by a *model name*, a *scenario name* and an automatically assigned *version number*.\n", + "The key benefit of **ixmp4** is handling a large number of scenarios - aka `ixmp4.Run` objects - in a version-controlled database.\n", + "Each `Run` is identified by a *model name*, a *scenario name* and an automatically assigned *version number*.\n", "\n", - "For every model-scenario combination, we can assign one run as the *default version*.\n", + "For every model-scenario combination, we can assign one `Run` as the *default version*.\n", "This allows to keep previous versions in the database (for easy reference and comparison) but have a well-defined approach to get the \"right\" version (e.g., the latest version of a scenario)." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ "run.set_as_default()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -579,7 +565,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.12.3" } }, "nbformat": 4, diff --git a/tutorial/transport/2_transport-tutorial_variant.ipynb b/tutorial/transport/2_transport-tutorial_variant.ipynb index e8b1b2d7..a1b32d46 100644 --- a/tutorial/transport/2_transport-tutorial_variant.ipynb +++ b/tutorial/transport/2_transport-tutorial_variant.ipynb @@ -25,7 +25,7 @@ "\n", "This tutorial consists of three Jupyter notebooks:\n", "\n", - "0. Set up an **ixmp4.Platform** to store the scenario input data and solution\n", + "0. Set up an `ixmp4.Platform` to store the scenario input data and solution\n", "1. Implement the **baseline version of the transport problem** and solve it\n", "2. Create an **alternative scenario** and solve it " ] @@ -45,7 +45,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## The platform as a connection to the database\n", + "## The `Platform` as a connection to the database\n", "\n", "An [**ixmp4.Platform**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/platform.html#ixmp4.core.platform.Platform)\n", "is the connection to a database instance that can hold scenario data and relevant additional information." @@ -58,15 +58,7 @@ "outputs": [], "source": [ "import ixmp4\n", - "import pandas as pd" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ + "\n", "platform = ixmp4.Platform(\"transport-tutorial\")" ] }, @@ -75,7 +67,7 @@ "metadata": {}, "source": [ "As a first step, we list all scenarios (aka [**ixmp4.Run**](https://docs.ece.iiasa.ac.at/projects/ixmp4/en/latest/devs/ixmp4.core/run.html#ixmp4.core.run.Run) instances)\n", - "available in the platform connected to the database instance." + "available in the `Platform` connected to the database instance." ] }, { @@ -103,14 +95,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Retrieve a run from the platform\n", + "## Retrieve a `Run` from the `Platform`\n", "\n", - "As a first step in this notebook, you can load the **ixmp4.Run** that you created in Notebook 1." + "As a first step in this notebook, you can load the `ixmp4.Run` that you created in [Notebook 1](1_transport-tutorial.ipynb)." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -137,7 +129,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can check that the solution from Notebook 1 was indeed saved by inspecting an **ixmp4.Variable**. \n", + "You can check that the solution from [Notebook 1](1_transport-tutorial.ipynb) was indeed saved by inspecting an `ixmp4.Variable`. \n", "The `data` of any optimization object is stored internally as a dictionary." ] }, @@ -154,22 +146,31 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "For instances of a **Variable** or a **Parameter** that have multiple dimensions,\n", + "For instances of a `Variable` or a `Parameter` that have multiple dimensions,\n", "you can use **pandas** for filtering and inspecting the data.\n", "\n", - "The following cell shows the data for a using the distance parameter *d* and cast the `Parameter.data` to a **pandas.DataFrame**." + "The following cell shows how to retrieve the distance parameter *d* and cast the `Parameter.data` to a `pandas.DataFrame`." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ + "import pandas as pd\n", + "\n", "d = run.optimization.parameters.get(\"d\")\n", "distance = pd.DataFrame(d.data)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**pandas** enables easy and powerful filtering, e.g. showing only the distances for connections from Seattle:" + ] + }, { "cell_type": "code", "execution_count": null, @@ -218,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 46, "metadata": {}, "outputs": [], "source": [ @@ -246,12 +247,12 @@ "metadata": {}, "source": [ "We now modify the structure and parameters of the *detroit* scenario.\n", - "First, we reduce the demand in *chicago* to ensure a feasible problem.." + "First, we reduce the demand in *chicago* to ensure a feasible problem." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 48, "metadata": {}, "outputs": [], "source": [ @@ -269,7 +270,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 49, "metadata": {}, "outputs": [], "source": [ @@ -282,7 +283,7 @@ " \"i\": [\"seattle\", \"san-diego\"],\n", " \"j\": [\"detroit\", \"detroit\"],\n", " \"values\": [1.7, 1.9],\n", - " \"units\": [\"km\", \"km\"],\n", + " \"units\": [\"1000 miles\", \"1000 miles\"],\n", " }\n", ")" ] @@ -294,7 +295,7 @@ "### Solve the new scenario\n", "\n", "Now, we create a **linopy** model, solve it, and read the solution to store it\n", - "in the respective **Variable** and **Equation** objects of the **ixmp4.Run**." + "in the respective `Variable` and `Equation` objects of the `ixmp4.Run`." ] }, { @@ -308,7 +309,6 @@ " read_dantzig_solution,\n", ")\n", "\n", - "\n", "linopy_model_detroit = create_dantzig_model(run=run_detroit)\n", "linopy_model_detroit.solve(\"highs\")\n", "read_dantzig_solution(model=linopy_model_detroit, run=run_detroit)" @@ -320,12 +320,12 @@ "source": [ "## Setting a default version of the scenario\n", "\n", - "As in Notebook 1, we set the *detroit* scenario as the default version so that we can easily retrieve it later." + "As in [Notebook 1](1_transport-tutorial.ipynb), we set the *detroit* scenario as the default version so that we can easily retrieve it later." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 51, "metadata": {}, "outputs": [], "source": [ @@ -338,9 +338,9 @@ "source": [ "## Display and analyze the results\n", "\n", - "We can now compare the *standard* instance of the *transport problem* and the *detroit* scenario.\n", + "We can now compare the *standard* instance of the **transport problem** and the *detroit* scenario.\n", "\n", - "The next two cells show the objective values of the two runs." + "The next two cells show the objective values of the two `Run`s." ] }, { @@ -375,7 +375,7 @@ "source": [ "You see that the *detroit* scenario has higher total cost.\n", "\n", - "The next two cells compare the optimal assignment of shipments from plants to markets in the two runs." + "The next two cells compare the optimal assignment of shipments from plants to markets in the two `Run`s." ] }, { @@ -402,7 +402,7 @@ "metadata": {}, "outputs": [], "source": [ - "run_detroit.optimization.equations.get(\"demand\").data" + "pd.DataFrame(run_detroit.optimization.equations.get(\"demand\").data)" ] }, { @@ -411,7 +411,7 @@ "source": [ "## Scenario version management\n", "\n", - "As above, you can now list all scenarios available in the database instance to which the **ixmp4.Platform** is connected.\n", + "As above, you can now list all scenarios available in the database instance to which the `ixmp4.Platform` is connected.\n", "\n", "You should now see (at least) two scenarios." ] @@ -431,15 +431,15 @@ "source": [ "When developing scenarios, we often make minor variations to numerous scenarios, and changing the *scenario name* every time is not practical.\n", "\n", - "The **ixmp4** package provides a more efficient approach to scenario version management: Every time that you *create* a new run or *clone* an existing run and the *model-scenario-name* combination already exists, a new *version* will be created.\n", + "The **ixmp4** package provides a more efficient approach to scenario version management: Every time that you `create()` a new `Run` or `clone()` an existing `Run` and the *model-scenario-name* combination already exists, a new *version* will be created.\n", "\n", - "You can get a specific *version* by including the version number in the call to get an **ixmp4.Run** like\n", + "You can get a specific *version* by including the version number in the call to get an `ixmp4.Run` like\n", "\n", "```python\n", "platforms.runs.get(model, scenario, version)\n", "```\n", "\n", - "You also can assign one of the versions as *default*, so that this run will be retrieved when you call\n", + "You also can assign one of the versions as *default*, so that this `Run` will be retrieved when you call\n", "\n", "```python\n", "platforms.runs.get(model, scenario)\n", @@ -447,9 +447,9 @@ "\n", "without a version number.\n", "\n", - "All versions will be kept in the database and are accessible via the **ixmp4.Platform**.\n", + "All versions will be kept in the database and are accessible via the `ixmp4.Platform`.\n", "\n", - "If you have run this tutorial multiple times, you can tabulate all runs - including the non-default versions - as illustrated below." + "If you have run this tutorial multiple times, you can tabulate all `Run`s - including the non-default versions - as illustrated below." ] }, { @@ -474,21 +474,14 @@ "ixmp4 platforms remove transport-tutorial\n", "```\n", "\n", - "The prompt will ask whether you also want to delete the SQLite database file from your computer." + "The prompt will ask whether you also want to delete the SQLite database file from your computer, answer `y` for a complete deletion." ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -502,7 +495,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.12.3" } }, "nbformat": 4,