# utrechtuniversity/mimosa architecture

> Architecture diagram of the GitHub repository utrechtuniversity/mimosa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/utrechtuniversity/mimosa
- Repository: https://github.com/utrechtuniversity/mimosa

## Overview

MIMOSA is a regional integrated-assessment model for climate-policy cost-benefit analysis. A user configures and runs the model; MIMOSA validates parameters, assembles and instantiates a selectable model, then solves it or evaluates a simulation and can save results. Its domain model covers emissions and temperature, sea-level rise, damages, mitigation, policy allocation and transfers, and welfare/objectives. The index and excerpts show orchestration and module references, but most component implementations and runtime calls were not sampled; links below are limited to documented or indexed relationships.

Main entry points: [`mimosa/abstract_model.py`](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/abstract_model.py) (Abstract model builder), [`mimosa/core/initializer.py`](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/initializer.py) (Model preprocessor), [`mimosa/mimosa.py`](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/mimosa.py) (MIMOSA API), [`mimosa/concrete_model/instantiate_params.py`](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/concrete_model/instantiate_params.py) (Parameter instantiation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Model runtime"]
  node_api["MIMOSA API<br/>[mimosa.py]"]
  node_preprocessor["Model preprocessor<br/>[initializer.py]"]
  node_abstract["Abstract model builder<br/>[abstract_model.py]"]
  node_solver["Optimization solver<br/>[solver.py]"]
end

subgraph group_domain["Climate and economy"]
  node_emissions["Emissions and temperature<br/>[emissions.py]"]
  node_slr["Sea-level rise<br/>[sealevelrise.py]"]
  node_damages["Climate damages"]
  node_economy["Production and mitigation"]
end

subgraph group_policy["Policy and welfare"]
  node_trading["Emissions trading"]
  node_transfers["Financial transfers"]
  node_effort["Effort sharing"]
  node_welfare["Welfare and objective"]
end

subgraph group_inputs["Inputs and setup"]
  node_config["Config parsing<br/>[parseconfig.py]"]
  node_parsers["Typed config parsers<br/>[parsers.py]"]
  node_data[("Input data store<br/>[datastore.py]")]
  node_regional["Regional parameters<br/>[main.py]"]
  node_instantiate["Parameter instantiation"]
  node_constraints["Custom constraints<br/>[set_constraints.py]"]
end

subgraph group_results["Simulation and results"]
  node_simulator["Equation simulator<br/>[simulator.py]"]
  node_simobjects["Simulation results<br/>[objects.py]"]
  node_export["Result export<br/>[save.py]"]
end

node_user(("Model user"))

node_user -->|"configures and runs"| node_api
node_api -->|"builds model"| node_preprocessor
node_api -->|"solves model"| node_solver
node_api -->|"runs simulation"| node_simulator
node_api -->|"saves results"| node_export
node_preprocessor -->|"validates parameters"| node_config
node_preprocessor -->|"creates model"| node_abstract
node_preprocessor -->|"loads data"| node_data
node_preprocessor -->|"loads regional parameters"| node_regional
node_preprocessor -->|"instantiates model"| node_instantiate
node_preprocessor -->|"applies configured constraints"| node_constraints
node_config -->|"uses parser utilities"| node_parsers
node_instantiate -->|"interpolates data"| node_data
node_instantiate -->|"reads regional values"| node_regional
node_abstract -->|"builds component"| node_emissions
node_abstract -->|"builds component"| node_slr
node_abstract -->|"selects damage module"| node_damages
node_abstract -->|"builds components"| node_economy
node_abstract -->|"selects trade module"| node_trading
node_abstract -->|"selects transfer module"| node_transfers
node_abstract -->|"selects regime"| node_effort
node_abstract -->|"builds objective"| node_welfare
node_simulator -->|"produces results"| node_simobjects

click node_api "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/mimosa.py"
click node_preprocessor "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/initializer.py"
click node_abstract "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/abstract_model.py"
click node_solver "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/solver.py"
click node_simulator "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/simulation/simulator.py"
click node_simobjects "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/simulation/objects.py"
click node_export "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/export/save.py"
click node_config "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/config/parseconfig.py"
click node_parsers "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/config/utils/parsers.py"
click node_data "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/data/datastore.py"
click node_regional "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/regional_params/main.py"
click node_instantiate "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/concrete_model/instantiate_params.py"
click node_constraints "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/concrete_model/custom_constraints/set_constraints.py"
click node_emissions "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/components/emissions.py"
click node_slr "https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/components/sealevelrise.py"
click node_damages "https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/damages"
click node_economy "https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components"
click node_trading "https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/emissiontrade"
click node_transfers "https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/financialtransfer"
click node_effort "https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/effortsharing"
click node_welfare "https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/welfare"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_preprocessor,node_abstract,node_solver,node_user toneBlue
class node_emissions,node_slr,node_damages,node_economy toneAmber
class node_trading,node_transfers,node_effort,node_welfare toneMint
class node_config,node_parsers,node_data,node_regional,node_instantiate,node_constraints toneRose
class node_simulator,node_simobjects,node_export toneIndigo
```

## Components

### Model runtime

- [MIMOSA API](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/mimosa.py): `mimosa/mimosa.py`
- [Model preprocessor](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/initializer.py): `mimosa/core/initializer.py`
- [Abstract model builder](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/abstract_model.py): `mimosa/abstract_model.py`
- [Optimization solver](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/solver.py): `mimosa/core/solver.py`

### Climate and economy

- [Emissions and temperature](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/components/emissions.py): `mimosa/components/emissions.py`
- [Sea-level rise](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/components/sealevelrise.py): `mimosa/components/sealevelrise.py`
- [Climate damages](https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/damages): `mimosa/components/damages`
- [Production and mitigation](https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components): `mimosa/components`

### Policy and welfare

- [Emissions trading](https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/emissiontrade): `mimosa/components/emissiontrade`
- [Financial transfers](https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/financialtransfer): `mimosa/components/financialtransfer`
- [Effort sharing](https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/effortsharing): `mimosa/components/effortsharing`
- [Welfare and objective](https://github.com/utrechtuniversity/mimosa/tree/master/mimosa/components/welfare): `mimosa/components/welfare`

### Inputs and setup

- [Config parsing](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/config/parseconfig.py): `mimosa/common/config/parseconfig.py`
- [Typed config parsers](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/config/utils/parsers.py): `mimosa/common/config/utils/parsers.py`
- [Input data store](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/data/datastore.py): `mimosa/common/data/datastore.py`
- [Regional parameters](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/common/regional_params/main.py): `mimosa/common/regional_params/main.py`
- [Parameter instantiation](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/concrete_model/instantiate_params.py): `mimosa/concrete_model/instantiate_params.py`
- [Custom constraints](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/concrete_model/custom_constraints/set_constraints.py): `mimosa/concrete_model/custom_constraints/set_constraints.py`

### Simulation and results

- [Equation simulator](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/simulation/simulator.py): `mimosa/core/simulation/simulator.py`
- [Simulation results](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/core/simulation/objects.py): `mimosa/core/simulation/objects.py`
- [Result export](https://github.com/utrechtuniversity/mimosa/blob/master/mimosa/export/save.py): `mimosa/export/save.py`

### Other components

- **Model user**

## Connections

- Model user → MIMOSA API: configures and runs (evidence: `mimosa/mimosa.py`)
- MIMOSA API → Model preprocessor: builds model (evidence: `mimosa/mimosa.py`)
- MIMOSA API → Optimization solver: solves model (evidence: `mimosa/mimosa.py`)
- MIMOSA API → Equation simulator: runs simulation (evidence: `mimosa/mimosa.py`)
- MIMOSA API → Result export: saves results (evidence: `mimosa/mimosa.py`)
- Model preprocessor → Config parsing: validates parameters (evidence: `mimosa/core/initializer.py`)
- Model preprocessor → Abstract model builder: creates model (evidence: `mimosa/core/initializer.py`)
- Model preprocessor → Input data store: loads data (evidence: `mimosa/core/initializer.py`)
- Model preprocessor → Regional parameters: loads regional parameters (evidence: `mimosa/core/initializer.py`)
- Model preprocessor → Parameter instantiation: instantiates model (evidence: `mimosa/core/initializer.py`)
- Model preprocessor → Custom constraints: applies configured constraints (evidence: `mimosa/core/initializer.py`)
- Config parsing → Typed config parsers: uses parser utilities (evidence: `mimosa/common/config/parseconfig.py`)
- Parameter instantiation → Input data store: interpolates data (evidence: `mimosa/concrete_model/instantiate_params.py`)
- Parameter instantiation → Regional parameters: reads regional values (evidence: `mimosa/concrete_model/instantiate_params.py`)
- Abstract model builder → Emissions and temperature: builds component (evidence: `mimosa/abstract_model.py`)
- Abstract model builder → Sea-level rise: builds component (evidence: `mimosa/abstract_model.py`)
- Abstract model builder → Climate damages: selects damage module (evidence: `mimosa/abstract_model.py`)
- Abstract model builder → Production and mitigation: builds components (evidence: `mimosa/abstract_model.py`)
- Abstract model builder → Emissions trading: selects trade module (evidence: `mimosa/abstract_model.py`)
- Abstract model builder → Financial transfers: selects transfer module (evidence: `mimosa/abstract_model.py`)
- Abstract model builder → Effort sharing: selects regime (evidence: `mimosa/abstract_model.py`)
- Abstract model builder → Welfare and objective: builds objective (evidence: `mimosa/abstract_model.py`)
- Equation simulator → Simulation results: produces results (evidence: `mimosa/core/simulation/simulator.py`)
