Hello St John: my granddad was born there.

Umm, you have a 'weakly stated' problem. What is the shape of the matrix? Are you really dumping out a row of a wide matrix on a long line? If so, you can hit a line length limit.

Better is to format as a 2-d array; standard C and DX format would be 'lastest fastest', i.e. for 2-d x-y array, y varies faster. So for a 4-position list, 0,0; 0,1, 1,0, 1,1.

Personally, I despise the 'general array format' and try to avoid it whenever possible. Do you write shell scripts or use perl or awk? If so, subdivide your big file into 100 separate files, laid out in the order above, that is, one long list of ints in fastest-lastest order. Then you can build a .dx file as follows:

object "positions" class gridpositions counts 10 20 #assuming your matrix is 10 in x and 20 in y

object "connections" class gridconnections counts 10 20 #these numbers should match the gridpositions

object "data_001" class array type int rank 0 items 200 data follows
data_0_0  #by this I mean insert the integer that belongs at x,y=[0,0]
data_0_1
data_0_2
...
data_9_19  #C and DX start counting at 0, so this is the last index
attribute "dep" string "positions"

object "time_step_001" class field
component "positions" value "positions"
component "connections" value "connections"
object "data" value "data_001"

object "data_002" blah blah (copy everything as above but use the data values from time step 2)

object "time_step_002" class field
component "positions" value "positions"
component "connections" value "connections"
object "data" value "data_002"

... repeat for all time steps

object "series" class series
member 0 position 0.0 time_step_001
member 1 positions 1.0 time_step_002
...



Save the files as my_series.dx; Import, use Sequencer to feed Select to pick one member at a time, AutoColor, Image. That will make an animation.

(There may be a few syntax errors above: I wrote it off the top of my head; check the Users Guide documentation Appendix B2 examples for the exact details if you get any errors.)



On Jun 24, 2004, at 2:29 PM, White, Adam Murray wrote:

Hi -

I am a novice user of OpenDX with little experience. I have a genetic algorithm that dumps its population (matrix of ints) to a out file for say 100 iterations. So the data file contains 100 matrices separated by white space (1 line between each).

I would like to visualize the solution process by animating the population values.

Could someone help me out with this??

Best,
Adam

######################################################
Adam M. White
4th Year BScCSUniversity of New Brunswick Saint John
http://www.unbsj.ca/sase/csas
[EMAIL PROTECTED]
######################################################


Reply via email to