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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
E Optimiser code<br />
Listing E.1: Structures <strong>for</strong> the use with the IMEA algorithm<br />
1 /∗ Function pointer type definitions ∗/<br />
typedef real_T (∗objFunc) (real_T∗ , real_T∗ ,real_T∗) ; /∗ Objective<br />
functions ∗/<br />
3 typedef void (∗ sysFunc ) (real_T∗ , real_T∗ , real_T∗ ,real_T∗ , real_T , real_T) ; /∗ System<br />
function ∗/<br />
5 /∗ Structure <strong>of</strong> one individual ∗/<br />
struct individual {<br />
7 real_T ∗DV; /∗ Array <strong>of</strong> the lenght numDV ∗/<br />
real_T ∗ObjResults ; /∗ Array <strong>of</strong> the lenght numObj ∗/<br />
9 real_T weightedSum ;<br />
11 } ;<br />
int_T r<strong>an</strong>king ;<br />
/∗ Structure <strong>of</strong> the system related values ∗/<br />
13 struct system {<br />
/∗ Pointer to a system function in the <strong>for</strong>m <strong>of</strong><br />
15 f (∗<strong>Design</strong>Variables , ∗EstimatedSystemStates , ∗SystemParameters , Timestep ,<br />
∗/<br />
Simulation_Horizon)<br />
17 sysFunc systemFunction ;<br />
real_T ∗SYS_States ; /∗ Values to be modified through the control (<strong>an</strong>d predicted)<br />
∗/<br />
19 real_T ∗SYS_Param ; /∗ Values assumed to be const<strong>an</strong>t during one timestep ∗/<br />
21 } ;<br />
int_T numSysStates ; /∗ Number if system states ∗/<br />
/∗ Structure <strong>of</strong> values related to the objectives ∗/<br />
23 struct objectives {<br />
/∗ Array <strong>of</strong> pointers to objective functions in the <strong>for</strong>m <strong>of</strong><br />
25 f (∗<strong>Design</strong>Variables , ∗EstimatedSystemStates , ∗SystemParameters)<br />
∗/<br />
27 objFunc ∗objectiveFctArray ;<br />
int_T ∗priorities ; /∗ Array <strong>of</strong> objective priorities ∗/<br />
29 real_T ∗weights ; /∗ Array <strong>of</strong> objective weights ∗/<br />
real_T ∗ limits ; /∗ Array <strong>of</strong> objective limits ∗/<br />
31 real_T ∗p<strong>an</strong>ic_order ; /∗ Array <strong>of</strong> objective p<strong>an</strong>ic order ∗/