Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. package dz;
  2.  
  3. public class Analiticki {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. final float S1 = 0.003f; // Vrijeme trajanja obrade paketa (s/p)
  8. final float S2 = 0.001f;
  9. final float S3 = 0.01f;
  10. final float S4 = 0.04f;
  11. final float S5 = 0.1f;
  12. final float S6 = 0.13f;
  13. final float S7 = 0.15f;
  14.  
  15. final float a = 0.2f;
  16. final float b = 0.3f;
  17. final float c = 0.5f;
  18. final float d = 0.6f;
  19. final float e = 0.4f;
  20. final float f = 0.6f;
  21. final float g = 0.2f;
  22. final float h = 0.3f;
  23.  
  24. final float dS1 = S1;
  25. final float dS2 = S2/(1-f);
  26. final float dS3 = S3*((a+b*h)/((1-f)*(1-g*h)));
  27. final float dS4 = S4*(b/(1-f)+((a+b*h)*g)/((1-f)*(1-g*h)));
  28. final float dS5 = S5*c/(1-f);
  29. final float dS6 = S6*d;
  30. final float dS7 = S7*e;
  31.  
  32. int steps = 15;
  33. float step = 0.5f;
  34. float L = 0.5f;
  35. float T;
  36.  
  37. System.out.println("L\tT");
  38. for(int i = 1; i <= steps; i++) {
  39. T = dS1/(1-L*dS1)+dS2/(1-L*dS2)+dS3/(1-L*dS3)+dS4/(1-L*dS4)+dS5/(1-L*dS5)+
  40. dS6/(1-L*dS6)+dS7/(1-L*dS7);
  41. System.out.print(L+"\t"+T+"\n");
  42. L += step;
  43. }
  44.  
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement