Displaying 20 results from an estimated 200 matches similar to: "Translation of Linear minimization probelm from matlab to r"
2008 Apr 23
2
HTML help solveLP(linprog) (PR#11250)
Dear R team!
=20
I found in HTML help for function solveLP(linprog) a small mistake. It
says in Description "Minimizes c'x, subject to A x >=3D b and x >=3D 0", but
tests show that there should be A x <=3D b.
=20
Best regards,
=20
Ludek
=20
=20
[[alternative HTML version deleted]]
2008 Jun 17
1
error with solveLP(linprog) (PR#11721)
Full_Name: wfeng
Version: 2.7
OS: windows xp
Submission from: (NULL) (208.62.252.2)
for solveLP(linprog), the program is specified as
Minimizes c'x, subject to A x >= b and x >= 0.
However, what I found is the actual constraints that works with the function
are
A x <= b and x >= 0.
2004 Jun 15
1
any linear programming routine in R
Dear all
is there any linear programming routine available for R?
if not, can you suggest any alternatives? not need to be very powerful, I
get only a samll problem to resolve.
many thanks
yong
2004 Sep 16
3
newbie needs help using R as solver
Greetings
I'm a total newbie in R and I'm trying to make a comparisson of Excel
and R in the fields of:
- optimisation modeling (using solver)
- decision trees
- simulation modeling
as described in Winston, Wayne L.: Practical Management Science.
for optimisation modeling in Excel I would normaly use solver. In R
however I can't seem to be able to find the solution. I've
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
2008 May 28
2
Linear Programming.
An embedded and charset-unspecified text was scrubbed...
Name: n?o dispon?vel
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080528/96325940/attachment.pl>
2009 Oct 23
1
help using R's linprog for LP
Hi,
I am using R in one of my courses. I am trying to use R's linprog
package to solve to formulate 2-class classification problem as Linear
programming problem.
For my formulation, I need to set to "cvec" to all 0s.
I know the points are linearly separable so an optimal solution "x"
does exist, which satisfies all the constraints.
But given the constraints and setting
2006 May 05
1
A question about linear optimizaton
Dear all,
I am trying to find a solution satisfying the below equations
in R.
Set up the problem
9 X1+ X2 + X3 = 2
X1+ X2 + X3 = 1
which is subjected to
0 < X1 < X2 < X3 < 2.
I have downloaded the packages \'linprog\' and \'lpSolve\' but can
not see how to solve the question.
Thank you for your help.
With
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 =
2009 Jul 21
1
strange bug? with R CMD check
Hello,
I am trying to get a package to pass R CMD check on an iMac running
Mac OS X. When the package is named safeBinaryRegression I get the
following warning from R CMD check:
* checking whether the name space can be loaded with stated
dependencies ... WARNING
Error in dyn.load(file, DLLpath = DLLpath, ...) :
function 'make_lp' not provided by package 'lpSolveAPI'
2017 Jul 14
0
Help with R script
@Don your solution does not solve Vijayan's scenario 2. I used spread and
gather for that.
An alternative solution to insert mising Fval - picking up with Don's
newtst - is
newtst <- c("FName: fname1", "Fval: Fval1.name1", "FName: fname2", "Fval:
Fval2.name2", "FName: fname3", "FName: fname4", "Fval: fval4.fname4")
2017 Jul 13
2
Help with R script
Using Ulrik?s example data (and assuming I understand what is wanted), here is what I would do:
ex.dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3")
tst <- data.frame(x = ex.dat, stringsAsFactors=FALSE)
sp <- strsplit(tst$x, ':', fixed=TRUE)
chk <-
2012 Jan 13
1
Portfolio Optimization
Hi,
I'm an R newbie and I've been struggling with a optimization problem for
the past couple of days now.
Here's the problem - I have a matrix of expected payouts from different
stock option strategies. Each column in my matrix represents a different
stock and each row represents the return to the strategy given a certain
market move. So the rows are not a time series of percentage
2017 Jul 13
0
Help with R script
Hi Vijayan,
one way going about it *could* be this:
library(dplyr)
library(tidyr)
library(purrr)
ex_dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName:
fname2", "Fval: Fval2.name2", "FName: fname3")
data.frame(x = ex_dat) %>%
separate(x, c("F1", "F2"), sep = ": ") %>%
filter(F2
2010 Jan 20
2
Error meaning
Hi r-users,
I have the following code to solve 4 simultaneous eqns with 4 unknowns using newton iteration method. But I got the error message:
pars <- c(1.15, 40, 50, 0.78)
newton.input2 <- function(pars)
{ ## parameters to estimate
alp <- pars[1]
b1 <- pars[2]
b2 <- pars[3]
rho <- pars[4]
f1 <- pars[1]*pars[2]
f2 <-
2008 Sep 12
2
[LLVMdev] Selection Condition Codes
I am attempting to lower the selectCC instruction to the instruction set
of the backend I'm working on and I cannot seem to find a way to
correctly implement this instruction. I know how this instruction should
get implemented; I just have yet to find a way to do it. I want the
select_cc instruction to be lowered into a comparison followed by a
conditional move. I've attempted to use a
2009 Oct 20
1
Buglet in optim() SANN
I think SANN method in optim() is failing to report that it has not
converged. Here is an example
genrose.f<- function(x, gs=NULL){ # objective function
## One generalization of the Rosenbrock banana valley function (n
parameters)
n <- length(x)
if(is.null(gs)) { gs=100.0 }
fval<-1.0 + sum (gs*(x[1:(n-1)]^2 - x[2:n])^2 + (x[2:n] - 1)^2)
return(fval)
}
2008 Jul 24
1
Coconut benchmark for R?
Hello All,
Could anybody point me out any port of "Global Optimization Test
Problems" OR "Constraint Satisfaction Test Problems" part of Coconut[%]
benchmark or other such similar benchmarks for R.
[%] Coconut benchmark:
http://www.mat.univie.ac.at/users/neum/public_html/glopt/coconut/Benchmark/Benchmark.html
Cheers!
Isa
[[alternative HTML version
2005 Oct 13
3
Optim with two constraints
Hi R-list,
I am new to optimization in R and would appreciate help on the following
question. I would like to minimize the following function using two
constraints:
######
fn <- function(par,H,F){
fval <- 0.5 * t(par) %*% H %*% par + F%*% par
fval
}
# matrix H is (n by k)
# matrix F is (n by 1)
# par is a (n by 1) set of weights
# I need two constraints:
# 1.
2007 Nov 22
3
anova planned comparisons/contrasts
Hi,
I'm trying to figure out how anova works in R by translating the
examples in Sokal And Rohlf's (1995 3rd edition) Biometry. I've hit a
snag with planned comparisons, their box 9.4 and section 9.6. It's a
basic anova design:
treatment <- factor(rep(c("control", "glucose", "fructose",
"gluc+fruct",