search for: lencsv1

Displaying 1 result from an estimated 1 matches for "lencsv1".

2007 Mar 09
1
lpSolve space problem in R 2.4.1 on Windows XP
...I have been able to get the full MIP formulation to work correctly on some very small problems (~10 variables and 25 constraints). Here is the code for a working example: >library(lpSolve) >(v1=rev(1:8)) [1] 8 7 6 5 4 3 2 1 >(csv1=cumsum(as.numeric(v1))) [1] 8 15 21 26 30 33 35 36 >(lencsv1=length(csv1)) [1] 8 >(Nm1=lencsv1-1) [1] 7 >(Np1=lencsv1+1) [1] 9 >ngp=3 >f.obj=c(1,1,rep(0,Nm1)) >f.int=3:Np1 >bin.con=cbind(rep(0,Nm1),rep(0,Nm1),diag(Nm1)) >bin.dir=rep("<=",Nm1) >bin.rhs=rep(1,Nm1) >gp.con=c(0,0,rep(1,Nm1)) >gp.dir="<=" &g...