Skip to content

calliope.examples

Example models that can be loaded directly into a session.

milp(*args, **kwargs)

Returns the built-in urban-scale example model with MILP constraints enabled.

Source code in src/calliope/examples.py
def milp(*args, **kwargs):
    """Returns the built-in urban-scale example model with MILP constraints enabled."""
    return urban_scale(scenario="milp", *args, **kwargs)

national_scale(*args, **kwargs)

Returns the built-in national-scale example model.

Source code in src/calliope/examples.py
def national_scale(*args, **kwargs):
    """Returns the built-in national-scale example model."""
    return Model(
        model_definition=_EXAMPLE_MODEL_DIR / "national_scale" / "model.yaml",
        *args,
        **kwargs,
    )

operate(*args, **kwargs)

Returns the built-in urban-scale example model in operate mode.

Source code in src/calliope/examples.py
def operate(*args, **kwargs):
    """Returns the built-in urban-scale example model in operate mode."""
    return urban_scale(scenario="operate", *args, **kwargs)

time_clustering(*args, **kwargs)

Returns the built-in national-scale example model with time clustering.

Source code in src/calliope/examples.py
def time_clustering(*args, **kwargs):
    """Returns the built-in national-scale example model with time clustering."""
    return national_scale(scenario="time_clustering", *args, **kwargs)

time_resampling(*args, **kwargs)

Returns the built-in national-scale example model with time resampling.

Source code in src/calliope/examples.py
def time_resampling(*args, **kwargs):
    """Returns the built-in national-scale example model with time resampling."""
    return national_scale(scenario="time_resampling", *args, **kwargs)

urban_scale(*args, **kwargs)

Returns the built-in urban-scale example model.

Source code in src/calliope/examples.py
def urban_scale(*args, **kwargs):
    """Returns the built-in urban-scale example model."""
    return Model(
        model_definition=_EXAMPLE_MODEL_DIR / "urban_scale" / "model.yaml",
        *args,
        **kwargs,
    )