- Internally to your objective function, change your integer variable x to x/10. Or,
- Make a list of allowable values in a variable indexvar. Have your objective function evaluate indexvar(x), where x is your integer-valued variable. This is more flexible, in that you can have any list of allowable values.
setting-up input variable in genetic algorithm
조회 수: 5 (최근 30일)
Alan Weiss 2021년 2월 17일
You need to use Mixed Integer ga Optimization in one of several ways.
See Solving a Mixed Integer Engineering Design Problem Using the Genetic Algorithm and in particular the section Add Discrete Non-Integer Variable Constraints.
MATLAB mathematical toolbox documentation
추가 답변 (1개)
Shiva Kalyan Diwakaruni 2021년 2월 10일
You can try using optimoptions for genetic algorithm where you can many options for passing extra parameters either in form of variables or a user defined function.
please refer the below link for more information on optimoptions for ga function
below is the link to see how we can pass extra paramters for customization of ga function
hope it helps,