+ factory_opt_script_node = catalogAd._nodeMap["FakeOptimizerLoopNode"]
+ opt_script_node = factory_opt_script_node.cloneNode("FakeFunctionNode")
+
+ # Add it
+ computation_bloc = runtime.createBloc("computation_bloc")
+ optimizer_node.edSetNode(computation_bloc)
+ computation_bloc.edAddChild(opt_script_node)
+
+ # We connect Optimizer with the script
+ proc.edAddDFLink(optimizer_node.edGetSamplePort(), opt_script_node.getInputPort("computation"))
+ proc.edAddDFLink(opt_script_node.getOutputPort("result"), optimizer_node.edGetPortForOutPool())