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 tonnage and tonne-kilometres. Maybe the more suitable function would be "lsei", but it retuns also negative values for some X-es. Do you have an idea where in the code to put some verification for non-negative results? Thanks in advance. Best Regards. ----- ЦиÑÐ°Ñ Ð¾Ñ Berend Hasselman (b...@xs4all.nl), на 27.02.2014 в 21:09 ----- 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 solution includes also negative values. Have a look at package limSolve. Maybe (and only maybe) function linp can be of use. Berend Thanks in advance. Best Regards. ------------------------------------- ÐайÑки пÑазниÑи на оÑÑÑов ÐеÑкада, ÐÑÑÑÐ¸Ñ Ð¾Ñ 158 евÑо ÐезкÑайниÑе ÑоманÑиÑни пÑÑÑÑи ÑÑÑеÑани Ñ Ñзо... ÐаÑи: 30/04/14 - 05/04/14 http://www.arrivalsidi.com/%D0%BC%D0%B0%D0%B9%D1%81%D0%BA%D0%B8-%D0%BF%D1%80%D0%B0%D0%B7%D0%BD%D0%B8%D1%86%D0%B8/%D0%BC%D0%B0%D0%B9%D1%81%D0%BA%D0%B8-%D0%BF%D1%80%D0%B0%D0%B7%D0%BD%D0%B8%D1%86%D0%B8-%D0%B2-%D0%BB%D0%B5%D1%84%D0%BA%D0%B0%D0%B4%D0%B0 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ------------------------------------- Mail.BG: ÐезплаÑен e-mail адÑеÑ. Ðай-добÑиÑе Ñ Ð°ÑакÑеÑиÑÑики на бÑлгаÑÑÐºÐ¸Ñ Ð¿Ð°Ð·Ð°Ñ - 20 GB поÑенÑка кÑÑиÑ, 1 GB пÑикÑепен Ñайл, безплаÑен POP3, мобилна веÑÑиÑ, SMS извеÑÑÑване и дÑÑги. http://mail.bg [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.