This code randomly generates quadratic max-min optimization problems of the form min 1/2 x^TQx+qx s.t. max_{1<=j<=r} min_{i /in N_j} a_{ij}x+b_{ij}<=0 and solves them with the decomposition method explained in section 6 of the paper S.Scholtes (2002), Combinatorial Structures in Nonlinear Programming, downloadable at www.eng.cam.ac.uk/~ss248/publications/scholtes_2002.pdf. It consists of the files gen.m - random problem generator qpqp.m - solver testqp.m - control for sample of tests In order to use the code you need to save the files gen.m qpqp.m testqp.m in a directory and add this directory to your matlab path. To initialise the test runs you need to set at the Matlab prompt the following parameters: n= (number of variables), m= (number of selection functions), l= (number of min functions in max-min expression), t= (number of test problems) Then type testqp and the program will output the successive results of the QP iterations. It will also generate two arrays. The array Vqp keeps track of the first and last objective function value and the array Itqp tracks the number of QP iterations used until a stationary point was found. This implementation is considerably slower than the version with the Dundee QP solver "BQPD" which has nice warm start properties. A replacement file for qpqp which makes use of this code is available on request but requires that you have the BQPD solver linked to your Matlab code. You may wish to change the qpqp.m file to take advantage of warm starting of the qp solver. Also, if you are infeasible initially (can happen if m,l are much larger than n), then the Dundee solver generates automatically a feasible problem (or at least attempts to do so). The matlab QP solver seems to be making progress then as well but I can't explain why because I don't know how the solver works. An alternative is to use a phase-1 approach as indicated in the paper. The Matlab QP solver is known to be unreliable if the Hessian of the objective function is not positive definite. This should not be a problem here since the generator gen.m generates problems with positive definite Hessians.