Displaying 14 results from an estimated 14 matches for "fmincon".
2006 Dec 08
1
fmincon equivalent in R
Dear all R users,
I am wondering if there are any function for Constraint optimization in R.
Especially i am looking for a R - equivalent of "fmincon" function in
MATLAB.
Thanks and regards,
Arun
[[alternative HTML version deleted]]
2004 Feb 24
5
Nonlinear Optimization
...inear (obj funct) with linear constraints.I know about the "ms"
and "nls" functions, but these seem only for nonlinear regression, not
nonlinear minimization. I am looking for a pure non-linear optimization
module.
The nonlinear optimization functions I used in MatLab are "fmincon" and
"fminunc"
Is there any nonlinear optimization algorithm for R?
Thanks.
Rob
2009 Feb 05
2
Non-linear optimisation
...);
objFunc_vol(C);
objFunc = @(C) compute_strategy_before_fees(prices, C, floor, cap,
m_ret_reb, prices_TR, hedge_fund, vg, euribor, last_reb_date, Maturity,
fixed_fees, var_fees);
objFunc(C);
options = optimset('MaxIter',10000000,'MaxFunEvals',10000000);
tic;
% OPTIMISE
%M =
fmincon(objFunc,C,[],[],[],[],repmat(-20,12,9),repmat(20,12,9), at TriskellConstraints,options);
M =
fmincon(objFunc_vol,C,[],[],[],[],repmat(-20,12,9),repmat(20,12,9), at TriskellConstraints,options);
[Z, ZZ] = compute_strategy_after_fees(prices, C, floor, cap, m_ret_reb,
prices_TR, Hedge_Fund, vg, euribo...
2025 Mar 28
3
Problem with minimization that I failed to understand
...doch <murdoch.duncan at gmail.com>
wrote:
> 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 2025-03-27 2:35 p.m., Daniel Lobo wrote:
> > Hi,
> >
> > I have below minimization problem
> &g...
2010 May 04
3
Two Questions on R (call by reference and pre-compilation)
...ss a
huge data set to a function. Is there any situations that R doesn't copy
the data, besides pass data in an environment object.
2) Does R pre-compile the object function to binary when running
"optim"? I experienced the R "optim" is much slower than the MATLAB
"fmincon" function. I don't know MATLAB has done any pre-compilation on
the script for object function or not. But perhaps, we can increase R
performance by some sort of pre-compilation during running time.
Thanks in advance.
Best Regards,
Ruihong
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 2025-03-27 2:35 p.m., Daniel Lobo wrote:
> Hi,
>
> I have below minimization problem
>
>
> MyDat = structure(list(c(50L, 0L, 0...
2003 Jun 26
0
nonlinear constraint optimization function in R?
...r a R-function that performs nonlinear constraint
optimization (where the objective function and the
constraints are allowed to be nonlinear).
More specifically, I am trying to figure out whether there
is an equivalent function of NAG fortran library' "E04UCF" or matlab's
"fmincon" in R.
Any help is greatly appreciated.
Thank you,
Sunduz
PS: fmincon is described at
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/optim.shtml?BB=1
2025 Mar 27
2
Problem with minimization that I failed to understand
...5L,
100L, 85L, 85L, 85L, 0L, 85L, 85L, 85L, 85L, 85L, 85L, 85L,
85L, 28L, 56L, 56L)), row.names = c(NA, -30L), class = "data.frame")
Fn = function(Wts) return(-Kendall::Kendall(1:Nobs,
rank(-as.vector(as.matrix(MyDat) %*% matrix(Wts, nc = 1)[, 1, drop =
T])))$tau[1])
q1 = pracma::fmincon(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 = Fn,
A = matrix(c(rep(0, 20), -1), nrow = 1), b = -2.05/100, Aeq =
matrix(c(rep(1, 20), 1), nrow = 1), beq = 1,
lb = rep(0.01, 21),
tol = 1...
2025 Mar 27
1
Problem with minimization that I failed to understand
...L, 85L, 85L, 85L, 85L, 85L,
> 85L, 28L, 56L, 56L)), row.names = c(NA, -30L), class = "data.frame")
>
> Fn = function(Wts) return(-Kendall::Kendall(1:dim(MyDat)[1],
> rank(-as.vector(as.matrix(MyDat) %*% matrix(Wts, nc = 1)[, 1, drop =
> T])))$tau[1])
> q1 = pracma::fmincon(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 = Fn,
> A = matrix(c(rep(0, 20), -1), nrow = 1), b = -2.05/100, Aeq =
> matrix(c(rep(1, 20), 1), nrow = 1), beq = 1,
> lb = rep(0...
2025 Mar 27
1
Problem with minimization that I failed to understand
...00L, 85L, 85L, 85L, 0L, 85L, 85L, 85L, 85L, 85L, 85L, 85L,
85L, 28L, 56L, 56L)), row.names = c(NA, -30L), class = "data.frame")
Fn = function(Wts) return(-Kendall::Kendall(1:dim(MyDat)[1],
rank(-as.vector(as.matrix(MyDat) %*% matrix(Wts, nc = 1)[, 1, drop =
T])))$tau[1])
q1 = pracma::fmincon(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 = Fn,
A = matrix(c(rep(0, 20), -1), nrow = 1), b = -2.05/100, Aeq =
matrix(c(rep(1, 20), 1), nrow = 1), beq = 1,
lb = rep(0.01, 21),
tol = 1...
2025 Mar 28
1
Problem with minimization that I failed to understand
...gmail.com>
> wrote:
>
>> 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 2025-03-27 2:35 p.m., Daniel Lobo wrote:
>>> Hi,
>>>
>>> I ha...
2025 Mar 27
1
Problem with minimization that I failed to understand
..., 85L, 85L, 85L, 85L, 85L, 85L, 85L,
> 85L, 28L, 56L, 56L)), row.names = c(NA, -30L), class = "data.frame")
>
> Fn = function(Wts) return(-Kendall::Kendall(1:Nobs,
> rank(-as.vector(as.matrix(MyDat) %*% matrix(Wts, nc = 1)[, 1, drop =
> T])))$tau[1])
> q1 = pracma::fmincon(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 = Fn,
> A = matrix(c(rep(0, 20), -1), nrow = 1), b = -2.05/100, Aeq =
> matrix(c(rep(1, 20), 1), nrow = 1), beq = 1,
> lb = rep(0...
2006 Nov 26
2
Quadratic Optimization
Hi,
I need to solve an optimization problem in R having linear objective function and quadratic constraints(number of variables is around 80). What are the possible choices to do this in R.
optim() function only allows box constrained problems. Is it possible in nlm()? Or please tell me if there is any other routine.
Thanks
Amit
2010 May 05
0
R-help Digest, Vol 87, Issue 5
...ss a
huge data set to a function. Is there any situations that R doesn't copy
the data, besides pass data in an environment object.
2) Does R pre-compile the object function to binary when running
"optim"? I experienced the R "optim" is much slower than the MATLAB
"fmincon" function. I don't know MATLAB has done any pre-compilation on
the script for object function or not. But perhaps, we can increase R
performance by some sort of pre-compilation during running time.
Thanks in advance.
Best Regards,
Ruihong
------------------------------
Message: 87...