13.02.2013 Views

Design of an Automatic Control Algorithm for Energy-Efficient ...

Design of an Automatic Control Algorithm for Energy-Efficient ...

Design of an Automatic Control Algorithm for Energy-Efficient ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Optimiser code 161<br />

∗ IMEA_breeding selects ’numChild ’∗2 parents via global stochastic remainder<br />

322 ∗ selection <strong>an</strong>d creates the children by recombining the parents <strong>an</strong>d mutating<br />

324 ∗/<br />

∗ ========================================================================<br />

real_T fitSum = 0.0;<br />

326 real_T tmpSum = 0.0;<br />

real_T r<strong>an</strong>dNr = 0.0;<br />

328 int_T r<strong>an</strong>kMax = 0;<br />

330<br />

332<br />

int_T r<strong>an</strong>kMin = 0;<br />

int_T i , j , cnt_parent ;<br />

334 /∗ determine max <strong>an</strong>d min r<strong>an</strong>king ∗/<br />

336 {<br />

<strong>for</strong>( i=0;i r<strong>an</strong>kMax)<br />

340 r<strong>an</strong>kMax = pop [ i ] . r<strong>an</strong>king ;<br />

}<br />

342 /∗ assign selection probability ∗/<br />

344 {<br />

if(r<strong>an</strong>kMin == r<strong>an</strong>kMax)<br />

/∗avoid problems if all equal ∗/<br />

346 <strong>for</strong>( i=0;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!