Skip to content

Documentation of model components

The MIMOSA model consists of several sub-modules, called model components. Each component is made up of multiple variables (global or regional), parameters and equations (called constraints).

  • Economics


    Cobb-Douglas production function, investments, consumption and capital stock

    Read more

  • Welfare


    Welfare and the utility function

    Read more

  • Emissions and temperature


    • Baseline emissions, regional mitigated emissions and cumulative emissions
    • Temperature module
    • Constraints on emissions like inertia

    Read more

  • Mitigation


    Mitigation costs, Marginal Abatement Cost curve and technological learning

    Read more

  • Sea-level rise


    Determines the level of global sea-level rise

    Read more

  • Damages


    Temperature related damages and sea-level rise related damages

    Read more

  • Effort-sharing


    Optional Various effort-sharing regimes to distribute the mitigation (and sometimes damage) costs

    Read more

  • Emission trading


    Optional Allows for global trade of emission reductions

    Read more

  • Financial transfers


    Optional Financial transfer schemes like a global damage cost pool

    Read more


Building the abstract model

Builds the abstract model for MIMOSA by combining all components. Some components are optional. In the parameters, different variants of some components can be chosen. The components are:

Source code in mimosa/abstract_model.py
def create_abstract_model(
    damage_module: str,
    emissiontrade_module: str,
    financialtransfer_module: str,
    welfare_module: str,
    objective_module: str,
) -> AbstractModel:
    """
    ## Building the abstract model

    Builds the abstract model for MIMOSA by combining all components. Some components are optional. In the
    parameters, different variants of some components can be chosen. The components are:

    - [`damage_module`](../parameters.md#model.damage%20module): The damage module to use
    - [`emissiontrade_module`](../parameters.md#model.emissiontrade%20module): The emission trading module to use
    - [`financialtransfer_module`](../parameters.md#model.financialtransfer%20module): The financial transfer module to use
    - [`welfare_module`](../parameters.md#model.welfare%20module): The welfare module to use
    - [`objective_module`](../parameters.md#model.objective%20module): The objective module to use

    """
    m = AbstractModel()

    ## Constraints
    # Each constraint will be put in this list,
    # then added to the model at the end of this file.
    constraints = []

    ## Time and region
    m.beginyear = Param()
    m.dt = Param()
    m.tf = Param()
    m.t = Set()
    m.year = None  # Initialised with concrete instance
    m.year2100 = Param()

    m.regions = Set(ordered=True)

    ######################
    # Create data params for baseline values
    ######################

    m.population = Param(
        m.t,
        m.regions,
        doc="timeandregional::population",
        units=quant.unit("billion people"),
    )
    m.baseline_GDP = Param(
        m.t,
        m.regions,
        doc="timeandregional::GDP",
        units=quant.unit("currency_unit"),
    )
    m.baseline_emissions = Param(
        m.t,
        m.regions,
        doc="timeandregional::emissions",
        units=quant.unit("emissionsrate_unit"),
    )

    ######################
    # Components
    ######################

    # Emissions and temperature equations
    constraints.extend(emissions.get_constraints(m))

    # Sea level rise
    constraints.extend(sealevelrise.get_constraints(m))

    # Damage costs
    if damage_module == "COACCH":
        constraints.extend(damages.coacch.get_constraints(m))
    elif damage_module == "nodamage":
        constraints.extend(damages.nodamage.get_constraints(m))
    else:
        raise NotImplementedError

    # Abatement costs
    constraints.extend(mitigation.get_constraints(m))

    # Emission trading
    if emissiontrade_module == "notrade":
        constraints.extend(emissiontrade.notrade.get_constraints(m))
    elif emissiontrade_module == "globalcostpool":
        constraints.extend(emissiontrade.globalcostpool.get_constraints(m))
    elif emissiontrade_module == "emissiontrade":
        constraints.extend(emissiontrade.emissiontrade.get_constraints(m))
    else:
        raise NotImplementedError(
            f"Emission trading module `{emissiontrade_module}` not implemented"
        )

    # Financial transfer
    if financialtransfer_module == "notransfer":
        constraints.extend(financialtransfer.notransfer.get_constraints(m))
    elif financialtransfer_module == "globaldamagepool":
        constraints.extend(financialtransfer.globaldamagepool.get_constraints(m))
    else:
        raise NotImplementedError(
            f"Financial transfer module `{financialtransfer_module}` not implemented"
        )

    # Effort sharing regime
    constraints.extend(effortsharing.get_constraints(m))

    # Cobb-Douglas and economics
    constraints.extend(cobbdouglas.get_constraints(m))

    # Utility and welfare
    if welfare_module == "welfare_loss_minimising":
        constraints.extend(welfare.welfare_loss_minimising.get_constraints(m))
    elif welfare_module == "cost_minimising":
        constraints.extend(welfare.cost_minimising.get_constraints(m))
    elif welfare_module == "inequal_aversion_general":
        constraints.extend(welfare.inequal_aversion_general.get_constraints(m))
    else:
        raise NotImplementedError(f"Welfare module `{welfare_module}` not implemented")

    # Objective of optimisation
    if objective_module == "utility":
        objective_rule, objective_constraints = objective.utility.get_constraints(m)
    elif objective_module == "globalcosts":
        objective_rule, objective_constraints = objective.globalcosts.get_constraints(m)
    else:
        raise NotImplementedError

    constraints.extend(objective_constraints)

    ######################
    # Add constraints to abstract model
    ######################

    for constraint in constraints:
        add_constraint(m, constraint.to_pyomo_constraint(m), constraint.name)

    m.obj = objective_rule

    return m