Closed hussamaoun closed 1 year ago
This isn't enough to go on...can you provide more context? As in, what does your call to either look like, how is your communicator setup, etc.? Alternatively, you can just post your model.
i am calling the function run to set x, then i will call the function runresults to get x. To do this i wrote:
pyCommunicator.run("x=3.14"); \ to set x
Attempt xValue= pyCommunicator.runResults(double.class,"x"); \ to get x traceln(xValue);
Well if you use the "shortcut" version of runResults
- passing the output type - you need to have the variable you're assigning the same.
As in, you want either:
double xValue= pyCommunicator.runResults(double.class,"x");
or
Attempt attempt = pyCommunicator.runResults("x");
double xValue = attempt.getFeedback(double.class);
I don't see why the run
call would fail. If it is, please attach your model so I can take a full look at it.
I'll assume it works, feel free to reopen if you still have qs
i am getting these errors upon execution, any idea ?
Description: The method runResults(Class, String) is undefined for the type Main._pyCommunicator_Population. Location: Trial Model/Main/level/button1 - Button
Description: The method run(String) is undefined for the type Main._pyCommunicator_Population. Location: Trial Model/Main - Agent Type