SDXorg / test-models

A collection of System Dynamics models implemented in various environments with a canonical output
MIT License
27 stars 22 forks source link

New test models only have the first row for constant values #63

Open enekomartinmartinez opened 3 years ago

enekomartinmartinez commented 3 years ago

Hi, The newest test I added only have first row for constant values output.tab is like:

Time FINAL TIME INITIAL TIME oscilating var constant var SAVEPER TIME STEP
0 2 0 0.841471 100 1 1
1 0.410781 1
2 0.893855 1

is this okay for everyone, I solved this issue in PySD adding the following lines to repeat the value over the rows:

# if for Vensim outputs where constant values are only in the first row
if np.isnan(expected[col].values[1:]).all():
    expected[col] = expected[col].values[0]

is it possible to do something similar in the other repositories that are using this repo? This way we avoid post-processing output.tab files and make easier contributing with new test models.

JamesPHoughton commented 3 years ago

@ivan-perl, will this work with your SDE test setup?