Displaying 17 results from an estimated 17 matches similar to: "API for optimization with Simulated annealing"
2012 Jun 08
0
Working with optim in C
I've searched to find examples of how to work with the C versions of
optim.
I've separated out the function just to test on it alone, and currently I'm
attempting to use fmmin as follows:
!~~CODE ~~!
double optimfn(int n, double *par, void *ex) {
double * lambda = (double*)malloc(sizeof(double)*n);
double sum = 0;
for(int i =0; i < n; i++) { lambda[i] =
2003 Mar 03
2
samin and vmmin
I am writing code in C and would like to call R's functions samin and
vmmin (optimization routines: simulated annealing and BFGS)
I do not understand how to create and pass in the function (as well as the
extra arguments it needs) I am optimizing.
I have read the R Extensions manual but it is still unclear to me.
Could you give me some pointers and/or direct me to some example code
which
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
2001 Jan 26
2
Suggestion for an extension of the API
Dear R Developers (I think in particular Brian)
Especially for larger optimization problems, it would be nice to have an
entry point for C/C++ code to the R optimizers (the ones which are called
when using optim()), where the client just has to provide the functions
fminfn() and fmingr() and calls directly, e.g., vmmin() (all from
$RHOME/src/main/optim.c). Are there any plans for providing such
2002 Oct 21
3
Combinatorial Optimisation
Hi
I am looking to perform a discrete mean-variance optimisation, specifically to maximise the ratio of portfolio mean over portfolio standard deviation for a portfolio of several hundred stocks through discrete position size holdings in each stock, where all position sizes must be elements of a small finite set of integer amounts which include zero.
I don't think any of the standard R
2002 Oct 21
3
Combinatorial Optimisation
Hi
I am looking to perform a discrete mean-variance optimisation, specifically to maximise the ratio of portfolio mean over portfolio standard deviation for a portfolio of several hundred stocks through discrete position size holdings in each stock, where all position sizes must be elements of a small finite set of integer amounts which include zero.
I don't think any of the standard R
2007 Apr 13
1
Simulated annealing using optim()
I'm preparing some code to compute the optimal geometry of stressed
solids. The core of the calculations is the optimization of elastic energy
using the simulated annealing method implemented in the R optim() rutine.
I've defined a function to compute this "energy" scalar (the fn parameter
for optim) and prepared a list with the arrays defining the geometry and
the elastic
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
Can anyone help me with lbfgsb (function for optimization)?
It takes the following parameters:
void lbfgsb (int n, int lmm, double *x, double *lower,
double *upper, int *nbd, double *Fmin, optimfn fn,
optimgr gr, int *fail, void *ex, double factr,
double pgtol, int *fncount, int *grcount,
int maxit, char *msg, int trace, int nREPORT);
What do I put for parameter ex (11th parameter)? I looked at
2003 Oct 31
1
Optimization of objective function with generic number of arguments (R-Extension with C code)
Hi All! I'm a new subscriber to this mailing list. I'm writing an R
extension with C linked code having a minimization function letting me pass
it an objective function with a GENERIC number of arguments and letting me
to optimize over a specific one among them if there are many.
#################################################
############### IPOTETICAL MAIN ###############
2012 Oct 28
0
lbfgsb from C
Hi,
I wanted to use R's lbfgsb method for minimization from C. Unfortunately,
my toy examples always crashes (segmentation fault). What's wrong with it?
double eval(int n, double* par, void *ex) {
double result = 0;
for (int i=0; i<n; ++i) {
result += par[i]*par[i];
}
printf("result=%.2f\n", result);
return result;
}
void grad(int n, double *par, double *gr,
2006 Mar 24
0
using R's optimization routines from C
Dear all,
I have been trying to use R's optimization routines from C and I have some
questions. Specifically, I am testing the usage of nmmin which performs
Nelder-Mead optimization in order to learn how to do the above exercise.
I understand from the notes in Chapter 5 that the declaration for both optimfn
as well as nmmin are included in the header file R_ext/Applic.h so I have
included
2006 Apr 13
1
bus error on calling nmmin
Hi,
I'm trying to get a toy program making use of nmmin to run
successfully. I've gotten to the point of compiling. However, when I
attempt to run my executable, I guess a bus error. I see that someone
else has asked about using nmmin before
<http://tolstoy.newcastle.edu.au/R/help/06/03/23944.html>, but I
haven't come across any replies.
Is there some documentation on how to
2013 Aug 08
2
Freeswitch with Digium T316 timed out, T316 timed out
Hi
I am trying to deploy freeswitch with Digium TE121 card for my office
setup, but it is continuously showing Signaling is up and channels are
down except D channel.
Our Architecture is like
We have freeswitch installed with libpri1.4 and Dahdi.
I am from India and here we are having E1 trunk.
Dahdi Configuration is
cat system.conf
# Autogenerated by /usr/sbin/dahdi_genconf on Wed Aug 7
2020 Jul 26
2
[LAA] RtCheck on pointers of different address spaces.
Hi Stefanos,
Attached the testcase. I tried to reduce it further, but the problem goes away when I remove the instructions further.
There is a nested loop and the fault occurs while processing the inner loop (for.body)
To reproduce the crash:
opt -O3 testcase.ll -o out.ll
> `groupChecks()` will only try to group pointers that are on the same alias set.
If that’s true, the RT check
2007 Mar 08
1
Calling Optim() from C
Hello:
I am sure this question was dealt with several years ago. Is the function
vmmin() available from Rmath Standalone? If not is it possible to call
optim() or nlm() from Rmath in C. Thank you.
Mervyn
2007 Aug 03
2
How to properly finalize external pointers?
Dear R .Call() insiders,
Can someone enlighten me how to properly finalize external pointers in C code (R-2.5.1 win)? What is the relation between R_ClearExternalPtr and the finalizer set in R_RegisterCFinalizer?
I succeeded registering a finalizer that works when an R object containing an external pointer is garbage collected. However, I have some difficulties figuring out how to do that in an
2020 Jul 26
2
[LAA] RtCheck on pointers of different address spaces.
Hello,
I Have a question related to the RT check on pointers during Loop Access Analysis pass.
There is a testcase with loop code that consist of 4 different memory operations referring two global objects of different address spaces.
One from global constant (address space 4, addr_size = 64) and the other from local, LDS (address space 3, addr_size= 32).
(Details of various address spaces