Closed NormannR closed 3 years ago
Interesting ! If you look at model.equations, just before model.functions is actually called, you see:
{'arbitrage': ['1 - ((((beta)*(1 + r[t+1]))*(c[t]))/(c[t+1]))', 'e[t]'], 'arbitrage_lb': ['-(B)', '-inf'], 'arbitrage_ub': ['(1 + r[t])*(a[t]) + (w[t])*(exp)', 'inf'], 'transition': ['a[t] = i[t-1]']}
so it looks like at that stage, the complementarity is already parsed incorrectly.
OK, now this is clearly a dolang issue. Step to reproduce:
import dolang.symbolic
eq = dolang.symbolic.parse_string("1-beta*(1+r[t+1])*c[t]/c[t+1] ⟂ -B <= i[t] <= (1+r[t])*a[t]+w[t]*exp(e[t])", start="complementarity_block")
dolang.symbolic.str_expression(eq)
results in
['1 - ((((beta)*(1 + r[t+1]))*(c[t]))/(c[t+1])) ⟂ -(B) <= i[t] <= (1 + r[t])*(a[t]) + (w[t])*(exp)',
'e[t]']
Fixed in dolang.
I encounter a bug when trying to import the following yaml file using the yaml_import function
I get the following error