Example1<-function(N,t_max){ #Example 1 in the manuscript Harman, Bachrata, Filova: Heuristic construction of exact experimental designs under multiple resource constraints #block model with a constraint on the number of blocks #input: #N: the number of blocks #t_max: the time (in seconds) the heuristic is required to run #output: #Phi_best: the D-value of the design w_best #w_best: D-efficient exact design found by the heuristic F<-matrix(0,nrow=16,ncol=120) k<-1 for (t1 in 1:15){ for (t2 in (t1+1):16){ F[t1,k]<-1 F[t2,k]<--1 k<-k+1 } } F<-F[1:15,] res<-HugoR(F,N,rep(0,120),-1,t_max) return(list(value=res$value,design=res$design)) }