You are here

entering whole tables into simile, not one column at a time


I have a CSV file with 140 indices in one column (the first column)
each indice then has 206 values which are represented as one value
per column.
that makes 206 columns of data. (28,840 separate values)

i need to import this table into simile so that it forms a data structure like this

[#1 {#1 .........#206},#2...........#140 {#1......#206}]
where #1 to #140 are part of a fixed membership submodel
and #1 to #206 are arrays for each of the instances.

at the moment, what i have been reading suggests that you can only select
1 column at a time in the table function. i dont want to do this 206 times
is there a way to select the whole table, or rearrange the data to fit?

i can send an example table if you like.



i then want to multiply these values by a value for each instance so i will make an array of 206 from the value of each instance that i wish to multiply
the above data structure by, so that it is for each instance
[array of 206]*[array of 206]


The problem is that your columns contain values for the same variable (which happens to have 2 dimensions).

If you rearrange your csv file:

1,2 v2

The table function allows you to use more than one index and the second index corresponds to the columns in your original file.

Simile does do matrix arithmetic and so; (as a small example)
[a] = [1,2,3,4]
[b] = [1,2,3,4]


I hope this helps,



This has worked a treat, and now i have
multiplied this matrix by another matrix
containing 27440 values to get this multiplication


1. although when i compile the model to run this is reasonably fast,
but i cannot view my new matrix (which is held in a variable) (in order to check for errors)
in tabular form in the runtime environment, i ended up turning off the computer after 20 minutes

2. when loading the csv file into my variable which had 3 columns
(2 indices and one value)
this went fine, but when i went to double click on the variable again (to edit the equation), the computer took 15 minutes to respond.

is this because of the size of the variable/matrix?
should it take this long? and is there another way to view
my new matrix?



regarding the above query,

I have represented the CSV file of 2indice columns and one value column
as 140 instance submodel nested in a 198 (was 206 in above queries) instance submodel

in the 140 instance submodel, i have the variable which looks up the CSV
file, in this i have the formula
table(index(1),index(2)) where index
1 is the 198 value column and index 2 is the 140 value column.

this seems to represent the data.
but could there be another way to do this. ie is this what could be slowing
the computer down?


This is just a quick reply to draw attention to the "Snapshot" tool (camera icon) in the model diagram window. You can use this to view large matrices quite quickly. You can also save data as csv files.



that works well