Skip to content

Other components at all time steps are always equal to final time step #285

@gustavdelius

Description

@gustavdelius

If a component stored in n_other is an array, then in a MizerSim object produced by project() the stored values at all time steps happen to be equal to the values at the final time. That happens because when project() calculates the value at the next time step, it also overwrites all previously-stored values. That is due to the fact that for lists containing arrays, R only does a shallow copy of the list, not copying the arrays. So all the arrays stored at different time slots are actually just pointers to the same array, so that when that gets changed, they all get changed. To fix this, project() will need to do deep copies of the n_other list and one way to do that is to serialise and then unserialise the list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcoreIssue relates to the mizer core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions