You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,26 @@
2
2
3
3
<!--next-version-placeholder-->
4
4
5
+
## v0.1.5 (17/02/2026)
6
+
7
+
### Breaking Changes
8
+
9
+
-**Solver migration**: Replaced `cplex_direct` (previously a core dependency) with **HiGHS** as the recommended solver, now available as an optional extra
10
+
- Install with `pip install "optigob[solvers]"` or `poetry install -E solvers`
11
+
- Users without HiGHS can specify any Pyomo-compatible solver via the `solver_name` parameter in their SIP file
12
+
13
+
### Features
14
+
15
+
-**Configurable solver**: Users can now specify their preferred solver in the SIP input file (e.g., `solver_name: "highs"`, `solver_name: "glpk"`)
16
+
-**Package-level imports**: Key classes (`Optigob`, `OptiGobDataManager`, `InputHelper`, `configure_logging`, `get_logger`) are now exported from `__init__.py` for cleaner imports (e.g., `from optigob import Optigob`)
17
+
18
+
### Documentation
19
+
20
+
- Fixed documentation inconsistencies across README, INSTALLATION, and CLAUDE.md
21
+
- Added `limitations.md` to ReadTheDocs navigation
22
+
- Updated Poetry extras install syntax in installation guide
23
+
- Corrected module tree to reflect actual `substitution/` directory structure
A land use change and environmental assessment tool based on preconfigured data animal population numbers based on negative emissions allowance.
11
+
`OptiGob` is a Python-based decision support tool for exploring Ireland's agriculture, forestry, and other land use (AFOLU) sector under different climate and land use transition pathways. It combines pre-computed scenario data from [GOBLIN Lite](https://github.com/colmduff/goblin_lite) (agriculture and land use), FERS-CBM (forestry carbon balance), and LCAD2.0 (anaerobic digestion) into a single interface that optimises livestock populations subject to land and emissions constraints — without requiring users to run the upstream modelling chains. It is designed for researchers, policymakers, and educators investigating environmental and economic trade-offs associated with net-zero and split-gas emissions targets.
12
12
13
13
---
14
14
15
15
## High-Level Architecture & Module Interaction
16
16
17
-
The `optigob` package is a modular land use and environmental assessment framework. It is designed to calculate, aggregate, and analyze greenhouse gas emissions, land use, protein, bioenergy, harvested wood products, and substitution impacts for both baseline and scenario cases. The system is built around a central API (`Optigob`), which coordinates specialized modules for each sector and data type.
17
+
The `optigob` package is a modular land use and environmental assessment framework. It calculates greenhouse gas emissions, land use, protein output, bioenergy, harvested wood products, and substitution impacts for both baseline and scenario cases. The system is built around a central API (`Optigob`), which coordinates specialised modules for each sector and data type.
18
18
19
19
### Module Structure
20
20
@@ -24,7 +24,8 @@ optigob/
24
24
│ ├── baseline_emissions.py
25
25
│ ├── emissions_budget.py
26
26
│ ├── landarea_budget.py
27
-
│ ├── econ_output.py
27
+
│ └── econ_output.py
28
+
├── substitution/
28
29
│ └── substitution.py
29
30
├── bioenergy/
30
31
│ └── bioenergy_budget.py
@@ -54,7 +55,7 @@ optigob/
54
55
-**budget_model/baseline_emissions.py**: Provides baseline emissions by sector for all gases.
55
56
-**budget_model/landarea_budget.py**: Calculates land area (aggregated, disaggregated, HNV) by sector for baseline and scenario.
56
57
-**budget_model/econ_output.py**: Calculates protein, bioenergy, harvested wood products, and livestock population by sector.
57
-
-**budget_model/substitution.py**: Centralizes logic for substitution impacts (e.g., wood for fossil, protein crop substitution).
58
+
-**substitution/substitution.py**: Centralizes logic for substitution impacts (e.g., wood for fossil, protein crop substitution).
58
59
-**protein_crops/protein_crops_budget.py**: Handles protein crop area, yield, and protein output calculations.
59
60
-**livestock/livestock_budget.py**: Calculates livestock sector budgets, including emissions, land use, and protein.
60
61
-**forest/forest_budget.py**: Handles forest sector land area, emissions, and harvested wood product calculations.
@@ -90,9 +91,56 @@ optigob/
90
91
- Substitution logic is centralized in `substitution.py` and called by emissions and output modules as needed.
91
92
- Specialized sector modules (livestock, forest, protein crops, etc.) encapsulate sector-specific calculations and are used by the budget modules.
92
93
93
-
### Default Database
94
+
### Input Data and Default Database
94
95
95
-
A default database offers multiple permutations of abatement and productivity scenarios, but certain parameters (e.g., wetland restoration, forestry on organic soils) are limited to predefined combinations. A helper function identifies valid options to prevent unsupported configurations. Custom databases can also be supplied, provided they follow the expected schema.
96
+
`optigob` ships with a pre-built SQLite database (`src/optigob/database/optigob_default_0.1.1.db`) that is installed automatically with the package. **No additional data download is required.**
97
+
98
+
#### Data provenance
99
+
100
+
The bundled database does not contain raw observational data. It contains **derived scenario scaler tables** generated by three upstream, sector-specific models:
101
+
102
+
| Upstream model | Domain | Reference |
103
+
|---|---|---|
104
+
|[GOBLIN Lite](https://github.com/colmduff/goblin_lite)| Agriculture and land use emissions, areas, livestock productivity | Duffy et al. (2022, 2024) |
105
+
|[FERS-CBM](https://www.ucd.ie/forestecosystemresearch/)| Forest carbon balance (afforestation, existing forest, harvested wood) | Black et al. (2025); Kurz et al. (2008) |
106
+
|[LCAD2.0](https://github.com/GOBLIN-Proj/lcad_gob)| Anaerobic digestion area, emissions, and bioenergy output | Martinez-Acre et al. (2025) |
107
+
108
+
These models were run across a defined set of valid parameter combinations for **Ireland**, and reflect three levels of abatement (Baseline, MACC, Frontier). The resulting scaler tables were stored in the SQLite database. At runtime, `optigob` queries these scalers to parameterise its optimisation model — effectively acting as a surrogate that stitches together pre-computed sectoral outputs without re-running the upstream models.
109
+
110
+
#### Database contents
111
+
112
+
The database contains scaler tables for:
113
+
114
+
- Livestock emissions, area, and protein (by species, abatement type, productivity tier)
115
+
- Forest emissions, area, harvested wood products, and wood CCS
116
+
- Organic soil emissions and area
117
+
- Anaerobic digestion emissions and area
118
+
- Protein crop emissions, area, and protein output
Not all parameter combinations are valid — only those that were modelled by the upstream tools exist in the database. Use the `InputHelper` class to explore valid combinations:
125
+
126
+
```python
127
+
from optigob.input_helper import InputHelper
128
+
helper = InputHelper()
129
+
helper.print_all_combos() # View all valid parameter sets
130
+
```
131
+
132
+
See `INPUT_VARIABLES.md` for full parameter definitions and validation requirements.
133
+
134
+
#### Using a custom database
135
+
136
+
While the default database is supplied, users can update it or supply a custom database using `DatabaseManager`:
137
+
138
+
```python
139
+
from optigob.resource_manager.database_manager import DatabaseManager
140
+
db = DatabaseManager(database_path="/path/to/custom_database.db")
141
+
```
142
+
143
+
The custom database must follow the same table schema as the default.
96
144
97
145
---
98
146
@@ -109,15 +157,30 @@ A default database offers multiple permutations of abatement and productivity sc
109
157
110
158
To install the package, use pip:
111
159
160
+
```bash
161
+
pip install "optigob[solvers]"
162
+
```
163
+
164
+
if you would prefer to use an alternative solver to HiGHS, the install command is:
165
+
112
166
```bash
113
167
pip install optigob
114
168
```
115
169
170
+
Be sure to specify the solver in "solver_name" in the SIP.yaml.
0 commit comments