Print

Print


Hi,

Please could someone advise on the best way to do the following?

I have a problem where the terminals in the terminal set are defined in 
a parameter file that is auto-generated by some other software.

In the parameter file are the data that represent the test case values 
for that particular terminal, and the format of the test data varies 
from terminal to terminal.

e.g.

gp.fs.0.func.33 = terminals.String
gp.fs.0.func.33.name = Day
gp.fs.0.func.33.values.0 = Monday
gp.fs.0.func.33.values.1 = Wednesday
gp.fs.0.func.33.values.2 = Monday
gp.fs.0.func.34 = terminals.Float
gp.fs.0.func.34.name = temperature
gp.fs.0.func.34.values.0 = 23.3
gp.fs.0.func.34.values.1 = 18.9
gp.fs.0.func.34.values.2 = 19.2

and so on.

So, I need to have a terminal-specific function read in the test data, 
such as Float.parseData() that reads the above and stores this somewhere 
(e.g. by calling a storeValue method in the problem class).

If I put this code in the "setup" method of the nodes, then the problem 
class will not have been instantiated when that method is called, so I 
can't store the test data at that point.

Any suggestions as to the best way to do this?  I would have thought 
this is a very common scenario.

Thanks!

David
-- 
Dr David R. White
Research Associate
Dept. of Computer Science
University of York, UK
http://www.cs.york.ac.uk/~drw