- Index
- » Users
- » badboydrix
- » Profile
Posts
Posts
Here is my code i am trying to achieve active queue management algorithm
in line 6 there is a logical error, what i wat to achieve is w(t-R) and q(t-R) respectively
but i have searched and haven't been able to find it, i am rather new at modelica and would appreciate the help
N = 1, R = 1, K = 5; 3, C = 1, W(0) = 0; 1,Q(0) = 1
where R(t)=1 just a small reference although it could be understood i guess
1)class generic
2)Real N,K,C,R;
3)Real w(start=0.1),q(start=1);
4)//AQM:
5)equation
6) der(w)=1/R - (((w*(w-R))/2*R)*K*(q-R));
7) der(q)=if q>0 then (N*w/R)-C else 0 ;
8)end generic;
- Index
- » Users
- » badboydrix
- » Profile