MATLAB: How choose MultiStart x0

multistartstarting point

Hello,
I have a 3D function (e.g. f(x,y)). I find the global minumum with MultiStart. Given lb_x,lb_y,ub_x,ub_y and a linear equality constraint (const=x+y).
When MultiStart runs fmincon "i" times, default random generated x0 starting points satisfy bounds but linear equality constraint is unsatisfied (const not equal x+y). Why? What can I do for generated x0 satisfy equality constraint?
Thanks in advance!

Best Answer

With help from LCON2VERT from the File Exchange, you can generate a random point approximately satisfying the linear constraints.
First, find the vertices, V, of the feasible set using LCON2VERT. Then generate a random point as
weights=rand(1, size(V,1));
weights=weights/sum(weights);
point=weights*V