Advertisement
Guest User

Untitled

a guest
May 8th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.32 KB | None | 0 0
  1. % Vector components: [ sm, ah, cs, ps, rv, nl ]
  2. % NOTE: sm = Steel Meridian, ah = Arbiters of Hexis, etc...
  3.  
  4. % Syndicate mixing matrix
  5. W = [ 1 0 0 -1 0.5 -0.5; 0 1 0.5 -0.5 -1 0; 0 0.5 1 0 -0.5 -1; -1 -0.5 0 1 0 0.5; 0.5 -1 -0.5 0 1 0; -0.5 0 -1 0.5 0 1 ];
  6.  
  7. % Starting syndicate standing (accumulate over rank)
  8. s0 = [ 372000, 372000, 372000, -71000, 372000, -71000 ]';
  9.  
  10. % Target syndicate standing (all but Perrin Sequence)
  11. s = [ 372000, 372000, 372000, -71000, 372000, 372000 ]';
  12.  
  13. % All 6 syndicates at max rank example
  14. % If you have 5 syndicates initially maxed
  15. %s0 = [ 372000, 372000, 372000, -71000, 372000, 372000 ]';
  16. %s = [ 283400, 283400, 283400, -71000, 283400, 283400 ]';
  17.  
  18. % Mask out Perrin Sequence
  19. M = eye(6);
  20. M(4,4) = 0;
  21.  
  22. Z = eye(6) - 1.0/6;
  23. Wh = M*W;
  24.  
  25. % Shorthand for \hat{W}^T*\hat{W}
  26. Q = Wh'*Wh;
  27.  
  28. % Pseudo inverse
  29. Qi = Z*inv(Q + 1)*Z;
  30.  
  31. uh = Qi*Wh'*(s-s0);
  32.  
  33. c = -6.0*min(uh);
  34. p = uh/c + 1/6;
  35.  
  36. format longG
  37.  
  38. disp("Starting syndicate standing: ")
  39. s0
  40. disp("Target syndicate standing: ")
  41. s
  42. disp("Total standing needed (not including the +50%): ")
  43. round(c) % The W will distribute the +50%
  44.  
  45. disp("Total cumulative standing earned across: ")
  46. round(c*1.5)
  47.  
  48. format shortG
  49. disp("Proportion of standing to accumulate per syndicate: ")
  50. p
  51.  
  52. format longG
  53. disp("Ending standing: ")
  54. round(s0 + c*W*p)
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement