push_object: Pushing objects to the master.

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

push objects to the master.

Usage

1
push_object (object_list, verbose_slave=FALSE)

Arguments

object_list

named list of objects to be pushed to master.

verbose_slave

enable diagnostic messages.

Details

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).

Value

none.

Note

The pushed object is assigned in the local frame of the calling master function, or, if not found there, in the globvars environment.

Author(s)

Till Francke

See Also

request_object

Examples

 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)							

marcianito/ppso documentation built on May 30, 2019, 2:16 p.m.