Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. self.Amax = 0.01
  2. self.Smax = 1e5
  3.  
  4. x1 = x[:, 0]
  5. x2 = x[:, 1]
  6. y = x[:, 2]
  7.  
  8. f1 = x1 * anp.sqrt(16 + anp.square(y)) + x2 * anp.sqrt((1 + anp.square(y)))
  9.  
  10. sigma_ac = 20 * anp.sqrt(16 + anp.square(y)) / (y * x1)
  11. sigma_bc = 80 * anp.sqrt(1 + anp.square(y)) / (y * x2)
  12. f2 = anp.max(anp.column_stack((sigma_ac, sigma_bc)), axis=1)
  13.  
  14. g1 = f2 - self.Smax
  15.  
  16. Amax = 0.01;
  17. Smax = 10^5;
  18. x1 = x(:,1);
  19. x2 = x(:,2);
  20. y = x(:,3);
  21.  
  22. f(1,:) = x1 .* sqrt(16 + (y).^2) + x2 .* sqrt((1 + (y).^2));
  23. sigma_ac = 20 .* sqrt(16 + (y).^2) ./ (y .* x1);
  24. sigma_bc = 80 .* sqrt(1 + (y).^2) ./ (y .* x2);
  25.  
  26. Sigma = [sigma_ac, sigma_bc];
  27. f(2,:) = max(Sigma,[],2);
  28.  
  29. g = f - Smax; <code>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement