Skip to content

The measurement scalar/vector check should only check the states and times #210

@moorepants

Description

@moorepants

It doesn't make sense to pass in vectors of the constants (if it does that).

It's also hard to get the scalar and vector working nicely. Maybe we should just use vectorize.

Here is what a ramp input function has to look like:

def eval_ramp(Ft, time):
    if np.isscalar(time):
        if time < 3.0:
            return 0.0
        else:
            return Ft*time - Ft*3.0
    else:
        return (time >= 3.0) * (Ft*time - Ft*3.0)

sys.add_measurement('F', eval_ramp)

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