Objective Function & Cost Structure¶
Objective function¶
The model minimizes yy (total cost plus penalties):
totalcostE.. yy =e= y
+ Sum(lakecatch, Penalty2 × exceed_p(lakecatch))
+ Sum(k, exceed(k) × Penalty1)
+ (exceed_lav × Penalty1)
Where y = actual total cost:
Penalty values¶
| Variable | Penalty | Meaning |
|---|---|---|
exceed(k) |
Penalty1 = 9.999×10¹² DKK/ton N |
Unmet N target in catchment k |
exceed_p(lakecatch) |
Penalty2 = 9.999×10¹³ DKK/kg P |
Unmet P target in lake catchment |
exceed_lav |
Penalty1 |
Unmet tripartite lavbund floor |
The penalty values are set so high that the solver will always prefer meeting targets to using the penalty — effectively making targets "hard" while still maintaining a feasible model.
Total cost per coastal catchment (Total_cost_k_eq)¶
Total_cost_k(k) =e=
Sum(i$setki(k,i), Sum(j$nit(j), CostM(i,j) × x(i,j) × PotV(i,j))) [N field measures]
+ Sum(i$setki(k,i), Sum(j$pho(j), CostM(i,j) × PotV(i,j) × x(i,j))) [P field measures]
+ Sum(i$setki(k,i), Sum(j$comb(j), CostM(i,j) × x(i,j) × PotV(i,j))) [Combined measures]
+ Sum(i$setki(k,i), Sum(j$comb2(j),CostM(i,j) × x(i,j))) [Combined BZ: cost not multiplied by PotV!]
+ sum(ret$kret(k,ret), MWCost_ret(ret)) [Mini-wetlands]
+ sum(p$kp(k,p), sum(j, WWTCost(p,j) × WWTx(p,j))) [WWT upgrades]
+ sum(pp$kpp(k,pp), ofcost(pp) × OFx(pp)) [Overflow treatment]
+ Sum(w$kw(k,w), Sum(w_m, Cost_W(w,w_m) × v_w(w,w_m))) [Stream measures]
+ Sum(ero_stretch$kero(k,ero_stretch), Sum(str_m, Cost_S(ero_stretch,str_m) × v_str(ero_stretch,str_m))) [Trees]
Note on comb2: For combined measures with a BZ component (NPB10_BZ10, etc.), CostM(i,j) is already a total cost for the field (not per ha), so it is NOT multiplied by PotV(i,j).
Field-level cost structure (CostM)¶
Field costs have two components for most measures:
Opportunity cost: prodcost(i)¶
Average annual gross margin lost per ha, computed from 5 years of crop data:
WhereCostE(i,cy) = gross margin of the crop in year cy on field i (from Cost_new_avg.inc, indexed by oeko status, livestock level, soil type, and crop code). Fields with "unacceptable" crops in a year (fallow, non-cropped, etc.) are excluded from the average.
CostM formulas by measure¶
| Measure | Formula (DKK/ha/yr) |
|---|---|
| CCS | 315–396 (by soil and livestock) |
| CCW | 1,980–3,168 (by soil and livestock) |
| EC | prodcost(i) ± 599–1,676 (by soil) |
| WL | 3,486 + prodcost(i) [+200 if livestock ≥ 0.8] |
| IC | 325 |
| SA | prodcost(i) + 250 [+200 if livestock ≥ 0.8] |
| FO | prodcost(i) − Adj_Ann_Jordv_2pro(i) [+200 if livestock] |
| EW | 200 |
| BZ10 | prodcost(i) |
| BZ20 | prodcost(i) |
| LRl | prodcost(i) + 1,016 [+200 if livestock] |
| LRh | prodcost(i) [+200 if livestock] |
| N20 | 178 |
| N10 | 44.5 |
| PPC | 80 + 0.1 × prodcost(i) |
| NPB10 | 50 |
| NPB20 | 100 |
| OT | 200 |
| PWET (wtype 0,1,2) | prodcost(i) + 9,733 |
| PWET (wtype 3) | prodcost(i) + 13,200 |
| IBZ | 7,938 |
Livestock surcharge: 200 DKK/ha/yr added for fields with livestock(i) ≥ 0.8 for measures WL, SA, FO, LRl, LRh. Added 2021-11-05.
Negative costs set to zero: CostM(i,j)$(CostM(i,j)<0) = 0
Adj_Ann_Jordv_2pro(i) — land value annuity adjustment¶
Used in the FO cost formula. Represents an annual payment farmers receive for afforestation (kompensation). This reduces the net cost of forestation. Comes from Adj_Ann_Jordv_2pro.inc.
Mini-wetland costs (MWCost_ret_eq)¶
MWCost_ret(ret) =e=
sum(mw1$MW1Ret(ret,mw1), mw1x(mw1) × (mw1cost + CostMW_ha_N(ret) × 0.20))
+ sum(mw2$MW2Ret(ret,mw2), mw2x(mw2) × (mw2cost + CostMW_ha_N(ret) × 0.50))
+ sum(mw3$MW3Ret(ret,mw3), mw3x(mw3) × (mw3cost + CostMW_ha_N(ret) × 1.00))
| Component | MW1 | MW2 | MW3 |
|---|---|---|---|
| Fixed construction cost | 27,270 DKK | 36,983 DKK | 53,171 DKK |
| Land area (ha) | 0.20 ha | 0.50 ha | 1.00 ha |
| Land opportunity cost | CostMW_ha_N(ret) × 0.20 |
× 0.50 |
× 1.00 |
CostMW_ha_N(ret) = area-weighted average prodcost(i) across all fields in the retention area. (Updated Dec 2024 to include gross margin loss for the wetland's own area.)
Stream measure costs (Cost_W)¶
| Measure | Class 1 | Class 2 | Class 3 |
|---|---|---|---|
| Sand trap | 9,328 DKK | 12,460 DKK | — (excluded) |
| Ochre trap | 121,537 DKK | 121,537 DKK | — |
| Re-meandering | 7,000 DKK/km + xcost | 25,000 DKK/km + xcost | 25,000 DKK/km + xcost |
| Raising | 5,000 DKK/km | 8,000 DKK/km | 19,000 DKK/km |
re_meandering_xcost(w) is an additional cost loaded from re_meandering_xcost.inc (extra costs for re-meandering, calculated outside the model).
Trees on erosion stretches: 290.8 DKK/yr per stretch.
Open questions¶
- ✅
wtype(i): Watercourse type code per field (integer), fromP_waterways.inc(confirmed 2026-04-05). Not wetland type or water table — it reflects the width/character of the adjacent watercourse. See PWET. - ✅
Adj_Ann_Jordv_2pro(i): Annuitized income from forest grant scheme (skovrejsning compensation), fromAdj_Ann_Jordv_2pro.inc. Reduces net cost of FO. Based on Lundhede (2020) / Meilby et al. (2014). - Sand traps: the code suggests class 3 costs were "made up" — is class 3 sand trap still excluded? ⚠️ Open — confirm in model.
- Is the 200 DKK/ha livestock surcharge still the correct figure or has it been revised?
Related pages¶
Concepts: - Cost concepts — opportunity cost, prodcost, livestock surcharge explained - N Reduction — target constraints consuming the cost - P Reduction — P target constraints - Constraints — tripartite floors and mutual exclusions
Individual measures (cost table): - N measures: CCS, CCW, EC, WL, IC, SA, FO, EW, BZ10, BZ20, LRl, LRh, N10, N20 - P measures: PPC, NPB10, NPB20, OT, PWET, IBZ - Infrastructure: MW, Stream measures, WWT