econ-ark / HARK

Heterogenous Agents Resources & toolKit
Apache License 2.0
315 stars 195 forks source link

YAML config file to New Python Model Format (NPMF) #1373

Open sbenthall opened 3 months ago

sbenthall commented 3 months ago

With #1371, the New Python Model Format and the prototype YAML format developed in RLRO are nearly identical data structures.

This ticket is for implementing the compiler that consumes YAML and creates a valid Python object in NPMF.

As we have seen, mathematical expressions in YAML can be converted to useful Python using SymPy. Indeed, this was what Pablo originally did with Dolo. We can in HARK 1.0 provided similar functionality.

(There are some noted frustrating things about how SymPy changes the algebraic form of some expressions that it parses. These motivate the special parser in Dolo. However: