similar to: Translation of Linear minimization probelm from matlab to r

Displaying 20 results from an estimated 300 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>
2025 Mar 27
1
Problem with minimization that I failed to understand
My code is to minimize the objective function therefore, shouldnt I expect that StartingValue = c(0.12, 0.04, 0.07, 0.03, 0.06, 0.07, 0.07, 0.04, 0.09, 0.08, 0.02, 0.02, 0.03, 0.06, 0.02, 0, 0.07, 0.05, 0.02, 0.02, 0.02) Fn(q1$par) < Fn(StartingValue) ## FALSE Below is the corrected code that can be reproduced: MyDat = structure(list(c(50L, 0L, 0L, 50L, 75L, 100L, 50L, 0L, 50L, 0L, 25L,
2025 Mar 27
1
Problem with minimization that I failed to understand
?s 18:35 de 27/03/2025, Daniel Lobo escreveu: > Hi, > > I have below minimization problem > > > MyDat = structure(list(c(50L, 0L, 0L, 50L, 75L, 100L, 50L, 0L, 50L, 0L, > 25L, 50L, 50L, 75L, 75L, 75L, 0L, 75L, 75L, 75L, 0L, 25L, 75L, > 75L, 0L, 75L, 100L, 0L, 25L, 100L), c(75L, 0L, 0L, 50L, 100L, > 50L, 75L, 75L, 100L, 25L, 0L, 25L, 100L, 0L, 50L, 0L, 25L, 25L, >
2025 Mar 27
1
Problem with minimization that I failed to understand
?s 19:36 de 27/03/2025, Daniel Lobo escreveu: > My code is to minimize the objective function > > therefore, shouldnt I expect that > > StartingValue = c(0.12, 0.04, 0.07, 0.03, 0.06, 0.07, 0.07, 0.04, 0.09, > 0.08, 0.02, 0.02, 0.03, 0.06, 0.02, 0, 0.07, 0.05, 0.02, 0.02, 0.02) > Fn(q1$par) < Fn(StartingValue) > ## FALSE > > Below is the corrected code that can
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
2025 Mar 27
2
Problem with minimization that I failed to understand
Hi, I have below minimization problem MyDat = structure(list(c(50L, 0L, 0L, 50L, 75L, 100L, 50L, 0L, 50L, 0L, 25L, 50L, 50L, 75L, 75L, 75L, 0L, 75L, 75L, 75L, 0L, 25L, 75L, 75L, 0L, 75L, 100L, 0L, 25L, 100L), c(75L, 0L, 0L, 50L, 100L, 50L, 75L, 75L, 100L, 25L, 0L, 25L, 100L, 0L, 50L, 0L, 25L, 25L, 100L, 75L, 0L, 0L, 0L, 50L, 0L, 75L, 75L, 0L, 50L, 25L), c(50L, 0L, 0L, 0L, 100L, 25L, 0L, 0L,
2025 Mar 28
1
Problem with minimization that I failed to understand
I haven't run your code, but since Kendall correlation is based on ranks, your Fn is probably locally constant with jumps when the ranks change. That's a really hard kind of function to maximize, and the algorithm used by fmincon is not appropriate to do it. Sorry, but I don't know if there is an R function that can do constrained discrete maximization. Duncan Murdoch On
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 =
2025 Mar 28
3
Problem with minimization that I failed to understand
Hi Duncan, Thanks for your comment, I agree with that. But, how it can be justified that an Optimizer gives a result which is inferior to the starting value? At most, resulting value can remain at the same level, isnt it? On Fri, 28 Mar 2025 at 14:34, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > I haven't run your code, but since Kendall correlation is based on >
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'
2025 Mar 28
1
Problem with minimization that I failed to understand
?s 13:59 de 28/03/2025, Daniel Lobo escreveu: > Hi Duncan, > > Thanks for your comment, I agree with that. > > But, how it can be justified that an Optimizer gives a result which is > inferior to the starting value? At most, resulting value can remain at the > same level, isnt it? > > On Fri, 28 Mar 2025 at 14:34, Duncan Murdoch <murdoch.duncan at gmail.com>
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