Displaying 20 results from an estimated 6000 matches similar to: "question about lpSolve package"
2010 Nov 08
4
Random Sample
Hello R users,
Here is my question about generating random sample. How to set the random seed to recreate the same random numbers? For example, 10 random numbers is generated from N(0,1), then "runif(10)" is used.What if I want to get the same 10 random numbers when I run runif(10) again? Is it possible?I think .Random.seed should be used here.
Thanks.
Xiaoxi
[[alternative
2010 Sep 11
1
nonlinear programming package
Hello R users,
Can anyone recommend me any package that can be used to solve linear programming subject to nonlinear equality/inequality constraints. Rdonlp2 is now unavailable due to licensing issue.
Thanks,
Xiaoxi
[[alternative HTML version deleted]]
2009 Sep 22
2
Semi continous variable- define bounds using lpsolve
How to define bounds for a semi continous variable in lp_solve.
Min 5x1 +9x2 +7.15x3 +0.1x4
subject to
x1+x2+x3+x4=6.7
x1+x4 <= 6.5
And x3 can be 0 or greater than 3.6
hence x3 is a semi continous variable
how to define bounds as well as semicontinous function because using
set.semicont and set. bound simantaneously doesn't seem to work.Thanks in
advance for the help
--
View this
2009 Jul 02
1
lpSolve: how to allow variables to become negative
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 <= 7
# z1, z2, z3 BINARY {0,1}
# -5<= b1 <=5 (i.e. b1 <= 5; -b1 <= 5 )
Using
2007 Mar 09
1
lpSolve space problem in R 2.4.1 on Windows XP
Hi.
I am trying to use the linear optimizer from package lpSolve in R 2.4.1 on
Windows XP (Version 5.1). The problem I am trying to solve has 2843
variables (2841 integer, 2 continuous) and 8524 constraints, and I have 2 Gb
of memory. After I load the input data into R, I have at most 1.5 Gb of
memory available. If I start the lp with significantly less memory
available (say 1 Gb), I get
2007 Oct 01
1
lpSolve doesn't compile because of a malloc.h error
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/include -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE
2010 Sep 17
1
Nonlinear programming problem
Hello useRs,
I'm using the command "solnp" in package "Rsolnp" to solve a general nonlinear programming problem. But I got an error that " the leading minor of order 15 is not positive definite
". Can anybody tell what may cause this error? Does it have something to do with the starting values?
Thanks a lot!!!
Xiaoxi
[[alternative HTML version
2008 Jan 28
1
Package Installation produces "linux/limits.h: No such file or directory" error when installing the lpSolve package
Dear Friends,
I am trying to install a few packages in R and am receiving error messages.
Since the error messages are different, I am posting them separately. The
second error is with the installation of lpSolve.
The core error message is:
========================================================================
In file included from /usr/include/bits/posix1_lim.h:153,
from
2005 Mar 30
1
Problems with lpSolve/Memory ? R crashes
Hello!
I have a curious problem, which I cannot solve.
With my code I solve thousands of small linear programs with the package lpSolve automatically.
But R crashes sometimes (~always, but always on different linear programs) in a strange way.
For illustration, I tried to prepare a simple example, which shows the nature of the problem.
The function aaa (see below) declares some constants (only in
2008 Oct 22
2
suboptimal lp solutions
Hi list,
I want to find the total maximum resources I can spend given a set
allocation proportion and some simple budget constraints.
However, I get suboptimal results via lp and friends (i.e. lpSolve and
simplex in the linprog and boot) .
For example:
library(lpSolve)
proportions = c( 0.46, 0.28, 0.26)
constraints = c( 352, 75, 171)
lp(objective.in = proportions,
const.mat =
2007 Mar 05
2
Linear programming with sparse matrix input format?
Hi.
I am aware of three different R packages for linear programming: glpk,
linprog, lpSolve. From what I can tell, if there are N variables and M
constraints, all these solvers require the full NxM constraint matrix. Some
linear solvers I know of (not in R) have a sparse matrix input format. Are
there any linear solvers in R that have a sparse matrix input format?
(including the
2007 Jul 10
1
error using lp function in linux
Hello all,
I would like to use the lp function (lpSolve package) on a linux system. Using sample code from the lp function help, I can solve the linear program with no errors or problems. However, when I copy the exact same code to R in linux (after loading the lpSolve package), I get the following error:
*** caught segfault ***
address 0x3, cause 'memory not mapped'
Traceback:
1:
2024 Jan 30
1
linear programming in R | limits to what it can do, or my mistake?
Apart from the fact that the statement "such that t1+t2+t3+t4=2970 (as
it must)" is not correct, the LP can be implemented as follows:
library(lpSolve)
LHS <- rbind(
c(0,0,0,0, 1, 0, 0,0),
c(1,0,0,0,-1, 1, 0,0),
c(0,1,0,0, 0,-1, 1,0),
c(0,0,1,0, 0, 0,-1,1),
cbind(-diag(4),diag(4)),
c(0,0,0,0,0,1,0,0),
c(0,0,0,0,0,0,1,0),
c(0,0,0,0,0,0,0,1)
)
RHS <-
2004 Jun 22
0
semi-continuous variables in lpSolve package
Hi,
I am working with lpSolve "R" package by Sam Buttrey, buttrey at nps.navy.mil ,
which is interface to lp_solve linear/integer programming system.
You can find information about lp_solve at http://groups.yahoo.com/group/lp_solve/ (free registration required).
lpSolve (R package) supports linear and integer programming but it does not support semi-continuous variables
2009 Sep 17
0
lpSolve constraints don't seem to have an effect
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 the following problem:
max 2x-x^2+y
subject to
2x^2 + 3y^2 <= 6
2>= x,y >= 0
I would
2007 Oct 10
1
Deleting for() loop in function
Dear UseRs,
I wrote following function in order to solve Data Envelopment Analysis.
Reason for posting is that the function is slow when nrow(dat) is large.
I wonder if other functions could substitute the for() loop in the
code, such as mapply().
Can anybody help to rewrite the dea() function as efficiently as
possible?
The code is as follows:
2013 Mar 11
3
Optimization in R similar to MS Excel Solver
Dear all,
I am trying to find the solution for the optimization problem focused on the
finding minimum cost.
I used the solution proposed by excel solver, but there is a restriction in
the number of variables.
My data consists of 300 rows represent cities and 6 columns represent the
centres. It constitutes a cost matrix, where the cost are distances between
each city and each of six centres.
..+
2024 Jan 29
1
linear programming in R | limits to what it can do, or my mistake?
Question for 'experts' in LP using R (using the lpSolve package, say) --
which does not apply to me for the sort of problem I describe below.
I've run any number of LP's using lpSolve in R, but all of them to date
have objective and constraint functions that both contain the same
variables. This lets you set up a LHS and RHS matrix/vector that are
symmetrical.
But, for a
2010 Mar 19
0
lpSolve
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.
2010 Apr 02
0
Heterogeneous bootstrap
Hello all,
Can anybody tell me how to implement the heterogeneous bootstrap algorithm by the FEAR package. I only know there is a command (boot.sw98) for homogeneous bootstrap. Thanks a lot.
Xiaoxi
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.