8.3.1.2. parameter declaration

The class definition gives information neither about the input or output number nor about parameter order. These information have to be added to link with TDataServer and TMaster definitions. We use the addInput and addOutput method with TAttribute objects as argument to do so. Inputs and outputs have to be added in correct order. Here is an example of how to precise inputs and outputs, from the script in Relauncher abstraction levels:

# problem variables
x = DataServer.TAttribute("x", -3.0, 3.0)
y = DataServer.TAttribute("y", -4., 6.)
ros = DataServer.TAttribute("rose")

# user evaluation function
eval = Relauncher.TPythonEval(rosenbrock)
eval.addInput(x)  # Adding attribute in the correct order
eval.addInput(y)
eval.addOutput(ros)