Induced-investment equation: inconsistency in the floor logic in calc_dy_inv_induced:
! limit; we need this for sectors that go into zero and then back
investment.loc[investment['dk'] > investment['dk_base'] * 3, 'dk'] = investment['dk_base'] * 3
investment.loc[investment['dk'] + investment['dk_base'] < investment['dk_base'] * 0.1, 'dk'] = investment['dk_base'] * 0.1
dk is a delta (ΔI) — it gets added to dk_base downstream (dk_base_new = dk_induced + dk_base + dk_recyc at model_class.py:1588), not used as a level on its own.
The floor's condition checks the total: dk_base + dk < dk_base * 0.1. That looks like the intended guard for sectors collapsing to near-zero.
But the assignment sets dk (the delta) to dk_base * 0.1, not the total. So when the floor triggers, the resulting level becomes:
dk_base_new = dk_base + dk = dk_base + 0.1*dk_base = 1.1 * dk_base
That's a 10% increase over last year, not a floor at 10% of last year — the opposite of what the condition seems to be testing for.
If the intent was "don't let investment fall below 10% of its previous level," I think the assignment should be:
investment.loc[investment['dk'] + investment['dk_base'] < investment['dk_base'] * 0.1, 'dk'] = investment['dk_base'] * 0.1 - investment['dk_base']
Induced-investment equation: inconsistency in the floor logic in calc_dy_inv_induced:
! limit; we need this for sectors that go into zero and then back
investment.loc[investment['dk'] > investment['dk_base'] * 3, 'dk'] = investment['dk_base'] * 3
investment.loc[investment['dk'] + investment['dk_base'] < investment['dk_base'] * 0.1, 'dk'] = investment['dk_base'] * 0.1
dk is a delta (ΔI) — it gets added to dk_base downstream (dk_base_new = dk_induced + dk_base + dk_recyc at model_class.py:1588), not used as a level on its own.
The floor's condition checks the total: dk_base + dk < dk_base * 0.1. That looks like the intended guard for sectors collapsing to near-zero.
But the assignment sets dk (the delta) to dk_base * 0.1, not the total. So when the floor triggers, the resulting level becomes:
dk_base_new = dk_base + dk = dk_base + 0.1*dk_base = 1.1 * dk_base
That's a 10% increase over last year, not a floor at 10% of last year — the opposite of what the condition seems to be testing for.
If the intent was "don't let investment fall below 10% of its previous level," I think the assignment should be:
investment.loc[investment['dk'] + investment['dk_base'] < investment['dk_base'] * 0.1, 'dk'] = investment['dk_base'] * 0.1 - investment['dk_base']