Learn R Programming

MEIGOR (version 1.6.0)

CeVNSR: Global optimization algorithm for MINLPs based on VNS using a Cooperative Strategy

Description

Solves optimization problems with intenger variables. Using several cooperative instances of VNS.

Usage

CeVNSR( problem, opts, max_eval = Inf, max_time = Inf, n_iter = 1, is_parallel = TRUE, type = "SOCKS", global_save_list = NULL, ...)

Arguments

problem
List containing problem settings.
opts
A list of n_threads lists containing options for each cooperative instance of essR.
max_eval
Maximum bumber of evaluations. Default is Inf.
max_time
Maximum time, default is Inf.
n_iter
Number of cooperative iterations. Default is 0 which is the same as running multiple single thread (as many as n_cpus) optimization runs.
is_parallel
Default is TRUE. Sometimes this it is useful to use as FALSE for debugging.
type
Choose between "SOCKS" and "MPI". Default is "SOCKS" (socket-connection). If you are using "SOCKS" option and you want to run multiple cpus in different machines you must specify the adress of each machine in hosts. "MPI" mode requires you to have Rmpi installed.

global_save_list
Specify the names of global variables to be exported.
...
Additional variables.

Value

f_mean
Vector with size of n_iter+1 containing the mean value of the objective function in each iteration.
f_sd
Vector with size of n_iter+1 containing the standard deviation value of the objective function in each iteration.
fbest
Vector with size of n_iter+1 containing the best value of the objective function in each iteration.
iteration_res
A list containing the results from every VNS instance initialized. It follows the format: results$iteration_res[[iteration+1]][[thread_number]].
numeval
Vector with size of n_iter+1 containing the number objective function evaluations at the end of each iteration.
time
Vector with size of n_iter+1 containing the time spent at the end of an iteration.
x_sd
A list containing the standard deviation of decision each variable at the end of an iteration. It follows the format: results$iteration_res[[iteration+1]][[thread_number]]
xbest
A list containing the best set of decision variables found and the end of each iteration.

Details

problem[[ith_thread]]=VNS_problem; opts[[ith_thread]]=VNS_opts; VNS_problem and VNS_opts correspond to lists as seen in the rvnds_hamming documentation.

See Also

rvnds_hamming MEIGO

Examples

Run this code
	
	rosen10<-function(x){
		f<-0;
		n=length(x);
		for (i in 1:(n-1)){
			f <- f + 100*(x[i]^2 - x[i+1])^2 + (x[i]-1)^2;
		}
		return(f)
	}

	nvar=20;

	problem<-list(f=rosen10, x_L=rep(-1000,nvar), x_U=rep(1000,nvar))

	opts=list();
	opts[[1]]=list(use_local=1,aggr=1,local_search=1,decomp=1,maxdist=0.8,maxeval=2000);
	opts[[2]]=list(use_local=1,aggr=0,local_search=2,decomp=0,maxdist=0.5,maxeval=2000);
	opts[[3]]=list(use_local=1,aggr=0,local_search=2,decomp=0,maxdist=0.5,maxeval=2000);
	opts[[4]]=list(use_local=1,aggr=0,local_search=2,decomp=0,maxdist=0.5,maxeval=2000);

	opts$hosts=c('localhost','localhost','localhost','localhost');

	opts$ce_niter=2;
	opts$ce_type="SOCKS";
	opts$ce_isparallel= TRUE;

	Results=MEIGO(problem,opts, algorithm="CeVNSR");

Run the code above in your browser using DataLab