Re: [R] lpSolve constraints don't seem to have an effect

2011-08-17 Thread BSanders
"2x^2 + 3y^2 <= 6" My guess is because lpsolve doesn't handle non linear programs. -- View this message in context: http://r.789695.n4.nabble.com/lpSolve-constraints-don-t-seem-to-have-an-effect-tp898253p3751751.html Sent from the R help mailing list archive at Nabble.com. _

[R] lpSolve

2010-03-19 Thread torgrims
Hey, Anyone who knows what the following error report when calling lp() in package lpSolve means? Error: status 3 JT -- View this message in context: http://n4.nabble.com/lpSolve-tp1599380p1599380.html Sent from the R help mailing list archive at Nabble.com.

[R] lpSolve API - add Vs set

2010-01-28 Thread Kohleth Chia
Hi, Using the package lpSolve API, I need to build a 2000*10 constraint matrix. I wonder which method is faster: (a) model = make.lp(0,0) add.constraint(model, ...) or (b) model = make.lp(2000,10) set.constraint(model,...) Thanks KC _

[R] lpSolve constraints don't seem to have an effect

2009-09-17 Thread Adam Lenart
Dear R users, I would like to optimize a linear approximation of a quadratic function using lpSolve. My code runs without any error or warning message but the constraints that I set don't seem to work properly. Nevertheless, I am certain that my code is somewhere wrong. I would like to solve th

Re: [R] lpSolve: how to allow variables to become negative

2009-07-02 Thread Rob Helpert
Sorry. Of course, I meant the DIFFERENCE of two non-negative variables. So, for example, write b1 = b1p - b1n, where both b1p and b1n are non-negative. On Thu, Jul 2, 2009 at 4:18 PM, Rob Helpert wrote: > Hi Alicia, > > I think the trick may be to split b1 into the sum of two non-negative > varia

Re: [R] lpSolve: how to allow variables to become negative

2009-07-02 Thread Rob Helpert
Hi Alicia, I think the trick may be to split b1 into the sum of two non-negative variables. You will then also have to alter your constraints and objective to include the two new variables with negative values in appropriate places, but I believe that this will solve the problem. On Thu, Jul 2,

[R] lpSolve: how to allow variables to become negative

2009-07-02 Thread Alicia Perez-alonso
Dear all, I am interested in solving a MIP problem with binary outcomes and continuous variables, which ARE NOT RESTRICTED TO BE NEGATIVE. In particular, Max {z1,z2,z3,b1} z1 + z2 + z3 (s.t.) # 7 z1 + 0 z2 + 0 z3 + b1 <= 5 # 0 z1 + 8 z2 + 0 z3 - b1 <= 5 # 0 z1 + 0 z2 + 6 z3 + b1 <=

[R] lpSolve lp const.dir

2009-06-17 Thread Rob Helpert
Hi. In the help page for "lp" in package lpSolve, regarding "const.dir" it says: const.dir: Vector of character strings giving the direction of the constraint: each value should be one of "<," "<=," "=," "==," ">," or ">=". (In each pair the two values are identical.) I am having trouble unders

[R] lpSolve replacement to solve transportation problem

2008-06-17 Thread stefan . petersson
r-help, I'm currently using 'lp.transport' from 'lpSolve' to solve a transportation problem. However, I've experienced some performence issues, and have been told that other solvers may perform better. I've looked briefly at 'Rsymphony' and 'rglpk', but I can't seem to figure out how/if they s

Re: [R] lpSolve doesn't compile because of a malloc.h error

2007-10-02 Thread vittorio
Yes, it was very clear but being an absolute beginner as a programmer I was misled by the presence of both stdlib.h and malloc.h in lpslink55.c (in a nutshell, I thought "Why s it complaining if stdlib.h is there, in the code??"). Anyway, thanks to your help I made it in the end. Ciao Vittorio

Re: [R] lpSolve doesn't compile because of a malloc.h error

2007-10-01 Thread Prof Brian Ripley
Isn't the message rather clear? You need to edit the package sources and replace malloc.h by stdlib.h (or remove the former if the latter is already there, as in this case). And BTW, 'gcc-4.2.2' is unreleased, but imminent (as R 2.6.0 is). On Mon, 1 Oct 2007, vittorio wrote: > Under freebsd 6

[R] lpSolve doesn't compile because of a malloc.h error

2007-10-01 Thread vittorio
Under freebsd 6.2-p7 i386, R 2.5.1,gcc-4.2.2 I'm unable to compile package lpSolve because: hpbsd# R CMD INSTALL lpSolve_5.5.8.tar.gz * Installing to library '/usr/local/lib/R/library' * Installing *source* package 'lpSolve' ... ** libs cc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/