Error: Not enough input arguments. Hey, i am new to ga optimization. please help out here.. Would really appreciate. Thank You.

 Accepted Answer

Walter Roberson
Walter Roberson on 2 Nov 2018

1 vote

In your ga call you need to use @confun instead of confun
You also need to modify confun to return two outputs, even if the second one is just the empty matrix.

3 Comments

Thank You. I made the correction. i got this,"Optimization terminated: average change in the penalty fitness value less than options.FunctionTolerance but constraints are not satisfied."
Can you please share information as why constraints are not satisfied, and is optimization complete.. I am new to ga. so please help if you can.
>>
Matt J
Matt J on 2 Nov 2018
It couldn't find a solution satisfying the constraints. Maybe your constraints are infeasible. If you know an example point satisfying the constraints, adding it to the initial population might help.
Sometimes it is difficult to find an initial point that satisfies the constraints . With non-linear constraints it can also be difficult for the optimizer to figure out how it has to manipulate the variables to maintain the constraints: linear constraints are a lot more efficient than nonlinear constraints.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!