Answered
Understanding the syntax of the minimax constraint problem
Your problem is that you want to include a data matrix A as extra data, but you are doing it incorrectly. See Passing Extra Para...

7 years ago | 0

Answered
Genetic Algorithm stops after few iterations when constraints are added
You cannot run gamultiobj with integer constraints. Sorry. Alan Weiss MATLAB mathematical toolbox documentation

7 years ago | 0

| accepted

Answered
Wish to run an optimization but not sure which solver will help. The program has many calculations and functions defined correctly. I have 7 variables and one objective. PLease suggest
As explained in the documentation, you have to put all of your control variables into one variable, typically called x: functio...

7 years ago | 0

| accepted

Answered
Dynamic Optimization in matlab with optimization toolbox
Do you have four objective functions or do you have four control variables? If you have four objective functions, then you have...

7 years ago | 0

| accepted

Answered
How do I pass non-decision variables into gamultiobj?
The way of including extra parameters is described in Passing Extra Parameters. So in your case, instead of fun = @objval; you...

7 years ago | 1

Answered
Slow bayesopt initialization in parallel computing
Perhaps the documentation in Parallel Bayesian Optimization can help. In particular, there are descriptions of several methods o...

7 years ago | 0

Answered
how can i make ga code to set a specific values to a parameter
It sounds to me as if you have a discrete set of values to choose from. Use the technique of Mixed Integer Optimization, as show...

7 years ago | 0

Answered
How can i formulate a multi objective multi variable optimization problem?
I suggest that you look at the Design Optimization of a Welded Beam example or other examples in the Multiobjective Optimization...

7 years ago | 1

Answered
How to solve optimization problem using matlab
This sounds like a Linear Programming or Mixed-Integer Linear Programming Problem. Take a look at the examples in that section t...

7 years ago | 0

Answered
Extract some value from genetic algorithm tool addition to fitness function value
I think that the easiest way would be to run everything in a nested function, as in this example. Alan Weiss MATLAB mathematic...

7 years ago | 0

Answered
Programmatically Hard Stop intlinprog
Sorry, no. When you use an output function or the MaxTime option, intlnprog stops when it reaches a safe place to exit. This saf...

7 years ago | 0

| accepted

Answered
Optimization wrongly converging to the boundary
You have given no specifics, so my answer is completely generic. Solvers converge to local optima, not necessarily global optima...

7 years ago | 1

Answered
I start fminsearch in the solution (fval= 1.4974e-26), but still does 20 iterations finding the same value instead of ending the search inmediately, why?
fminsearch has no way to know that you started at the best point. It has to look around a bit to determine if it can find a bett...

7 years ago | 0

| accepted

Answered
Reference to non-existent field 'xd'. Kindly help .
The problem isn't S(i).xd, it is C(c).xd that doesn't exist. Your structure C(c) has fields distance and id but not xd. Alan We...

7 years ago | 1

Answered
Getting complex number as a output of fitness function from genetic algorithm...
The acosd function returns complex values when the argument is out of the range [-1,1]. That is why you are getting complex valu...

7 years ago | 0

Answered
Duplicates in Pareto frontier using gamultiobj
The genetic algorithm does not remove duplicate points that it finds. I do not know how you are implementing the constraints fo...

7 years ago | 2

| accepted

Answered
There is no solution for global optimum search in Optimization Toolbox?
To search for a global minimum, see the suggestions in Local vs. Global Optima. Alan Weiss MATLAB mathematical toolbox documen...

7 years ago | 0

Answered
How to define multi variable linear programming ??
You have two choices. One is to follow Torsten's advice and use linprog to solve the resulting problem. The other is to use the...

7 years ago | 0

Answered
How to solve error message in fsolve stating: "The vector of function values is near zero, as measured by the selected value of the function tolerance. However, the last step was ineffective"
Without running your code, I can tell you that the exit message you give is NOT an error message. Read its first part: "The vec...

7 years ago | 0

| accepted

Answered
How to limit optimisation program to choose only integer variables within defined range?
If your objective function test is linear, then you should use intlinprog to solve your problem. Otherwise, use ga according to...

7 years ago | 0

| accepted

Answered
Is it possible to optimize simulink parameters?
I'm not an expert on Simulink®, but there are some examples in Optimization Toolbox™ documentation that use Simulink, and maybe ...

7 years ago | 0

Answered
Set fmincon for a maximization problem when there are N agents and T periods of time
If I understand you, it sounds straightforward to set up the problem for solution by |fmincon|. I assume that your control varia...

7 years ago | 0

| accepted

Answered
Using fminunc with gradient computation
To include a gradient in the objective function, have the objective return another output, <https://www.mathworks.com/help/optim...

7 years ago | 0

Answered
How to select a single optimum solution from sets of solution using NSGA II and show the optimum value on the graph?
Perhaps <https://www.mathworks.com/help/gads/multiobjective-optimization-welded-beam.html this example> can help, especially tow...

7 years ago | 0

Answered
Error "too many output arguments while running in optimtool" , what i have to do?
Your functions do not make sense to me. |kpop| returns a constant matrix, what is the point of even calling it a function? |cons...

7 years ago | 0

| accepted

Answered
How to code a Genetic Algorithm that has a function within the fitness function?
Instead of minimizing the sum of absolute deviations, I suggest that you minimize the sum of squared deviations. Then do not use...

7 years ago | 0

Answered
fmincon stop criterion for function with multiple outputs
I think that you mainly need to realize that optimization toolbox generally asks that you put all of your control variables into...

7 years ago | 1

| accepted

Answered
Adding a constraint in @confun constrained optimization
It sounds to me as if your problem could be formulated for <https://www.mathworks.com/help/optim/ug/fseminf.html |fseminf|>. ...

7 years ago | 1

Answered
MATLAB R2017b Error: "Node coordinates should be 3-D, the matrix should have size 3-by-numnodes"
I believe that |geometryFromMesh| was originally for 3-D meshes, and was extended to 2-D meshes in R2018a. Alan Weiss MATL...

7 years ago | 0

| accepted

Answered
How to find electric field distribution numerically for a complicated structure such as the one I attached here?
I think that you need to define an entire geometry including some space around the ring. See <https://www.mathworks.com/help/pde...

7 years ago | 0

Load more