Source: octave-optim
Version: 1.6.0-5
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/package.php?p=octave-optim

...
[inst/quadprog.m]
>>>>> /<<PKGBUILDDIR>>/inst/quadprog.m
***** test
 H= diag([1; 0]);
 f = [3; 4];
 A= [-1 -3; 2 5; 3 4];
 b = [-15; 100; 80];
 l= zeros(2,1);
 [x,fval,exitflag,output] = quadprog(H,f,A,b,[],[],l,[]);
 assert(x,[0;5])
 assert(fval,20)
 assert(exitflag,1)
 assert(output.iterations,1)
!!!!! test failed
Invalid call to __qp__.  Correct usage is:

 -- [X, LAMBDA, INFO, ITER] = __qp__ (X0, H, Q, AEQ, BEQ, AIN, BIN,
          MAXIT, RTOL)
***** demo
  C = [0.9501    0.7620    0.6153    0.4057
      0.2311    0.4564    0.7919    0.9354
      0.6068    0.0185    0.9218    0.9169
      0.4859    0.8214    0.7382    0.4102
      0.8912    0.4447    0.1762    0.8936];
  %% Linear Inequality Constraints
  d = [0.0578; 0.3528; 0.8131; 0.0098; 0.1388];
  A =[0.2027    0.2721    0.7467    0.4659
      0.1987    0.1988    0.4450    0.4186
      0.6037    0.0152    0.9318    0.8462];
  b =[0.5251; 0.2026; 0.6721];
  %% Linear Equality Constraints
  Aeq = [3 5 7 9];
  beq = 4;
  %% Bound constraints
  lb = -0.1*ones(4,1);
  ub = ones(4,1);
  H = C' * C;
  f = -C' * d;
  [x, obj, flag, output, lambda]=quadprog (H, f, A, b, Aeq, beq, lb, ub)
1 test, 0 passed, 0 known failure, 0 skipped
...
[inst/lsqlin.m]
>>>>> /<<PKGBUILDDIR>>/inst/lsqlin.m
***** test
***** shared C,d,A,b
 C = [0.9501,0.7620,0.6153,0.4057;...
     0.2311,0.4564,0.7919,0.9354;...
     0.6068,0.0185,0.9218,0.9169;...
     0.4859,0.8214,0.7382,0.4102;...
     0.8912,0.4447,0.1762,0.8936];
 d = [0.0578;    0.3528;    0.8131;    0.0098;    0.1388];
 A =[0.2027,    0.2721,    0.7467,   0.4659;...
    0.1987,    0.1988,    0.4450,   0.4186;...
    0.6037 , 0.0152,    0.9318,    0.8462];
 b =[0.5251;0.2026;0.6721];
 Aeq = [3, 5, 7, 9];
 beq = 4;
 lb = -0.1*ones(4,1);
 ub = 2*ones(4,1);
 [x,resnorm,residual,exitflag] = lsqlin(C,d,A,b,Aeq,beq,lb,ub);
 assert(x,[-0.10000;  -0.10000;   0.15991;   0.40896],10e-5)
 assert(resnorm,0.16951,10e-5)
 assert(residual, [0.035297; 0.087623;  -0.353251;   0.145270;   
0.121232],10e-5)
 assert(exitflag,1)
warning: colon arguments should be scalars
warning: called from
    null at line 67 column 14
    quadprog at line 302 column 13
    lsqlin at line 123 column 21
    __test__ at line 17 column 32
    test at line 677 column 11
    /tmp/tmp.Kmq0GnniXr at line 78 column 31

!!!!! test failed
Invalid call to __qp__.  Correct usage is:

 -- [X, LAMBDA, INFO, ITER] = __qp__ (X0, H, Q, AEQ, BEQ, AIN, BIN,
          MAXIT, RTOL)
shared variables   scalar structure containing the fields:

    C = [](0x0)
    d = [](0x0)
    A = [](0x0)
    b = [](0x0)
***** test
 Aeq = [];
 beq = [];
 lb = [];
 ub = [];
 x0 = 0.1*ones(4,1);
 x = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0);
 [x,resnorm,residual,exitflag] = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0);
 assert(x,[ 0.12986;  -0.57569 ;  0.42510;   0.24384],10e-5)
 assert(resnorm,0.017585,10e-5)
 assert(residual, [-0.0126033;  -0.0208040;  -0.1295084;  -0.0057389;   
0.01372462],10e-5)
 assert(exitflag,1)
!!!!! test failed
quadprog: initial guess has incorrect length
shared variables   scalar structure containing the fields:

    C = [](0x0)
    d = [](0x0)
    A = [](0x0)
    b = [](0x0)
***** demo
  C = [0.9501    0.7620    0.6153    0.4057
      0.2311    0.4564    0.7919    0.9354
      0.6068    0.0185    0.9218    0.9169
      0.4859    0.8214    0.7382    0.4102
      0.8912    0.4447    0.1762    0.8936];
  d = [0.0578; 0.3528; 0.8131; 0.0098; 0.1388];
  %% Linear Inequality Constraints
  A =[0.2027    0.2721    0.7467    0.4659
      0.1987    0.1988    0.4450    0.4186
      0.6037    0.0152    0.9318    0.8462];
  b =[0.5251; 0.2026; 0.6721];
  %% Linear Equality Constraints
  Aeq = [3 5 7 9];
  beq = 4;
  %% Bound constraints
  lb = -0.1*ones(4,1);
  ub = ones(4,1);
  [x, resnorm, residual, flag, output, lambda] = lsqlin (C, d, A, b, Aeq, beq, 
lb, ub)
2 tests, 1 passed, 0 known failure, 0 skipped
...

Reply via email to