EconForge/dolo.py

Binary comparison operator in transition function definition get EOF error

sbenthall opened this issue · 3 comments

In this attempt to write a Dolang file for the KinkedRConsumer case (see econ-ark/DARKolo#9):

https://gist.github.com/sbenthall/67ac2884eafa8aebd51fc113cd77ae73

There is a parsing error.

Even though according to the Dynare documentation a binary comparison operator will evaluate to 0 or 1 (which believe would make this transition function/model work).

Here is the error:

https://gist.github.com/sbenthall/1a16372ea670b8dd2ad71e2703f885f7

albop commented

In dolang, ** and ^ are equivalent and both denote the exponential operator.

albop commented

What you would need is an indicator function. It does not exist in dolang yet. A starting point would be to try to add it to the python functions that are recognized: https://github.com/EconForge/Dolang.jl/blob/master/dolang/language.py