[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with ga boundaries
From: |
George Kousiouris |
Subject: |
Problem with ga boundaries |
Date: |
Tue, 21 Jul 2009 13:49:07 +0300 |
User-agent: |
Thunderbird 2.0.0.22 (Windows/20090605) |
Hi,
I have started using the ga function of octave (package ga-0.9.4) but
for some reason, around the 37th-38th generation the variables take
values beyond the specified interval (0,1). Can anyone help me? Am I
doing something wrong?
Here is the ga script used:
% Fitness function
gen=0;
save generation_number.m gen;
fitnessfcn = @script;
% Number of Variables
nvars = 19;
A = [];
b = [];
Aeq = [];
beq = [];
% Bounds
LB=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
UB=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1];
% Nonlinear constraints
nonlcon = [];
% Run GA
[x,fval,exitflag,output,population,scores] =
ga(fitnessfcn,nvars,A,b,Aeq,beq,LB,UB)
Thanks in advance and best regards,
George
- Problem with ga boundaries,
George Kousiouris <=