How to read data in to Minsky
System dynamics program with additional features for economics
Brought to you by:
hpcoder,
profstevekeen
I need to read in a list (CSV) of a numberical value for each time step. How can I accomplish this?
Thank you
Dave
On Mon, Apr 30, 2018 at 09:18:54PM -0000, David March wrote:
You add a "data operation", which looks like a trangle with a cylinder
superimposed (like a database flowchart symbol). Then you can import a
CSV file (space separated, not comma separated IIRC) into that, and it
will then interpolate the data op input using that time series.
It is fairly limited functionality, but it will do what you want. I
suggest you read that section of the manual for more details.
Cheers
Dr Russell Standish Phone 0425 253119 (mobile)
Principal, High Performance Coders
Visiting Senior Research Fellow hpcoder@hpcoders.com.au
Economics, Kingston University http://www.hpcoders.com.au
Thanks. I would have never gotten that interpretation from the widget help / description. But now that you suggested it, I got it. Thanks and sorry for the stupid question.
Dave
On Tue, May 01, 2018 at 09:19:57PM -0000, David March wrote:
It is not a stupid question! It indicates that discoverability could
be improved. Do you have any suggestions how to improve that section
of the manual?
--
Dr Russell Standish Phone 0425 253119 (mobile)
Principal, High Performance Coders
Visiting Senior Research Fellow hpcoder@hpcoders.com.au
Economics, Kingston University http://www.hpcoders.com.au
Sorry to bother you, but I can not get the data object to work with a file. It works fine with the random generator, but not a file. I put the time into the input, read in a file that has two numbers on each line. I have tried both space separated and tab separated. Neither work.
It is a simple text file. The first column number is just an assending sequence. The second column number is just a constant (though I have tried many different things). No matter what is in the second column, the output of the data widget is always one. The simple test file looks like this:
1 10
2 10
3 10
4 10
5 10
etc.
It always outputs one. no matter what is in column 2.
Any idea what I am doing wrong?
THank you
Dave March
On Wed, May 02, 2018 at 10:44:00PM -0000, David March wrote:
You might need to send me your .mky file so that I can see. I cut and
pasted the above into a test file, loaded it into a data widget, and
the output is a constant 10, as you would expect.... You have the data
format correct.
--
Dr Russell Standish Phone 0425 253119 (mobile)
Principal, High Performance Coders
Visiting Senior Research Fellow hpcoder@hpcoders.com.au
Economics, Kingston University http://www.hpcoders.com.au
I tried the same thing no go. I copied the data from the email, put it into a file and wired the model the same as the manual example, except using a data import rather than the random function. I have attached the model and the data file.
Thanks
Dave
The problem appears to be the presence of a space in the file name. I renamed the file to testAgain.txt, and it imported just fine.
This appears to be TCL issue, rather than a Minsky bug, but please raise a Minsky ticket, and I'll take a look at workarounds for when people put spaces in their file names. In the meantime, please avoid the spaces in the filenames...