From: jia on 6 Aug 2010 21:07 Hello all: I know how to make GA (genetic algorithm) code for unconstrained problems. But I have a problem with equation and inequation constraints. e.g., X1+X2+X3=B Xi>0; i=1, 2, 3 Thank you, JH
From: Alan Weiss on 9 Aug 2010 07:37 On 8/6/2010 9:07 PM, jia wrote: > Hello all: > > I know how to make GA (genetic algorithm) code for unconstrained > problems. But I have a problem with equation and inequation constraints. > e.g., > > X1+X2+X3=B > Xi>0; i=1, 2, 3 > > Thank you, > JH Depending on your version of MATLAB, you can use both linear and nonlinear constraints. See http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-11.html for the syntax of constraints, and see http://www.mathworks.com/access/helpdesk/help/toolbox/gads/ga.html for the syntax of ga. Alan Weiss MATLAB mathematical toolbox documentation
|
Pages: 1 Prev: Retrieving image from webcam (very slow) Next: Restructuring cell arrays with cellfun |