Running 'Gwen.R' [174s]
  Running 'TalbotKatz.R' [0s]
  Comparing 'TalbotKatz.Rout' to 'TalbotKatz.Rout.save' ... OK
  Running 'test1.R' [152s]
  Running 'test2.R' [156s]
Running the tests in 'tests/Gwen.R' failed.
Complete output:
  > ## private communication from Gwen (gleday <gleday@few.vu.nl>) via Kurt Hornik
  > ## produced an endless loop on some platforms.
  > 
  > library(quadprog)
  > load("bug.RData")
  > sol <- solve.QP(Dmat, as.vector(dvec), Amat, bvec, meq=meq)
  > print(lapply(sol, zapsmall))
  $solution
  [1] 1.625775 6.513264 0.564113 0.000000 0.564113 0.000000 0.564113 0.000000
  [9] 0.000000
  
  $value
  [1] -9.463198
  
  $unconstrained.solution
  [1]  4.152656 13.131710  0.530181  0.292590 -1.061152  5.852929  0.484598
  [8]  0.000000  0.000000
  
  $iterations
  [1] 9 2
  
  $Lagrangian
   [1] 2.0065467 0.2982268 0.0795149 0.0000000 0.0000000 0.3674261 0.0000000
   [8] 0.0000000 0.1754063 0.0000000 0.1754063 0.0000000
  
  $iact
  [1]  1  9 11  6  2  3
  
  > 
  > proc.time()
     user  system elapsed 
     0.21    0.03    0.23 
