How to write linear constraint function in GA ?

Hi
I have an optimization problem written in GA and I want to have the constraints written in the form ax1 + bx2+ cx3 = D, where a, b and c are sources and D is demand and x1...xn are the fractions. So can someone please tell me how to write in matlab? I have written in the form c = ..and ceq =[], but it is showing errors like "too many output arguments"

답변 (1개)

Alan Weiss
Alan Weiss 2014년 8월 22일

1 개 추천

Take a look at the documentation on linear constraints. For a nonlinear objective with nonlinear equality constraints see this example which uses fmincon as the solver, but the constraint syntax is exactly the same as ga.
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

도움말 센터File Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

질문:

2014년 8월 22일

편집:

2014년 8월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by