Answered
why does this code give an error ( Undefined function or variable 'ObjectiveFunction'. Error in psi_kozhin (line 44) Swarm.Particles(k).O = fobj(currentX); )?
I do not see where you defined ObjectiveFunction. Is it on your MATLAB path? Alan Weiss MATLAB mathematical toolbox documentat...

ungefär 2 månader ago | 0

Answered
Find minimum of multi-variable function on fixed interval with additional parameter inputs
You need to pass the parameters correctly. See Passing Extra Parameters. In your case, you need to either nest the function in a...

ungefär 2 månader ago | 0

| accepted

Answered
Genetic Algorithm: Plot ONLY best fitness value, not mean.
You could try using this slightly modified plot function, gaplotbestf2: (I modified it slightly from gaplotbestf) function stat...

ungefär 2 månader ago | 0

Answered
Fitting nonlinear noisy data
Most likely the issue is that there are multiple local minima, as in this example: Nonlinear Data-Fitting Using Several Problem-...

ungefär 2 månader ago | 1

Answered
Explanation of hyperparameter tuning procedure for regression tree ensembles
You can find all the information later on in that same reference page: Hyperparameter Optimization Options Alan Weiss MATLAB ...

ungefär 2 månader ago | 0

Answered
Fitting procedure using MultiStart - doesn't recognize objective function
I think that you need to have just one input variable, typically called x, and have each of your other named variables be a comp...

ungefär 2 månader ago | 0

Answered
Optimization toolbox with ode45
I guess that I would make a minimization problem for Y(end,2)^2. I don't know what your parameters are, but you can use fminbnd ...

ungefär 2 månader ago | 0

Answered
Surrogate Optimization Error: 'Dimensions of arrays being concatenated are not consistent'
You say "Do not mind the AdiabaticReactor function" but I cannot tell what sizes the inputs and outputs are for the objconstrAdi...

ungefär 2 månader ago | 0

Answered
Error: Complex values ​​are not supported
I don't know where your objective function creates complex values, though I suspect that one or more of your logarithm calls has...

ungefär 2 månader ago | 0

| accepted

Answered
How to find optimum complex weighting coefficients for antenna beam pattern optimisation? A purely optimisation problem
fmincon requires real values only. Convert your complex-valued problem to twice as many real variables. For an example, see Fit ...

ungefär 2 månader ago | 0

Answered
system of nonlinear equations
Do you have Optimization Toolbox™ installed? Check by running the ver command. You might need to install or reinstall. Alan Wei...

ungefär 2 månader ago | 0

| accepted

Answered
Nonlinear fitting depends too heavily on starting points
You might find some relevant information here or here. The point is that fitting problems typically have multiple local optima, ...

ungefär 2 månader ago | 0

| accepted

Answered
Genetic Algorithm to Find desired parameters.
You might want to spend a little time reading up on the genetic algorithm: Genetic Algorithm Terminology How the Genetic Algor...

ungefär 2 månader ago | 0

Answered
I am working on an optimization problem which has 60 optimization variables to get minimum objective function. which solver would be best for this problem? right now I am using multistart with fmincon.
If your problem is smooth and you are looking for a global minimum, then those sound like the right choices, See Table for Choos...

ungefär 2 månader ago | 2

Answered
Find minimum Sum while keeping variable fix
I don't see your equality constraint. If the equality constraint is a nonlinear constraint, you need to pass it in the fmincon n...

ungefär 2 månader ago | 0

Answered
optimization using genetic algorithm using two variable
You might want to try to copy the coding techniques in Optimize an ODE in Parallel. Alan Weiss MATLAB mathematical toolbox doc...

ungefär 2 månader ago | 0

Answered
Genetic Algorithm objective and constraint
I suggest that you use the debugger. Put a break point in your nonlinear constraint function (or maybe elsewhere) and find out w...

ungefär 2 månader ago | 0

Answered
lsqnonlin and true parameters value
I can help you with a) and f), but for the rest you will have to look elsewhere. The examples Fit ODE, Problem-Based and Fit an...

2 månader ago | 0

| accepted

Answered
More details on fmincon function
Constrained Nonlinear Optimization Algorithms Alan Weiss MATLAB mathematical toolbox documentation

2 månader ago | 1

Answered
Does anyone know how to get the values of the variables?
Well, you have to solve the problem first by calling solve, as in your commented-out last line. Then you will have a solution s...

2 månader ago | 0

| accepted

Answered
Genetic Algorithm (GA)
You need to include nonlinear constraints that relate to the variable x. I do not understand how you get ANSYS to run based on y...

2 månader ago | 0

Answered
lsqcurvefit: Local minimum possible... but clearly visible minima
You could try to use fminbnd, which assumes no smoothness and is pretty efficient at 1-D minimization problems. Alan Weiss MAT...

2 månader ago | 0

Answered
lsqnonlin multiple dataset optimisation
It sounds like you are trying to find a set of ODE parameters that work for multiple data sets. If that is true, then I think th...

2 månader ago | 1

| accepted

Answered
How to solve by using fmincon?
This looks like a linear programming problem to me. Use linprog, not fmincon. Or even better, use the problem-based approach. ...

2 månader ago | 1

Answered
Dimension error with genetic algorithm optimization variable
In general, if you have an n-by-n matrix of variables x, the linear inequality constraint A*x <= b (and linear equality constrai...

2 månader ago | 0

| accepted

Answered
Surrogate optimization with different size constraints
Your problem is this line: c = [c1 c2]; The variable c1 is a 2-by-1 column. c2 is, I think, a 22-by-22. Maybe a 22-by-1. In an...

2 månader ago | 0

| accepted

Answered
What is the difference between Optimproblem and linprog
For examples and a description of the problem-based approach, see Linear Programming and Mixed-Integer Linear Programming. Alan...

2 månader ago | 0

Answered
Is there a bug in the genetic algorithm (ga) under certain conditions?
You have a nonlinear constraint function. This changes the algorithm quite a bit; see Nonlinear Constraint Solver Algoirithm. Se...

2 månader ago | 0

Answered
solve optimization with constraints
This problem is similar to Create Multiperiod Inventory Model in Problem-Based Framework. I think that you will find the problem...

2 månader ago | 0

| accepted

Answered
fmincon nonlinear constraints not being optimized
Your code contains a lot of lines of the form averagecurrentH2(isnan(averagecurrentH2))=0; When I run your entire code in debu...

2 månader ago | 0

Load more