The paper is focused on direct optimization of experimental designs of continuous or discrete variables according to any optimality criterion. D-optimality criterion and space filling criteria such as Mean Square Error (MSE), Eglajs criterion, entropy criterion, discrepancy criterion and others can be used. Univariate relaxation and coordinate exchange algorithm with improved multistart is used for optimization. The proposed univariate relaxation and exchange algorithm with improved multistart method gives a good effectiveness for direct optimization of continuous and discrete experimental designs according to any optimization criterion. In cases of low dimensions the known D-optimal discrete and continuous designs were confirmed. For a larger number of variables many designs with better D-efficiency were found. The algorithm works very well also for Latin hypercube designs.