Running the tests in 'tests/test1.R' failed.
Complete output:
  > library(quadprog)
  > 
  > FullAmat <- function(Dmat, Amat, Aind){
  +   res <- matrix(0, nrow=NROW(Dmat), ncol=NCOL(Amat))
  +   ii <- as.vector(Aind[-1,])
  +   ii <- cbind(ii, rep(1:NCOL(Aind), each=NROW(Aind)-1))
  +   ind <- ii[,1] != 0
  +   res[ii[ind,]] <- as.vector(Amat)[ind]
  +   res
  + }
  > 
  > Dmat       <- matrix(0,3,3)
  > diag(Dmat) <- 1
  > dvec       <- c(0,5,0)
  > Aind <- c(2,2,2)
  > Aind <- rbind(Aind,c(1,1,2))
  > Aind <- rbind(Aind,c(2,2,3))
  > Amat <- c(-4,2,-2)
  > Amat <- rbind(Amat,c(-3,1,1))
  > bvec  <- c(-8,2,0)
  > res<-solve.QP.compact(Dmat,dvec,Amat,Aind,bvec=bvec)
  > print(res)
  $solution
  [1] 0.4761905 1.0476190 2.0952381
  
  $value
  [1] -2.380952
  
  $unconstrained.solution
  [1] 0 5 0
  
  $iterations
  [1] 3 0
  
  $Lagrangian
  [1] 0.0000000 0.2380952 2.0952381
  
  $iact
  [1] 3 2
  
  > res<-solve.QP.compact(solve(chol(Dmat)),dvec,Amat,Aind,bvec=bvec,fac=T)
  > print(res)
  $solution
  [1] 0.4761905 1.0476190 2.0952381
  
  $value
  [1] -2.380952
  
  $unconstrained.solution
  [1] 0 5 0
  
  $iterations
  [1] 3 0
  
  $Lagrangian
  [1] 0.0000000 0.2380952 2.0952381
  
  $iact
  [1] 3 2
  
  > 
  > print(crv1 <- (crossprod(res$unc, Dmat)/2-dvec)%*%res$unc)
        [,1]
  [1,] -12.5
  > print(crv2 <- (crossprod(res$solution, Dmat)/2-dvec)%*%res$solution)
            [,1]
  [1,] -2.380952
  > print(res$value)
  [1] -2.380952
  > print(crv2 >= crv1)
       [,1]
  [1,] TRUE
  > Amat <- FullAmat(Dmat, Amat, Aind)
  > print(all(crossprod(Amat, res$solution) >= bvec))
  [1] TRUE
  > 
  > Dmat <- matrix(c(4,-2,-2,4),2,2)
  > dvec <- c(-6,0)
  > Amat <- c(1,1,1)
  > Amat <- rbind(Amat,Amat)
  > Aind <- c(1,1,2)
  > Aind <- rbind(Aind,c(1,2,1))
  > Aind <- rbind(Aind,c(0,0,2))
  > bvec <- c(0,0,2)
  > res<-solve.QP.compact(Dmat,dvec,Amat,Aind,bvec=bvec)
  > print(res)
  $solution
  [1] 0.5 1.5
  
  $value
  [1] 6.5
  
  $unconstrained.solution
  [1] -2 -1
  
  $iterations
  [1] 2 0
  
  $Lagrangian
  [1] 0 0 5
  
  $iact
  [1] 3
  
  > res<-solve.QP.compact(solve(chol(Dmat)),dvec,Amat,Aind,bvec=bvec,fac=T)
  > print(res)
  $solution
  [1] 0.5 1.5
  
  $value
  [1] 6.5
  
  $unconstrained.solution
  [1] -2 -1
  
  $iterations
  [1] 2 0
  
  $Lagrangian
  [1] 0 0 5
  
  $iact
  [1] 3
  
  > 
  > print(crv1 <- (crossprod(res$unc, Dmat)/2-dvec)%*%res$unc)
       [,1]
  [1,]   -6
  > print(crv2 <- (crossprod(res$solution, Dmat)/2-dvec)%*%res$solution)
       [,1]
  [1,]  6.5
  > print(res$value)
  [1] 6.5
  > print(crv2 >= crv1)
       [,1]
  [1,] TRUE
  > Amat <- FullAmat(Dmat, Amat, Aind)
  > print(all(crossprod(Amat, res$solution) >= bvec))
  [1] TRUE
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.21    0.04    0.25 
Running the tests in 'tests/test2.R' failed.
Complete output:
  > library(quadprog)
  > 
  > Dmat <- matrix(c(4,-2,-2,4),2,2)
  > dvec <- c(-6,0)
  > Amat <- matrix(c(1,0,0,1,1,1),2,3)
  > bvec <- c(0,0,2)
  > res<-solve.QP(Dmat,dvec,Amat,bvec=bvec)
  > print(res)
  $solution
  [1] 0.5 1.5
  
  $value
  [1] 6.5
  
  $unconstrained.solution
  [1] -2 -1
  
  $iterations
  [1] 2 0
  
  $Lagrangian
  [1] 0 0 5
  
  $iact
  [1] 3
  
  > res<-solve.QP(solve(chol(Dmat)),dvec,Amat,bvec=bvec,fac=T)
  > print(res)
  $solution
  [1] 0.5 1.5
  
  $value
  [1] 6.5
  
  $unconstrained.solution
  [1] -2 -1
  
  $iterations
  [1] 2 0
  
  $Lagrangian
  [1] 0 0 5
  
  $iact
  [1] 3
  
  > 
  > print(crv1 <- (crossprod(res$unc, Dmat)/2-dvec)%*%res$unc)
       [,1]
  [1,]   -6
  > print(crv2 <- (crossprod(res$solution, Dmat)/2-dvec)%*%res$solution)
       [,1]
  [1,]  6.5
  > print(res$value)
  [1] 6.5
  > print(crv2 >= crv1)
       [,1]
  [1,] TRUE
  > print(all(crossprod(Amat, res$solution) >= bvec))
  [1] TRUE
  > 
  > 
  > Dmat       <- matrix(0,3,3)
  > diag(Dmat) <- 1
  > dvec       <- c(0,5,0)
  > Amat  <- matrix(c(-4,-3,0,2,1,0,0,-2,1),3,3)
  > bvec  <- c(-8,2,0)
  > res<-solve.QP(Dmat,dvec,Amat,bvec=bvec)
  > print(res)
  $solution
  [1] 0.4761905 1.0476190 2.0952381
  
  $value
  [1] -2.380952
  
  $unconstrained.solution
  [1] 0 5 0
  
  $iterations
  [1] 3 0
  
  $Lagrangian
  [1] 0.0000000 0.2380952 2.0952381
  
  $iact
  [1] 3 2
  
  > res<-solve.QP(solve(chol(Dmat)),dvec,Amat,bvec=bvec,fac=T)
  > print(res)
  $solution
  [1] 0.4761905 1.0476190 2.0952381
  
  $value
  [1] -2.380952
  
  $unconstrained.solution
  [1] 0 5 0
  
  $iterations
  [1] 3 0
  
  $Lagrangian
  [1] 0.0000000 0.2380952 2.0952381
  
  $iact
  [1] 3 2
  
  > 
  > print(crv1 <- (crossprod(res$unc, Dmat)/2-dvec)%*%res$unc)
        [,1]
  [1,] -12.5
  > print(crv2 <- (crossprod(res$solution, Dmat)/2-dvec)%*%res$solution)
            [,1]
  [1,] -2.380952
  > print(res$value)
  [1] -2.380952
  > print(crv2 >= crv1)
       [,1]
  [1,] TRUE
  > print(all(crossprod(Amat, res$solution) >= bvec))
  [1] TRUE
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.15    0.09    0.21