function [Phi_best,w_best]=Example1b(t_max) % Example 1b in the manuscript Harman, Bachrata, Filova: Heuristic construction of exact experimental designs under multiple resource constraints % The function creates the matrix F of regressors, the matrix A of resource % consumption coefficients and the vector b of resource limits. % Then the function runs the main heuristic (Hugo). % t_max is the allowed computation time. F=zeros(16,120); k=1; for t1=1:15 for t2=(t1+1):16 F(t1,k)=1; F(t2,k)=-1; k=k+1; end end; A=zeros(16,120); for t=1:16 for k=1:120 if abs(F(t,k))>0 A(t,k)=1; end end end; F=F(1:15,:); b=[4 4 4 4 4 5 5 5 5 5 6 6 6 6 6 56]'; [Phi_best,w_best]=Hugo(F,A,b,zeros(120,1),-1,t_max); end