Skip to content

Syntax for mathematical expressions in model definitions #1085

@sbenthall

Description

@sbenthall

A desideratum for future versions of HARK is a syntax for mathematical expressions in model definitions.

This syntax need not be the native Python syntax, though this is what is done in @llorracc 's "pre-alpha 2.0" code, which uses strings of Python and the very controversial eval function to parse them.

#1055

Dolo has its own Dolang syntax and interpreter, which is an attractive choice. I wonder if it can be extracted from the YAML context in which it is used.

In conversation with @alanlujan91 and @nicksawhney , Disciplined Convex Programming (DCP) has come up. This is a DSL for convex optimization problems developed by researchers at Stanford. It is implemented in several convex optimization packages, in different languages.

https://www.cvxpy.org/tutorial/dcp/index.html

DCP has the advantage of being featureful with respect to convex optimization -- if it can be expressed in the language, then it guarantees that it can be solved by their optimization engine (in this case CVXPY).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions