Skip to content

[Feature]: Template Expression with user defined expressions as variables #1075

@jiangr100

Description

@jiangr100

Feature Request

Hello Miles,

Is it currently possible to implement the following functionality: I want to define a variable x = p1 * a + p2 * b + p3 * c, where a, b, and c are from the input data, and p1 to p3 are their parameters. When I use the variable x multiple times in an equation, I want each instance to have a different set of parameters. I know we can currently use parametrized expressions, but this creates only one set of parameters (so different instances of x in one expression use the same parameters).

Also, I've realized that when running like this, the complexity measurement can be different. The variable x is considered to have a complexity of 1, even though it is itself a combined expression. This is good for my application, but I'm curious how this is achieved and if we can have a more flexible approach for controlling complexity. I would like to implement some custom mutations.

Thanks, and please let me know if anything is unclear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions