Sanjaya, regarding your second question, try setting the 'ConstrBoundary' option to 'penalize'. Regarding your first question, my code should be able to handle as any variables as you are willing to throw at it, but unfortunately it is not able to handle mixed integer problems. The Genetic Algorithm included in MATLAB's Global Optimzation Toolbox should be able to help you with that.
If you have a time-sensitive question (e.g. academic assignment due), please direct any questions to your professor, teaching assistant, or a classmate. Like most contributors to the File Exchange community, I am not a Mathworks employee and have other responsibilities that I must attend to. I cannot guarantee that I will have the chance to check this page on a regular basis to answer your questions.
Some resources that can help you with any problems that arise while using the toolbox include:
- Genetic Algorithm Toolbox documentation (http://www.mathworks.com/help/gads/genetic-algorithm.html)
- The books, academic paper, and Wikipedia article listed in the "bibliography" section of the file description
It is very sad that you have not replied my query till yet.Again I am facing another problem with your code which I am explaining.
I am getting the fitness function from a simulink file. The simulink file will run if the variables lie within lower bound and upper bound.But with your code sometimes the variables exceed the lower bound or upper bound so that the simulink file is not able to execute and it shows error.So please help me as soon as possible. Thanks.
I have to optimize 16 parameters. Out of which the first nine parameters are in the range of zero to one but the rest seven variables are in the range of one to four (only integers).So please help me to use your codings. Is your coding is useful for mixed integer constraints?Again is it useful for 16 variables?
Anticipating a quick reply.Thanking you.
Nara and Natiolol,
I had thought about implementing an integer solving method, but never had the time to do so. After giving it some thought, I came up with one idea to get around this: you could convert your integers into binary form and use the psobinary solver.
Mouloud Kachouane, to find the maximum of a function simply add a (-) sign in front of your problem to convert it into a minimum-finding problem.