similar to: constrOptim with SANN

Displaying 20 results from an estimated 4000 matches similar to: "constrOptim with SANN"

2008 Jan 18
1
constrOptim with method SANN
Hi Everyone, I'm trying to minimize a function using constrOptim with the simulated annealing method SANN. If I understand constrOptim well, it basically passes most of its arguments to optim while somehow enforcing the constraints. My problem is, that since SANN does not need gradients, when using optim with SANN, the gr argument of optim is used to specify a function to create the next
2008 Jun 26
1
Question about Constraint Optimization
Dear All, I am having trouble in using R function "constrOptim" to do constraint optimization. It seems that "constrOptim" calls function "optim" when it does the optimization, and "optim" allows us to set "method" to be "SANN" if we want to use simulated annealing. In "optim", the function allows us to set gradient to be
2008 Mar 14
1
Optimization with constraint.
Hello. I have some problems, when I try to model an optimization problem with some constraints. The original problem cannot be solved analytically, so I have to use routines like "Simulated Annealing" or "Sequential Quadric Programming". But to see how all this works in R, I would like to start with some simple problem to get to know the basics: The Problem: min f(x1,x2)=
2008 Mar 16
1
optim: why is REPORT not used in SANN?
Hello, I wonder why the control parameter REPORT is not supported by method SANN. Looking into optim.c I found an internal constant: #define STEPS 100 ... and decreasing this to 10 helped me fine-tuning the annealing parameters in an actual problem. Is there any reason why not passing nREPORT to samin and setting something like: STEPS = nREPORT / tmax Thomas P. -- Thomas Petzoldt
2003 Jul 16
2
numerical differentiation in R? (for optim "SANN" parscale)
Dear R users, I am running a maximum likelihood model with optim. I chose the simulated annealing method (method="SANN"). SANN is not performing bad, but I guess it would be much more effecive if I could set the `parscale' parameter. The help sais: `parscale' A vector of scaling values for the parameters. Optimization is performed on `par/parscale' and these
2011 Dec 16
1
optim with simulated annealing SANN for combinatorial optimization
Hi all I am trying to solve a combinatorial optimization problem. Basically, I can reduce my problem into the next problem: 1.- Given a NxN grid of points, with some values in each cell 2.- Find the combination of K points on the grid such that, the maximum mean value is obtained I took the Travel SalesMan problem example in ?optim documentation. I am not sure if I have understood correctly
2007 Aug 02
1
constraint in constrOptim
I'm using the function constrOptim together with the "SANN" method and my objective function (f) has two parameters. One of the parameters needs be into (2^(-10), 2^4) range and the other into (2^(-2), 2^12) range. How can I do it using constrOptim?? Thank you André Rossi Alertas do Yahoo! Mail em seu celular. Saiba mais em http://br.mobile.yahoo.com/mailalertas/
2004 Jul 14
0
Re: [R] constrOptim and function with additional parameters? (PR#7089)
Okay, looking at the docs, then it's not a bug, since the "..." argument is not actually documented as "other arguments passed to f or grad". However, that *is* how it's document in `optim', so one can see how this might cause some confusion. Now, it's not clear to me which other arguments need to be passed to `optim' except perhaps `hessian'. Am
2004 Jul 14
0
Re: [R] constrOptim and function with additional parameters? (PR#7088)
I've moved this from r-help to r-bugs. If you reply, please be careful that replies go to the right place: r-bugs if your comment is specifically about the bug (and it contains the PR# in the subject that will be added when this is cc'd to r-devel), r-devel if general discussion, not both. On Wed, 14 Jul 2004 10:01:45 -0400, "Roger D. Peng" <rpeng@jhsph.edu> wrote :
2012 Apr 26
0
Problem with constrOptim when hitting boundary
Hello, I am using constrOptim to maximize a likelihood function (the values of my parameter vector must be between zero and one and must sum up to <=1). I am getting the error 'initial value in 'vmmin' is not finite'. I've tracked it down to a problem in the function 'R' defined within the constrOptim function. It is performing a check on my values, and its not
2010 Apr 28
1
Problem with optimization (constrOptim)
Hello, I have the following problem: I have a set of n matrix equations in the form of : [b1] = [A] * [b0] [b2] = [A] * [b1] etc. vertical vectors [b0], [b1], ... are GIVEN. We try to estimate matrix A. As there are many equations (more than cells in matrix A) the system has no solutions. A is transition matrix (stochastic matrix) or markov process, so the sum of each row = 1 and each entry is
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) }
2011 Sep 08
3
global optimisation with inequality constraints
Dear All, I would like to minimise a nonlinear function subject to linear inequality constraints as part of an R program. I have been using the constrOptim function. I have tried all of the methods that come with Optim, but nothing finds the correct solution. If I use the correct solution as the vector of starting values, though, my program does output the correct solution and optimum - the
2004 May 28
1
optim(method="SANN")
Hello List I'm working on a combinatoric problem in which the object is to minimize the badness() of a vector. I think this class of problem is only soluble by optim() using method=SANN. The badness() of anything is >= 0, and when I've found a solution with zero badness, I want optim() to stop (carrying on beyond zero badness cannot improve the solution). Efficiency is crucial here.
2012 Dec 07
1
Error using constrOptim in constraint definition
Hello, I'm trying to run constrOptim. It returns to me an error about the fact that constraints arguments (ui and ci) are non compatibles: > optout= constrOptim(startparams, f=ImpulseSS, grad=grImpulse, ui=UI, ci=CI, data=gexp[k,], t=t) Error in ui %*% theta : non-conformable arguments I would like to point out that I can calculate that product in the command line: > UI %*%
2009 Apr 07
0
Repeated SANN values.
I tried optim using the SANN algoithm. To start things out I tried the example of solving the "traveling salesman" problem as given in the documentation. The example works just fine. But if I comment out the line: set.seed(123) # chosen to get a good soln relatively quickly More often than not it doesn't converge to the optimum solution as shown in the example. Alos with trace on
2009 Nov 18
1
bug in '...' of constrOptim (PR#14071)
Dear all, There appears to be a bug in how constrOptim handles ... arguments that are suppose to be passed to optim, according to the documentation. This means you can't get the hessian to be returned, for example (so this is a real problem, and not just a question of mistaken documentation). Looking at the code, it appears that a call to the user-defined f includes the ..., when the ...
2009 Nov 02
2
a prolem with constrOptim
Hi, I apologize for the long message but the problem I encountered can't be stated in a few lines. I am having some problems with the function constrOptim. My goal is to maximize the likelihood of product of K multinomials, each with four catagories under linear constraints on the parameter values. I have found that the function does not work for many data configurations. #The likelihood
2009 Nov 19
1
optim(.. ,"SANN",..)
I have a problem using optim, so I am hoping someone can help me out with it: Suppose I have the list: list(D,R,P) [[1]] V1 V2 V3 V4 1 0 1 0 1 2 1 1 0 0 3 1 0 1 0 4 0 0 1 1 5 0 1 0 1 6 1 1 0 0 7 1 0 1 0 8 0 0 1 1 9 1 0 1 0 10 0 0 1 1 [[2]] [1] 23 85 12 73 23 24 25 56 78 1200 [[3]] V1 1 25 2 80 3 15 4
2003 Oct 31
1
help with constrOptim function
Hello. I had previously posted a question concerning the optimization of a nonlinear function conditional on equality constraints. I was pointed towards the contrOptim function. However, I do not understand the syntax of this function with respect to specifying the constraints and so I don’t know if it is what I need. The command is: constrOptim(theta, f, grad,ui,ci,…). “theta” is the