Currently I am having an issue with running scenarios while using time series. The setup I have right now is an object type which has a time series property. This object type is used to place objects in the vertex graph. There is then a python model that is hooked up to an edit action within that object. In Vertex this model isn’t called as a modelling objective, rather as a scenario action.
The problem is, once the model has been run as a scenario action, the time series data that is produced has nowhere to go. I’m not able to directly update the property in the object directly as it’s a time series property backed by a time series sync. I’m not able to write to the time sync backing dataset as scenarios wouldn’t work correctly.
Was hoping someone would have a solution to this as I’m starting to think using a model as a scenario action isn’t feasible.
Unfortunately we don’t currently have support for writing to time series in actions (Scenarios or otherwise).
One potential work around could be to write to a regular property (either on the object, or a linked scenario-only synthetic object), and then instead of accessing the Time Series Property (TSP) directly, have a function that checks for the existence of this scenario data and returns that, or loads data from the TSP and returns it. Depending on how you leverage the time series, this might not be appropriate though.
As another alternative, it might be possible to write the time series data from the Python Model directly to the backing dataset (or a new Dataset that gets union’d into the same sync) under a new temporary series ID, and then within the Scenario just have the action update the Time Series Property to point to that new ID.