Models
- class ixmp4.core.model.ModelServiceFacade(backend: Backend)
- create(name: str) Model
Creates a model.
platform.models.create("Model") #> <Model 1 name='Model'>
- Parameters:
name (str) – The name of the model.
- Raises:
ModelNotUnique – If the model with name is not unique.
- Returns:
The created model.
- Return type:
- delete(ref: Model | int | str) None
Deletes a model.
platform.models.delete("Model")
- Parameters:
ref (
ixmp4.core.model.Model| int | str) – Model object, model id or model name.- Raises:
ModelNotFound – If no model matching
refexists.ModelDeletionPrevented – If the model matching
refis used in the database, preventing its deletion.Unauthorized – If the current user is not authorized to perform this action.
- get_by_name(name: str) Model
Retrieves a model by its name.
platform.models.get_by_name("Model") #> <Model 1 name='Model'>
- Parameters:
name (str) – The unique name of the model.
- Raises:
ModelNotFound – If the model with name does not exist.
- Returns:
The retrieved model.
- Return type:
- list(**kwargs: Unpack[FacadeModelFilter]) List[Model]
Lists models by specified criteria.
platform.models.list() #> [<Model 1 name='Model'>]
- Parameters:
**kwargs (any) – Filter parameters as specified in
ModelFilter.- Returns:
List of models.
- Return type:
list[
ixmp4.core.model.Model]
- tabulate(**kwargs: Unpack[FacadeModelFilter]) DataFrame
Tabulates models by specified criteria.
platform.models.tabulate() #> name id # 0 Model 1
- Parameters:
**kwargs (any) – Filter parameters as specified in
ModelFilter.- Returns:
- A data frame with the columns:
id
name
- Return type:
- class ixmp4.core.model.Model(backend: Backend, dto: DtoT)
- Filter
alias of
FacadeModelFilter
- NotFound
alias of
ModelNotFound
- NotUnique
alias of
ModelNotUnique
- DeletionPrevented
alias of
ModelDeletionPrevented
- docs: DocsDescriptor[ModelService, Model]
Model docs.