How can I perform integer programming using the GA function in the Genetic Algorithm and Direct Search Toolbox?
Date Last Modified: Tuesday, February 1, 2011
| Solution ID: | 1-10PDHC | |
| Product: | Global Optimization Toolbox | |
| Reported in Release: | R14SP1 | |
| Platform: | All Platforms | |
| Operating System: | All OS |
Subject:
How can I perform integer programming using the GA function in the Genetic Algorithm and Direct Search Toolbox?
Problem Description:
I would like to perform integer programming or mixed integer programming using the GA function by constraining certain parameters to be integers.
Solution:To perform integer programming using the GA function, create a custom mutation function and a creation function that generate only integer outputs. Then, use the GAOPTIMSET function to set the "MutationFcn" and "CreationFcn" properties to the custom functions, as shown with the following code: |
Related Documents/Files:
|
|
