For pausing, there's no built-in mechanism like you find in PyEvolve for that. It's possible to create one, and it can be relatively easy to do so, depending on what information you want in order to make your decision. The simplest thing to do would be to create a custom terminator. Take a look at the user_termination function as an example to build from. You'd just want to output some info and prompt the user as to whether to continue or not. If you had more quantified criteria, you could just make a custom terminator that automatically checked those criteria directly without involving the user.
For parallel evaluation, I have quite a bit of experience with problems like you describe. Are you running the evaluations on a network of computers? If so, then you can use the Parallel Python evaluator to do that for you, but it would require that your CFD software be installed on every node and be executable from the command line. And you'd need to be able to get the output to send back to the controller node. For instance, suppose that you were able to say
run_cfd my_parameters
in a terminal and your solver output a file called result.out that had all of the information you want in it. Then you could just have your evaluator function do something like this:
subprocess.call(['run_cfd', param1, param2, param3, ..., paramN])
with open('result.out') as resultfile:
# read in the answer from the resultfile
return answer
If you can give me more detail about what you're trying to do, I'll help you get it working or give you some guidance as to what will work better.
-- Aaron Garrett
--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To view this discussion on the web visit https://groups.google.com/d/msg/inspyred/-/Kvz-YBdnBCUJ.
To post to this group, send email to insp...@googlegroups.com.
To unsubscribe from this group, send email to inspyred+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/inspyred?hl=en.
"parallel_evaluation_mp", can it call the CFD slover in different process at one time?I used the NSGA-II algorithm, i have two objective functions. And i also want t know, in my case what variator, mutator is recommanded.
--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To view this discussion on the web visit https://groups.google.com/d/msg/inspyred/-/NQ63W5dyzc8J.
I think it's the global that's causing the problem. You should just pass that in as an integer in the args variable
args['generation_id'] = whatever
and modify it the same way. Just make sure you initially pass it in as a 0 in the call to the evolve method.
If all you need are temporary directories with unique names, though, you can use the tempfile.mkdtemp function in the standard Python library. That may solve your problem without needing any extra parameters.
-- Aaron Garrett
--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To view this discussion on the web visit https://groups.google.com/d/msg/inspyred/-/3iXZZECYyBgJ.
--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To view this discussion on the web visit https://groups.google.com/d/msg/inspyred/-/2NMhDP_NwxkJ.
--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To view this discussion on the web visit https://groups.google.com/d/msg/inspyred/-/BgUVThsIsdUJ.
Until now I still have no idea how to write a terminator to pause the evaluation, if my evaluation process was stopped by accident like power off, how can i go on from where i stopped last time. Can you show a example?
--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To view this discussion on the web visit https://groups.google.com/d/msg/inspyred/-/uWm1-OmqOGYJ.