
ffile = fopen('./runbb.sh','w');
dims = [2,3,5,10,20];
funcs = 1:55;
iinsts = 1:5;

logit = 1;
%dims = [2];  funcs = 1:55; iinsts = 1:5;
dims = [2,3,5,10,20];  funcs = 1:55; iinsts = 1:10;
%sh runalgo/runalgo1/for_testing/run_runalgo.sh MATLABruntime/v83 myrun 20 1 1 10 1000 0 0 5 500 500 3 50 1.02 2.0

for idim=dims
    for ifunc=funcs
        for iinst=iinsts
            destpath = ['mysub1/' num2str(idim) '_' num2str(idim) '_' num2str(ifunc) '_' num2str(iinst)];
            str = ['runalgo/runalgo5/for_testing/run_runalgo.sh MATLABruntime/v83 ' destpath];
            bb_1 = 10;
            ss1_1 = 1000;       % SS1 first runs for ss1_1 evals
            cmares = 400000; 	% CMARES then runs for cmares evals
            ss1_2 = 400000;       % SS1 runs for ss1_2 evals when in parallel with CMARES
            gen1_1 = 10000;         % GEN1 starts when CMARES is at gen1_1 evals
            gen1_2 = 400000;  	% GEN1 stops when CMARES is at gen1_1 evals    
            mu2 = 5;            % initial popsize of ss-mo-cma
            mu3 = 10;           % initial popsize of gen-mo-cma
            t2 = 50*idim;       % period (in iterations) of increase by 1 of popsize of ss-mo-cma 
            doubleT_gen1 = 50*idim; % period (in iterations) restarts with double popsize of gen-mo-cma
            t3 = 300000000000;  % period of increase by 1 of popsize of gen-mo-cma 
            iter0 = 100;        % initial number of iterations of rescma
            lambda_min = 50;    % minimum lambda of rescma
            inc = 1.02;         % not used
            s0 = 2.0;           % not used
            cmares_lp = 1.02;   % factor of increase of max popsize in restart-cma
            cmares_itp = 1.02;   % factor of increase of max iterations in restart-cma
            cmares_b = 2.0;     % factor in power of popsize
            str = [str ' ' num2str(logit) ' ' num2str(idim) ' ' num2str(ifunc) ' ' num2str(iinst)  ' ' num2str(bb_1)  ' '  num2str(ss1_1)  ...
                    ' '  num2str(cmares)  ' '  num2str(ss1_2)  ' '  num2str(gen1_1)  ' '  num2str(gen1_2)  ' '  ...
                    ' ' num2str(mu2) ' ' num2str(mu3) ' ' num2str(t2) ' ' num2str(doubleT_gen1) ' ' num2str(t3) ' ' num2str(iter0) ' ' ... 
                    num2str(s0) ' ' num2str(cmares_lp) ' ' num2str(cmares_itp) ' ' num2str(cmares_b) ' ' num2str(lambda_min)];
            fprintf(ffile,'%s\n',str);
        end;
    end;
end;
fclose(ffile);