Description Usage Arguments Details Value Note Author(s) See Also Examples
push objects to the master.
1 | push_object (object_list, verbose_slave=FALSE)
|
object_list |
named list of objects to be pushed to master. |
verbose_slave |
enable diagnostic messages. |
This function pushes an object to the master. Also partial assignments like a[3]=4
are possible.
This is not necessary for ordinary optimizations! However, it enables the slave to react specifically on the overall conditions of the optimization.
Potentially useful objects are the variables listed and explained in globvars.R (see package source code).
none.
The pushed object is assigned in the local frame of the calling master function, or, if not found there, in the globvars environment.
Till Francke
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
#objective function with additional master-slave interaction
interact_function = function(parms)
{
library(ppso)
X=request_object("X") #request some object
print(paste("X:",X))
flush.console()
print(paste("pushing object..."))
push_object(list("fitness_gbest"=1000)) #push some object
flush.console()
print("returning results...")
return(ackley_function(parms))
}
result = optim_pdds_robust(objective_function=interact_function, projectfile=NULL, logfile=NULL, load_projectfile="no",
max_number_function_calls=20, verbose=TRUE, tryCall=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.