next up previous contents
Next: Artificially generated problems Up: Examples Previous: Examples

A randomly generated problem

>> 
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> % Example of a randomly generated problem
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> 
>> path(path, 'testing');
>> format short e
>> 
>> blk = [50 5 5 5 5 20];
>> m = 75;
>> rndinf         % generate random feasible problem with INFEASIBLE 
>>                % initial points
>> setpars
>> scalefac = 1;  % X0 = Z0 = I fine for random problems
>> initvars
>> sdp

tau =   0.9990,     scalefac =        1

iter   p_step      d_step     p_infeas    d_infeas      X.Z         pobj        dobj
  0   0.000e+00   0.000e+00   1.405e+02   1.894e+03   9.000e+01   1.691e+01   0.000e+00
  1   9.787e-01   9.924e-01   2.989e+00   1.438e+01   8.926e+00   5.454e+02   5.447e+02
  2   8.311e-01   7.137e-01   5.049e-01   4.116e+00   2.745e+00   5.499e+02   5.481e+02
  3   7.393e-01   8.693e-01   1.316e-01   5.381e-01   1.395e+00   5.504e+02   5.494e+02
  4   8.680e-01   9.131e-01   1.737e-02   4.675e-02   1.850e-01   5.498e+02   5.496e+02
  5   1.000e+00   1.000e+00   1.072e-11   6.634e-13   1.603e-02   5.497e+02   5.497e+02
  6   9.702e-01   9.750e-01   1.080e-12   6.331e-13   4.790e-04   5.497e+02   5.497e+02
  7   1.000e+00   1.000e+00   4.659e-11   6.265e-13   4.710e-05   5.497e+02   5.497e+02
  8   9.990e-01   9.990e-01   1.248e-12   6.509e-13   4.713e-08   5.497e+02   5.497e+02
  9   9.990e-01   9.990e-01   1.049e-12   6.560e-13   4.714e-11   5.497e+02   5.497e+02
fsdp: stop since error reduced to desired value

sdp: elapsed time               = 206.51526 seconds
sdp: elapsed cpu time           = 161.41000 seconds
sdp: flops                      =   1.06780e+09
sdp: Number of iterations       =    9
sdp: final value of X.Z         =   4.714e-11
sdp: final primal infeasibility =   1.049e-12
sdp: final dual infeasibility   =   6.560e-13
sdp: primal objective value     =   5.4965327462494383e+02
sdp: dual objective value       =   5.4965327462489518e+02
>> 
>> % note the successive reductions of X.Z by factors 
>> % of 1000 in final iterations (this is because tau = 0.999)
>> 
>> primalcond(A,blk,X,1.0e-06); % confirms that primal nondegenerate
primalcond =   5.965e+00
>>                              % (as expected since randomly generated)
>> 
>> dualcond(A,blk,Z,1.0e-06);   % confirms that dual nondegenerate
dualcond =   6.398e+00
>>                              % (as expected since randomly generated)



Madhu Nayakkankuppam
Fri Mar 28 00:48:56 EST 1997