Clear Filters
Clear Filters

Genetic algorithm - Constraint Function

1 view (last 30 days)
Soon Kok Yew
Soon Kok Yew on 2 Apr 2018
Objective function: f(x) = x(1) + 2*x(2) + 3*x(3) + 4*x(4)
Constraint function: x(1) + x(2) + x(3) + x(4) - 5 = 0
Based on the statement above, the constraint function of the GA must equal to 0 for the minimization. However, the GA in matlab only permit lesser or equal instead of absolute equal. As result, the minimization of my objective function does not achieve the number that I desired. Hence, any solutions for this problem?

Answers (0)

Community Treasure Hunt

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

Start Hunting!