Last updated on 2024-03-27 23:59:54 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.5-8 | 4.84 | 22.95 | 27.79 | OK | |
r-devel-linux-x86_64-debian-gcc | 1.5-8 | 3.23 | 18.29 | 21.52 | OK | |
r-devel-linux-x86_64-fedora-clang | 1.5-8 | 36.11 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 1.5-8 | 35.63 | OK | |||
r-devel-windows-x86_64 | 1.5-8 | 8.00 | 519.00 | 527.00 | ERROR | |
r-patched-linux-x86_64 | 1.5-8 | 4.20 | 21.98 | 26.18 | OK | |
r-release-linux-x86_64 | 1.5-8 | 3.68 | 22.39 | 26.07 | OK | |
r-release-macos-arm64 | 1.5-8 | 18.00 | OK | |||
r-release-macos-x86_64 | 1.5-8 | 23.00 | OK | |||
r-release-windows-x86_64 | 1.5-8 | 9.00 | 42.00 | 51.00 | OK | |
r-oldrel-macos-arm64 | 1.5-8 | 19.00 | OK | |||
r-oldrel-windows-x86_64 | 1.5-8 | 10.00 | 48.00 | 58.00 | OK |
Version: 1.5-8
Check: tests
Result: ERROR
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
Flavor: r-devel-windows-x86_64