Re: [R] Non-negative solution to an underdetermined linear system

2014-03-06 Thread Lyubomir Klyambarski
The unknown matrix is like this: > x<-matrix(c("x11","x12","x13","x21","x22","x23","x31","x32","x33"),nrow=3,ncol=3,byrow=TRUE) > x      [,1]  [,2]  [,3]  [1,] "x11" "x12" "x13" [2,] "x21" "x22" "x23" [3,] "x31" "x32" "x33" This is my distance matrix. > D<-matrix(c(1,5,10,5,2,6,10,6,8),nrow=3,ncol

Re: [R] Non-negative solution to an underdetermined linear system

2014-03-04 Thread Berend Hasselman
On 04-03-2014, at 12:38, klq...@mail.bg wrote: > I don't have any cost function to minimize. My task is to create the "best" > matrix, matching the row sums, the column sums, row sumproducts (with the > rows from another constant matrix) and also column sumproducts - it's a > transportation pr

Re: [R] Non-negative solution to an underdetermined linear system

2014-03-04 Thread klqmba
I don't have any cost function to minimize. My task is to create the "best" matrix, matching the row sums, the column sums, row sumproducts (with the rows from another constant matrix) and also column sumproducts - it's a transportation problem of finding OD matrix corresponding the total tonnag

Re: [R] Non-negative solution to an underdetermined linear system

2014-02-27 Thread Berend Hasselman
On 27-02-2014, at 13:22, klq...@mail.bg wrote: > > > > Dear R users, > > > I have to find optimal solution of an underdetermined linear system, but > only with positive variables. I tried the function from this post > https://stat.ethz.ch/pipermail/r-help/2007-October/143408.html , but it's

[R] Non-negative solution to an underdetermined linear system

2014-02-27 Thread klqmba
Dear R users, I have to find optimal solution of an underdetermined linear system, but only with positive variables. I tried the function from this post https://stat.ethz.ch/pipermail/r-help/2007-October/143408.html , but it's solution includes also negative values. Thanks in advance. Bes