How to use loads method in autotest

Best Python code snippet using autotest_python

hurricane_sim_lap2.py

Source:hurricane_sim_lap2.py Github

copy

Full Screen

1# -*- coding: utf-8 -*-2"""3Created on Thu Oct 22 14:42:34 202045@author: glf140026"""78import random9import numpy as np10import scipy.stats11import math12import tkinter as tk13from PIL import ImageTk,Image14from tkinter import *15import sys16import math17from tkinter import simpledialog18import matplotlib.pyplot as plt19from PIL import ImageTk,Image20import arcinfo21import arcpy22import arcgis23import arcgisscripting24import requests25from io import BytesIO2627def writeCoordinates():28 y_coord = entry1.get()29 x_coord = entry2.get() 30 # file = open("Coordinates","w")31 # file.write("x_coordinate, y_coordinate \n")32 coordinates_string = "{}, {}".format(x_coord,y_coord)33 # file.write(coordinates_string)34 # file.flush()35 file = open("Coordinates_up","w")36 file.write("Point \n")37 coordinates_string = "0 {} {} 0 0".format(x_coord,y_coord)38 file.write(coordinates_string)39 file.write("\nEND")40 file.flush()41 root14.destroy()4243def submitAnswers():44 global K_zt45 Lh = entry3.get()46 Lh = float(Lh)47 H = entry4.get()48 H = float(H)49 z = entry5.get()50 z = float(z)51 x = entry6.get()52 x = float(x)53 if exposure_category == 1:54 if feature_type == 1:55 K1 = 0.95*H/Lh56 u = 1.557 lamb = 458 K2 = 1 - (x/(u*Lh))59 K3 = math.exp((-lamb*z)/Lh)60 K_zt = (1+K1*K2*K3)**261 elif feature_type == 2:62 K1 = 1.30*H/Lh63 u = 1.564 lamb = 365 K2 = 1 - (x/(u*Lh))66 K3 = math.exp((-lamb*z)/Lh)67 K_zt = (1+K1*K2*K3)**268 elif feature_type == 3:69 K1 = 0.75*H/Lh70 u = 471 lamb = 2.572 K2 = 1 - (x/(u*Lh))73 K3 = math.exp((-lamb*z)/Lh)74 K_zt = (1+K1*K2*K3)**275 else:76 K_zt = 1.077 if exposure_category == 2:78 if feature_type == 1:79 K1 = 1.05*H/Lh80 u = 1.581 lamb = 482 K2 = 1 - (x/(u*Lh))83 K3 = math.exp((-lamb*z)/Lh)84 K_zt = (1+K1*K2*K3)**285 elif feature_type == 2:86 K1 = 1.45*H/Lh87 u = 1.588 lamb = 389 K2 = 1 - (x/(u*Lh))90 K3 = math.exp((-lamb*z)/Lh)91 K_zt = (1+K1*K2*K3)**292 elif feature_type == 3:93 K1 = 0.85*H/Lh94 u = 495 lamb = 2.596 K2 = 1 - (x/(u*Lh))97 K3 = math.exp((-lamb*z)/Lh)98 K_zt = (1+K1*K2*K3)**299 else:100 K_zt = 1.0101 if exposure_category == 3:102 if feature_type == 1:103 K1 = 1.15*H/Lh104 u = 1.5105 lamb = 4106 K2 = 1 - (x/(u*Lh))107 K3 = math.exp((-lamb*z)/Lh)108 K_zt = (1+K1*K2*K3)**2109 elif feature_type == 2:110 K1 = 1.55*H/Lh111 u = 1.5112 lamb = 3113 K2 = 1 - (x/(u*Lh))114 K3 = math.exp((-lamb*z)/Lh)115 K_zt = (1+K1*K2*K3)**2116 elif feature_type == 3:117 K1 = 0.95*H/Lh118 u = 4119 lamb = 2.5120 K2 = 1 - (x/(u*Lh))121 K3 = math.exp((-lamb*z)/Lh)122 K_zt = (1+K1*K2*K3)**2123 else:124 K_zt = 1.0125 root15.destroy()126127128# collecting anonymous user number129#root4 = tk.Tk()130#root4.withdraw()131#Participant_num = simpledialog.askstring(title = "Participant Number", prompt = "What is the participant number assigned to you?")132133# get user demographics134root2 = tk.Tk()135root2.title('Demographics')136root2.geometry("400x400")137138139clicked5 = tk.StringVar(root2)140clicked5.set("Choose Option")141142clicked6 = tk.StringVar(root2)143clicked6.set("Choose Option")144145clicked7 = tk.StringVar(root2)146clicked7.set("Choose Option")147148clicked8 = tk.StringVar(root2)149clicked8.set("Choose Option")150151clicked9 = tk.StringVar(root2)152clicked9.set("Choose Option")153154155question5 = tk.Label(root2, text = "What gender do you identify as?")156question5.pack()157158drop5 = tk.OptionMenu(root2,clicked5,"Male", "Female", "Others", "Prefer not to answer")159drop5.pack()160161question6 = tk.Label(root2, text = "What is your age?")162question6.pack()163164drop6 = tk.OptionMenu(root2,clicked6, "Under 18", "18-25", "26-35", "36-45", "46-55", "56-75", "76+", "Prefer not to answer")165drop6.pack()166167question7 = tk.Label(root2, text = "What is the highest degree or level of education you have \n completed?")168question7.pack()169170drop7 = tk.OptionMenu(root2,clicked7, "Some high school", "High school diploma", "Bachelor's degree", "Graduate degree (Master's and/or PhD)", "Prefer not to answer")171drop7.pack()172173question8 = tk.Label(root2, text = "What is your annual household income?")174question8.pack()175176drop8 = tk.OptionMenu(root2,clicked8, "Less than $20,000", "$20,000 to $34,999", "$35,000 to $49,999", "$50,000 to $74,999", "$75,000 to $99,999", "Over $100,000", "Prefer not to answer")177drop8.pack()178179question9 = tk.Label(root2, text = "Including yourself, how many people currently live in your \n household?")180question9.pack()181182drop9 = tk.OptionMenu(root2,clicked9, "1", "2", "3", "4", "5", "More than 5", "Prefer not to answer")183drop9.pack()184185186exit_button = tk.Button(root2, text = "Submit", command = root2.destroy)187exit_button.pack(side=BOTTOM)188189190root2.mainloop()191192# get human behavior/factors influencing evacuation decision193root3 = tk.Tk()194root3.title('Human Behaviors/Factors')195root3.geometry("400x400")196197198clicked10 = tk.StringVar(root3)199clicked10.set("Choose Option")200201clicked11 = tk.StringVar(root3)202clicked11.set("Choose Option")203204clicked12 = tk.StringVar(root3)205clicked12.set("Choose Option")206207clicked13 = tk.StringVar(root3)208clicked13.set("Choose Option")209210clicked14 = tk.StringVar(root3)211clicked14.set("Choose Option")212213214question10 = tk.Label(root3, text = "Do you or anyone in your household have speical needs \n (disabilities, elderly, etc)?")215question10.pack()216217drop10 = tk.OptionMenu(root3,clicked10,"Yes", "No")218drop10.pack()219220question11 = tk.Label(root3, text = "How many pets does your household have?")221question11.pack()222223drop11 = tk.OptionMenu(root3,clicked11, "0", "1", "2", "3", "4", "5", "5+")224drop11.pack()225226question12 = tk.Label(root3, text = "What would be your primary mode of transportation \n in case of evacuation?")227question12.pack()228229drop12 = tk.OptionMenu(root3,clicked12, "Car", "Bus", "Train", "Other", "I have no form of transporation")230drop12.pack()231232question13 = tk.Label(root3, text = "Where would you shelter in case of evacuation?")233question13.pack()234235drop13 = tk.OptionMenu(root3,clicked13, "In a second home located elsewhere", "With friends or family", "In a rented space (hotel, motel, etc)", "In an evacuation shelter", "Other", "I have no other place to evacuate to")236drop13.pack()237238question14 = tk.Label(root3, text = "Do you have any past hurricane experience?")239question14.pack()240241drop14 = tk.OptionMenu(root3,clicked14, "Yes", "No")242drop14.pack()243244245exit_button = tk.Button(root3, text = "Submit", command = root3.destroy)246exit_button.pack(side=BOTTOM)247248249root3.mainloop()250251# get user input for the category of hurricane252root1 = tk.Tk()253root1.title('Building and Storm Factors')254root1.geometry("500x400")255256clicked4 = tk.StringVar(root1)257clicked4.set("Choose Option")258259260question4 = tk.Label(root1, text = "What category hurricane is predicted to strike?")261question4.pack()262263drop4 = tk.OptionMenu(root1,clicked4, "Category 1", "Category 2", "Category 3", "Category 4", "Category 5")264drop4.pack()265266response = requests.get('https://github.com/gfusco19/VR_V1/blob/main/windscale.png?raw=true')267img11 = Image.open(BytesIO(response.content))268img11 = img11.resize((400, 300))269tkimage11 = ImageTk.PhotoImage(img11)270tk.Label(root1, image=tkimage11).pack()271272exit_button = tk.Button(root1, text = "Submit", command = root1.destroy)273exit_button.pack(side=BOTTOM)274275276root1.mainloop()277278category = clicked4.get()279if category in ['Category 1']:280 category = 1281elif category in ['Category 2']:282 category = 2283elif category in ['Category 3']:284 category = 3285elif category in ['Category 4']:286 category = 4287elif category in ['Category 5']:288 category = 5289else:290 sys.exit("Please select valid hurricane category option") 291 292file = open("Hurricane_Category", "w")293category_string = str(category)294file.write(category_string)295file.flush()296297### concrete block or wood frame 298root8 = tk.Tk()299root8.title('Building Factors')300root8.geometry("700x425")301302clicked1 = tk.StringVar(root8)303clicked1.set("Choose Option")304305question1 = tk.Label(root8, text = "Is your home wood frame or concrete block ?")306question1.pack()307308drop1 = tk.OptionMenu(root8,clicked1,"Wood Frame", "Concrete Block")309drop1.pack()310311response = requests.get('https://github.com/gfusco19/VR_V1/blob/main/concreteblockVSwoodframe.PNG?raw=true')312img4 = Image.open(BytesIO(response.content))313tkimage4 = ImageTk.PhotoImage(img4)314tk.Label(root8, image=tkimage4).pack()315316exit_button = tk.Button(root8, text = "Submit", command = root8.destroy)317exit_button.pack()318319320root8.mainloop()321322323# get user input for roof material324root9 = tk.Tk()325root9.title('Building Factors')326root9.geometry("600x600")327328clicked2 = tk.StringVar(root9)329clicked2.set("Choose Option")330331question2 = tk.Label(root9, text = "What type of roof cover does your home have?")332question2.pack()333334drop2 = tk.OptionMenu(root9,clicked2, "Asphalt Shingles", "Metal Roofing", "Concrete Tiles", "Clay Tiles")335drop2.pack()336337response = requests.get('https://github.com/gfusco19/VR_V1/blob/main/RoofingOptions.PNG?raw=true')338img5 = Image.open(BytesIO(response.content))339tkimage5 = ImageTk.PhotoImage(img5)340tk.Label(root9, image=tkimage5).pack()341342exit_button = tk.Button(root9, text = "Submit", command = root9.destroy)343exit_button.pack()344345346root9.mainloop()347348349# get user input for connections350root10 = tk.Tk()351root10.title('Building and Storm Factors')352root10.geometry("800x425")353354clicked3 = tk.StringVar(root10)355clicked3.set("Choose Option")356357question3 = tk.Label(root10, text = "Does your home have hurricane straps or toe nailing connections?")358question3.pack()359360drop3 = tk.OptionMenu(root10,clicked3, "Hurricane Straps", "Toe Nailing")361drop3.pack()362363response = requests.get('https://github.com/gfusco19/VR_V1/blob/main/ConnectionOptions.PNG?raw=true')364img9 = Image.open(BytesIO(response.content))365tkimage9 = ImageTk.PhotoImage(img9)366tk.Label(root10, image=tkimage9).pack()367368exit_button = tk.Button(root10, text = "Submit", command = root10.destroy)369exit_button.pack()370371root10.mainloop()372373# user input for exposure category 374root11 = tk.Tk()375root11.title('Exposure Category')376root11.geometry("1000x350")377378clicked19 = tk.StringVar(root11)379clicked19.set("Choose Option")380381question19 = tk.Label(root11, text = "What is the exposure category or your household?")382question19.pack()383384drop19 = tk.OptionMenu(root11, clicked19, "Urban", "Suburban", "Rural")385drop19.pack()386387response = requests.get('https://github.com/gfusco19/VR_V1/blob/main/exposure.PNG?raw=true')388img19 = Image.open(BytesIO(response.content))389tkimage19 = ImageTk.PhotoImage(img19)390tk.Label(root11, image=tkimage19).pack()391392exit_button = tk.Button(root11, text = "Submit", command = root11.destroy)393exit_button.pack(side=BOTTOM)394395root11.mainloop()396397# user input for vegetation density398root12 = tk.Tk()399root12.title('Vegetation Density')400root12.geometry("600x410")401402clicked20 = tk.StringVar(root12)403clicked20.set("Choose Option")404405question20 = tk.Label(root12, text = "What type of vegetation density surrounds your household?")406question20.pack()407408drop20 = tk.OptionMenu(root12, clicked20, "High", "Moderate", "Low", "Very Low")409drop20.pack()410411response = requests.get('https://github.com/gfusco19/VR_V1/blob/main/vegetationdensity.jpg?raw=true')412img20 = Image.open(BytesIO(response.content))413tkimage20 = ImageTk.PhotoImage(img20)414tk.Label(root12, image=tkimage20).pack()415416exit_button = tk.Button(root12, text = "Submit", command = root12.destroy)417exit_button.pack()418419root12.mainloop()420421# user input for garage, windows and roof sheathing422root13 = tk.Tk()423root13.title('Openings and Sheathing')424root13.geometry("500x410")425426clicked21 = tk.StringVar(root13)427clicked21.set("Choose Option")428429clicked22 = tk.StringVar(root13)430clicked22.set("Choose Option")431432clicked27 = tk.StringVar(root13)433clicked27.set("Choose Option")434435clicked28 = tk.StringVar(root13)436clicked28.set("Choose Option")437438clicked31 = tk.StringVar(root13)439clicked31.set("Choose Option")440441question21 = tk.Label(root13, text = "What strength roof sheathing does your structure have?")442question21.pack()443444drop21 = tk.OptionMenu(root13, clicked21, "High (8d with 6/6 nail pattern)", "Moderate (8d with 6/12 nail pattern)", "Low (6d with 6/12 nail pattern)")445drop21.pack()446447448question22 = tk.Label(root13, text = "Is your garage door braced or impact resistant?")449question22.pack()450451drop22 = tk.OptionMenu(root13, clicked22, "Yes", "No")452drop22.pack()453454question29 = tk.Label(root13, text = "Does your house have a basement?")455question29.pack()456457drop29 = tk.OptionMenu(root13, clicked31, "Yes", "No")458drop29.pack()459460question23 = tk.Label(root13, text = "Is your home located in a hurricane prone area?")461question23.pack()462463drop23 = tk.OptionMenu(root13, clicked27, "Yes", "No")464drop23.pack()465466question24 = tk.Label(root13, text = "Is your home located near any open water?")467question24.pack()468469drop24 = tk.OptionMenu(root13, clicked28, "Yes", "No")470drop24.pack()471472exit_button = tk.Button(root13, text = "Submit", command = root13.destroy)473exit_button.pack()474475root13.mainloop()476477hurricane_prone = clicked27.get()478if hurricane_prone in ['Yes']:479 hurricane_prone = 1480elif hurricane_prone in ['No']:481 hurricane_prone = 2482 483basement = clicked31.get()484if basement in ['Yes']:485 basement = 1486elif basement in ['No']:487 basement = 2488 489open_water = clicked28.get()490if open_water in ['Yes']:491 open_water = 1492elif open_water in ['No']:493 open_water = 2494 495exposure = clicked19.get()496if exposure in ['Urban']:497 exposure = 1498elif exposure in ['Suburban']:499 exposure = 2500elif exposure in ['Rural']:501 exposure = 3 502 503vegetation = clicked20.get()504if vegetation in ['High']:505 vegetation = 1506elif vegetation in ['Moderate']:507 vegetation = 2508elif vegetation in ['Low']:509 vegetation = 3510elif vegetation in ['Very Low']:511 vegetation = 4512513if exposure == 1 or 2:514 exposure_category = 1 #B515elif vegetation == 1 or 2:516 exposure_category = 1 #B517elif exposure == 3 and hurricane_prone == 1:518 exposure_category = 2 #C519elif open_water == 1 and hurricane_prone == 1:520 expsore_category = 2 #C521elif exposure == 3 and hurricane_prone == 2:522 exposure_category = 3 #D523elif open_water == 1 and hurricane_prone == 2:524 exposure_category = 3 #D525else:526 exposure_category = 3527 528529# input for location and escarpment530root14 = tk.Tk()531root14.title('Location')532root14.geometry("550x150")533question23 = tk.Label(root14, text = "Enter the decimal coordinates to your structure. You may find your coordinates using this link")534question23.pack()535question24 = tk.Label(root14, text = "https://www.whatsmygps.com/")536question24.pack()537question25 = tk.Label(root14, text = "Lattitude:")538question25.pack(side=LEFT)539entry1 = tk.Entry(root14)540entry1.pack(side=LEFT)541question26 = tk.Label(root14, text = "Longitude:")542question26.pack(side=LEFT)543entry2 = tk.Entry(root14)544entry2.pack(side=LEFT)545546exit_button = tk.Button(root14, text = "Submit", command = writeCoordinates)547exit_button.pack(side=LEFT)548549550root14.mainloop()551552arcpy.env.overwriteOutput = True553mxd = arcpy.mapping.MapDocument(r"C:\Users\giova\Dropbox\Research\Graduate School\contours_map.mxd")554555mxd_H1 = arcpy.mapping.MapDocument(r"C:\Users\giova\Dropbox\Research\Graduate School\storm_surge_H1.mxd")556mxd_H2 = arcpy.mapping.MapDocument(r"C:\Users\giova\Dropbox\Research\Graduate School\storm_surge_H2.mxd")557mxd_H3 = arcpy.mapping.MapDocument(r"C:\Users\giova\Dropbox\Research\Graduate School\storm_surge_H3.mxd")558mxd_H4 = arcpy.mapping.MapDocument(r"C:\Users\giova\Dropbox\Research\Graduate School\storm_surge_H4.mxd")559mxd_H5 = arcpy.mapping.MapDocument(r"C:\Users\giova\Dropbox\Research\Graduate School\storm_surge_H5.mxd")560561file1 = open("Hurricane_Category", "r+")562category = file1.readline()563category = float(category)564565if category == 1:566 mxd2 = mxd_H1567elif category == 2:568 mxd2 = mxd_H2569elif category == 3:570 mxd2 = mxd_H3571elif category == 4:572 mxd2 = mxd_H4573elif category == 5:574 mxd2 = mxd_H5575576df = arcpy.mapping.ListDataFrames(mxd,"*")[0]577df2 = arcpy.mapping.ListDataFrames(mxd2,"*")[0]578579gp = arcgisscripting.create()580inTxt = r"C:\Users\giova\Dropbox\Research\Graduate School\Coordinates_up"581inSep = "."582point = r"C:\Users\giova\Dropbox\Research\Graduate School\point.shp"583gp.CreateFeaturesFromTextFile(inTxt, inSep, point, "#")584newlayer = arcpy.mapping.Layer(r"C:\Users\giova\Dropbox\Research\Graduate School\point.shp")585586arcpy.mapping.AddLayer(df, newlayer, "AUTO_ARRANGE")587Layer = arcpy.mapping.ListLayers(mxd,'point',df)[0]588ext = Layer.getExtent()589df.panToExtent(ext)590df.scale = 50000591arcpy.mapping.ExportToPNG(mxd,r"C:\Users\giova\Dropbox\Research\Graduate School\contours_map_example.png")592593arcpy.mapping.AddLayer(df2, newlayer, "AUTO_ARRANGE")594Layer2 = arcpy.mapping.ListLayers(mxd2,'point',df2)[0]595ext = Layer2.getExtent()596df2.panToExtent(ext)597df2.scale = 10000598arcpy.mapping.ExportToPNG(mxd2,r"C:\Users\giova\Dropbox\Research\Graduate School\hazard_map_image.png")599600601602# topographic map603root15 = tk.Tk()604root15.title('Topographic Factor')605root15.geometry("750x1000")606root15.attributes('-fullscreen',True)607608img = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\contours_map_example.png")609img = img.crop((20,195,796,830))610tkimage = ImageTk.PhotoImage(img)611tk.Label(root15, image=tkimage).pack()612613img2 = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\feature.png")614img2 = img2.resize((550,200))615tkimage2 = ImageTk.PhotoImage(img2)616tk.Label(root15, image=tkimage2).pack()617618clicked23 = tk.StringVar(root15)619clicked23.set("Choose Option")620621clicked29 = tk.StringVar(root15)622clicked29.set("Choose Option")623624question4 = tk.Label(root15, text = "\nIs your house located in the upper half of a hill or ridge \n or near the crest of an escarpment?")625question4.pack()626627drop4 = tk.OptionMenu(root15,clicked23, "Yes", "No")628drop4.pack()629630question5 = tk.Label(root15, text = "\nIs the feature your house located on a hill, ridge, or escarpment?")631question5.pack()632633drop5 = tk.OptionMenu(root15,clicked29, "Hill", "Ridge", "Escarpment", "N/A")634drop5.pack()635636exit_button = tk.Button(root15, text = "Submit", command = root15.destroy)637exit_button.pack()638639root15.mainloop()640641feature_type = clicked29.get()642if feature_type in ['Hill']:643 feature_type = 1644elif feature_type in ['Ridge']:645 feature_type = 2646elif feature_type in ['Escarpment']:647 feature_type = 3648elif feature_type in ['N/A']:649 feature_type = 4650651if feature_type == 4:652 K_zt = 1.0653654topo_1 = clicked23.get()655if topo_1 in ['No']:656 K_zt = 1.0657if topo_1 in ['Yes']:658 root15 = tk.Tk()659 root15.title('Topographic Factor')660 root15.geometry("750x800")661 root15.attributes('-fullscreen',True)662 663 img = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\contours_map_example.png")664 img = img.crop((20,180,796,846))665 tkimage = ImageTk.PhotoImage(img)666 tk.Label(root15, image=tkimage).pack()667 668 img2 = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\feature.png")669 img2 = img2.resize((550,200))670 tkimage2 = ImageTk.PhotoImage(img2)671 tk.Label(root15, image=tkimage2).pack()672 673 clicked24 = tk.StringVar(root15)674 clicked24.set("Choose Option")675 676 question4 = tk.Label(root15, text = "\nIs the hill, ridge or escarpment unobstructed by other topographic features of \n comparable height within two miles of the feature?")677 question4.pack()678 679 drop4 = tk.OptionMenu(root15,clicked24, "Yes", "No")680 drop4.pack()681 682 exit_button = tk.Button(root15, text = "Submit", command = root15.destroy)683 exit_button.pack()684 685 root15.mainloop()686 687 topo_2 = clicked24.get()688 if topo_2 in ['Yes']:689 root15 = tk.Tk()690 root15.title('Topographic Factor')691 root15.geometry("750x800")692 root15.attributes('-fullscreen',True)693 694 img = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\contours_map_example.png")695 img = img.crop((20,180,796,846))696 tkimage = ImageTk.PhotoImage(img)697 tk.Label(root15, image=tkimage).pack()698 699 img2 = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\feature.png")700 img2 = img2.resize((550,200))701 tkimage2 = ImageTk.PhotoImage(img2)702 tk.Label(root15, image=tkimage2).pack()703 704 question25 = tk.Label(root15, text = "Lh (Distance upwind of crest to where the difference in ground elevation is half the height of hill or escarpment):")705 question25.pack()706 entry3 = tk.Entry(root15)707 entry3.pack()708 question26 = tk.Label(root15, text = "H (Height of hill or escarpment relative to the upwind terrain):")709 question26.pack()710 entry4 = tk.Entry(root15)711 entry4.pack()712 question27 = tk.Label(root15, text = "z (Height above local ground level):")713 question27.pack()714 entry5 = tk.Entry(root15)715 entry5.pack()716 question28 = tk.Label(root15, text = "x (Distance (upwind or downwind) from the crest to the building site):")717 question28.pack()718 entry6 = tk.Entry(root15)719 entry6.pack()720 721 exit_button = tk.Button(root15, text = "Submit", command = submitAnswers)722 exit_button.pack()723 724 root15.mainloop()725 726 if topo_2 in ['No']:727 root15 = tk.Tk()728 root15.title('Topographic Factor')729 root15.geometry("750x800")730 root15.attributes('-fullscreen',True)731 732 img = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\contours_map_example.png")733 img = img.crop((20,180,796,846))734 tkimage = ImageTk.PhotoImage(img)735 tk.Label(root15, image=tkimage).pack()736 737 img2 = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\feature.png")738 img2 = img2.resize((550,200))739 tkimage2 = ImageTk.PhotoImage(img2)740 tk.Label(root15, image=tkimage2).pack()741 742 clicked26 = tk.StringVar(root15)743 clicked26.set("Choose Option")744 745 question4 = tk.Label(root15, text = "Does the hill, ridge or escarpment protrude above other topographic features within \n a two mile radius by a factor of two or more?")746 question4.pack()747 748 drop4 = tk.OptionMenu(root15,clicked26, "Yes", "No")749 drop4.pack()750 751 exit_button = tk.Button(root15, text = "Submit", command = root15.destroy)752 exit_button.pack()753 754 root15.mainloop()755 756 topo_3 = clicked26.get()757 if topo_3 in ['No']:758 K_zt = 1.0759 if topo_3 in ['Yes']:760 root15 = tk.Tk()761 root15.title('Topographic Factor')762 root15.geometry("750x800")763 root15.attributes('-fullscreen',True)764 765 img = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\contours_map_example.png")766 img = img.crop((20,180,796,846))767 tkimage = ImageTk.PhotoImage(img)768 tk.Label(root15, image=tkimage).pack()769 770 img2 = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\feature.png")771 img2 = img2.resize((550,200))772 tkimage2 = ImageTk.PhotoImage(img2)773 tk.Label(root15, image=tkimage2).pack()774 775 question25 = tk.Label(root15, text = "Lh (Distance upwind of crest to where the difference in ground elevation is half the height of hill or escarpment):")776 question25.pack()777 entry3 = tk.Entry(root15)778 entry3.pack()779 question26 = tk.Label(root15, text = "H (Height of hill or escarpment relative to the upwind terrain):")780 question26.pack()781 entry4 = tk.Entry(root15)782 entry4.pack()783 question27 = tk.Label(root15, text = "z (Height above local ground level):")784 question27.pack()785 entry5 = tk.Entry(root15)786 entry5.pack()787 question28 = tk.Label(root15, text = "x (Distance (upwind or downwind) from the crest to the building site):")788 question28.pack()789 entry6 = tk.Entry(root15)790 entry6.pack()791 792 exit_button = tk.Button(root15, text = "Submit", command = submitAnswers)793 exit_button.pack()794 795 root15.mainloop()796797 798799root16 = tk.Tk()800root16.title('Storm Surge')801root16.geometry("750x800")802803img = Image.open(r"C:\Users\giova\Dropbox\Research\Graduate School\hazard_map_image.png")804img = img.crop((20,195,796,830))805tkimage = ImageTk.PhotoImage(img)806tk.Label(root16, image=tkimage).pack()807808clicked30 = tk.StringVar(root16)809clicked30.set("Choose Option")810811question5 = tk.Label(root16, text = "\nIn what map color is your house located?")812question5.pack()813814drop5 = tk.OptionMenu(root16,clicked30, "White", "Blue", "Yellow", "Orange", "Red", "Striped")815drop5.pack()816817exit_button = tk.Button(root16, text = "Submit", command = root16.destroy)818exit_button.pack()819820root16.mainloop()821822surge = clicked30.get()823if surge in ['White']:824 ds = 0825elif surge in ['Blue']:826 ds = round(random.uniform(0.01,3),2)827elif surge in ['Yellow']:828 ds = round(random.uniform(3.01,6),2)829elif surge in ['Orange']:830 ds = round(random.uniform(6.01,9),2)831elif surge in ['Red']:832 ds = round(random.uniform(9.01,18),2)833elif surge in ['Striped']:834 ds = round(random.uniform(9.01,18),2)835else:836 sys.exit("Please select valid surge category option") 837 838839# translate user input to integer form840walls = clicked1.get()841if walls in ['Wood Frame']:842 walls = 1843elif walls in ['Concrete Block']:844 walls = 2845else:846 sys.exit("Please select valid framing option")847 848roof = clicked2.get()849if roof in ['Asphalt Shingles']:850 roof = 1851elif roof in ['Metal Roofing']:852 roof = 2853elif roof in ['Concrete Tiles']:854 roof = 3855elif roof in ['Clay Tiles']:856 roof = 4857else:858 sys.exit("Please select valid roof cover option")859860connections = clicked3.get()861if connections in ['Hurricane Straps']:862 connections = 1863elif connections in ['Toe Nailing']:864 connections = 2865else:866 sys.exit("Please select valid connections option") 867868869sheath_strength = clicked21.get()870if sheath_strength in ['High (8d with 6/6 nail pattern)']:871 sheath_strength = 1872elif sheath_strength in ['Moderate (8d with 6/12 nail pattern)']:873 sheath_strength = 2874elif sheath_strength in ['Low (6d with 6/12 nail pattern)']:875 sheath_strength = 3876else:877 sys.exit("Please select valid sheathing strenght option") 878879garage_strength = clicked22.get()880if garage_strength in ['Yes']:881 garage_strength = 1882elif garage_strength in ['No']:883 garage_strength = 2884else:885 sys.exit("Please select valid garage strength option") 886887# randomize the wind direction888direction = round(random.uniform(1,8),0)889890891# predefined values for wall height, roof pitch, length and width892height = 10893roof_pitch = 22.62894length = 60895width = 44896a = width*0.1897898# determine a randomized wind speed based on the category of storm 899if category == 1:900 wind = random.uniform(74,95)901elif category == 2:902 wind = random.uniform(96,110)903elif category == 3:904 wind = random.uniform(111,129)905elif category == 4:906 wind = random.uniform(130,156)907elif category == 5:908 wind = random.uniform(157,185)909910# randomize the pressure coefficients911# matrix of pressure coefficients = [internal pressure, roof zone 1, roof zone 2, roof zone 3, wall C&C winward,912# wall C&C side leading, wall C&C side, wall C&C leeward, MWFRS Case A 1, MWFRS Case A 2, MWFRS Case A 3, 913# MWFRS Case A 4, MWFRS Case A 1E, MWFRS Case A 2E, MWFRS Case A 3E,914# MWFRS Case A 4E, MWFRS Case B 1, MWFRS Case B 2, MWFRS Case B 3, 915# MWFRS Case B 4, MWFRS Case B 5, MWFRS Case B 6, MWFRS Case B 1E, MWFRS Case B 2E, MWFRS Case B 3E,916# MWFRS Case B 4E, MWFRS Case B 5E, MWFRS Case B 6E]917z = np.random.normal(0, 1, size = (1,28))918cp = [0.18, -0.9, -2.1, -2.1, 1.0, -1.4, -1.1, -0.8, 0.538, -0.456, -0.467, -0.414, 0.771, -0.722, -0.648, -0.598, -0.450, -0.690, -0.370, -0.450, 0.400, -0.290, -0.480, -1.070, -0.530, -0.480, 0.610, -0.430]919cp_rand = ((z*0.1)+1)*cp920921# velocity pressure of roof mean height calculation922qh = 0.00256*0.85*K_zt*wind**2 923924# design pressure calculation for roof sheathing925p_sheath_zone1 = qh*0.8*(cp_rand[0,1]-cp_rand[0,0])926p_sheath_zone2 = qh*0.8*(cp_rand[0,2]-cp_rand[0,0])927p_sheath_zone3 = qh*0.8*(cp_rand[0,3]-cp_rand[0,0])928929# design pressure calculation for roof cover930p_cover_zone1 = qh*0.8*(cp_rand[0,1]-0)931p_cover_zone2 = qh*0.8*(cp_rand[0,2]-0)932p_cover_zone3 = qh*0.8*(cp_rand[0,3]-0)933934935# design pressure calculations for walls (MWFRS)936p_caseA1_MWFRS = qh*0.8*(0.85*cp_rand[0,8]-cp_rand[0,0])937p_caseA2_MWFRS = qh*0.8*(0.85*cp_rand[0,9]-cp_rand[0,0])938p_caseA3_MWFRS = qh*0.8*(0.85*cp_rand[0,10]-cp_rand[0,0])939p_caseA4_MWFRS = qh*0.8*(0.85*cp_rand[0,11]-cp_rand[0,0])940p_caseA1E_MWFRS = qh*0.8*(0.85*cp_rand[0,12]-cp_rand[0,0])941p_caseA2E_MWFRS = qh*0.8*(0.85*cp_rand[0,13]-cp_rand[0,0])942p_caseA3E_MWFRS = qh*0.8*(0.85*cp_rand[0,14]-cp_rand[0,0])943p_caseA4E_MWFRS = qh*0.8*(0.85*cp_rand[0,15]-cp_rand[0,0])944945p_caseB1_MWFRS = qh*0.8*(0.85*cp_rand[0,16]-cp_rand[0,0])946p_caseB2_MWFRS = qh*0.8*(0.85*cp_rand[0,17]-cp_rand[0,0])947p_caseB3_MWFRS = qh*0.8*(0.85*cp_rand[0,18]-cp_rand[0,0])948p_caseB4_MWFRS = qh*0.8*(0.85*cp_rand[0,19]-cp_rand[0,0])949p_caseB5_MWFRS = qh*0.8*(0.85*cp_rand[0,20]-cp_rand[0,0])950p_caseB6_MWFRS = qh*0.8*(0.85*cp_rand[0,21]-cp_rand[0,0])951p_caseB1E_MWFRS = qh*0.8*(0.85*cp_rand[0,22]-cp_rand[0,0])952p_caseB2E_MWFRS = qh*0.8*(0.85*cp_rand[0,23]-cp_rand[0,0])953p_caseB3E_MWFRS = qh*0.8*(0.85*cp_rand[0,24]-cp_rand[0,0])954p_caseB4E_MWFRS = qh*0.8*(0.85*cp_rand[0,25]-cp_rand[0,0])955p_caseB5E_MWFRS = qh*0.8*(0.85*cp_rand[0,26]-cp_rand[0,0])956p_caseB6E_MWFRS = qh*0.8*(0.85*cp_rand[0,27]-cp_rand[0,0])957958959# design pressure calculations for walls and openings (C&C)960p_windward_CC = qh*0.8*(cp_rand[0,4]-cp_rand[0,0])961p_sideleading_CC = qh*0.8*(cp_rand[0,5]-cp_rand[0,0])962p_side_CC = qh*0.8*(cp_rand[0,6]-cp_rand[0,0])963p_leeward_CC = qh*0.8*(cp_rand[0,7]-cp_rand[0,0])964965# impact for windows 966N_A = 0967A = scipy.stats.norm(135,15).cdf(wind)968B = 0.0016*wind969D = scipy.stats.norm(70,10).cdf(wind)970vegetation_factor = 0.0032*(wind**2)-0.4948*wind+30.57971vegetation_factor = vegetation_factor/100972973974# application of loads to components based on wind direction975if direction == 1:976 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,977 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,978 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,979 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,980 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,981 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,982 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,983 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,984 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,985 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,986 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,987 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3]988 989 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,990 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,991 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,992 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,993 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,994 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,995 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,996 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,997 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,998 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,999 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,1000 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3]1001 1002 if exposure == 1:1003 N_A = N_A + 768*(1/8)1004 elif exposure == 2:1005 N_A = N_A + 768*(1/8)1006 elif exposure == 3:1007 N_A = N_A + 385*(0/4)1008 1009 if vegetation == 1:1010 N_A = N_A + 23100*vegetation_factor*(1/8)1011 elif vegetation == 2:1012 N_A = N_A + 2200*vegetation_factor*(1/8)1013 elif vegetation == 3:1014 N_A = N_A + 420*vegetation_factor*(1/8) 1015 elif vegetation == 4:1016 N_A = N_A + 45*vegetation_factor*(1/8) 1017 1018 front_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC]1019 front_door_load = p_windward_CC1020 garage_door_load = p_windward_CC1021 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1022 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1023 back_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]1024 back_door_load = p_leeward_CC1025 prob_front = 1 - math.exp(-A*N_A*B*((3.5*5)/(60*10))*D)1026 prob_right = 01027 prob_left = 01028 prob_back = 01029 1030elif direction == 2:1031 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1032 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1033 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1034 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1035 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1,1036 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1037 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1038 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1039 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1040 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1041 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1042 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2]1043 1044 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1045 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1046 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1047 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1048 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1049 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1050 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1051 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1052 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1053 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1054 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1055 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2]10561057 if exposure == 1:1058 N_A = N_A + 768*(1.5/8)1059 elif exposure == 2:1060 N_A = N_A + 768*(1.5/8)1061 elif exposure == 3:1062 N_A = N_A + 385*(1/4)1063 1064 if vegetation == 1:1065 N_A = N_A + 23100*vegetation_factor*(1.5/8)1066 elif vegetation == 2:1067 N_A = N_A + 2200*vegetation_factor*(1.5/8)1068 elif vegetation == 3:1069 N_A = N_A + 420*vegetation_factor*(1.5/8) 1070 elif vegetation == 4:1071 N_A = N_A + 45*vegetation_factor*(1.5/8)10721073 front_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC]1074 front_door_load = p_windward_CC1075 garage_door_load = p_windward_CC1076 leftside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1077 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1078 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1079 back_door_load = p_side_CC1080 prob_front = 1 - math.exp(-A*N_A*B*((3.5*5)/((60*10)+(44*10)+(44*0.5*9.167))*D))1081 prob_right = 01082 prob_left = 1 - math.exp(-A*N_A*B*((3.5*3.5)/((60*10)+(44*10)+(44*0.5*9.167))*D))1083 prob_back = 01084 1085elif direction == 3:1086 cover_loads = [p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1087 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1088 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1089 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1090 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1091 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1092 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1093 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1094 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1095 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1096 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1097 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]1098 1099 sheath_loads = [p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1100 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1101 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1102 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1103 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1104 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1105 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1106 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1107 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1108 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1109 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1110 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]11111112 if exposure == 1:1113 N_A = N_A + 768*(1/8)1114 elif exposure == 2:1115 N_A = N_A + 768*(1/8)1116 elif exposure == 3:1117 N_A = N_A + 385*(0/4)1118 1119 if vegetation == 1:1120 N_A = N_A + 23100*vegetation_factor*(1/8)1121 elif vegetation == 2:1122 N_A = N_A + 2200*vegetation_factor*(1/8)1123 elif vegetation == 3:1124 N_A = N_A + 420*vegetation_factor*(1/8) 1125 elif vegetation == 4:1126 N_A = N_A + 45*vegetation_factor*(1/8)1127 1128 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]1129 front_door_load = p_side_CC1130 garage_door_load = p_side_CC1131 leftside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1132 rightside_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]1133 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1134 back_door_load = p_side_CC1135 prob_front = 01136 prob_right = 01137 prob_left = 1 - math.exp(-A*N_A*B*((3.5*3.5)/((44*10)+(44*0.5*9.167))*D))1138 prob_back = 01139 1140elif direction == 4:1141 cover_loads = [p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1142 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1143 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1144 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1145 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1146 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1147 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1,1148 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1149 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1150 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1151 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1152 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]1153 1154 sheath_loads = [p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1155 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1156 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1157 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1158 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1159 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1160 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1161 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1162 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1163 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1164 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1165 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]11661167 if exposure == 1:1168 N_A = N_A + 768*(1.5/8)1169 elif exposure == 2:1170 N_A = N_A + 768*(1.5/8)1171 elif exposure == 3:1172 N_A = N_A + 385*(1/4)1173 1174 if vegetation == 1:1175 N_A = N_A + 23100*vegetation_factor*(1.5/8)1176 elif vegetation == 2:1177 N_A = N_A + 2200*vegetation_factor*(1.5/8)1178 elif vegetation == 3:1179 N_A = N_A + 420*vegetation_factor*(1.5/8) 1180 elif vegetation == 4:1181 N_A = N_A + 45*vegetation_factor*(1.5/8)11821183 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]1184 front_door_load = p_side_CC1185 garage_door_load = p_side_CC1186 leftside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1187 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1188 back_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1189 back_door_load = p_windward_CC1190 prob_front = 01191 prob_right = 01192 prob_left = 1 - math.exp(-A*N_A*B*((3.5*3.5)/((60*10)+(44*10)+(44*0.5*9.167))*D))1193 prob_back = 1 - math.exp(-A*N_A*B*((3.5*5)/((60*10)+(44*10)+(44*0.5*9.167))*D))11941195elif direction == 5:1196 cover_loads = [p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,1197 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1198 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,1199 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1200 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,1201 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1202 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1203 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1204 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1205 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1206 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1207 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]1208 1209 sheath_loads = [p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,1210 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1211 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,1212 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1213 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,1214 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1215 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1216 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1217 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1218 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1219 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1220 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]12211222 if exposure == 1:1223 N_A = N_A + 768*(1/8)1224 elif exposure == 2:1225 N_A = N_A + 768*(1/8)1226 elif exposure == 3:1227 N_A = N_A + 385*(0/4)1228 1229 if vegetation == 1:1230 N_A = N_A + 23100*vegetation_factor*(1/8)1231 elif vegetation == 2:1232 N_A = N_A + 2200*vegetation_factor*(1/8)1233 elif vegetation == 3:1234 N_A = N_A + 420*vegetation_factor*(1/8) 1235 elif vegetation == 4:1236 N_A = N_A + 45*vegetation_factor*(1/8)1237 1238 front_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC]1239 front_door_load = p_leeward_CC1240 garage_door_load = p_leeward_CC1241 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1242 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1243 back_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1244 back_door_load = p_windward_CC1245 prob_front = 01246 prob_right = 01247 prob_left = 01248 prob_back = 1 - math.exp(-A*N_A*B*((3.5*5)/((60*10))*D))1249 1250elif direction == 6:1251 cover_loads = [p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1252 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1253 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1254 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1255 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1256 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1257 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1258 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1259 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1260 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1261 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1262 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]1263 1264 sheath_loads = [p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1265 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1266 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1267 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1268 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1269 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1270 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1271 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1272 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1273 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1274 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1275 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]12761277 if exposure == 1:1278 N_A = N_A + 768*(1.5/8)1279 elif exposure == 2:1280 N_A = N_A + 768*(1.5/8)1281 elif exposure == 3:1282 N_A = N_A + 385*(1/4)1283 1284 if vegetation == 1:1285 N_A = N_A + 23100*vegetation_factor*(1.5/8)1286 elif vegetation == 2:1287 N_A = N_A + 2200*vegetation_factor*(1.5/8)1288 elif vegetation == 3:1289 N_A = N_A + 420*vegetation_factor*(1.5/8) 1290 elif vegetation == 4:1291 N_A = N_A + 45*vegetation_factor*(1.5/8)1292 1293 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]1294 front_door_load = p_side_CC1295 garage_door_load = p_side_CC1296 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1297 rightside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1298 back_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1299 back_door_load = p_windward_CC1300 prob_front = 01301 prob_right = 1 - math.exp(-A*N_A*B*((3.5*3.5)/((60*10)+(44*10)+(44*0.5*9.167))*D))1302 prob_left = 01303 prob_back = 1 - math.exp(-A*N_A*B*((3.5*5)/((60*10)+(44*10)+(44*0.5*9.167))*D))1304 1305elif direction == 7:1306 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,1307 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1308 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,1309 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1310 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,1311 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1312 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,1313 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1314 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,1315 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1316 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,1317 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3]1318 1319 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,1320 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1321 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,1322 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1323 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,1324 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1325 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,1326 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1327 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,1328 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1329 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,1330 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3]1331 1332 if exposure == 1:1333 N_A = N_A + 768*(1/8)1334 elif exposure == 2:1335 N_A = N_A + 768*(1/8)1336 elif exposure == 3:1337 N_A = N_A + 385*(0/4)1338 1339 if vegetation == 1:1340 N_A = N_A + 23100*vegetation_factor*(1/8)1341 elif vegetation == 2:1342 N_A = N_A + 2200*vegetation_factor*(1/8)1343 elif vegetation == 3:1344 N_A = N_A + 420*vegetation_factor*(1/8) 1345 elif vegetation == 4:1346 N_A = N_A + 45*vegetation_factor*(1/8) 1347 1348 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]1349 front_door_load = p_side_CC1350 garage_door_load = p_side_CC1351 leftside_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]1352 rightside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1353 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1354 back_door_load = p_side_CC1355 prob_front = 01356 prob_right = 1 - math.exp(-A*N_A*B*((3.5*3.5)/((44*10)+(44*0.5*9.167))*D))1357 prob_left = 01358 prob_back = 01359 1360elif direction == 8:1361 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1362 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1363 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1364 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,1365 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1366 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,1367 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1368 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1369 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,1370 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1371 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,1372 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3]1373 1374 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1375 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1376 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1377 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,1378 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1379 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,1380 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1381 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1382 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,1383 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1384 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,1385 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3]13861387 if exposure == 1:1388 N_A = N_A + 768*(1.5/8)1389 elif exposure == 2:1390 N_A = N_A + 768*(1.5/8)1391 elif exposure == 3:1392 N_A = N_A + 385*(1/4)1393 1394 if vegetation == 1:1395 N_A = N_A + 23100*vegetation_factor*(1.5/8)1396 elif vegetation == 2:1397 N_A = N_A + 2200*vegetation_factor*(1.5/8)1398 elif vegetation == 3:1399 N_A = N_A + 420*vegetation_factor*(1.5/8) 1400 elif vegetation == 4:1401 N_A = N_A + 45*vegetation_factor*(1.5/8)14021403 front_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC]1404 front_door_load = p_windward_CC1405 garage_door_load = p_windward_CC1406 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1407 rightside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]1408 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]1409 back_door_load = p_side_CC1410 prob_front = 1 - math.exp(-A*N_A*B*((3.5*5)/((60*10)+(44*10)+(44*0.5*9.167))*D))1411 prob_right = 1 - math.exp(-A*N_A*B*((3.5*3.5)/((60*10)+(44*10)+(44*0.5*9.167))*D))1412 prob_left = 01413 prob_back = 0141414151416# sheathing capacities1417if sheath_strength == 1:1418 sheath_mean_capacity = 181.91419elif sheath_strength == 2:1420 sheath_mean_capacity = 103.01421elif sheath_strength == 3:1422 sheath_mean_capacity = 54.61423sheath_COV = 0.111424sheath_std = sheath_COV*sheath_mean_capacity1425upper_sheath_limit = sheath_mean_capacity + 2*sheath_std1426lower_sheath_limit = sheath_mean_capacity - 2*sheath_std1427sheath_capacity = np.random.lognormal(sheath_mean_capacity, sheath_std, size = (96))14281429# remove any capacities that are outside of two standard deviations from the mean1430too_high_indices = np.where(sheath_capacity > upper_sheath_limit)1431while np.any(too_high_indices):1432 sheath_capacity[too_high_indices] = np.random.normal(1433 sheath_mean_capacity, sheath_std, size=len(too_high_indices))1434 too_high_indices = np.where(sheath_capacity > upper_sheath_limit)14351436too_low_indices = np.where(sheath_capacity < lower_sheath_limit)1437while np.any(too_low_indices):1438 sheath_capacity[too_low_indices] = np.random.normal(1439 sheath_mean_capacity, sheath_std, size=len(too_low_indices))1440 too_low_indices = np.where(sheath_capacity < lower_sheath_limit)14411442 # multiply loads by -1 (because uplifts were negative)1443sheath_loads = np.array(sheath_loads)*-114441445 # create a matrix with an element for each sheathing component and assign all values to be 11446 # 1 = not failed, 0 = failed1447 # if the load is greater than the capacity, replace the 1 with a 01448failed_sheath = np.full(96, 1, dtype = int)1449for i in range(len(failed_sheath)):1450 if sheath_loads[i] > sheath_capacity[i]:1451 failed_sheath[i] = 014521453# cover capacities1454if roof == 1:1455 cover_mean_capacity = 75.41456 cover_COV = 0.41457 cover_std = cover_COV*cover_mean_capacity1458 upper_cover_limit = cover_mean_capacity + 2*cover_std1459 lower_cover_limit = cover_mean_capacity - 2*cover_std1460 cover_capacity = np.random.normal(cover_mean_capacity, cover_std, size = (96))1461 1462 too_high_indices = np.where(cover_capacity > upper_cover_limit)1463 while np.any(too_high_indices):1464 cover_capacity[too_high_indices] = np.random.normal(1465 cover_mean_capacity, cover_std, size=len(too_high_indices))1466 too_high_indices = np.where(cover_capacity > upper_cover_limit)14671468 too_low_indices = np.where(cover_capacity < lower_cover_limit)1469 while np.any(too_low_indices):1470 cover_capacity[too_low_indices] = np.random.normal(1471 cover_mean_capacity, cover_std, size=len(too_low_indices))1472 too_low_indices = np.where(cover_capacity < lower_cover_limit)1473elif roof == 2: 1474 cover_mean_capacity = 1761475 cover_COV = 0.41476 cover_std = cover_COV*cover_mean_capacity1477 upper_cover_limit = cover_mean_capacity + 2*cover_std1478 lower_cover_limit = cover_mean_capacity - 2*cover_std1479 cover_capacity = np.random.normal(cover_mean_capacity, cover_std, size = (96))1480 1481 too_high_indices = np.where(cover_capacity > upper_cover_limit)1482 while np.any(too_high_indices):1483 cover_capacity[too_high_indices] = np.random.normal(1484 cover_mean_capacity, cover_std, size=len(too_high_indices))1485 too_high_indices = np.where(cover_capacity > upper_cover_limit)14861487 too_low_indices = np.where(cover_capacity < lower_cover_limit)1488 while np.any(too_low_indices):1489 cover_capacity[too_low_indices] = np.random.normal(1490 cover_mean_capacity, cover_std, size=len(too_low_indices))1491 too_low_indices = np.where(cover_capacity < lower_cover_limit)1492elif roof == 3:1493 cover_mean_capacity = 152.91494 cover_COV = 0.41495 cover_std = cover_COV*cover_mean_capacity1496 upper_cover_limit = cover_mean_capacity + 2*cover_std1497 lower_cover_limit = cover_mean_capacity - 2*cover_std1498 cover_capacity = np.random.normal(cover_mean_capacity, cover_std, size = (96))1499 1500 too_high_indices = np.where(cover_capacity > upper_cover_limit)1501 while np.any(too_high_indices):1502 cover_capacity[too_high_indices] = np.random.normal(1503 cover_mean_capacity, cover_std, size=len(too_high_indices))1504 too_high_indices = np.where(cover_capacity > upper_cover_limit)15051506 too_low_indices = np.where(cover_capacity < lower_cover_limit)1507 while np.any(too_low_indices):1508 cover_capacity[too_low_indices] = np.random.normal(1509 cover_mean_capacity, cover_std, size=len(too_low_indices))1510 too_low_indices = np.where(cover_capacity < lower_cover_limit)1511elif roof == 4:1512 cover_mean_capacity = 124.21513 cover_COV = 0.41514 cover_std = cover_COV*cover_mean_capacity1515 upper_cover_limit = cover_mean_capacity + 2*cover_std1516 lower_cover_limit = cover_mean_capacity - 2*cover_std1517 cover_capacity = np.random.normal(cover_mean_capacity, cover_std, size = (96))1518 1519 too_high_indices = np.where(cover_capacity > upper_cover_limit)1520 while np.any(too_high_indices):1521 cover_capacity[too_high_indices] = np.random.normal(1522 cover_mean_capacity, cover_std, size=len(too_high_indices))1523 too_high_indices = np.where(cover_capacity > upper_cover_limit)15241525 too_low_indices = np.where(cover_capacity < lower_cover_limit)1526 while np.any(too_low_indices):1527 cover_capacity[too_low_indices] = np.random.normal(1528 cover_mean_capacity, cover_std, size=len(too_low_indices))1529 too_low_indices = np.where(cover_capacity < lower_cover_limit)15301531cover_loads = np.array(cover_loads)*-115321533failed_cover = np.full(96, 1, dtype = int)1534for i in range(len(failed_cover)):1535 if cover_loads[i] > cover_capacity[i]:1536 failed_cover[i] = 01537 elif failed_sheath[i] == 0:1538 failed_cover[i] = 01539 1540if roof == 3:1541 D_cover = scipy.stats.norm(114.75,0.75).cdf(wind)1542 prob_cover = 1 - math.exp(-A*N_A*B*((4*8)/((60*24))*D_cover))1543elif roof == 4:1544 D_cover = scipy.stats.norm(95.2,2.67).cdf(wind)1545 prob_cover = 1 - math.exp(-A*N_A*B*((4*8)/((60*24))*D_cover))1546else:1547 prob_cover = 015481549if direction == 1:1550 prob_front_cover = np.full(48,prob_cover)1551 prob_back_cover = np.full(48,0)1552elif direction == 2:1553 prob_front_cover = np.full(48,prob_cover)1554 prob_back_cover = np.full(48,0)1555elif direction == 3:1556 prob_front_cover = np.full(48,0)1557 prob_back_cover = np.full(48,0)1558elif direction == 4:1559 prob_front_cover = np.full(48,0)1560 prob_back_cover = np.full(48,prob_cover)1561elif direction == 5:1562 prob_front_cover = np.full(48,0)1563 prob_back_cover = np.full(48,prob_cover)1564elif direction == 6:1565 prob_front_cover = np.full(48,0)1566 prob_back_cover = np.full(48,prob_cover)1567elif direction == 7:1568 prob_front_cover = np.full(48,0)1569 prob_back_cover = np.full(48,0) 1570elif direction == 8:1571 prob_front_cover = np.full(48,prob_cover)1572 prob_back_cover = np.full(48,0)1573 1574prob_total_cover = np.concatenate([prob_front_cover, prob_back_cover])1575cover_rand = np.random.rand(96)1576for i in range(len(failed_cover)):1577 if cover_rand[i] < prob_total_cover[i]:1578 failed_cover[i] = 015791580# opening capacities1581# doors1582door_mean_capacity = 1001583door_COV = 0.21584door_std = door_COV*door_mean_capacity1585upper_door_limit = door_mean_capacity + 2*door_std1586lower_door_limit = door_mean_capacity - 2*door_std1587door_capacity = np.random.normal(door_mean_capacity, door_std, size = (2))15881589too_high_indices = np.where(door_capacity > upper_door_limit)1590while np.any(too_high_indices):1591 door_capacity[too_high_indices] = np.random.normal(1592 door_mean_capacity, door_std, size=len(too_high_indices))1593 too_high_indices = np.where(door_capacity > upper_door_limit)15941595too_low_indices = np.where(door_capacity < lower_door_limit)1596while np.any(too_low_indices):1597 door_capacity[too_low_indices] = np.random.normal(1598 door_mean_capacity, door_std, size=len(too_low_indices))1599 too_low_indices = np.where(door_capacity < lower_door_limit)16001601front_door_load = abs(front_door_load)1602back_door_load = abs(back_door_load)16031604if front_door_load > door_capacity[0]:1605 front_door_fail = 01606elif front_door_load < door_capacity[0]:1607 front_door_fail = 116081609if back_door_load > door_capacity[1]:1610 back_door_fail = 01611elif back_door_load < door_capacity[1]:1612 back_door_fail = 11613 1614# garage door1615if garage_strength == 1:1616 garage_mean_capacity = 201617elif garage_strength == 2:1618 garage_mean_capacity = 101619garage_COV = 0.21620garage_std = garage_COV*garage_mean_capacity1621upper_garage_limit = garage_mean_capacity + 2*garage_std1622lower_garage_limit = garage_mean_capacity - 2*garage_std1623garage_capacity = np.random.normal(garage_mean_capacity, garage_std, size = (1))16241625too_high_indices = np.where(garage_capacity > upper_garage_limit)1626while np.any(too_high_indices):1627 garage_capacity[too_high_indices] = np.random.normal(1628 garage_mean_capacity, garage_std, size=len(too_high_indices))1629 too_high_indices = np.where(garage_capacity > upper_garage_limit)16301631too_low_indices = np.where(garage_capacity < lower_garage_limit)1632while np.any(too_low_indices):1633 garage_capacity[too_low_indices] = np.random.normal(1634 garage_mean_capacity, garage_std, size=len(too_low_indices))1635 too_low_indices = np.where(garage_capacity < lower_garage_limit)16361637garage_door_load = abs(garage_door_load)16381639if garage_door_load > garage_capacity:1640 garage_fail = 01641elif garage_door_load < garage_capacity:1642 garage_fail = 116431644# small windows1645sidewindow_mean_capacity = 104.41646sidewindow_COV = 0.21647sidewindow_std = sidewindow_COV*sidewindow_mean_capacity1648upper_sidewindow_limit = sidewindow_mean_capacity + 2*sidewindow_std1649lower_sidewindow_limit = sidewindow_mean_capacity - 2*sidewindow_std1650leftsidewindow_capacity = np.random.normal(sidewindow_mean_capacity, sidewindow_std, size = (4))1651rightsidewindow_capacity = np.random.normal(sidewindow_mean_capacity, sidewindow_std, size = (4))16521653too_high_indices = np.where(leftsidewindow_capacity > upper_sidewindow_limit)1654while np.any(too_high_indices):1655 leftsidewindow_capacity[too_high_indices] = np.random.normal(1656 sidewindow_mean_capacity, sidewindow_std, size=len(too_high_indices))1657 too_high_indices = np.where(leftsidewindow_capacity > upper_sidewindow_limit)16581659too_low_indices = np.where(leftsidewindow_capacity < lower_sidewindow_limit)1660while np.any(too_low_indices):1661 leftsidewindow_capacity[too_low_indices] = np.random.normal(1662 sidewindow_mean_capacity, sidewindow_std, size=len(too_low_indices))1663 too_low_indices = np.where(leftsidewindow_capacity < lower_sidewindow_limit)1664 1665too_high_indices = np.where(rightsidewindow_capacity > upper_sidewindow_limit)1666while np.any(too_high_indices):1667 rightsidewindow_capacity[too_high_indices] = np.random.normal(1668 sidewindow_mean_capacity, sidewindow_std, size=len(too_high_indices))1669 too_high_indices = np.where(rightsidewindow_capacity > upper_sidewindow_limit)16701671too_low_indices = np.where(rightsidewindow_capacity < lower_sidewindow_limit)1672while np.any(too_low_indices):1673 rightsidewindow_capacity[too_low_indices] = np.random.normal(1674 sidewindow_mean_capacity, sidewindow_std, size=len(too_low_indices))1675 too_low_indices = np.where(rightsidewindow_capacity < lower_sidewindow_limit)16761677leftsidewindow_loads = np.abs(leftside_window_loads)1678rightsidewindow_loads = np.abs(rightside_window_loads)16791680failed_leftwindows = np.full(4, 1)1681for i in range(len(failed_leftwindows)):1682 if leftsidewindow_loads[i] > leftsidewindow_capacity[i]:1683 failed_leftwindows[i] = 01684failed_rightwindows = np.full(4, 1)1685for i in range(len(failed_rightwindows)):1686 if rightsidewindow_loads[i] > rightsidewindow_capacity[i]:1687 failed_rightwindows[i] = 0 1688 1689right_rand = np.random.rand(4)1690left_rand = np.random.rand(4)16911692for i in range(len(failed_leftwindows)):1693 if left_rand[i] < prob_left:1694 failed_leftwindows[i] = 01695for i in range(len(failed_rightwindows)):1696 if right_rand[i] < prob_right:1697 failed_rightwindows[i] = 01698 1699# medium windows1700mediumwindow_mean_capacity = 69.61701mediumwindow_COV = 0.21702mediumwindow_std = mediumwindow_COV*mediumwindow_mean_capacity1703upper_mediumwindow_limit = mediumwindow_mean_capacity + 2*mediumwindow_std1704lower_mediumwindow_limit = mediumwindow_mean_capacity - 2*mediumwindow_std1705front_mediumwindow_capacity = np.random.normal(mediumwindow_mean_capacity, mediumwindow_std, size = (3))1706back_mediumwindow_capacity = np.random.normal(mediumwindow_mean_capacity, mediumwindow_std, size = (4))17071708too_high_indices = np.where(front_mediumwindow_capacity > upper_mediumwindow_limit)1709while np.any(too_high_indices):1710 front_mediumwindow_capacity[too_high_indices] = np.random.normal(1711 mediumwindow_mean_capacity, mediumwindow_std, size=len(too_high_indices))1712 too_high_indices = np.where(front_mediumwindow_capacity > upper_mediumwindow_limit)17131714too_low_indices = np.where(front_mediumwindow_capacity < lower_mediumwindow_limit)1715while np.any(too_low_indices):1716 front_mediumwindow_capacity[too_low_indices] = np.random.normal(1717 mediumwindow_mean_capacity, mediumwindow_std, size=len(too_low_indices))1718 too_low_indices = np.where(front_mediumwindow_capacity < lower_mediumwindow_limit)17191720too_high_indices = np.where(back_mediumwindow_capacity > upper_mediumwindow_limit)1721while np.any(too_high_indices):1722 back_mediumwindow_capacity[too_high_indices] = np.random.normal(1723 mediumwindow_mean_capacity, mediumwindow_std, size=len(too_high_indices))1724 too_high_indices = np.where(back_mediumwindow_capacity > upper_mediumwindow_limit)17251726too_low_indices = np.where(back_mediumwindow_capacity < lower_mediumwindow_limit)1727while np.any(too_low_indices):1728 back_mediumwindow_capacity[too_low_indices] = np.random.normal(1729 mediumwindow_mean_capacity, mediumwindow_std, size=len(too_low_indices))1730 too_low_indices = np.where(back_mediumwindow_capacity < lower_mediumwindow_limit)17311732front_mediumwindow_loads = np.abs(front_window_loads)1733back_mediumwindow_loads = np.abs(back_window_loads)17341735failed_frontwindows = np.full(3, 1)1736for i in range(len(failed_frontwindows)):1737 if front_mediumwindow_loads[i] > front_mediumwindow_capacity[i]:1738 failed_frontwindows[i] = 01739failed_backwindows = np.full(4, 1)1740for i in range(len(failed_backwindows)):1741 if back_mediumwindow_loads[i] > back_mediumwindow_capacity[i]:1742 failed_backwindows[i] = 017431744front_rand = np.random.rand(3)1745back_rand = np.random.rand(4)17461747for i in range(len(failed_frontwindows)):1748 if front_rand[i] < prob_front:1749 failed_frontwindows[i] = 01750for i in range(len(failed_backwindows)):1751 if back_rand[i] < prob_back:1752 failed_backwindows[i] = 017531754# connections1755for i in range(len(sheath_loads)):1756 if sheath_loads[i]>sheath_capacity[i]:1757 sheath_loads[i] = 01758 if sheath_loads[i] != 0:1759 sheath_loads[i] = sheath_loads[i]-101760 1761left_end_truss = (sheath_loads[0]*4+sheath_loads[8]*4+sheath_loads[16]*4+sheath_loads[24]*4+sheath_loads[32]*4+sheath_loads[40]*4+sheath_loads[48]*4+sheath_loads[56]*4+sheath_loads[64]*4+sheath_loads[72]*4+sheath_loads[80]*4+sheath_loads[88]*4)/81762right_end_truss = (sheath_loads[7]*4+sheath_loads[15]*4+sheath_loads[23]*4+sheath_loads[31]*4+sheath_loads[39]*4+sheath_loads[47]*4+sheath_loads[55]*4+sheath_loads[63]*4+sheath_loads[71]*4+sheath_loads[79]*4+sheath_loads[87]*4+sheath_loads[95]*4)/81763bottom_1 = ((sheath_loads[0]+sheath_loads[0])*(math.cos(math.radians(22.62))*2)*4+1764 (sheath_loads[8]+sheath_loads[8])*(math.cos(math.radians(22.62))*6)*4+1765 (sheath_loads[16]+sheath_loads[16])*(math.cos(math.radians(22.62))*10)*4+1766 (sheath_loads[24]+sheath_loads[24])*(math.cos(math.radians(22.62))*14)*4+1767 (sheath_loads[32]+sheath_loads[32])*(math.cos(math.radians(22.62))*18)*4+1768 (sheath_loads[40]+sheath_loads[40])*(math.cos(math.radians(22.62))*22)*4+1769 (sheath_loads[48]+sheath_loads[48])*(math.cos(math.radians(22.62))*26)*4+1770 (sheath_loads[56]+sheath_loads[56])*(math.cos(math.radians(22.62))*30)*4+1771 (sheath_loads[64]+sheath_loads[64])*(math.cos(math.radians(22.62))*34)*4+1772 (sheath_loads[72]+sheath_loads[72])*(math.cos(math.radians(22.62))*38)*4+1773 (sheath_loads[80]+sheath_loads[80])*(math.cos(math.radians(22.62))*42)*4+1774 (sheath_loads[88]+sheath_loads[88])*(math.cos(math.radians(22.62))*46)*4)/441775top_1 = ((sheath_loads[0]+sheath_loads[0])*4+1776 (sheath_loads[8]+sheath_loads[8])*4+1777 (sheath_loads[16]+sheath_loads[16])*4+1778 (sheath_loads[24]+sheath_loads[24])*4+1779 (sheath_loads[32]+sheath_loads[32])*4+1780 (sheath_loads[40]+sheath_loads[40])*4+1781 (sheath_loads[48]+sheath_loads[48])*4+1782 (sheath_loads[56]+sheath_loads[56])*4+1783 (sheath_loads[64]+sheath_loads[64])*4+1784 (sheath_loads[72]+sheath_loads[72])*4+1785 (sheath_loads[80]+sheath_loads[80])*4+1786 (sheath_loads[88]+sheath_loads[88])*4)-bottom_117871788bottom_2 = ((sheath_loads[0]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+1789 (sheath_loads[8]+sheath_loads[8])*(math.cos(math.radians(22.62))*6)*4+1790 (sheath_loads[16]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+1791 (sheath_loads[24]+sheath_loads[24])*(math.cos(math.radians(22.62))*14)*4+1792 (sheath_loads[32]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+1793 (sheath_loads[40]+sheath_loads[40])*(math.cos(math.radians(22.62))*22)*4+1794 (sheath_loads[48]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+1795 (sheath_loads[56]+sheath_loads[56])*(math.cos(math.radians(22.62))*30)*4+1796 (sheath_loads[64]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+1797 (sheath_loads[72]+sheath_loads[72])*(math.cos(math.radians(22.62))*38)*4+1798 (sheath_loads[80]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+1799 (sheath_loads[88]+sheath_loads[88])*(math.cos(math.radians(22.62))*46)*4)/441800top_2 = ((sheath_loads[0]+sheath_loads[1])*4+1801 (sheath_loads[8]+sheath_loads[8])*4+1802 (sheath_loads[16]+sheath_loads[17])*4+1803 (sheath_loads[24]+sheath_loads[24])*4+1804 (sheath_loads[32]+sheath_loads[33])*4+1805 (sheath_loads[40]+sheath_loads[40])*4+1806 (sheath_loads[48]+sheath_loads[49])*4+1807 (sheath_loads[56]+sheath_loads[56])*4+1808 (sheath_loads[64]+sheath_loads[65])*4+1809 (sheath_loads[72]+sheath_loads[72])*4+1810 (sheath_loads[80]+sheath_loads[81])*4+1811 (sheath_loads[88]+sheath_loads[88])*4)-bottom_2 18121813bottom_3 = ((sheath_loads[1]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+1814 (sheath_loads[8]+sheath_loads[8])*(math.cos(math.radians(22.62))*6)*4+1815 (sheath_loads[17]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+1816 (sheath_loads[24]+sheath_loads[24])*(math.cos(math.radians(22.62))*14)*4+1817 (sheath_loads[33]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+1818 (sheath_loads[40]+sheath_loads[40])*(math.cos(math.radians(22.62))*22)*4+1819 (sheath_loads[49]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+1820 (sheath_loads[56]+sheath_loads[56])*(math.cos(math.radians(22.62))*30)*4+1821 (sheath_loads[65]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+1822 (sheath_loads[72]+sheath_loads[72])*(math.cos(math.radians(22.62))*38)*4+1823 (sheath_loads[81]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+1824 (sheath_loads[88]+sheath_loads[88])*(math.cos(math.radians(22.62))*46)*4)/441825top_3 = ((sheath_loads[1]+sheath_loads[1])*4+1826 (sheath_loads[8]+sheath_loads[8])*4+1827 (sheath_loads[17]+sheath_loads[17])*4+1828 (sheath_loads[24]+sheath_loads[24])*4+1829 (sheath_loads[33]+sheath_loads[33])*4+1830 (sheath_loads[40]+sheath_loads[40])*4+1831 (sheath_loads[49]+sheath_loads[49])*4+1832 (sheath_loads[56]+sheath_loads[56])*4+1833 (sheath_loads[65]+sheath_loads[65])*4+1834 (sheath_loads[72]+sheath_loads[72])*4+1835 (sheath_loads[81]+sheath_loads[81])*4+1836 (sheath_loads[88]+sheath_loads[88])*4)-bottom_3 18371838bottom_4 = ((sheath_loads[1]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+1839 (sheath_loads[8]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+1840 (sheath_loads[17]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+1841 (sheath_loads[24]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+1842 (sheath_loads[33]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+1843 (sheath_loads[40]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+1844 (sheath_loads[49]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+1845 (sheath_loads[56]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+1846 (sheath_loads[65]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+1847 (sheath_loads[72]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+1848 (sheath_loads[81]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+1849 (sheath_loads[88]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/441850top_4 = ((sheath_loads[1]+sheath_loads[1])*4+1851 (sheath_loads[8]+sheath_loads[9])*4+1852 (sheath_loads[17]+sheath_loads[17])*4+1853 (sheath_loads[24]+sheath_loads[25])*4+1854 (sheath_loads[33]+sheath_loads[33])*4+1855 (sheath_loads[40]+sheath_loads[41])*4+1856 (sheath_loads[49]+sheath_loads[49])*4+1857 (sheath_loads[56]+sheath_loads[57])*4+1858 (sheath_loads[65]+sheath_loads[65])*4+1859 (sheath_loads[72]+sheath_loads[73])*4+1860 (sheath_loads[81]+sheath_loads[81])*4+1861 (sheath_loads[88]+sheath_loads[89])*4)-bottom_4 18621863bottom_5 = ((sheath_loads[1]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+1864 (sheath_loads[9]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+1865 (sheath_loads[17]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+1866 (sheath_loads[25]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+1867 (sheath_loads[33]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+1868 (sheath_loads[41]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+1869 (sheath_loads[49]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+1870 (sheath_loads[57]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+1871 (sheath_loads[65]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+1872 (sheath_loads[73]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+1873 (sheath_loads[81]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+1874 (sheath_loads[89]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/441875top_5 = ((sheath_loads[1]+sheath_loads[1])*4+1876 (sheath_loads[9]+sheath_loads[9])*4+1877 (sheath_loads[17]+sheath_loads[17])*4+1878 (sheath_loads[25]+sheath_loads[25])*4+1879 (sheath_loads[33]+sheath_loads[33])*4+1880 (sheath_loads[41]+sheath_loads[41])*4+1881 (sheath_loads[49]+sheath_loads[49])*4+1882 (sheath_loads[57]+sheath_loads[57])*4+1883 (sheath_loads[65]+sheath_loads[65])*4+1884 (sheath_loads[73]+sheath_loads[73])*4+1885 (sheath_loads[81]+sheath_loads[81])*4+1886 (sheath_loads[89]+sheath_loads[89])*4)-bottom_5 18871888bottom_6 = ((sheath_loads[1]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+1889 (sheath_loads[9]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+1890 (sheath_loads[17]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+1891 (sheath_loads[25]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+1892 (sheath_loads[33]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+1893 (sheath_loads[41]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+1894 (sheath_loads[49]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+1895 (sheath_loads[57]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+1896 (sheath_loads[65]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+1897 (sheath_loads[73]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+1898 (sheath_loads[81]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+1899 (sheath_loads[89]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/441900top_6 = ((sheath_loads[1]+sheath_loads[2])*4+1901 (sheath_loads[9]+sheath_loads[9])*4+1902 (sheath_loads[17]+sheath_loads[18])*4+1903 (sheath_loads[25]+sheath_loads[25])*4+1904 (sheath_loads[33]+sheath_loads[34])*4+1905 (sheath_loads[41]+sheath_loads[41])*4+1906 (sheath_loads[49]+sheath_loads[50])*4+1907 (sheath_loads[57]+sheath_loads[57])*4+1908 (sheath_loads[65]+sheath_loads[66])*4+1909 (sheath_loads[73]+sheath_loads[73])*4+1910 (sheath_loads[81]+sheath_loads[82])*4+1911 (sheath_loads[89]+sheath_loads[89])*4)-bottom_6 19121913bottom_7 = ((sheath_loads[2]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+1914 (sheath_loads[9]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+1915 (sheath_loads[18]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+1916 (sheath_loads[25]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+1917 (sheath_loads[34]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+1918 (sheath_loads[41]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+1919 (sheath_loads[50]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+1920 (sheath_loads[57]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+1921 (sheath_loads[66]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+1922 (sheath_loads[73]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+1923 (sheath_loads[82]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+1924 (sheath_loads[89]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/441925top_7 = ((sheath_loads[2]+sheath_loads[2])*4+1926 (sheath_loads[9]+sheath_loads[9])*4+1927 (sheath_loads[18]+sheath_loads[18])*4+1928 (sheath_loads[25]+sheath_loads[25])*4+1929 (sheath_loads[35]+sheath_loads[34])*4+1930 (sheath_loads[41]+sheath_loads[41])*4+1931 (sheath_loads[50]+sheath_loads[50])*4+1932 (sheath_loads[57]+sheath_loads[57])*4+1933 (sheath_loads[66]+sheath_loads[66])*4+1934 (sheath_loads[73]+sheath_loads[73])*4+1935 (sheath_loads[82]+sheath_loads[82])*4+1936 (sheath_loads[89]+sheath_loads[89])*4)-bottom_7 19371938bottom_8 = ((sheath_loads[2]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+1939 (sheath_loads[9]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+1940 (sheath_loads[18]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+1941 (sheath_loads[25]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+1942 (sheath_loads[34]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+1943 (sheath_loads[41]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+1944 (sheath_loads[50]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+1945 (sheath_loads[57]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+1946 (sheath_loads[66]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+1947 (sheath_loads[73]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+1948 (sheath_loads[82]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+1949 (sheath_loads[89]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/441950top_8 = ((sheath_loads[2]+sheath_loads[2])*4+1951 (sheath_loads[9]+sheath_loads[10])*4+1952 (sheath_loads[18]+sheath_loads[18])*4+1953 (sheath_loads[25]+sheath_loads[26])*4+1954 (sheath_loads[35]+sheath_loads[34])*4+1955 (sheath_loads[41]+sheath_loads[42])*4+1956 (sheath_loads[50]+sheath_loads[50])*4+1957 (sheath_loads[57]+sheath_loads[58])*4+1958 (sheath_loads[66]+sheath_loads[66])*4+1959 (sheath_loads[73]+sheath_loads[74])*4+1960 (sheath_loads[82]+sheath_loads[82])*4+1961 (sheath_loads[89]+sheath_loads[90])*4)-bottom_8 19621963bottom_9 = ((sheath_loads[2]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+1964 (sheath_loads[10]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+1965 (sheath_loads[18]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+1966 (sheath_loads[26]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+1967 (sheath_loads[34]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+1968 (sheath_loads[42]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+1969 (sheath_loads[50]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+1970 (sheath_loads[58]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+1971 (sheath_loads[66]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+1972 (sheath_loads[74]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+1973 (sheath_loads[82]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+1974 (sheath_loads[90]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/441975top_9 = ((sheath_loads[2]+sheath_loads[2])*4+1976 (sheath_loads[10]+sheath_loads[10])*4+1977 (sheath_loads[18]+sheath_loads[18])*4+1978 (sheath_loads[26]+sheath_loads[26])*4+1979 (sheath_loads[35]+sheath_loads[34])*4+1980 (sheath_loads[42]+sheath_loads[42])*4+1981 (sheath_loads[50]+sheath_loads[50])*4+1982 (sheath_loads[58]+sheath_loads[58])*4+1983 (sheath_loads[66]+sheath_loads[66])*4+1984 (sheath_loads[74]+sheath_loads[74])*4+1985 (sheath_loads[82]+sheath_loads[82])*4+1986 (sheath_loads[90]+sheath_loads[90])*4)-bottom_9 19871988bottom_10 = ((sheath_loads[2]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+1989 (sheath_loads[10]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+1990 (sheath_loads[18]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+1991 (sheath_loads[26]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+1992 (sheath_loads[34]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+1993 (sheath_loads[42]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+1994 (sheath_loads[50]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+1995 (sheath_loads[58]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+1996 (sheath_loads[66]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+1997 (sheath_loads[74]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+1998 (sheath_loads[82]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+1999 (sheath_loads[90]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/442000top_10 = ((sheath_loads[2]+sheath_loads[3])*4+2001 (sheath_loads[10]+sheath_loads[10])*4+2002 (sheath_loads[18]+sheath_loads[19])*4+2003 (sheath_loads[26]+sheath_loads[26])*4+2004 (sheath_loads[34]+sheath_loads[35])*4+2005 (sheath_loads[42]+sheath_loads[42])*4+2006 (sheath_loads[50]+sheath_loads[51])*4+2007 (sheath_loads[58]+sheath_loads[58])*4+2008 (sheath_loads[66]+sheath_loads[67])*4+2009 (sheath_loads[74]+sheath_loads[74])*4+2010 (sheath_loads[82]+sheath_loads[83])*4+2011 (sheath_loads[90]+sheath_loads[90])*4)-bottom_10 20122013bottom_11 = ((sheath_loads[3]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+2014 (sheath_loads[10]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+2015 (sheath_loads[19]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+2016 (sheath_loads[26]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+2017 (sheath_loads[35]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+2018 (sheath_loads[42]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+2019 (sheath_loads[51]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+2020 (sheath_loads[58]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+2021 (sheath_loads[67]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+2022 (sheath_loads[74]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+2023 (sheath_loads[83]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+2024 (sheath_loads[90]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/442025top_11 = ((sheath_loads[3]+sheath_loads[3])*4+2026 (sheath_loads[10]+sheath_loads[10])*4+2027 (sheath_loads[19]+sheath_loads[19])*4+2028 (sheath_loads[26]+sheath_loads[26])*4+2029 (sheath_loads[35]+sheath_loads[35])*4+2030 (sheath_loads[42]+sheath_loads[42])*4+2031 (sheath_loads[51]+sheath_loads[51])*4+2032 (sheath_loads[58]+sheath_loads[58])*4+2033 (sheath_loads[67]+sheath_loads[67])*4+2034 (sheath_loads[74]+sheath_loads[74])*4+2035 (sheath_loads[83]+sheath_loads[83])*4+2036 (sheath_loads[90]+sheath_loads[90])*4)-bottom_11 20372038bottom_12 = ((sheath_loads[3]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+2039 (sheath_loads[10]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+2040 (sheath_loads[19]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+2041 (sheath_loads[26]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+2042 (sheath_loads[35]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+2043 (sheath_loads[42]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+2044 (sheath_loads[51]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+2045 (sheath_loads[58]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+2046 (sheath_loads[67]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+2047 (sheath_loads[74]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+2048 (sheath_loads[83]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+2049 (sheath_loads[90]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/442050top_12 = ((sheath_loads[3]+sheath_loads[3])*4+2051 (sheath_loads[10]+sheath_loads[11])*4+2052 (sheath_loads[19]+sheath_loads[19])*4+2053 (sheath_loads[26]+sheath_loads[27])*4+2054 (sheath_loads[35]+sheath_loads[35])*4+2055 (sheath_loads[42]+sheath_loads[43])*4+2056 (sheath_loads[51]+sheath_loads[51])*4+2057 (sheath_loads[58]+sheath_loads[59])*4+2058 (sheath_loads[67]+sheath_loads[67])*4+2059 (sheath_loads[74]+sheath_loads[75])*4+2060 (sheath_loads[83]+sheath_loads[83])*4+2061 (sheath_loads[90]+sheath_loads[91])*4)-bottom_12 20622063bottom_13 = ((sheath_loads[3]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+2064 (sheath_loads[11]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+2065 (sheath_loads[19]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+2066 (sheath_loads[27]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+2067 (sheath_loads[35]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+2068 (sheath_loads[43]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+2069 (sheath_loads[51]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+2070 (sheath_loads[59]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+2071 (sheath_loads[67]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+2072 (sheath_loads[75]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+2073 (sheath_loads[83]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+2074 (sheath_loads[91]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/442075top_13 = ((sheath_loads[3]+sheath_loads[3])*4+2076 (sheath_loads[11]+sheath_loads[11])*4+2077 (sheath_loads[19]+sheath_loads[19])*4+2078 (sheath_loads[27]+sheath_loads[27])*4+2079 (sheath_loads[35]+sheath_loads[35])*4+2080 (sheath_loads[43]+sheath_loads[43])*4+2081 (sheath_loads[51]+sheath_loads[51])*4+2082 (sheath_loads[59]+sheath_loads[59])*4+2083 (sheath_loads[67]+sheath_loads[67])*4+2084 (sheath_loads[75]+sheath_loads[75])*4+2085 (sheath_loads[83]+sheath_loads[83])*4+2086 (sheath_loads[91]+sheath_loads[91])*4)-bottom_13 20872088bottom_14 = ((sheath_loads[3]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+2089 (sheath_loads[11]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+2090 (sheath_loads[19]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+2091 (sheath_loads[27]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+2092 (sheath_loads[35]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+2093 (sheath_loads[43]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+2094 (sheath_loads[51]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+2095 (sheath_loads[59]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+2096 (sheath_loads[67]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+2097 (sheath_loads[75]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+2098 (sheath_loads[83]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+2099 (sheath_loads[91]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/442100top_14 = ((sheath_loads[3]+sheath_loads[4])*4+2101 (sheath_loads[11]+sheath_loads[11])*4+2102 (sheath_loads[19]+sheath_loads[20])*4+2103 (sheath_loads[27]+sheath_loads[27])*4+2104 (sheath_loads[35]+sheath_loads[36])*4+2105 (sheath_loads[43]+sheath_loads[43])*4+2106 (sheath_loads[51]+sheath_loads[52])*4+2107 (sheath_loads[59]+sheath_loads[59])*4+2108 (sheath_loads[67]+sheath_loads[68])*4+2109 (sheath_loads[75]+sheath_loads[75])*4+2110 (sheath_loads[83]+sheath_loads[84])*4+2111 (sheath_loads[91]+sheath_loads[91])*4)-bottom_14 21122113bottom_15 = ((sheath_loads[4]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+2114 (sheath_loads[11]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+2115 (sheath_loads[20]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+2116 (sheath_loads[27]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+2117 (sheath_loads[36]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+2118 (sheath_loads[43]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+2119 (sheath_loads[52]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+2120 (sheath_loads[59]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+2121 (sheath_loads[68]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+2122 (sheath_loads[75]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+2123 (sheath_loads[84]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+2124 (sheath_loads[91]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/442125top_15 = ((sheath_loads[4]+sheath_loads[4])*4+2126 (sheath_loads[11]+sheath_loads[11])*4+2127 (sheath_loads[20]+sheath_loads[20])*4+2128 (sheath_loads[27]+sheath_loads[27])*4+2129 (sheath_loads[36]+sheath_loads[36])*4+2130 (sheath_loads[43]+sheath_loads[43])*4+2131 (sheath_loads[52]+sheath_loads[52])*4+2132 (sheath_loads[59]+sheath_loads[59])*4+2133 (sheath_loads[68]+sheath_loads[68])*4+2134 (sheath_loads[75]+sheath_loads[75])*4+2135 (sheath_loads[84]+sheath_loads[84])*4+2136 (sheath_loads[91]+sheath_loads[91])*4)-bottom_15 21372138bottom_16 = ((sheath_loads[4]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+2139 (sheath_loads[11]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+2140 (sheath_loads[20]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+2141 (sheath_loads[27]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+2142 (sheath_loads[36]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+2143 (sheath_loads[43]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+2144 (sheath_loads[52]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+2145 (sheath_loads[59]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+2146 (sheath_loads[68]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+2147 (sheath_loads[75]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+2148 (sheath_loads[84]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+2149 (sheath_loads[91]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/442150top_16 = ((sheath_loads[4]+sheath_loads[4])*4+2151 (sheath_loads[11]+sheath_loads[12])*4+2152 (sheath_loads[20]+sheath_loads[20])*4+2153 (sheath_loads[27]+sheath_loads[28])*4+2154 (sheath_loads[36]+sheath_loads[36])*4+2155 (sheath_loads[43]+sheath_loads[44])*4+2156 (sheath_loads[52]+sheath_loads[52])*4+2157 (sheath_loads[59]+sheath_loads[60])*4+2158 (sheath_loads[68]+sheath_loads[68])*4+2159 (sheath_loads[75]+sheath_loads[76])*4+2160 (sheath_loads[84]+sheath_loads[84])*4+2161 (sheath_loads[91]+sheath_loads[92])*4)-bottom_16 21622163bottom_17 = ((sheath_loads[4]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+2164 (sheath_loads[12]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+2165 (sheath_loads[20]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+2166 (sheath_loads[28]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+2167 (sheath_loads[36]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+2168 (sheath_loads[44]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+2169 (sheath_loads[52]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+2170 (sheath_loads[60]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+2171 (sheath_loads[68]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+2172 (sheath_loads[76]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+2173 (sheath_loads[84]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+2174 (sheath_loads[92]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/442175top_17 = ((sheath_loads[4]+sheath_loads[4])*4+2176 (sheath_loads[12]+sheath_loads[12])*4+2177 (sheath_loads[20]+sheath_loads[20])*4+2178 (sheath_loads[28]+sheath_loads[28])*4+2179 (sheath_loads[36]+sheath_loads[36])*4+2180 (sheath_loads[44]+sheath_loads[44])*4+2181 (sheath_loads[52]+sheath_loads[52])*4+2182 (sheath_loads[60]+sheath_loads[60])*4+2183 (sheath_loads[68]+sheath_loads[68])*4+2184 (sheath_loads[76]+sheath_loads[76])*4+2185 (sheath_loads[84]+sheath_loads[84])*4+2186 (sheath_loads[92]+sheath_loads[92])*4)-bottom_17 21872188bottom_18 = ((sheath_loads[4]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+2189 (sheath_loads[12]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+2190 (sheath_loads[20]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+2191 (sheath_loads[28]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+2192 (sheath_loads[36]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+2193 (sheath_loads[44]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+2194 (sheath_loads[52]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+2195 (sheath_loads[60]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+2196 (sheath_loads[68]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+2197 (sheath_loads[76]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+2198 (sheath_loads[84]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+2199 (sheath_loads[92]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/442200top_18 = ((sheath_loads[4]+sheath_loads[5])*4+2201 (sheath_loads[12]+sheath_loads[12])*4+2202 (sheath_loads[20]+sheath_loads[21])*4+2203 (sheath_loads[28]+sheath_loads[28])*4+2204 (sheath_loads[36]+sheath_loads[37])*4+2205 (sheath_loads[44]+sheath_loads[44])*4+2206 (sheath_loads[52]+sheath_loads[53])*4+2207 (sheath_loads[60]+sheath_loads[60])*4+2208 (sheath_loads[68]+sheath_loads[69])*4+2209 (sheath_loads[76]+sheath_loads[76])*4+2210 (sheath_loads[84]+sheath_loads[85])*4+2211 (sheath_loads[92]+sheath_loads[92])*4)-bottom_18 22122213bottom_19 = ((sheath_loads[5]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+2214 (sheath_loads[12]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+2215 (sheath_loads[21]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+2216 (sheath_loads[28]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+2217 (sheath_loads[37]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+2218 (sheath_loads[44]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+2219 (sheath_loads[53]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+2220 (sheath_loads[60]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+2221 (sheath_loads[69]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+2222 (sheath_loads[76]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+2223 (sheath_loads[85]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+2224 (sheath_loads[92]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/442225top_19 = ((sheath_loads[5]+sheath_loads[5])*4+2226 (sheath_loads[12]+sheath_loads[12])*4+2227 (sheath_loads[21]+sheath_loads[21])*4+2228 (sheath_loads[28]+sheath_loads[28])*4+2229 (sheath_loads[37]+sheath_loads[37])*4+2230 (sheath_loads[44]+sheath_loads[44])*4+2231 (sheath_loads[53]+sheath_loads[53])*4+2232 (sheath_loads[60]+sheath_loads[60])*4+2233 (sheath_loads[69]+sheath_loads[69])*4+2234 (sheath_loads[76]+sheath_loads[76])*4+2235 (sheath_loads[85]+sheath_loads[85])*4+2236 (sheath_loads[92]+sheath_loads[92])*4)-bottom_19 22372238bottom_20 = ((sheath_loads[5]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+2239 (sheath_loads[12]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+2240 (sheath_loads[21]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+2241 (sheath_loads[28]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+2242 (sheath_loads[37]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+2243 (sheath_loads[44]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+2244 (sheath_loads[53]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+2245 (sheath_loads[60]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+2246 (sheath_loads[69]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+2247 (sheath_loads[76]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+2248 (sheath_loads[85]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+2249 (sheath_loads[92]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/442250top_20 = ((sheath_loads[5]+sheath_loads[5])*4+2251 (sheath_loads[12]+sheath_loads[13])*4+2252 (sheath_loads[21]+sheath_loads[21])*4+2253 (sheath_loads[28]+sheath_loads[29])*4+2254 (sheath_loads[37]+sheath_loads[37])*4+2255 (sheath_loads[44]+sheath_loads[45])*4+2256 (sheath_loads[53]+sheath_loads[53])*4+2257 (sheath_loads[60]+sheath_loads[61])*4+2258 (sheath_loads[69]+sheath_loads[69])*4+2259 (sheath_loads[76]+sheath_loads[77])*4+2260 (sheath_loads[85]+sheath_loads[85])*4+2261 (sheath_loads[92]+sheath_loads[93])*4)-bottom_2022622263bottom_21 = ((sheath_loads[5]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+2264 (sheath_loads[13]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+2265 (sheath_loads[21]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+2266 (sheath_loads[29]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+2267 (sheath_loads[37]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+2268 (sheath_loads[45]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+2269 (sheath_loads[53]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+2270 (sheath_loads[61]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+2271 (sheath_loads[69]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+2272 (sheath_loads[77]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+2273 (sheath_loads[85]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+2274 (sheath_loads[93]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/442275top_21 = ((sheath_loads[5]+sheath_loads[5])*4+2276 (sheath_loads[13]+sheath_loads[13])*4+2277 (sheath_loads[21]+sheath_loads[21])*4+2278 (sheath_loads[29]+sheath_loads[29])*4+2279 (sheath_loads[37]+sheath_loads[37])*4+2280 (sheath_loads[45]+sheath_loads[45])*4+2281 (sheath_loads[53]+sheath_loads[53])*4+2282 (sheath_loads[61]+sheath_loads[61])*4+2283 (sheath_loads[69]+sheath_loads[69])*4+2284 (sheath_loads[77]+sheath_loads[77])*4+2285 (sheath_loads[85]+sheath_loads[85])*4+2286 (sheath_loads[93]+sheath_loads[93])*4)-bottom_2122872288bottom_22 = ((sheath_loads[5]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+2289 (sheath_loads[13]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+2290 (sheath_loads[21]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+2291 (sheath_loads[29]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+2292 (sheath_loads[37]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+2293 (sheath_loads[45]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+2294 (sheath_loads[53]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+2295 (sheath_loads[61]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+2296 (sheath_loads[69]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+2297 (sheath_loads[77]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+2298 (sheath_loads[85]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+2299 (sheath_loads[93]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/442300top_22 = ((sheath_loads[5]+sheath_loads[6])*4+2301 (sheath_loads[13]+sheath_loads[13])*4+2302 (sheath_loads[21]+sheath_loads[22])*4+2303 (sheath_loads[29]+sheath_loads[29])*4+2304 (sheath_loads[37]+sheath_loads[38])*4+2305 (sheath_loads[45]+sheath_loads[45])*4+2306 (sheath_loads[53]+sheath_loads[54])*4+2307 (sheath_loads[61]+sheath_loads[61])*4+2308 (sheath_loads[69]+sheath_loads[70])*4+2309 (sheath_loads[77]+sheath_loads[77])*4+2310 (sheath_loads[85]+sheath_loads[86])*4+2311 (sheath_loads[93]+sheath_loads[93])*4)-bottom_2223122313bottom_23 = ((sheath_loads[6]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+2314 (sheath_loads[13]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+2315 (sheath_loads[22]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+2316 (sheath_loads[29]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+2317 (sheath_loads[38]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+2318 (sheath_loads[45]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+2319 (sheath_loads[54]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+2320 (sheath_loads[61]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+2321 (sheath_loads[70]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+2322 (sheath_loads[77]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+2323 (sheath_loads[86]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+2324 (sheath_loads[93]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/442325top_23 = ((sheath_loads[6]+sheath_loads[6])*4+2326 (sheath_loads[13]+sheath_loads[13])*4+2327 (sheath_loads[22]+sheath_loads[22])*4+2328 (sheath_loads[29]+sheath_loads[29])*4+2329 (sheath_loads[38]+sheath_loads[38])*4+2330 (sheath_loads[45]+sheath_loads[45])*4+2331 (sheath_loads[54]+sheath_loads[54])*4+2332 (sheath_loads[61]+sheath_loads[61])*4+2333 (sheath_loads[70]+sheath_loads[70])*4+2334 (sheath_loads[77]+sheath_loads[77])*4+2335 (sheath_loads[86]+sheath_loads[86])*4+2336 (sheath_loads[93]+sheath_loads[93])*4)-bottom_2323372338bottom_24 = ((sheath_loads[6]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+2339 (sheath_loads[13]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+2340 (sheath_loads[22]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+2341 (sheath_loads[29]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+2342 (sheath_loads[38]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+2343 (sheath_loads[45]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+2344 (sheath_loads[54]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+2345 (sheath_loads[61]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+2346 (sheath_loads[70]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+2347 (sheath_loads[77]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+2348 (sheath_loads[86]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+2349 (sheath_loads[93]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/442350top_24 = ((sheath_loads[6]+sheath_loads[6])*4+2351 (sheath_loads[13]+sheath_loads[14])*4+2352 (sheath_loads[22]+sheath_loads[22])*4+2353 (sheath_loads[29]+sheath_loads[30])*4+2354 (sheath_loads[38]+sheath_loads[38])*4+2355 (sheath_loads[45]+sheath_loads[46])*4+2356 (sheath_loads[54]+sheath_loads[54])*4+2357 (sheath_loads[61]+sheath_loads[62])*4+2358 (sheath_loads[70]+sheath_loads[70])*4+2359 (sheath_loads[77]+sheath_loads[78])*4+2360 (sheath_loads[86]+sheath_loads[86])*4+2361 (sheath_loads[93]+sheath_loads[94])*4)-bottom_2423622363bottom_25 = ((sheath_loads[6]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+2364 (sheath_loads[14]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+2365 (sheath_loads[22]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+2366 (sheath_loads[30]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+2367 (sheath_loads[38]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+2368 (sheath_loads[46]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+2369 (sheath_loads[54]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+2370 (sheath_loads[62]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+2371 (sheath_loads[70]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+2372 (sheath_loads[78]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+2373 (sheath_loads[86]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+2374 (sheath_loads[94]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/442375top_25 = ((sheath_loads[6]+sheath_loads[6])*4+2376 (sheath_loads[14]+sheath_loads[14])*4+2377 (sheath_loads[22]+sheath_loads[22])*4+2378 (sheath_loads[30]+sheath_loads[30])*4+2379 (sheath_loads[38]+sheath_loads[38])*4+2380 (sheath_loads[46]+sheath_loads[46])*4+2381 (sheath_loads[54]+sheath_loads[54])*4+2382 (sheath_loads[62]+sheath_loads[62])*4+2383 (sheath_loads[70]+sheath_loads[70])*4+2384 (sheath_loads[78]+sheath_loads[78])*4+2385 (sheath_loads[86]+sheath_loads[86])*4+2386 (sheath_loads[94]+sheath_loads[94])*4)-bottom_2523872388bottom_26 = ((sheath_loads[6]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+2389 (sheath_loads[14]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+2390 (sheath_loads[22]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+2391 (sheath_loads[30]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+2392 (sheath_loads[38]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+2393 (sheath_loads[46]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+2394 (sheath_loads[54]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+2395 (sheath_loads[62]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+2396 (sheath_loads[70]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+2397 (sheath_loads[78]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+2398 (sheath_loads[86]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+2399 (sheath_loads[94]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/442400top_26 = ((sheath_loads[6]+sheath_loads[7])*4+2401 (sheath_loads[14]+sheath_loads[14])*4+2402 (sheath_loads[22]+sheath_loads[23])*4+2403 (sheath_loads[30]+sheath_loads[30])*4+2404 (sheath_loads[38]+sheath_loads[39])*4+2405 (sheath_loads[46]+sheath_loads[46])*4+2406 (sheath_loads[54]+sheath_loads[55])*4+2407 (sheath_loads[62]+sheath_loads[62])*4+2408 (sheath_loads[70]+sheath_loads[71])*4+2409 (sheath_loads[78]+sheath_loads[78])*4+2410 (sheath_loads[86]+sheath_loads[87])*4+2411 (sheath_loads[94]+sheath_loads[94])*4)-bottom_2624122413bottom_27 = ((sheath_loads[7]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+2414 (sheath_loads[14]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+2415 (sheath_loads[23]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+2416 (sheath_loads[30]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+2417 (sheath_loads[39]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+2418 (sheath_loads[46]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+2419 (sheath_loads[55]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+2420 (sheath_loads[62]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+2421 (sheath_loads[71]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+2422 (sheath_loads[78]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+2423 (sheath_loads[87]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+2424 (sheath_loads[94]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/442425top_27 = ((sheath_loads[7]+sheath_loads[7])*4+2426 (sheath_loads[14]+sheath_loads[14])*4+2427 (sheath_loads[23]+sheath_loads[23])*4+2428 (sheath_loads[30]+sheath_loads[30])*4+2429 (sheath_loads[39]+sheath_loads[39])*4+2430 (sheath_loads[46]+sheath_loads[46])*4+2431 (sheath_loads[55]+sheath_loads[55])*4+2432 (sheath_loads[62]+sheath_loads[62])*4+2433 (sheath_loads[71]+sheath_loads[71])*4+2434 (sheath_loads[78]+sheath_loads[78])*4+2435 (sheath_loads[87]+sheath_loads[87])*4+2436 (sheath_loads[94]+sheath_loads[94])*4)-bottom_2724372438bottom_28 = ((sheath_loads[7]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+2439 (sheath_loads[14]+sheath_loads[15])*(math.cos(math.radians(22.62))*6)*4+2440 (sheath_loads[23]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+2441 (sheath_loads[30]+sheath_loads[31])*(math.cos(math.radians(22.62))*14)*4+2442 (sheath_loads[39]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+2443 (sheath_loads[46]+sheath_loads[47])*(math.cos(math.radians(22.62))*22)*4+2444 (sheath_loads[55]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+2445 (sheath_loads[62]+sheath_loads[63])*(math.cos(math.radians(22.62))*30)*4+2446 (sheath_loads[71]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+2447 (sheath_loads[78]+sheath_loads[79])*(math.cos(math.radians(22.62))*38)*4+2448 (sheath_loads[87]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+2449 (sheath_loads[94]+sheath_loads[95])*(math.cos(math.radians(22.62))*46)*4)/442450top_28 = ((sheath_loads[7]+sheath_loads[7])*4+2451 (sheath_loads[14]+sheath_loads[15])*4+2452 (sheath_loads[23]+sheath_loads[23])*4+2453 (sheath_loads[30]+sheath_loads[31])*4+2454 (sheath_loads[39]+sheath_loads[39])*4+2455 (sheath_loads[46]+sheath_loads[47])*4+2456 (sheath_loads[55]+sheath_loads[55])*4+2457 (sheath_loads[62]+sheath_loads[63])*4+2458 (sheath_loads[71]+sheath_loads[71])*4+2459 (sheath_loads[78]+sheath_loads[79])*4+2460 (sheath_loads[87]+sheath_loads[87])*4+2461 (sheath_loads[94]+sheath_loads[95])*4)-bottom_2824622463bottom_29 = ((sheath_loads[7]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+2464 (sheath_loads[15]+sheath_loads[15])*(math.cos(math.radians(22.62))*6)*4+2465 (sheath_loads[23]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+2466 (sheath_loads[32]+sheath_loads[31])*(math.cos(math.radians(22.62))*14)*4+2467 (sheath_loads[39]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+2468 (sheath_loads[47]+sheath_loads[47])*(math.cos(math.radians(22.62))*22)*4+2469 (sheath_loads[55]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+2470 (sheath_loads[63]+sheath_loads[63])*(math.cos(math.radians(22.62))*30)*4+2471 (sheath_loads[71]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+2472 (sheath_loads[79]+sheath_loads[79])*(math.cos(math.radians(22.62))*38)*4+2473 (sheath_loads[87]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+2474 (sheath_loads[95]+sheath_loads[95])*(math.cos(math.radians(22.62))*46)*4)/442475top_29 = ((sheath_loads[7]+sheath_loads[7])*4+2476 (sheath_loads[15]+sheath_loads[15])*4+2477 (sheath_loads[23]+sheath_loads[23])*4+2478 (sheath_loads[31]+sheath_loads[31])*4+2479 (sheath_loads[39]+sheath_loads[39])*4+2480 (sheath_loads[47]+sheath_loads[47])*4+2481 (sheath_loads[55]+sheath_loads[55])*4+2482 (sheath_loads[63]+sheath_loads[63])*4+2483 (sheath_loads[71]+sheath_loads[71])*4+2484 (sheath_loads[79]+sheath_loads[79])*4+2485 (sheath_loads[87]+sheath_loads[87])*4+2486 (sheath_loads[95]+sheath_loads[95])*4)-bottom_2924872488connection_loads = [left_end_truss, top_1, top_2, top_3, top_4, top_5, top_6, top_7, top_8, top_9, top_10, top_11,2489 top_12, top_13, top_14, top_15, top_16, top_17, top_18, top_19, top_20, top_21, top_22, top_23,2490 top_24, top_25, top_26, top_27, top_28, top_29, right_end_truss, right_end_truss, right_end_truss,2491 right_end_truss, right_end_truss, right_end_truss, right_end_truss, right_end_truss, bottom_29,2492 bottom_28, bottom_27, bottom_26, bottom_25, bottom_24, bottom_23, bottom_22, bottom_21, bottom_20,2493 bottom_19, bottom_18, bottom_17, bottom_16, bottom_15, bottom_14, bottom_13, bottom_12, bottom_11,2494 bottom_10, bottom_9, bottom_8, bottom_7, bottom_6, bottom_5, bottom_4, bottom_3, bottom_2, 2495 bottom_1, left_end_truss, left_end_truss, left_end_truss, left_end_truss, left_end_truss,2496 left_end_truss, left_end_truss]24972498if walls == 1: # concrete block2499 if connections == 1: # hurricane straps2500 connection_COV = 0.22501 batch_COV = 0.052502 2503 side_mean = 42002504 side_std = side_mean*connection_COV2505 upper_side_limit = side_mean + 2*side_std2506 lower_side_limit = side_mean - 2*side_std2507 2508 gable_mean = 19202509 gable_std = side_mean*connection_COV2510 upper_gable_limit = gable_mean + 2*gable_std2511 lower_gable_limit = gable_mean - 2*gable_std2512 2513 side = np.random.normal(side_mean, side_std, size = (1))2514 too_high_indices = np.where(side > upper_side_limit)2515 while np.any(too_high_indices):2516 side[too_high_indices] = np.random.normal(2517 side_mean, side_std, size=len(too_high_indices))2518 too_high_indices = np.where(side > upper_side_limit)2519 2520 too_low_indices = np.where(side < lower_side_limit)2521 while np.any(too_low_indices):2522 side[too_low_indices] = np.random.normal(2523 side_mean, side_std, size=len(too_low_indices))2524 too_low_indices = np.where(side < lower_side_limit)2525 2526 gable = np.random.normal(gable_mean, gable_std, size = (1))2527 too_high_indices = np.where(gable > upper_gable_limit)2528 while np.any(too_high_indices):2529 gable[too_high_indices] = np.random.normal(2530 gable_mean, gable_std, size=len(too_high_indices))2531 too_high_indices = np.where(gable > upper_gable_limit)2532 2533 too_low_indices = np.where(gable < lower_gable_limit)2534 while np.any(too_low_indices):2535 side[too_low_indices] = np.random.normal(2536 gable_mean, gable_std, size=len(too_low_indices))2537 too_low_indices = np.where(gable < lower_gable_limit) 2538 2539 new_side_std = batch_COV*side2540 new_gable_std = batch_COV*gable2541 new_upper_side_limit = side + 2*new_side_std2542 new_lower_side_limit = side - 2*new_side_std2543 new_upper_gable_limit = gable + 2*new_gable_std2544 new_lower_gable_limit = gable - 2*new_gable_std 2545 2546 side_conn_capacities = np.random.normal(side, new_side_std, size = (58))2547 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit) 2548 while np.any(too_high_indices):2549 side_conn_capacities[too_high_indices] = np.random.normal(2550 side, new_side_std, size=len(too_high_indices))2551 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit)2552 2553 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit)2554 while np.any(too_low_indices):2555 side_conn_capacities[too_low_indices] = np.random.normal(2556 side, new_side_std, size=len(too_low_indices))2557 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit) 2558 2559 gable_conn_capacities = np.random.normal(gable, new_gable_std, size = (16))2560 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit) 2561 while np.any(too_high_indices):2562 gable_conn_capacities[too_high_indices] = np.random.normal(2563 gable, new_gable_std, size=len(too_high_indices))2564 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit)2565 2566 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit)2567 while np.any(too_low_indices):2568 gable_conn_capacities[too_low_indices] = np.random.normal(2569 gable, new_gable_std, size=len(too_low_indices))2570 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit) 2571 2572 2573 connection_capacities = [gable_conn_capacities[0], side_conn_capacities[0], side_conn_capacities[1],2574 side_conn_capacities[2], side_conn_capacities[3], side_conn_capacities[4],2575 side_conn_capacities[5], side_conn_capacities[6], side_conn_capacities[7],2576 side_conn_capacities[8], side_conn_capacities[9], side_conn_capacities[10],2577 side_conn_capacities[11], side_conn_capacities[12], side_conn_capacities[13],2578 side_conn_capacities[14], side_conn_capacities[15], side_conn_capacities[16],2579 side_conn_capacities[17], side_conn_capacities[18], side_conn_capacities[19],2580 side_conn_capacities[20], side_conn_capacities[21], side_conn_capacities[22],2581 side_conn_capacities[23], side_conn_capacities[24], side_conn_capacities[25],2582 side_conn_capacities[26], side_conn_capacities[27], side_conn_capacities[28],2583 gable_conn_capacities[1], gable_conn_capacities[2], gable_conn_capacities[3], 2584 gable_conn_capacities[4], gable_conn_capacities[5], gable_conn_capacities[6], 2585 gable_conn_capacities[7], gable_conn_capacities[8],2586 side_conn_capacities[29], side_conn_capacities[30],2587 side_conn_capacities[31], side_conn_capacities[32], side_conn_capacities[33],2588 side_conn_capacities[34], side_conn_capacities[35], side_conn_capacities[36],2589 side_conn_capacities[37], side_conn_capacities[38], side_conn_capacities[39],2590 side_conn_capacities[40], side_conn_capacities[41], side_conn_capacities[42],2591 side_conn_capacities[43], side_conn_capacities[44], side_conn_capacities[45],2592 side_conn_capacities[46], side_conn_capacities[47], side_conn_capacities[48],2593 side_conn_capacities[49], side_conn_capacities[50], side_conn_capacities[51],2594 side_conn_capacities[52], side_conn_capacities[53], side_conn_capacities[54],2595 side_conn_capacities[55], side_conn_capacities[56], side_conn_capacities[57], 2596 gable_conn_capacities[9], gable_conn_capacities[10], 2597 gable_conn_capacities[11], gable_conn_capacities[12], gable_conn_capacities[13], 2598 gable_conn_capacities[14], gable_conn_capacities[15]]2599 elif connections == 2: # hurricane straps2600 connection_COV = 0.22601 batch_COV = 0.052602 2603 side_mean = 31952604 side_std = side_mean*connection_COV2605 upper_side_limit = side_mean + 2*side_std2606 lower_side_limit = side_mean - 2*side_std2607 2608 gable_mean = 6752609 gable_std = side_mean*connection_COV2610 upper_gable_limit = gable_mean + 2*gable_std2611 lower_gable_limit = gable_mean - 2*gable_std2612 2613 side = np.random.normal(side_mean, side_std, size = (1))2614 too_high_indices = np.where(side > upper_side_limit)2615 while np.any(too_high_indices):2616 side[too_high_indices] = np.random.normal(2617 side_mean, side_std, size=len(too_high_indices))2618 too_high_indices = np.where(side > upper_side_limit)2619 2620 too_low_indices = np.where(side < lower_side_limit)2621 while np.any(too_low_indices):2622 side[too_low_indices] = np.random.normal(2623 side_mean, side_std, size=len(too_low_indices))2624 too_low_indices = np.where(side < lower_side_limit)2625 2626 gable = np.random.normal(gable_mean, gable_std, size = (1))2627 too_high_indices = np.where(gable > upper_gable_limit)2628 while np.any(too_high_indices):2629 gable[too_high_indices] = np.random.normal(2630 gable_mean, gable_std, size=len(too_high_indices))2631 too_high_indices = np.where(gable > upper_gable_limit)2632 2633 too_low_indices = np.where(gable < lower_gable_limit)2634 while np.any(too_low_indices):2635 side[too_low_indices] = np.random.normal(2636 gable_mean, gable_std, size=len(too_low_indices))2637 too_low_indices = np.where(gable < lower_gable_limit) 2638 2639 new_side_std = batch_COV*side2640 new_gable_std = batch_COV*gable2641 new_upper_side_limit = side + 2*new_side_std2642 new_lower_side_limit = side - 2*new_side_std2643 new_upper_gable_limit = gable + 2*new_gable_std2644 new_lower_gable_limit = gable - 2*new_gable_std 2645 2646 side_conn_capacities = np.random.normal(side, new_side_std, size = (58))2647 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit) 2648 while np.any(too_high_indices):2649 side_conn_capacities[too_high_indices] = np.random.normal(2650 side, new_side_std, size=len(too_high_indices))2651 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit)2652 2653 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit)2654 while np.any(too_low_indices):2655 side_conn_capacities[too_low_indices] = np.random.normal(2656 side, new_side_std, size=len(too_low_indices))2657 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit) 2658 2659 gable_conn_capacities = np.random.normal(gable, new_gable_std, size = (16))2660 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit) 2661 while np.any(too_high_indices):2662 gable_conn_capacities[too_high_indices] = np.random.normal(2663 gable, new_gable_std, size=len(too_high_indices))2664 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit)2665 2666 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit)2667 while np.any(too_low_indices):2668 gable_conn_capacities[too_low_indices] = np.random.normal(2669 gable, new_gable_std, size=len(too_low_indices))2670 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit) 2671 2672 2673 connection_capacities = [gable_conn_capacities[0], side_conn_capacities[0], side_conn_capacities[1],2674 side_conn_capacities[2], side_conn_capacities[3], side_conn_capacities[4],2675 side_conn_capacities[5], side_conn_capacities[6], side_conn_capacities[7],2676 side_conn_capacities[8], side_conn_capacities[9], side_conn_capacities[10],2677 side_conn_capacities[11], side_conn_capacities[12], side_conn_capacities[13],2678 side_conn_capacities[14], side_conn_capacities[15], side_conn_capacities[16],2679 side_conn_capacities[17], side_conn_capacities[18], side_conn_capacities[19],2680 side_conn_capacities[20], side_conn_capacities[21], side_conn_capacities[22],2681 side_conn_capacities[23], side_conn_capacities[24], side_conn_capacities[25],2682 side_conn_capacities[26], side_conn_capacities[27], side_conn_capacities[28],2683 gable_conn_capacities[1], gable_conn_capacities[2], gable_conn_capacities[3], 2684 gable_conn_capacities[4], gable_conn_capacities[5], gable_conn_capacities[6], 2685 gable_conn_capacities[7], gable_conn_capacities[8],2686 side_conn_capacities[29], side_conn_capacities[30],2687 side_conn_capacities[31], side_conn_capacities[32], side_conn_capacities[33],2688 side_conn_capacities[34], side_conn_capacities[35], side_conn_capacities[36],2689 side_conn_capacities[37], side_conn_capacities[38], side_conn_capacities[39],2690 side_conn_capacities[40], side_conn_capacities[41], side_conn_capacities[42],2691 side_conn_capacities[43], side_conn_capacities[44], side_conn_capacities[45],2692 side_conn_capacities[46], side_conn_capacities[47], side_conn_capacities[48],2693 side_conn_capacities[49], side_conn_capacities[50], side_conn_capacities[51],2694 side_conn_capacities[52], side_conn_capacities[53], side_conn_capacities[54],2695 side_conn_capacities[55], side_conn_capacities[56], side_conn_capacities[57], 2696 gable_conn_capacities[9], gable_conn_capacities[10], 2697 gable_conn_capacities[11], gable_conn_capacities[12], gable_conn_capacities[13], 2698 gable_conn_capacities[14], gable_conn_capacities[15]]2699if walls == 2: # wood frame2700 if connections == 1: # hurricane straps2701 connection_COV = 0.22702 batch_COV = 0.052703 2704 side_mean = 37202705 side_std = side_mean*connection_COV2706 upper_side_limit = side_mean + 2*side_std2707 lower_side_limit = side_mean - 2*side_std2708 2709 gable_mean = 37802710 gable_std = side_mean*connection_COV2711 upper_gable_limit = gable_mean + 2*gable_std2712 lower_gable_limit = gable_mean - 2*gable_std2713 2714 side = np.random.normal(side_mean, side_std, size = (1))2715 too_high_indices = np.where(side > upper_side_limit)2716 while np.any(too_high_indices):2717 side[too_high_indices] = np.random.normal(2718 side_mean, side_std, size=len(too_high_indices))2719 too_high_indices = np.where(side > upper_side_limit)2720 2721 too_low_indices = np.where(side < lower_side_limit)2722 while np.any(too_low_indices):2723 side[too_low_indices] = np.random.normal(2724 side_mean, side_std, size=len(too_low_indices))2725 too_low_indices = np.where(side < lower_side_limit)2726 2727 gable = np.random.normal(gable_mean, gable_std, size = (1))2728 too_high_indices = np.where(gable > upper_gable_limit)2729 while np.any(too_high_indices):2730 gable[too_high_indices] = np.random.normal(2731 gable_mean, gable_std, size=len(too_high_indices))2732 too_high_indices = np.where(gable > upper_gable_limit)2733 2734 too_low_indices = np.where(gable < lower_gable_limit)2735 while np.any(too_low_indices):2736 side[too_low_indices] = np.random.normal(2737 gable_mean, gable_std, size=len(too_low_indices))2738 too_low_indices = np.where(gable < lower_gable_limit) 2739 2740 new_side_std = batch_COV*side2741 new_gable_std = batch_COV*gable2742 new_upper_side_limit = side + 2*new_side_std2743 new_lower_side_limit = side - 2*new_side_std2744 new_upper_gable_limit = gable + 2*new_gable_std2745 new_lower_gable_limit = gable - 2*new_gable_std 2746 2747 side_conn_capacities = np.random.normal(side, new_side_std, size = (58))2748 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit) 2749 while np.any(too_high_indices):2750 side_conn_capacities[too_high_indices] = np.random.normal(2751 side, new_side_std, size=len(too_high_indices))2752 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit)2753 2754 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit)2755 while np.any(too_low_indices):2756 side_conn_capacities[too_low_indices] = np.random.normal(2757 side, new_side_std, size=len(too_low_indices))2758 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit) 2759 2760 gable_conn_capacities = np.random.normal(gable, new_gable_std, size = (16))2761 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit) 2762 while np.any(too_high_indices):2763 gable_conn_capacities[too_high_indices] = np.random.normal(2764 gable, new_gable_std, size=len(too_high_indices))2765 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit)2766 2767 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit)2768 while np.any(too_low_indices):2769 gable_conn_capacities[too_low_indices] = np.random.normal(2770 gable, new_gable_std, size=len(too_low_indices))2771 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit) 2772 2773 2774 connection_capacities = [gable_conn_capacities[0], side_conn_capacities[0], side_conn_capacities[1],2775 side_conn_capacities[2], side_conn_capacities[3], side_conn_capacities[4],2776 side_conn_capacities[5], side_conn_capacities[6], side_conn_capacities[7],2777 side_conn_capacities[8], side_conn_capacities[9], side_conn_capacities[10],2778 side_conn_capacities[11], side_conn_capacities[12], side_conn_capacities[13],2779 side_conn_capacities[14], side_conn_capacities[15], side_conn_capacities[16],2780 side_conn_capacities[17], side_conn_capacities[18], side_conn_capacities[19],2781 side_conn_capacities[20], side_conn_capacities[21], side_conn_capacities[22],2782 side_conn_capacities[23], side_conn_capacities[24], side_conn_capacities[25],2783 side_conn_capacities[26], side_conn_capacities[27], side_conn_capacities[28],2784 gable_conn_capacities[1], gable_conn_capacities[2], gable_conn_capacities[3], 2785 gable_conn_capacities[4], gable_conn_capacities[5], gable_conn_capacities[6], 2786 gable_conn_capacities[7], gable_conn_capacities[8],2787 side_conn_capacities[29], side_conn_capacities[30],2788 side_conn_capacities[31], side_conn_capacities[32], side_conn_capacities[33],2789 side_conn_capacities[34], side_conn_capacities[35], side_conn_capacities[36],2790 side_conn_capacities[37], side_conn_capacities[38], side_conn_capacities[39],2791 side_conn_capacities[40], side_conn_capacities[41], side_conn_capacities[42],2792 side_conn_capacities[43], side_conn_capacities[44], side_conn_capacities[45],2793 side_conn_capacities[46], side_conn_capacities[47], side_conn_capacities[48],2794 side_conn_capacities[49], side_conn_capacities[50], side_conn_capacities[51],2795 side_conn_capacities[52], side_conn_capacities[53], side_conn_capacities[54],2796 side_conn_capacities[55], side_conn_capacities[56], side_conn_capacities[57], 2797 gable_conn_capacities[9], gable_conn_capacities[10], 2798 gable_conn_capacities[11], gable_conn_capacities[12], gable_conn_capacities[13], 2799 gable_conn_capacities[14], gable_conn_capacities[15]]2800 elif connections == 2: # hurricane straps2801 connection_COV = 0.22802 batch_COV = 0.052803 2804 side_mean = 20702805 side_std = side_mean*connection_COV2806 upper_side_limit = side_mean + 2*side_std2807 lower_side_limit = side_mean - 2*side_std2808 2809 gable_mean = 19502810 gable_std = side_mean*connection_COV2811 upper_gable_limit = gable_mean + 2*gable_std2812 lower_gable_limit = gable_mean - 2*gable_std2813 2814 side = np.random.normal(side_mean, side_std, size = (1))2815 too_high_indices = np.where(side > upper_side_limit)2816 while np.any(too_high_indices):2817 side[too_high_indices] = np.random.normal(2818 side_mean, side_std, size=len(too_high_indices))2819 too_high_indices = np.where(side > upper_side_limit)2820 2821 too_low_indices = np.where(side < lower_side_limit)2822 while np.any(too_low_indices):2823 side[too_low_indices] = np.random.normal(2824 side_mean, side_std, size=len(too_low_indices))2825 too_low_indices = np.where(side < lower_side_limit)2826 2827 gable = np.random.normal(gable_mean, gable_std, size = (1))2828 too_high_indices = np.where(gable > upper_gable_limit)2829 while np.any(too_high_indices):2830 gable[too_high_indices] = np.random.normal(2831 gable_mean, gable_std, size=len(too_high_indices))2832 too_high_indices = np.where(gable > upper_gable_limit)2833 2834 too_low_indices = np.where(gable < lower_gable_limit)2835 while np.any(too_low_indices):2836 side[too_low_indices] = np.random.normal(2837 gable_mean, gable_std, size=len(too_low_indices))2838 too_low_indices = np.where(gable < lower_gable_limit) 2839 2840 new_side_std = batch_COV*side2841 new_gable_std = batch_COV*gable2842 new_upper_side_limit = side + 2*new_side_std2843 new_lower_side_limit = side - 2*new_side_std2844 new_upper_gable_limit = gable + 2*new_gable_std2845 new_lower_gable_limit = gable - 2*new_gable_std 2846 2847 side_conn_capacities = np.random.normal(side, new_side_std, size = (58))2848 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit) 2849 while np.any(too_high_indices):2850 side_conn_capacities[too_high_indices] = np.random.normal(2851 side, new_side_std, size=len(too_high_indices))2852 too_high_indices = np.where(side_conn_capacities > new_upper_side_limit)2853 2854 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit)2855 while np.any(too_low_indices):2856 side_conn_capacities[too_low_indices] = np.random.normal(2857 side, new_side_std, size=len(too_low_indices))2858 too_low_indices = np.where(side_conn_capacities < new_lower_side_limit) 2859 2860 gable_conn_capacities = np.random.normal(gable, new_gable_std, size = (16))2861 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit) 2862 while np.any(too_high_indices):2863 gable_conn_capacities[too_high_indices] = np.random.normal(2864 gable, new_gable_std, size=len(too_high_indices))2865 too_high_indices = np.where(gable_conn_capacities > new_upper_gable_limit)2866 2867 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit)2868 while np.any(too_low_indices):2869 gable_conn_capacities[too_low_indices] = np.random.normal(2870 gable, new_gable_std, size=len(too_low_indices))2871 too_low_indices = np.where(gable_conn_capacities < new_lower_gable_limit) 2872 2873 2874 connection_capacities = [gable_conn_capacities[0], side_conn_capacities[0], side_conn_capacities[1],2875 side_conn_capacities[2], side_conn_capacities[3], side_conn_capacities[4],2876 side_conn_capacities[5], side_conn_capacities[6], side_conn_capacities[7],2877 side_conn_capacities[8], side_conn_capacities[9], side_conn_capacities[10],2878 side_conn_capacities[11], side_conn_capacities[12], side_conn_capacities[13],2879 side_conn_capacities[14], side_conn_capacities[15], side_conn_capacities[16],2880 side_conn_capacities[17], side_conn_capacities[18], side_conn_capacities[19],2881 side_conn_capacities[20], side_conn_capacities[21], side_conn_capacities[22],2882 side_conn_capacities[23], side_conn_capacities[24], side_conn_capacities[25],2883 side_conn_capacities[26], side_conn_capacities[27], side_conn_capacities[28],2884 gable_conn_capacities[1], gable_conn_capacities[2], gable_conn_capacities[3], 2885 gable_conn_capacities[4], gable_conn_capacities[5], gable_conn_capacities[6], 2886 gable_conn_capacities[7], gable_conn_capacities[8],2887 side_conn_capacities[29], side_conn_capacities[30],2888 side_conn_capacities[31], side_conn_capacities[32], side_conn_capacities[33],2889 side_conn_capacities[34], side_conn_capacities[35], side_conn_capacities[36],2890 side_conn_capacities[37], side_conn_capacities[38], side_conn_capacities[39],2891 side_conn_capacities[40], side_conn_capacities[41], side_conn_capacities[42],2892 side_conn_capacities[43], side_conn_capacities[44], side_conn_capacities[45],2893 side_conn_capacities[46], side_conn_capacities[47], side_conn_capacities[48],2894 side_conn_capacities[49], side_conn_capacities[50], side_conn_capacities[51],2895 side_conn_capacities[52], side_conn_capacities[53], side_conn_capacities[54],2896 side_conn_capacities[55], side_conn_capacities[56], side_conn_capacities[57], 2897 gable_conn_capacities[9], gable_conn_capacities[10], 2898 gable_conn_capacities[11], gable_conn_capacities[12], gable_conn_capacities[13], 2899 gable_conn_capacities[14], gable_conn_capacities[15]]29002901failed_connections = np.full(74,1)2902for i in range(len(failed_connections)):2903 if connection_loads[i] > connection_capacities[i]:2904 failed_connections[i] = 02905 connection_loads[i-1] = connection_loads[i-1] + (connection_loads[i]/2)2906 connection_loads[i+1] = connection_loads[i+1] + (connection_loads[i]/2)2907 connection_loads[i] = 02908 2909zz = np.count_nonzero(failed_connections==0)2910if zz != 0:2911 zz_old = zz + 12912 while zz > zz_old:2913 zz_old = zz2914 for i in range(len(failed_connections)):2915 if connection_loads[i] > connection_capacities[i]:2916 failed_connections[i] = 02917 connection_loads[i-1] = connection_loads[i-1] + (connection_loads[i]/2)2918 connection_loads[i+1] = connection_loads[i+1] + (connection_loads[i]/2)2919 connection_loads[i] = 02920 zz = np.count_nonzero(failed_connections==0)29212922back_wall_connections = [failed_connections[1],failed_connections[2],failed_connections[3],failed_connections[4],failed_connections[5],2923 failed_connections[6],failed_connections[7],failed_connections[8],failed_connections[9],failed_connections[10],2924 failed_connections[11],failed_connections[12],failed_connections[13],failed_connections[14],failed_connections[15],2925 failed_connections[16],failed_connections[17],failed_connections[18],failed_connections[19],failed_connections[20],2926 failed_connections[21],failed_connections[22],failed_connections[23],failed_connections[24],failed_connections[25], 2927 failed_connections[26],failed_connections[27],failed_connections[28]]; 2928front_wall_connections = [failed_connections[37],failed_connections[38],failed_connections[39],failed_connections[40],failed_connections[41],2929 failed_connections[42],failed_connections[43],failed_connections[44],failed_connections[45],failed_connections[46],2930 failed_connections[47],failed_connections[48],failed_connections[49],failed_connections[50],failed_connections[51],2931 failed_connections[52],failed_connections[53],failed_connections[54],failed_connections[55],failed_connections[56],2932 failed_connections[57],failed_connections[58],failed_connections[59],failed_connections[60],failed_connections[61],2933 failed_connections[62],failed_connections[63],failed_connections[64]]; 2934right_wall_connections = [failed_connections[29],failed_connections[30],failed_connections[31],failed_connections[32],failed_connections[33],2935 failed_connections[34],failed_connections[35],failed_connections[36]];2936left_wall_connections = [failed_connections[65],failed_connections[66],failed_connections[67],failed_connections[68],failed_connections[69],2937 failed_connections[70],failed_connections[71],failed_connections[0]];2938back_fail_conn_count = np.count_nonzero(back_wall_connections==0)2939front_fail_conn_count = np.count_nonzero(front_wall_connections==0)2940right_fail_conn_count = np.count_nonzero(right_wall_connections==0)2941left_fail_conn_count = np.count_nonzero(left_wall_connections==0)29422943## wall uplift2944back_wall_uplift = (connection_loads[1]+connection_loads[2]+connection_loads[3]+connection_loads[4]+connection_loads[5]+2945 connection_loads[6]+connection_loads[7]+connection_loads[8]+connection_loads[9]+connection_loads[10]+2946 connection_loads[11]+connection_loads[12]+connection_loads[13]+connection_loads[14]+connection_loads[15]+2947 connection_loads[16]+connection_loads[17]+connection_loads[18]+connection_loads[19]+connection_loads[20]+2948 connection_loads[21]+connection_loads[22]+connection_loads[23]+connection_loads[24]+connection_loads[25]+ 2949 connection_loads[26]+connection_loads[27]+connection_loads[28])/60; 2950front_wall_uplift = (connection_loads[37]+connection_loads[38]+connection_loads[39]+connection_loads[40]+connection_loads[41]+2951 connection_loads[42]+connection_loads[43]+connection_loads[44]+connection_loads[45]+connection_loads[46]+2952 connection_loads[47]+connection_loads[48]+connection_loads[49]+connection_loads[50]+connection_loads[51]+2953 connection_loads[52]+connection_loads[53]+connection_loads[54]+connection_loads[55]+connection_loads[56]+2954 connection_loads[57]+connection_loads[58]+connection_loads[59]+connection_loads[60]+connection_loads[61]+ 2955 connection_loads[62]+connection_loads[63]+connection_loads[64])/60; 2956right_wall_uplift = (connection_loads[29]+connection_loads[30]+connection_loads[31]+connection_loads[32]+connection_loads[33]+2957 connection_loads[34]+connection_loads[35]+connection_loads[36])/442958left_wall_uplift = (connection_loads[65]+connection_loads[66]+connection_loads[67]+connection_loads[68]+connection_loads[69]+2959 connection_loads[70]+connection_loads[71]+connection_loads[0])/4429602961uplift_loads = [front_wall_uplift,left_wall_uplift,back_wall_uplift,right_wall_uplift]29622963## wall bending2964if direction == 1:2965 front_wall_bending = abs((p_windward_CC*10**2)/8)2966 back_wall_bending = abs((p_leeward_CC*10**2)/8)2967 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)2968 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)2969 left_wall_bending = max(left_wall_bending1, left_wall_bending2)2970 right_wall_bending = left_wall_bending2971if direction == 2:2972 front_wall_bending = abs((p_windward_CC*10**2)/8)2973 back_wall_bending1 = abs((p_side_CC*10**2)/8)2974 back_wall_bending2 = abs((p_sideleading_CC*10**2)/8)2975 back_wall_bending = max(back_wall_bending1, back_wall_bending2)2976 left_wall_bending = abs((p_windward_CC*19.167**2)/8)2977 right_wall_bending1 = abs((p_side_CC*19.167**2)/8)2978 right_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)2979 right_wall_bending = max(right_wall_bending1, right_wall_bending2)2980if direction == 3:2981 front_wall_bending1 = abs((p_side_CC*10**2)/8)2982 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)2983 front_wall_bending = max(front_wall_bending1, front_wall_bending2)2984 back_wall_bending = front_wall_bending2985 left_wall_bending = abs((p_windward_CC*19.167**2)/8)2986 right_wall_bending = abs((p_leeward_CC*19.167**2)/8)2987if direction == 4:2988 back_wall_bending = abs((p_windward_CC*10**2)/8)2989 front_wall_bending1 = abs((p_side_CC*10**2)/8)2990 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)2991 front_wall_bending = max(front_wall_bending1, front_wall_bending2)2992 left_wall_bending = abs((p_windward_CC*19.167**2)/8)2993 right_wall_bending1 = abs((p_side_CC*19.167**2)/8)2994 right_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)2995 right_wall_bending = max(right_wall_bending1, right_wall_bending2) 2996if direction == 5:2997 back_wall_bending = abs((p_windward_CC*10**2)/8)2998 front_wall_bending = abs((p_leeward_CC*10**2)/8)2999 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)3000 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)3001 left_wall_bending = max(left_wall_bending1, left_wall_bending2)3002 right_wall_bending = left_wall_bending 3003if direction == 6:3004 back_wall_bending = abs((p_windward_CC*10**2)/8)3005 front_wall_bending1 = abs((p_side_CC*10**2)/8)3006 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)3007 front_wall_bending = max(front_wall_bending1, front_wall_bending2)3008 right_wall_bending = abs((p_windward_CC*19.167**2)/8)3009 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)3010 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)3011 left_wall_bending = max(left_wall_bending1, left_wall_bending2) 3012if direction == 7:3013 front_wall_bending1 = abs((p_side_CC*10**2)/8)3014 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)3015 front_wall_bending = max(front_wall_bending1, front_wall_bending2)3016 back_wall_bending = front_wall_bending3017 right_wall_bending = abs((p_windward_CC*19.167**2)/8)3018 left_wall_bending = abs((p_leeward_CC*19.167**2)/8) 3019if direction == 8:3020 front_wall_bending = abs((p_windward_CC*10**2)/8)3021 back_wall_bending1 = abs((p_side_CC*10**2)/8)3022 back_wall_bending2 = abs((p_sideleading_CC*10**2)/8)3023 back_wall_bending = max(back_wall_bending1, back_wall_bending2)3024 right_wall_bending = abs((p_windward_CC*19.167**2)/8)3025 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)3026 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)3027 left_wall_bending = max(left_wall_bending1, left_wall_bending2) 30283029if back_fail_conn_count > 14:3030 back_wall_bending = back_wall_bending*2.83031if front_fail_conn_count > 14:3032 front_wall_bending = front_wall_bending*2.83033if right_fail_conn_count > 4:3034 right_wall_bending = right_wall_bending*2.83035if left_fail_conn_count > 4:3036 left_wall_bending = left_wall_bending*2.83037 3038bending_loads = [front_wall_bending,left_wall_bending,back_wall_bending,right_wall_bending]30393040## lateral loads3041if direction == 1:3042 if front_fail_conn_count <= 14:3043 front_lateral = p_windward_CC*3*30*10/23044 elif front_fail_conn_count > 14:3045 front_lateral = p_windward_CC*0.5*30*103046 3047 if left_fail_conn_count <= 4:3048 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3049 elif left_fail_conn_count > 4:3050 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3051 3052 if back_fail_conn_count <= 14:3053 back_lateral = p_leeward_CC*3*30*10/23054 elif back_fail_conn_count > 14:3055 back_lateral = p_leeward_CC*0.5*30*103056 3057 if right_fail_conn_count <= 4:3058 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3059 elif right_fail_conn_count > 4:3060 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3061if direction == 2:3062 if front_fail_conn_count <= 14:3063 front_lateral = p_windward_CC*3*30*10/23064 elif front_fail_conn_count > 14:3065 front_lateral = p_windward_CC*0.5*30*103066 3067 if left_fail_conn_count <= 4:3068 left_lateral = p_windward_CC*3*22*14.583/23069 elif left_fail_conn_count > 4:3070 left_lateral = p_windward_CC*0.5*22*14.5833071 3072 if back_fail_conn_count <= 14:3073 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3074 elif back_fail_conn_count > 14:3075 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3076 3077 if right_fail_conn_count <= 4:3078 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3079 elif right_fail_conn_count > 4:3080 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3081if direction == 3:3082 if front_fail_conn_count <= 14:3083 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3084 elif front_fail_conn_count > 14:3085 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3086 3087 if left_fail_conn_count <= 4:3088 left_lateral = p_windward_CC*3*22*14.583/23089 elif left_fail_conn_count > 4:3090 left_lateral = p_windward_CC*0.5*22*14.583 3091 3092 if back_fail_conn_count <= 14:3093 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3094 elif back_fail_conn_count > 14:3095 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93) 3096 3097 if right_fail_conn_count <= 4:3098 right_lateral = p_leeward_CC*3*22*14.583/23099 elif right_fail_conn_count > 4:3100 right_lateral = p_leeward_CC*0.5*22*14.5833101if direction == 4:3102 if front_fail_conn_count <= 14:3103 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3104 elif front_fail_conn_count > 14:3105 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3106 3107 if left_fail_conn_count <= 4:3108 left_lateral = p_windward_CC*3*22*14.583/23109 elif left_fail_conn_count > 4:3110 left_lateral = p_windward_CC*0.5*22*14.583 3111 3112 if back_fail_conn_count <= 14:3113 back_lateral = p_windward_CC*3*30*10/23114 elif back_fail_conn_count > 14:3115 back_lateral = p_windward_CC*0.5*30*103116 3117 if right_fail_conn_count <= 4:3118 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3119 elif right_fail_conn_count > 4:3120 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3121if direction == 5:3122 if front_fail_conn_count <= 14:3123 front_lateral = p_leeward_CC*3*30*10/23124 elif front_fail_conn_count > 14:3125 front_lateral = p_leeward_CC*0.5*30*103126 3127 if left_fail_conn_count <= 4:3128 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3129 elif left_fail_conn_count > 4:3130 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3131 3132 if back_fail_conn_count <= 14:3133 back_lateral = p_windward_CC*3*30*10/23134 elif back_fail_conn_count > 14:3135 back_lateral = p_windward_CC*0.5*30*103136 3137 if right_fail_conn_count <= 4:3138 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3139 elif right_fail_conn_count > 4:3140 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3141if direction == 6:3142 if front_fail_conn_count <= 14:3143 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3144 elif front_fail_conn_count > 14:3145 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3146 3147 if left_fail_conn_count <= 4:3148 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3149 elif left_fail_conn_count > 4:3150 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3151 3152 if back_fail_conn_count <= 14:3153 back_lateral = p_windward_CC*3*30*10/23154 elif back_fail_conn_count > 14:3155 back_lateral = p_windward_CC*0.5*30*103156 3157 if right_fail_conn_count <= 4:3158 right_lateral = p_windward_CC*3*22*14.583/23159 elif right_fail_conn_count > 4:3160 right_lateral = p_windward_CC*0.5*22*14.583 3161if direction == 7:3162 if front_fail_conn_count <= 14:3163 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3164 elif front_fail_conn_count > 14:3165 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)31663167 if left_fail_conn_count <= 4:3168 left_lateral = p_leeward_CC*3*22*14.583/23169 elif left_fail_conn_count > 4:3170 left_lateral = p_leeward_CC*0.5*22*14.5833171 3172 if back_fail_conn_count <= 14:3173 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3174 elif back_fail_conn_count > 14:3175 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93) 31763177 if right_fail_conn_count <= 4:3178 right_lateral = p_windward_CC*3*22*14.583/23179 elif right_fail_conn_count > 4:3180 right_lateral = p_windward_CC*0.5*22*14.583 3181if direction == 8:3182 if front_fail_conn_count <= 14:3183 front_lateral = p_windward_CC*3*30*10/23184 elif front_fail_conn_count > 14:3185 front_lateral = p_windward_CC*0.5*30*103186 3187 if left_fail_conn_count <= 4:3188 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3189 elif left_fail_conn_count > 4:3190 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)3191 3192 if back_fail_conn_count <= 14:3193 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)3194 elif back_fail_conn_count > 14:3195 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93) 31963197 if right_fail_conn_count <= 4:3198 right_lateral = p_windward_CC*3*22*14.583/23199 elif right_fail_conn_count > 4:3200 right_lateral = p_windward_CC*0.5*22*14.583 32013202front_lateral = abs(front_lateral)/453203left_lateral = abs(left_lateral)/333204back_lateral = abs(back_lateral)/453205right_lateral = abs(right_lateral)/333206lateral_loads = [front_lateral,left_lateral,back_lateral,right_lateral]32073208## wall sheathing3209if direction == 1:3210 wall_sheath_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3211 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3212 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3213 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3214 p_windward_CC, p_windward_CC, p_windward_CC,3215 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3216 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3217 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3218 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3219 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3220 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3221 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3222 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3223 p_leeward_CC, p_leeward_CC, p_leeward_CC,3224 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3225 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3226 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3227 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]3228if direction == 2:3229 wall_sheath_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3230 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3231 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3232 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3233 p_windward_CC, p_windward_CC, p_windward_CC,3234 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3235 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3236 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3237 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3238 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3239 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3240 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3241 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3242 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3243 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3244 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3245 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3246 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]3247if direction == 3:3248 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3249 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3250 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3251 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3252 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3253 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3254 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3255 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3256 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3257 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3258 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3259 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3260 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3261 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3262 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3263 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3264 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3265 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]3266if direction == 4:3267 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3268 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3269 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3270 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3271 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3272 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3273 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3274 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3275 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3276 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3277 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3278 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3279 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3280 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3281 p_windward_CC,3282 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3283 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3284 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3285 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]3286if direction == 5:3287 wall_sheath_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3288 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3289 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3290 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3291 p_leeward_CC, p_leeward_CC, p_leeward_CC, 3292 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3293 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3294 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3295 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3296 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3297 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3298 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3299 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3300 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3301 p_windward_CC,3302 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3303 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3304 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3305 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]3306if direction == 6:3307 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3308 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3309 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3310 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3311 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3312 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3313 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3314 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3315 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3316 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3317 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3318 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3319 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3320 p_windward_CC,3321 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3322 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3323 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3324 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3325 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3326if direction == 7:3327 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3328 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3329 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3330 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3331 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3332 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3333 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3334 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3335 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,3336 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3337 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3338 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3339 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3340 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3341 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3342 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3343 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3344 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3345if direction == 8:3346 wall_sheath_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3347 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3348 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3349 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3350 p_windward_CC, p_windward_CC, p_windward_CC,3351 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3352 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3353 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3354 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3355 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,3356 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 3357 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3358 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,3359 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3360 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3361 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3362 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,3363 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3364 3365wall_sheath_loads = np.absolute(wall_sheath_loads)3366336733683369## wall capacities and failure check3370if walls ==1:3371 lateral_mean_capacity = 12323372 lateral_COV = 0.253373 lateral_std = lateral_COV*lateral_mean_capacity3374 upper_lateral_limit = lateral_mean_capacity + 2*lateral_std3375 lower_lateral_limit = lateral_mean_capacity - 2*lateral_std3376 lateral_capacity = np.random.normal(lateral_mean_capacity, lateral_std, size = (4))33773378 too_high_indices = np.where(lateral_capacity > upper_lateral_limit)3379 while np.any(too_high_indices):3380 lateral_capacity[too_high_indices] = np.random.normal(3381 lateral_mean_capacity, lateral_std, size=len(too_high_indices))3382 too_high_indices = np.where(lateral_capacity > upper_lateral_limit)3383 3384 too_low_indices = np.where(lateral_capacity < lower_lateral_limit)3385 while np.any(too_low_indices):3386 lateral_capacity[too_low_indices] = np.random.normal(3387 lateral_mean_capacity, lateral_std, size=len(too_low_indices))3388 too_low_indices = np.where(lateral_capacity < lower_lateral_limit)3389 3390 lateraladd_mean_capacity = 7943391 lateraladd_COV = 0.253392 lateraladd_std = lateraladd_COV*lateraladd_mean_capacity3393 upper_lateraladd_limit = lateraladd_mean_capacity + 2*lateraladd_std3394 lower_lateraladd_limit = lateraladd_mean_capacity - 2*lateraladd_std3395 lateraladd_capacity = np.random.normal(lateraladd_mean_capacity, lateraladd_std, size = (4))33963397 too_high_indices = np.where(lateraladd_capacity > upper_lateraladd_limit)3398 while np.any(too_high_indices):3399 lateraladd_mean_capacity[too_high_indices] = np.random.normal(3400 lateraladd_capacity, lateraladd_std, size=len(too_high_indices))3401 too_high_indices = np.where(lateraladd_capacity > upper_lateraladd_limit)3402 3403 too_low_indices = np.where(lateraladd_capacity < lower_lateraladd_limit)3404 while np.any(too_low_indices):3405 lateraladd_capacity[too_low_indices] = np.random.normal(3406 lateraladd_mean_capacity, lateraladd_std, size=len(too_low_indices))3407 too_low_indices = np.where(lateraladd_capacity < lower_lateraladd_limit)34083409 front_lateral_capacity = lateral_capacity[0] + lateraladd_capacity[0]3410 left_lateral_capacity = lateral_capacity[1] + lateraladd_capacity[1]3411 back_lateral_capacity = lateral_capacity[2] + lateraladd_capacity[2]3412 right_lateral_capacity = lateral_capacity[3] + lateraladd_capacity[3]3413 total_lateral_capacity = [front_lateral_capacity, left_lateral_capacity, back_lateral_capacity, right_lateral_capacity]3414 3415 uplift_mean_capacity = 6163416 uplift_COV = 0.253417 uplift_std = uplift_COV*uplift_mean_capacity3418 upper_uplift_limit = uplift_mean_capacity + 2*uplift_std3419 lower_uplift_limit = uplift_mean_capacity - 2*uplift_std3420 uplift_capacity = np.random.normal(uplift_mean_capacity, uplift_std, size = (4))34213422 too_high_indices = np.where(uplift_capacity > upper_uplift_limit)3423 while np.any(too_high_indices):3424 uplift_capacity[too_high_indices] = np.random.normal(3425 uplift_mean_capacity, uplift_std, size=len(too_high_indices))3426 too_high_indices = np.where(uplift_capacity > upper_uplift_limit)3427 3428 too_low_indices = np.where(uplift_capacity < lower_uplift_limit)3429 while np.any(too_low_indices):3430 uplift_capacity[too_low_indices] = np.random.normal(3431 uplift_mean_capacity, uplift_std, size=len(too_low_indices))3432 too_low_indices = np.where(uplift_capacity < lower_uplift_limit)3433 3434 upliftadd_mean_capacity = 3973435 upliftadd_COV = 0.253436 upliftadd_std = upliftadd_COV*upliftadd_mean_capacity3437 upper_upliftadd_limit = upliftadd_mean_capacity + 2*upliftadd_std3438 lower_upliftadd_limit = upliftadd_mean_capacity - 2*upliftadd_std3439 upliftadd_capacity = np.random.normal(upliftadd_mean_capacity, upliftadd_std, size = (4))34403441 too_high_indices = np.where(upliftadd_capacity > upper_upliftadd_limit)3442 while np.any(too_high_indices):3443 upliftadd_capacity[too_high_indices] = np.random.normal(3444 upliftadd_mean_capacity, upliftadd_std, size=len(too_high_indices))3445 too_high_indices = np.where(upliftadd_capacity > upper_upliftadd_limit)3446 3447 too_low_indices = np.where(upliftadd_capacity < lower_upliftadd_limit)3448 while np.any(too_low_indices):3449 upliftadd_capacity[too_low_indices] = np.random.normal(3450 upliftadd_mean_capacity, upliftadd_std, size=len(too_low_indices))3451 too_low_indices = np.where(upliftadd_capacity < lower_upliftadd_limit)34523453 front_uplift_capacity = uplift_capacity[0] + upliftadd_capacity[0] 3454 left_uplift_capacity = uplift_capacity[1] + upliftadd_capacity[1] 3455 back_uplift_capacity = uplift_capacity[2] + upliftadd_capacity[2] 3456 right_uplift_capacity = uplift_capacity[3] + upliftadd_capacity[3] 3457 total_uplift_capacity = [front_uplift_capacity, left_uplift_capacity, back_uplift_capacity, right_uplift_capacity]34583459 wallsheath_mean_capacity = 1263460 wallsheath_COV = 0.43461 wallsheath_std = wallsheath_COV*wallsheath_mean_capacity3462 upper_wallsheath_limit = wallsheath_mean_capacity + 2*wallsheath_std3463 lower_wallsheath_limit = wallsheath_mean_capacity - 2*wallsheath_std3464 wall_sheath_capacity = np.random.normal(wallsheath_mean_capacity, wallsheath_std, size = (118))34653466 too_high_indices = np.where(wall_sheath_capacity > upper_wallsheath_limit)3467 while np.any(too_high_indices):3468 wall_sheath_capacity[too_high_indices] = np.random.normal(3469 wallsheath_mean_capacity, wallsheath_std, size=len(too_high_indices))3470 too_high_indices = np.where(wall_sheath_capacity > upper_wallsheath_limit)3471 3472 too_low_indices = np.where(wall_sheath_capacity < lower_wallsheath_limit)3473 while np.any(too_low_indices):3474 wall_sheath_capacity[too_low_indices] = np.random.normal(3475 wallsheath_mean_capacity, wallsheath_std, size=len(too_low_indices))3476 too_low_indices = np.where(wall_sheath_capacity < lower_wallsheath_limit)3477 3478 failed_walls_uplift = np.full(4, 1)3479 for i in range(len(failed_walls_uplift)):3480 if uplift_loads[i] > total_uplift_capacity[i]:3481 failed_walls_uplift[i] = 03482 failed_walls_lateral = np.full(4, 1)3483 for i in range(len(failed_walls_lateral)):3484 if lateral_loads[i] > total_lateral_capacity[i]:3485 failed_walls_lateral[i] = 03486 failed_walls_sheath = np.full(118, 1, dtype = int)3487 for i in range(len(failed_walls_sheath)):3488 if wall_sheath_loads[i] > wall_sheath_capacity[i]:3489 failed_walls_sheath[i] = 03490 3491 failed_walls = np.full(4, 1)3492 for i in range(len(failed_walls)):3493 if failed_walls_uplift[i] < 1:3494 failed_walls[i] = 03495 if failed_walls_lateral[i] < 1:3496 failed_walls[i] = 034973498 3499 3500elif walls == 2:3501 uplift_mean_capacity = 40003502 uplift_COV = 0.23503 uplift_std = uplift_COV*uplift_mean_capacity3504 upper_uplift_limit = uplift_mean_capacity + 2*uplift_std3505 lower_uplift_limit = uplift_mean_capacity - 2*uplift_std3506 uplift_capacity = np.random.normal(uplift_mean_capacity, uplift_std, size = (4))35073508 too_high_indices = np.where(uplift_capacity > upper_uplift_limit)3509 while np.any(too_high_indices):3510 uplift_capacity[too_high_indices] = np.random.normal(3511 uplift_mean_capacity, uplift_std, size=len(too_high_indices))3512 too_high_indices = np.where(uplift_capacity > upper_uplift_limit)3513 3514 too_low_indices = np.where(uplift_capacity < lower_uplift_limit)3515 while np.any(too_low_indices):3516 uplift_capacity[too_low_indices] = np.random.normal(3517 uplift_mean_capacity, uplift_std, size=len(too_low_indices))3518 too_low_indices = np.where(uplift_capacity < lower_uplift_limit)3519 3520 front_uplift_capacity = uplift_capacity[0]3521 left_uplift_capacity = uplift_capacity[1]3522 back_uplift_capacity = uplift_capacity[2]3523 right_uplift_capacity = uplift_capacity[3]3524 total_uplift_capacity = [front_uplift_capacity, left_uplift_capacity, back_uplift_capacity, right_uplift_capacity]3525 3526 bending_mean_capacity = 115883527 bending_COV = 0.23528 bending_std = bending_COV*bending_mean_capacity3529 upper_bending_limit = bending_mean_capacity + 2*bending_std3530 lower_bending_limit = bending_mean_capacity - 2*bending_std3531 bending_capacity = np.random.normal(bending_mean_capacity, bending_std, size = (4))35323533 too_high_indices = np.where(bending_capacity > upper_bending_limit)3534 while np.any(too_high_indices):3535 bending_capacity[too_high_indices] = np.random.normal(3536 bending_mean_capacity, bending_std, size=len(too_high_indices))3537 too_high_indices = np.where(bending_capacity > upper_bending_limit)3538 3539 too_low_indices = np.where(bending_capacity < lower_bending_limit)3540 while np.any(too_low_indices):3541 bending_capacity[too_low_indices] = np.random.normal(3542 bending_mean_capacity, bending_std, size=len(too_low_indices))3543 too_low_indices = np.where(bending_capacity < lower_bending_limit)3544 3545 front_bending_capacity = bending_capacity[0]3546 left_bending_capacity = bending_capacity[1]3547 back_bending_capacity = bending_capacity[2]3548 right_bending_capacity = bending_capacity[3]3549 total_bending_capacity = [front_bending_capacity, left_bending_capacity, back_bending_capacity, right_bending_capacity]35503551 u_front = (front_wall_bending/front_bending_capacity)+(front_wall_uplift/front_uplift_capacity)3552 u_left = (left_wall_bending/left_bending_capacity)+(left_wall_uplift/left_uplift_capacity)3553 u_back = (back_wall_bending/back_bending_capacity)+(back_wall_uplift/back_uplift_capacity)3554 u_right = (right_wall_bending/right_bending_capacity)+(right_wall_uplift/right_uplift_capacity)3555 u = [u_front, u_left, u_back, u_right]3556 3557 failed_walls_u = np.full(4, 1)3558 for i in range(len(failed_walls_u)):3559 if u[i] > 1:3560 failed_walls_u[i] = 03561 3562 failed_walls = failed_walls_u3563 3564 failed_walls_sheath = np.full(118, 1)3565 3566 3567 3568## internal pressure recalculation3569initial_failures = [garage_fail, front_door_fail, back_door_fail, failed_frontwindows[0], failed_frontwindows[1],3570 failed_frontwindows[2], failed_leftwindows[0], failed_leftwindows[1], failed_leftwindows[2],3571 failed_leftwindows[3], failed_backwindows[0], failed_backwindows[1], failed_backwindows[2],3572 failed_backwindows[3], failed_rightwindows[0], failed_rightwindows[1], failed_rightwindows[2],3573 failed_rightwindows[3]]3574failed_openings_count = 18 - np.count_nonzero(initial_failures)35753576if failed_openings_count == 0:3577 cp_rand[0,0] = cp_rand[0,0]3578else:3579 if garage_fail == 1:3580 gar = 03581 elif garage_fail == 0:3582 gar = 13583 3584 open_failures = [front_door_fail, back_door_fail, failed_frontwindows[0], failed_frontwindows[1],3585 failed_frontwindows[2], failed_leftwindows[0], failed_leftwindows[1], failed_leftwindows[2],3586 failed_leftwindows[3], failed_backwindows[0], failed_backwindows[1], failed_backwindows[2],3587 failed_backwindows[3], failed_rightwindows[0], failed_rightwindows[1], failed_rightwindows[2],3588 failed_rightwindows[3]]3589 n = 17 - np.count_nonzero(open_failures) 35903591 front_failures = [front_door_fail, failed_frontwindows[0], failed_frontwindows[1],failed_frontwindows[2]] 3592 a1 = 4 - np.count_nonzero(front_failures)3593 left_failures = [failed_leftwindows[1], failed_leftwindows[2], failed_leftwindows[3]]3594 a2 = 3 - np.count_nonzero(left_failures)3595 b2 = 1 - np.count_nonzero(failed_leftwindows[0])3596 back_failures = [back_door_fail, failed_backwindows[1], failed_backwindows[2], failed_backwindows[3]]3597 a3 = 4 - np.count_nonzero(back_failures)3598 b3 = 1 - np.count_nonzero(failed_backwindows[0])3599 right_failures = [failed_rightwindows[1], failed_rightwindows[2], failed_rightwindows[3]]3600 a4 = 3 - np.count_nonzero(right_failures)3601 b4 = 1 - np.count_nonzero(failed_rightwindows[0])3602 3603 if direction == 1:3604 pg = cp_rand[0,4]3605 3606 pi1 = a1*cp_rand[0,4]3607 pi2 = a2*cp_rand[0,6]+b2*cp_rand[0,5]3608 pi3 = a3*cp_rand[0,7]+b3*cp_rand[0,7]3609 pi4 = a4*cp_rand[0,6]+b4*cp_rand[0,5]3610 3611 if direction == 2:3612 pg = cp_rand[0,4]3613 3614 pi1 = a1*cp_rand[0,4]3615 pi2 = a2*cp_rand[0,4]+b2*cp_rand[0,4]3616 pi3 = a3*cp_rand[0,6]+b3*cp_rand[0,5]3617 pi4 = a4*cp_rand[0,6]+b4*cp_rand[0,5]3618 3619 if direction == 3: 3620 pg = cp_rand[0,5]3621 3622 pi1 = a1*cp_rand[0,6]3623 pi2 = a2*cp_rand[0,4]+b2*cp_rand[0,4]3624 pi3 = a3*cp_rand[0,6]+b3*cp_rand[0,5]3625 pi4 = a4*cp_rand[0,7]+b4*cp_rand[0,7]3626 3627 if direction == 4:3628 pg = cp_rand[0,5]3629 3630 pi1 = a1*cp_rand[0,6]3631 pi2 = a2*cp_rand[0,4]+b2*cp_rand[0,4]3632 pi3 = a3*cp_rand[0,4]+b3*cp_rand[0,4]3633 pi4 = a4*cp_rand[0,6]+b4*cp_rand[0,5]3634 3635 if direction == 5:3636 pg = cp_rand[0,7]3637 3638 pi1 = a1*cp_rand[0,7]3639 pi2 = a2*cp_rand[0,6]+b2*cp_rand[0,5]3640 pi3 = a3*cp_rand[0,4]+b3*cp_rand[0,4]3641 pi4 = a4*cp_rand[0,6]+b4*cp_rand[0,5]3642 3643 if direction == 6:3644 pg = cp_rand[0,6]3645 3646 pi1 = a1*cp_rand[0,6]3647 pi2 = a2*cp_rand[0,6]+b2*cp_rand[0,5]3648 pi3 = a3*cp_rand[0,4]+b3*cp_rand[0,4]3649 pi4 = a4*cp_rand[0,4]+b4*cp_rand[0,4]3650 3651 if direction == 7:3652 pg = cp_rand[0,6]3653 3654 pi1 = a1*cp_rand[0,6]3655 pi2 = a2*cp_rand[0,7]+b2*cp_rand[0,7]3656 pi3 = a3*cp_rand[0,7]+b3*cp_rand[0,7]3657 pi4 = a4*cp_rand[0,4]+b4*cp_rand[0,4]3658 3659 if direction == 8:3660 pg = cp_rand[0,4]36613662 pi1 = a1*cp_rand[0,4]3663 pi2 = a2*cp_rand[0,6]+b2*cp_rand[0,5]3664 pi3 = a3*cp_rand[0,6]+b3*cp_rand[0,5]3665 pi4 = a4*cp_rand[0,4]+b4*cp_rand[0,4]36663667 pi = pi1 + pi2 + pi3 + pi43668 3669 pi_old = cp_rand[0,0]3670 cp_rand[0,0] = (4*gar*pg + pi)/(n+4*gar)3671 3672## recalculate loads3673# design pressure calculation for roof sheathing3674p_sheath_zone1 = qh*0.8*(cp_rand[0,1]-cp_rand[0,0])3675p_sheath_zone2 = qh*0.8*(cp_rand[0,2]-cp_rand[0,0])3676p_sheath_zone3 = qh*0.8*(cp_rand[0,3]-cp_rand[0,0])36773678# design pressure calculation for roof cover3679p_cover_zone1 = qh*0.8*(cp_rand[0,1]-0)3680p_cover_zone2 = qh*0.8*(cp_rand[0,2]-0)3681p_cover_zone3 = qh*0.8*(cp_rand[0,3]-0)368236833684# design pressure calculations for walls (MWFRS)3685p_caseA1_MWFRS = qh*0.8*(0.85*cp_rand[0,8]-cp_rand[0,0])3686p_caseA2_MWFRS = qh*0.8*(0.85*cp_rand[0,9]-cp_rand[0,0])3687p_caseA3_MWFRS = qh*0.8*(0.85*cp_rand[0,10]-cp_rand[0,0])3688p_caseA4_MWFRS = qh*0.8*(0.85*cp_rand[0,11]-cp_rand[0,0])3689p_caseA1E_MWFRS = qh*0.8*(0.85*cp_rand[0,12]-cp_rand[0,0])3690p_caseA2E_MWFRS = qh*0.8*(0.85*cp_rand[0,13]-cp_rand[0,0])3691p_caseA3E_MWFRS = qh*0.8*(0.85*cp_rand[0,14]-cp_rand[0,0])3692p_caseA4E_MWFRS = qh*0.8*(0.85*cp_rand[0,15]-cp_rand[0,0])36933694p_caseB1_MWFRS = qh*0.8*(0.85*cp_rand[0,16]-cp_rand[0,0])3695p_caseB2_MWFRS = qh*0.8*(0.85*cp_rand[0,17]-cp_rand[0,0])3696p_caseB3_MWFRS = qh*0.8*(0.85*cp_rand[0,18]-cp_rand[0,0])3697p_caseB4_MWFRS = qh*0.8*(0.85*cp_rand[0,19]-cp_rand[0,0])3698p_caseB5_MWFRS = qh*0.8*(0.85*cp_rand[0,20]-cp_rand[0,0])3699p_caseB6_MWFRS = qh*0.8*(0.85*cp_rand[0,21]-cp_rand[0,0])3700p_caseB1E_MWFRS = qh*0.8*(0.85*cp_rand[0,22]-cp_rand[0,0])3701p_caseB2E_MWFRS = qh*0.8*(0.85*cp_rand[0,23]-cp_rand[0,0])3702p_caseB3E_MWFRS = qh*0.8*(0.85*cp_rand[0,24]-cp_rand[0,0])3703p_caseB4E_MWFRS = qh*0.8*(0.85*cp_rand[0,25]-cp_rand[0,0])3704p_caseB5E_MWFRS = qh*0.8*(0.85*cp_rand[0,26]-cp_rand[0,0])3705p_caseB6E_MWFRS = qh*0.8*(0.85*cp_rand[0,27]-cp_rand[0,0])370637073708# design pressure calculations for walls and openings (C&C)3709p_windward_CC = qh*0.8*(cp_rand[0,4]-cp_rand[0,0])3710p_sideleading_CC = qh*0.8*(cp_rand[0,5]-cp_rand[0,0])3711p_side_CC = qh*0.8*(cp_rand[0,6]-cp_rand[0,0])3712p_leeward_CC = qh*0.8*(cp_rand[0,7]-cp_rand[0,0])37133714# application of loads to components based on wind direction3715if direction == 1:3716 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3717 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3718 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3719 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3720 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3721 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3722 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,3723 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3724 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,3725 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3726 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,3727 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3]3728 3729 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3730 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3731 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3732 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3733 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3734 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3735 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,3736 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3737 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,3738 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3739 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,3740 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3]3741 3742 front_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC]3743 front_door_load = p_windward_CC3744 garage_door_load = p_windward_CC3745 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3746 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3747 back_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]3748 back_door_load = p_leeward_CC37493750 3751elif direction == 2:3752 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3753 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3754 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3755 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3756 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1,3757 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3758 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3759 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3760 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3761 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3762 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3763 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2]3764 3765 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3766 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3767 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3768 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3769 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3770 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3771 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3772 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3773 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3774 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3775 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3776 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2]37773778 front_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC]3779 front_door_load = p_windward_CC3780 garage_door_load = p_windward_CC3781 leftside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3782 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3783 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3784 back_door_load = p_side_CC37853786 3787elif direction == 3:3788 cover_loads = [p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3789 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3790 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3791 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3792 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3793 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3794 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3795 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3796 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3797 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3798 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3799 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]3800 3801 sheath_loads = [p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3802 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3803 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3804 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3805 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3806 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3807 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3808 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3809 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3810 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3811 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3812 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]3813 3814 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]3815 front_door_load = p_side_CC3816 garage_door_load = p_side_CC3817 leftside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3818 rightside_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]3819 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3820 back_door_load = p_side_CC38213822 3823elif direction == 4:3824 cover_loads = [p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3825 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3826 p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3827 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3828 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3829 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3830 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1,3831 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3832 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3833 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3834 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3835 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]3836 3837 sheath_loads = [p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3838 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3839 p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3840 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3841 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3842 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3843 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3844 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3845 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3846 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3847 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3848 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]38493850 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]3851 front_door_load = p_side_CC3852 garage_door_load = p_side_CC3853 leftside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3854 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3855 back_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3856 back_door_load = p_windward_CC385738583859elif direction == 5:3860 cover_loads = [p_cover_zone3, p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,3861 p_cover_zone3, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3862 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,3863 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3864 p_cover_zone2, p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,3865 p_cover_zone2, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3866 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3867 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3868 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3869 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3870 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3871 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]3872 3873 sheath_loads = [p_sheath_zone3, p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,3874 p_sheath_zone3, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3875 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,3876 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3877 p_sheath_zone2, p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,3878 p_sheath_zone2, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3879 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3880 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3881 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3882 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3883 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3884 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]3885 3886 front_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC]3887 front_door_load = p_leeward_CC3888 garage_door_load = p_leeward_CC3889 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3890 rightside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3891 back_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3892 back_door_load = p_windward_CC38933894 3895elif direction == 6:3896 cover_loads = [p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3897 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3898 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3899 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3900 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3901 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3902 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3903 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3904 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3905 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3906 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3907 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1]3908 3909 sheath_loads = [p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3910 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3911 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3912 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3913 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3914 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3915 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3916 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3917 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3918 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3919 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3920 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1]3921 3922 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]3923 front_door_load = p_side_CC3924 garage_door_load = p_side_CC3925 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3926 rightside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3927 back_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3928 back_door_load = p_windward_CC3929 3930 3931elif direction == 7:3932 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,3933 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3934 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,3935 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3936 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,3937 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3938 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,3939 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3940 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2,3941 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3942 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3,3943 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3]3944 3945 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,3946 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3947 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,3948 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3949 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,3950 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3951 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,3952 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3953 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2,3954 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3955 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3,3956 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3]3957 3958 front_window_loads = [p_side_CC, p_side_CC, p_side_CC]3959 front_door_load = p_side_CC3960 garage_door_load = p_side_CC3961 leftside_window_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]3962 rightside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3963 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3964 back_door_load = p_side_CC39653966 3967elif direction == 8:3968 cover_loads = [p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3969 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3970 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3971 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1,3972 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3973 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2,3974 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3975 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3976 p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone1, p_cover_zone2, p_cover_zone2,3977 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3978 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3,3979 p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone2, p_cover_zone3, p_cover_zone3]3980 3981 sheath_loads = [p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3982 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3983 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3984 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1,3985 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3986 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2,3987 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3988 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3989 p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone1, p_sheath_zone2, p_sheath_zone2,3990 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3991 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3,3992 p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone2, p_sheath_zone3, p_sheath_zone3]39933994 front_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC]3995 front_door_load = p_windward_CC3996 garage_door_load = p_windward_CC3997 leftside_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]3998 rightside_window_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]3999 back_window_loads = [p_sideleading_CC, p_side_CC, p_side_CC, p_side_CC]4000 back_door_load = p_side_CC400140024003sheath_loads = np.array(sheath_loads)*-14004for i in range(len(failed_sheath)):4005 if sheath_loads[i] > sheath_capacity[i]:4006 failed_sheath[i] = 040074008cover_loads = np.array(cover_loads)*-14009for i in range(len(failed_cover)):4010 if cover_loads[i] > cover_capacity[i]:4011 failed_cover[i] = 04012 elif failed_sheath[i] == 0:4013 failed_cover[i] = 04014 4015 4016front_door_load = abs(front_door_load)4017back_door_load = abs(back_door_load)4018if front_door_load > door_capacity[0]:4019 front_door_fail = 04020elif front_door_load < door_capacity[0]:4021 front_door_fail = 140224023if back_door_load > door_capacity[1]:4024 back_door_fail = 04025elif back_door_load < door_capacity[1]:4026 back_door_fail = 140274028garage_door_load = abs(garage_door_load)4029if garage_door_load > garage_capacity:4030 garage_fail = 04031elif garage_door_load < garage_capacity:4032 garage_fail = 1403340344035leftsidewindow_loads = np.abs(leftside_window_loads)4036rightsidewindow_loads = np.abs(rightside_window_loads)4037for i in range(len(failed_leftwindows)):4038 if leftsidewindow_loads[i] > leftsidewindow_capacity[i]:4039 failed_leftwindows[i] = 04040for i in range(len(failed_rightwindows)):4041 if rightsidewindow_loads[i] > rightsidewindow_capacity[i]:4042 failed_rightwindows[i] = 0 4043right_rand = np.random.rand(4)4044left_rand = np.random.rand(4)4045for i in range(len(failed_leftwindows)):4046 if left_rand[i] < prob_left:4047 failed_leftwindows[i] = 04048for i in range(len(failed_rightwindows)):4049 if right_rand[i] < prob_right:4050 failed_rightwindows[i] = 040514052front_mediumwindow_loads = np.abs(front_window_loads)4053back_mediumwindow_loads = np.abs(back_window_loads)4054for i in range(len(failed_frontwindows)):4055 if front_mediumwindow_loads[i] > front_mediumwindow_capacity[i]:4056 failed_frontwindows[i] = 04057for i in range(len(failed_backwindows)):4058 if back_mediumwindow_loads[i] > back_mediumwindow_capacity[i]:4059 failed_backwindows[i] = 04060front_rand = np.random.rand(3)4061back_rand = np.random.rand(4)4062for i in range(len(failed_frontwindows)):4063 if front_rand[i] < prob_front:4064 failed_frontwindows[i] = 04065for i in range(len(failed_backwindows)):4066 if back_rand[i] < prob_back:4067 failed_backwindows[i] = 0406840694070for i in range(len(sheath_loads)):4071 if sheath_loads[i]>sheath_capacity[i]:4072 sheath_loads[i] = 04073 if sheath_loads[i] != 0:4074 sheath_loads[i] = sheath_loads[i]-104075 4076left_end_truss = (sheath_loads[0]*4+sheath_loads[8]*4+sheath_loads[16]*4+sheath_loads[24]*4+sheath_loads[32]*4+sheath_loads[40]*4+sheath_loads[48]*4+sheath_loads[56]*4+sheath_loads[64]*4+sheath_loads[72]*4+sheath_loads[80]*4+sheath_loads[88]*4)/84077right_end_truss = (sheath_loads[7]*4+sheath_loads[15]*4+sheath_loads[23]*4+sheath_loads[31]*4+sheath_loads[39]*4+sheath_loads[47]*4+sheath_loads[55]*4+sheath_loads[63]*4+sheath_loads[71]*4+sheath_loads[79]*4+sheath_loads[87]*4+sheath_loads[95]*4)/84078bottom_1 = ((sheath_loads[0]+sheath_loads[0])*(math.cos(math.radians(22.62))*2)*4+4079 (sheath_loads[8]+sheath_loads[8])*(math.cos(math.radians(22.62))*6)*4+4080 (sheath_loads[16]+sheath_loads[16])*(math.cos(math.radians(22.62))*10)*4+4081 (sheath_loads[24]+sheath_loads[24])*(math.cos(math.radians(22.62))*14)*4+4082 (sheath_loads[32]+sheath_loads[32])*(math.cos(math.radians(22.62))*18)*4+4083 (sheath_loads[40]+sheath_loads[40])*(math.cos(math.radians(22.62))*22)*4+4084 (sheath_loads[48]+sheath_loads[48])*(math.cos(math.radians(22.62))*26)*4+4085 (sheath_loads[56]+sheath_loads[56])*(math.cos(math.radians(22.62))*30)*4+4086 (sheath_loads[64]+sheath_loads[64])*(math.cos(math.radians(22.62))*34)*4+4087 (sheath_loads[72]+sheath_loads[72])*(math.cos(math.radians(22.62))*38)*4+4088 (sheath_loads[80]+sheath_loads[80])*(math.cos(math.radians(22.62))*42)*4+4089 (sheath_loads[88]+sheath_loads[88])*(math.cos(math.radians(22.62))*46)*4)/444090top_1 = ((sheath_loads[0]+sheath_loads[0])*4+4091 (sheath_loads[8]+sheath_loads[8])*4+4092 (sheath_loads[16]+sheath_loads[16])*4+4093 (sheath_loads[24]+sheath_loads[24])*4+4094 (sheath_loads[32]+sheath_loads[32])*4+4095 (sheath_loads[40]+sheath_loads[40])*4+4096 (sheath_loads[48]+sheath_loads[48])*4+4097 (sheath_loads[56]+sheath_loads[56])*4+4098 (sheath_loads[64]+sheath_loads[64])*4+4099 (sheath_loads[72]+sheath_loads[72])*4+4100 (sheath_loads[80]+sheath_loads[80])*4+4101 (sheath_loads[88]+sheath_loads[88])*4)-bottom_141024103bottom_2 = ((sheath_loads[0]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+4104 (sheath_loads[8]+sheath_loads[8])*(math.cos(math.radians(22.62))*6)*4+4105 (sheath_loads[16]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+4106 (sheath_loads[24]+sheath_loads[24])*(math.cos(math.radians(22.62))*14)*4+4107 (sheath_loads[32]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+4108 (sheath_loads[40]+sheath_loads[40])*(math.cos(math.radians(22.62))*22)*4+4109 (sheath_loads[48]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+4110 (sheath_loads[56]+sheath_loads[56])*(math.cos(math.radians(22.62))*30)*4+4111 (sheath_loads[64]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+4112 (sheath_loads[72]+sheath_loads[72])*(math.cos(math.radians(22.62))*38)*4+4113 (sheath_loads[80]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+4114 (sheath_loads[88]+sheath_loads[88])*(math.cos(math.radians(22.62))*46)*4)/444115top_2 = ((sheath_loads[0]+sheath_loads[1])*4+4116 (sheath_loads[8]+sheath_loads[8])*4+4117 (sheath_loads[16]+sheath_loads[17])*4+4118 (sheath_loads[24]+sheath_loads[24])*4+4119 (sheath_loads[32]+sheath_loads[33])*4+4120 (sheath_loads[40]+sheath_loads[40])*4+4121 (sheath_loads[48]+sheath_loads[49])*4+4122 (sheath_loads[56]+sheath_loads[56])*4+4123 (sheath_loads[64]+sheath_loads[65])*4+4124 (sheath_loads[72]+sheath_loads[72])*4+4125 (sheath_loads[80]+sheath_loads[81])*4+4126 (sheath_loads[88]+sheath_loads[88])*4)-bottom_2 41274128bottom_3 = ((sheath_loads[1]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+4129 (sheath_loads[8]+sheath_loads[8])*(math.cos(math.radians(22.62))*6)*4+4130 (sheath_loads[17]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+4131 (sheath_loads[24]+sheath_loads[24])*(math.cos(math.radians(22.62))*14)*4+4132 (sheath_loads[33]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+4133 (sheath_loads[40]+sheath_loads[40])*(math.cos(math.radians(22.62))*22)*4+4134 (sheath_loads[49]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+4135 (sheath_loads[56]+sheath_loads[56])*(math.cos(math.radians(22.62))*30)*4+4136 (sheath_loads[65]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+4137 (sheath_loads[72]+sheath_loads[72])*(math.cos(math.radians(22.62))*38)*4+4138 (sheath_loads[81]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+4139 (sheath_loads[88]+sheath_loads[88])*(math.cos(math.radians(22.62))*46)*4)/444140top_3 = ((sheath_loads[1]+sheath_loads[1])*4+4141 (sheath_loads[8]+sheath_loads[8])*4+4142 (sheath_loads[17]+sheath_loads[17])*4+4143 (sheath_loads[24]+sheath_loads[24])*4+4144 (sheath_loads[33]+sheath_loads[33])*4+4145 (sheath_loads[40]+sheath_loads[40])*4+4146 (sheath_loads[49]+sheath_loads[49])*4+4147 (sheath_loads[56]+sheath_loads[56])*4+4148 (sheath_loads[65]+sheath_loads[65])*4+4149 (sheath_loads[72]+sheath_loads[72])*4+4150 (sheath_loads[81]+sheath_loads[81])*4+4151 (sheath_loads[88]+sheath_loads[88])*4)-bottom_3 41524153bottom_4 = ((sheath_loads[1]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+4154 (sheath_loads[8]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+4155 (sheath_loads[17]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+4156 (sheath_loads[24]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+4157 (sheath_loads[33]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+4158 (sheath_loads[40]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+4159 (sheath_loads[49]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+4160 (sheath_loads[56]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+4161 (sheath_loads[65]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+4162 (sheath_loads[72]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+4163 (sheath_loads[81]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+4164 (sheath_loads[88]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/444165top_4 = ((sheath_loads[1]+sheath_loads[1])*4+4166 (sheath_loads[8]+sheath_loads[9])*4+4167 (sheath_loads[17]+sheath_loads[17])*4+4168 (sheath_loads[24]+sheath_loads[25])*4+4169 (sheath_loads[33]+sheath_loads[33])*4+4170 (sheath_loads[40]+sheath_loads[41])*4+4171 (sheath_loads[49]+sheath_loads[49])*4+4172 (sheath_loads[56]+sheath_loads[57])*4+4173 (sheath_loads[65]+sheath_loads[65])*4+4174 (sheath_loads[72]+sheath_loads[73])*4+4175 (sheath_loads[81]+sheath_loads[81])*4+4176 (sheath_loads[88]+sheath_loads[89])*4)-bottom_4 41774178bottom_5 = ((sheath_loads[1]+sheath_loads[1])*(math.cos(math.radians(22.62))*2)*4+4179 (sheath_loads[9]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+4180 (sheath_loads[17]+sheath_loads[17])*(math.cos(math.radians(22.62))*10)*4+4181 (sheath_loads[25]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+4182 (sheath_loads[33]+sheath_loads[33])*(math.cos(math.radians(22.62))*18)*4+4183 (sheath_loads[41]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+4184 (sheath_loads[49]+sheath_loads[49])*(math.cos(math.radians(22.62))*26)*4+4185 (sheath_loads[57]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+4186 (sheath_loads[65]+sheath_loads[65])*(math.cos(math.radians(22.62))*34)*4+4187 (sheath_loads[73]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+4188 (sheath_loads[81]+sheath_loads[81])*(math.cos(math.radians(22.62))*42)*4+4189 (sheath_loads[89]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/444190top_5 = ((sheath_loads[1]+sheath_loads[1])*4+4191 (sheath_loads[9]+sheath_loads[9])*4+4192 (sheath_loads[17]+sheath_loads[17])*4+4193 (sheath_loads[25]+sheath_loads[25])*4+4194 (sheath_loads[33]+sheath_loads[33])*4+4195 (sheath_loads[41]+sheath_loads[41])*4+4196 (sheath_loads[49]+sheath_loads[49])*4+4197 (sheath_loads[57]+sheath_loads[57])*4+4198 (sheath_loads[65]+sheath_loads[65])*4+4199 (sheath_loads[73]+sheath_loads[73])*4+4200 (sheath_loads[81]+sheath_loads[81])*4+4201 (sheath_loads[89]+sheath_loads[89])*4)-bottom_5 42024203bottom_6 = ((sheath_loads[1]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+4204 (sheath_loads[9]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+4205 (sheath_loads[17]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+4206 (sheath_loads[25]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+4207 (sheath_loads[33]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+4208 (sheath_loads[41]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+4209 (sheath_loads[49]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+4210 (sheath_loads[57]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+4211 (sheath_loads[65]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+4212 (sheath_loads[73]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+4213 (sheath_loads[81]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+4214 (sheath_loads[89]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/444215top_6 = ((sheath_loads[1]+sheath_loads[2])*4+4216 (sheath_loads[9]+sheath_loads[9])*4+4217 (sheath_loads[17]+sheath_loads[18])*4+4218 (sheath_loads[25]+sheath_loads[25])*4+4219 (sheath_loads[33]+sheath_loads[34])*4+4220 (sheath_loads[41]+sheath_loads[41])*4+4221 (sheath_loads[49]+sheath_loads[50])*4+4222 (sheath_loads[57]+sheath_loads[57])*4+4223 (sheath_loads[65]+sheath_loads[66])*4+4224 (sheath_loads[73]+sheath_loads[73])*4+4225 (sheath_loads[81]+sheath_loads[82])*4+4226 (sheath_loads[89]+sheath_loads[89])*4)-bottom_6 42274228bottom_7 = ((sheath_loads[2]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+4229 (sheath_loads[9]+sheath_loads[9])*(math.cos(math.radians(22.62))*6)*4+4230 (sheath_loads[18]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+4231 (sheath_loads[25]+sheath_loads[25])*(math.cos(math.radians(22.62))*14)*4+4232 (sheath_loads[34]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+4233 (sheath_loads[41]+sheath_loads[41])*(math.cos(math.radians(22.62))*22)*4+4234 (sheath_loads[50]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+4235 (sheath_loads[57]+sheath_loads[57])*(math.cos(math.radians(22.62))*30)*4+4236 (sheath_loads[66]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+4237 (sheath_loads[73]+sheath_loads[73])*(math.cos(math.radians(22.62))*38)*4+4238 (sheath_loads[82]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+4239 (sheath_loads[89]+sheath_loads[89])*(math.cos(math.radians(22.62))*46)*4)/444240top_7 = ((sheath_loads[2]+sheath_loads[2])*4+4241 (sheath_loads[9]+sheath_loads[9])*4+4242 (sheath_loads[18]+sheath_loads[18])*4+4243 (sheath_loads[25]+sheath_loads[25])*4+4244 (sheath_loads[35]+sheath_loads[34])*4+4245 (sheath_loads[41]+sheath_loads[41])*4+4246 (sheath_loads[50]+sheath_loads[50])*4+4247 (sheath_loads[57]+sheath_loads[57])*4+4248 (sheath_loads[66]+sheath_loads[66])*4+4249 (sheath_loads[73]+sheath_loads[73])*4+4250 (sheath_loads[82]+sheath_loads[82])*4+4251 (sheath_loads[89]+sheath_loads[89])*4)-bottom_7 42524253bottom_8 = ((sheath_loads[2]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+4254 (sheath_loads[9]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+4255 (sheath_loads[18]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+4256 (sheath_loads[25]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+4257 (sheath_loads[34]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+4258 (sheath_loads[41]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+4259 (sheath_loads[50]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+4260 (sheath_loads[57]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+4261 (sheath_loads[66]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+4262 (sheath_loads[73]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+4263 (sheath_loads[82]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+4264 (sheath_loads[89]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/444265top_8 = ((sheath_loads[2]+sheath_loads[2])*4+4266 (sheath_loads[9]+sheath_loads[10])*4+4267 (sheath_loads[18]+sheath_loads[18])*4+4268 (sheath_loads[25]+sheath_loads[26])*4+4269 (sheath_loads[35]+sheath_loads[34])*4+4270 (sheath_loads[41]+sheath_loads[42])*4+4271 (sheath_loads[50]+sheath_loads[50])*4+4272 (sheath_loads[57]+sheath_loads[58])*4+4273 (sheath_loads[66]+sheath_loads[66])*4+4274 (sheath_loads[73]+sheath_loads[74])*4+4275 (sheath_loads[82]+sheath_loads[82])*4+4276 (sheath_loads[89]+sheath_loads[90])*4)-bottom_8 42774278bottom_9 = ((sheath_loads[2]+sheath_loads[2])*(math.cos(math.radians(22.62))*2)*4+4279 (sheath_loads[10]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+4280 (sheath_loads[18]+sheath_loads[18])*(math.cos(math.radians(22.62))*10)*4+4281 (sheath_loads[26]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+4282 (sheath_loads[34]+sheath_loads[34])*(math.cos(math.radians(22.62))*18)*4+4283 (sheath_loads[42]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+4284 (sheath_loads[50]+sheath_loads[50])*(math.cos(math.radians(22.62))*26)*4+4285 (sheath_loads[58]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+4286 (sheath_loads[66]+sheath_loads[66])*(math.cos(math.radians(22.62))*34)*4+4287 (sheath_loads[74]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+4288 (sheath_loads[82]+sheath_loads[82])*(math.cos(math.radians(22.62))*42)*4+4289 (sheath_loads[90]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/444290top_9 = ((sheath_loads[2]+sheath_loads[2])*4+4291 (sheath_loads[10]+sheath_loads[10])*4+4292 (sheath_loads[18]+sheath_loads[18])*4+4293 (sheath_loads[26]+sheath_loads[26])*4+4294 (sheath_loads[35]+sheath_loads[34])*4+4295 (sheath_loads[42]+sheath_loads[42])*4+4296 (sheath_loads[50]+sheath_loads[50])*4+4297 (sheath_loads[58]+sheath_loads[58])*4+4298 (sheath_loads[66]+sheath_loads[66])*4+4299 (sheath_loads[74]+sheath_loads[74])*4+4300 (sheath_loads[82]+sheath_loads[82])*4+4301 (sheath_loads[90]+sheath_loads[90])*4)-bottom_9 43024303bottom_10 = ((sheath_loads[2]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+4304 (sheath_loads[10]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+4305 (sheath_loads[18]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+4306 (sheath_loads[26]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+4307 (sheath_loads[34]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+4308 (sheath_loads[42]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+4309 (sheath_loads[50]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+4310 (sheath_loads[58]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+4311 (sheath_loads[66]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+4312 (sheath_loads[74]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+4313 (sheath_loads[82]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+4314 (sheath_loads[90]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/444315top_10 = ((sheath_loads[2]+sheath_loads[3])*4+4316 (sheath_loads[10]+sheath_loads[10])*4+4317 (sheath_loads[18]+sheath_loads[19])*4+4318 (sheath_loads[26]+sheath_loads[26])*4+4319 (sheath_loads[34]+sheath_loads[35])*4+4320 (sheath_loads[42]+sheath_loads[42])*4+4321 (sheath_loads[50]+sheath_loads[51])*4+4322 (sheath_loads[58]+sheath_loads[58])*4+4323 (sheath_loads[66]+sheath_loads[67])*4+4324 (sheath_loads[74]+sheath_loads[74])*4+4325 (sheath_loads[82]+sheath_loads[83])*4+4326 (sheath_loads[90]+sheath_loads[90])*4)-bottom_10 43274328bottom_11 = ((sheath_loads[3]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+4329 (sheath_loads[10]+sheath_loads[10])*(math.cos(math.radians(22.62))*6)*4+4330 (sheath_loads[19]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+4331 (sheath_loads[26]+sheath_loads[26])*(math.cos(math.radians(22.62))*14)*4+4332 (sheath_loads[35]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+4333 (sheath_loads[42]+sheath_loads[42])*(math.cos(math.radians(22.62))*22)*4+4334 (sheath_loads[51]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+4335 (sheath_loads[58]+sheath_loads[58])*(math.cos(math.radians(22.62))*30)*4+4336 (sheath_loads[67]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+4337 (sheath_loads[74]+sheath_loads[74])*(math.cos(math.radians(22.62))*38)*4+4338 (sheath_loads[83]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+4339 (sheath_loads[90]+sheath_loads[90])*(math.cos(math.radians(22.62))*46)*4)/444340top_11 = ((sheath_loads[3]+sheath_loads[3])*4+4341 (sheath_loads[10]+sheath_loads[10])*4+4342 (sheath_loads[19]+sheath_loads[19])*4+4343 (sheath_loads[26]+sheath_loads[26])*4+4344 (sheath_loads[35]+sheath_loads[35])*4+4345 (sheath_loads[42]+sheath_loads[42])*4+4346 (sheath_loads[51]+sheath_loads[51])*4+4347 (sheath_loads[58]+sheath_loads[58])*4+4348 (sheath_loads[67]+sheath_loads[67])*4+4349 (sheath_loads[74]+sheath_loads[74])*4+4350 (sheath_loads[83]+sheath_loads[83])*4+4351 (sheath_loads[90]+sheath_loads[90])*4)-bottom_11 43524353bottom_12 = ((sheath_loads[3]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+4354 (sheath_loads[10]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+4355 (sheath_loads[19]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+4356 (sheath_loads[26]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+4357 (sheath_loads[35]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+4358 (sheath_loads[42]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+4359 (sheath_loads[51]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+4360 (sheath_loads[58]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+4361 (sheath_loads[67]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+4362 (sheath_loads[74]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+4363 (sheath_loads[83]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+4364 (sheath_loads[90]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/444365top_12 = ((sheath_loads[3]+sheath_loads[3])*4+4366 (sheath_loads[10]+sheath_loads[11])*4+4367 (sheath_loads[19]+sheath_loads[19])*4+4368 (sheath_loads[26]+sheath_loads[27])*4+4369 (sheath_loads[35]+sheath_loads[35])*4+4370 (sheath_loads[42]+sheath_loads[43])*4+4371 (sheath_loads[51]+sheath_loads[51])*4+4372 (sheath_loads[58]+sheath_loads[59])*4+4373 (sheath_loads[67]+sheath_loads[67])*4+4374 (sheath_loads[74]+sheath_loads[75])*4+4375 (sheath_loads[83]+sheath_loads[83])*4+4376 (sheath_loads[90]+sheath_loads[91])*4)-bottom_12 43774378bottom_13 = ((sheath_loads[3]+sheath_loads[3])*(math.cos(math.radians(22.62))*2)*4+4379 (sheath_loads[11]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+4380 (sheath_loads[19]+sheath_loads[19])*(math.cos(math.radians(22.62))*10)*4+4381 (sheath_loads[27]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+4382 (sheath_loads[35]+sheath_loads[35])*(math.cos(math.radians(22.62))*18)*4+4383 (sheath_loads[43]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+4384 (sheath_loads[51]+sheath_loads[51])*(math.cos(math.radians(22.62))*26)*4+4385 (sheath_loads[59]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+4386 (sheath_loads[67]+sheath_loads[67])*(math.cos(math.radians(22.62))*34)*4+4387 (sheath_loads[75]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+4388 (sheath_loads[83]+sheath_loads[83])*(math.cos(math.radians(22.62))*42)*4+4389 (sheath_loads[91]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/444390top_13 = ((sheath_loads[3]+sheath_loads[3])*4+4391 (sheath_loads[11]+sheath_loads[11])*4+4392 (sheath_loads[19]+sheath_loads[19])*4+4393 (sheath_loads[27]+sheath_loads[27])*4+4394 (sheath_loads[35]+sheath_loads[35])*4+4395 (sheath_loads[43]+sheath_loads[43])*4+4396 (sheath_loads[51]+sheath_loads[51])*4+4397 (sheath_loads[59]+sheath_loads[59])*4+4398 (sheath_loads[67]+sheath_loads[67])*4+4399 (sheath_loads[75]+sheath_loads[75])*4+4400 (sheath_loads[83]+sheath_loads[83])*4+4401 (sheath_loads[91]+sheath_loads[91])*4)-bottom_13 44024403bottom_14 = ((sheath_loads[3]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+4404 (sheath_loads[11]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+4405 (sheath_loads[19]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+4406 (sheath_loads[27]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+4407 (sheath_loads[35]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+4408 (sheath_loads[43]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+4409 (sheath_loads[51]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+4410 (sheath_loads[59]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+4411 (sheath_loads[67]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+4412 (sheath_loads[75]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+4413 (sheath_loads[83]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+4414 (sheath_loads[91]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/444415top_14 = ((sheath_loads[3]+sheath_loads[4])*4+4416 (sheath_loads[11]+sheath_loads[11])*4+4417 (sheath_loads[19]+sheath_loads[20])*4+4418 (sheath_loads[27]+sheath_loads[27])*4+4419 (sheath_loads[35]+sheath_loads[36])*4+4420 (sheath_loads[43]+sheath_loads[43])*4+4421 (sheath_loads[51]+sheath_loads[52])*4+4422 (sheath_loads[59]+sheath_loads[59])*4+4423 (sheath_loads[67]+sheath_loads[68])*4+4424 (sheath_loads[75]+sheath_loads[75])*4+4425 (sheath_loads[83]+sheath_loads[84])*4+4426 (sheath_loads[91]+sheath_loads[91])*4)-bottom_14 44274428bottom_15 = ((sheath_loads[4]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+4429 (sheath_loads[11]+sheath_loads[11])*(math.cos(math.radians(22.62))*6)*4+4430 (sheath_loads[20]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+4431 (sheath_loads[27]+sheath_loads[27])*(math.cos(math.radians(22.62))*14)*4+4432 (sheath_loads[36]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+4433 (sheath_loads[43]+sheath_loads[43])*(math.cos(math.radians(22.62))*22)*4+4434 (sheath_loads[52]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+4435 (sheath_loads[59]+sheath_loads[59])*(math.cos(math.radians(22.62))*30)*4+4436 (sheath_loads[68]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+4437 (sheath_loads[75]+sheath_loads[75])*(math.cos(math.radians(22.62))*38)*4+4438 (sheath_loads[84]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+4439 (sheath_loads[91]+sheath_loads[91])*(math.cos(math.radians(22.62))*46)*4)/444440top_15 = ((sheath_loads[4]+sheath_loads[4])*4+4441 (sheath_loads[11]+sheath_loads[11])*4+4442 (sheath_loads[20]+sheath_loads[20])*4+4443 (sheath_loads[27]+sheath_loads[27])*4+4444 (sheath_loads[36]+sheath_loads[36])*4+4445 (sheath_loads[43]+sheath_loads[43])*4+4446 (sheath_loads[52]+sheath_loads[52])*4+4447 (sheath_loads[59]+sheath_loads[59])*4+4448 (sheath_loads[68]+sheath_loads[68])*4+4449 (sheath_loads[75]+sheath_loads[75])*4+4450 (sheath_loads[84]+sheath_loads[84])*4+4451 (sheath_loads[91]+sheath_loads[91])*4)-bottom_15 44524453bottom_16 = ((sheath_loads[4]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+4454 (sheath_loads[11]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+4455 (sheath_loads[20]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+4456 (sheath_loads[27]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+4457 (sheath_loads[36]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+4458 (sheath_loads[43]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+4459 (sheath_loads[52]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+4460 (sheath_loads[59]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+4461 (sheath_loads[68]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+4462 (sheath_loads[75]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+4463 (sheath_loads[84]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+4464 (sheath_loads[91]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/444465top_16 = ((sheath_loads[4]+sheath_loads[4])*4+4466 (sheath_loads[11]+sheath_loads[12])*4+4467 (sheath_loads[20]+sheath_loads[20])*4+4468 (sheath_loads[27]+sheath_loads[28])*4+4469 (sheath_loads[36]+sheath_loads[36])*4+4470 (sheath_loads[43]+sheath_loads[44])*4+4471 (sheath_loads[52]+sheath_loads[52])*4+4472 (sheath_loads[59]+sheath_loads[60])*4+4473 (sheath_loads[68]+sheath_loads[68])*4+4474 (sheath_loads[75]+sheath_loads[76])*4+4475 (sheath_loads[84]+sheath_loads[84])*4+4476 (sheath_loads[91]+sheath_loads[92])*4)-bottom_16 44774478bottom_17 = ((sheath_loads[4]+sheath_loads[4])*(math.cos(math.radians(22.62))*2)*4+4479 (sheath_loads[12]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+4480 (sheath_loads[20]+sheath_loads[20])*(math.cos(math.radians(22.62))*10)*4+4481 (sheath_loads[28]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+4482 (sheath_loads[36]+sheath_loads[36])*(math.cos(math.radians(22.62))*18)*4+4483 (sheath_loads[44]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+4484 (sheath_loads[52]+sheath_loads[52])*(math.cos(math.radians(22.62))*26)*4+4485 (sheath_loads[60]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+4486 (sheath_loads[68]+sheath_loads[68])*(math.cos(math.radians(22.62))*34)*4+4487 (sheath_loads[76]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+4488 (sheath_loads[84]+sheath_loads[84])*(math.cos(math.radians(22.62))*42)*4+4489 (sheath_loads[92]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/444490top_17 = ((sheath_loads[4]+sheath_loads[4])*4+4491 (sheath_loads[12]+sheath_loads[12])*4+4492 (sheath_loads[20]+sheath_loads[20])*4+4493 (sheath_loads[28]+sheath_loads[28])*4+4494 (sheath_loads[36]+sheath_loads[36])*4+4495 (sheath_loads[44]+sheath_loads[44])*4+4496 (sheath_loads[52]+sheath_loads[52])*4+4497 (sheath_loads[60]+sheath_loads[60])*4+4498 (sheath_loads[68]+sheath_loads[68])*4+4499 (sheath_loads[76]+sheath_loads[76])*4+4500 (sheath_loads[84]+sheath_loads[84])*4+4501 (sheath_loads[92]+sheath_loads[92])*4)-bottom_17 45024503bottom_18 = ((sheath_loads[4]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+4504 (sheath_loads[12]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+4505 (sheath_loads[20]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+4506 (sheath_loads[28]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+4507 (sheath_loads[36]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+4508 (sheath_loads[44]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+4509 (sheath_loads[52]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+4510 (sheath_loads[60]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+4511 (sheath_loads[68]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+4512 (sheath_loads[76]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+4513 (sheath_loads[84]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+4514 (sheath_loads[92]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/444515top_18 = ((sheath_loads[4]+sheath_loads[5])*4+4516 (sheath_loads[12]+sheath_loads[12])*4+4517 (sheath_loads[20]+sheath_loads[21])*4+4518 (sheath_loads[28]+sheath_loads[28])*4+4519 (sheath_loads[36]+sheath_loads[37])*4+4520 (sheath_loads[44]+sheath_loads[44])*4+4521 (sheath_loads[52]+sheath_loads[53])*4+4522 (sheath_loads[60]+sheath_loads[60])*4+4523 (sheath_loads[68]+sheath_loads[69])*4+4524 (sheath_loads[76]+sheath_loads[76])*4+4525 (sheath_loads[84]+sheath_loads[85])*4+4526 (sheath_loads[92]+sheath_loads[92])*4)-bottom_18 45274528bottom_19 = ((sheath_loads[5]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+4529 (sheath_loads[12]+sheath_loads[12])*(math.cos(math.radians(22.62))*6)*4+4530 (sheath_loads[21]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+4531 (sheath_loads[28]+sheath_loads[28])*(math.cos(math.radians(22.62))*14)*4+4532 (sheath_loads[37]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+4533 (sheath_loads[44]+sheath_loads[44])*(math.cos(math.radians(22.62))*22)*4+4534 (sheath_loads[53]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+4535 (sheath_loads[60]+sheath_loads[60])*(math.cos(math.radians(22.62))*30)*4+4536 (sheath_loads[69]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+4537 (sheath_loads[76]+sheath_loads[76])*(math.cos(math.radians(22.62))*38)*4+4538 (sheath_loads[85]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+4539 (sheath_loads[92]+sheath_loads[92])*(math.cos(math.radians(22.62))*46)*4)/444540top_19 = ((sheath_loads[5]+sheath_loads[5])*4+4541 (sheath_loads[12]+sheath_loads[12])*4+4542 (sheath_loads[21]+sheath_loads[21])*4+4543 (sheath_loads[28]+sheath_loads[28])*4+4544 (sheath_loads[37]+sheath_loads[37])*4+4545 (sheath_loads[44]+sheath_loads[44])*4+4546 (sheath_loads[53]+sheath_loads[53])*4+4547 (sheath_loads[60]+sheath_loads[60])*4+4548 (sheath_loads[69]+sheath_loads[69])*4+4549 (sheath_loads[76]+sheath_loads[76])*4+4550 (sheath_loads[85]+sheath_loads[85])*4+4551 (sheath_loads[92]+sheath_loads[92])*4)-bottom_19 45524553bottom_20 = ((sheath_loads[5]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+4554 (sheath_loads[12]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+4555 (sheath_loads[21]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+4556 (sheath_loads[28]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+4557 (sheath_loads[37]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+4558 (sheath_loads[44]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+4559 (sheath_loads[53]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+4560 (sheath_loads[60]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+4561 (sheath_loads[69]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+4562 (sheath_loads[76]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+4563 (sheath_loads[85]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+4564 (sheath_loads[92]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/444565top_20 = ((sheath_loads[5]+sheath_loads[5])*4+4566 (sheath_loads[12]+sheath_loads[13])*4+4567 (sheath_loads[21]+sheath_loads[21])*4+4568 (sheath_loads[28]+sheath_loads[29])*4+4569 (sheath_loads[37]+sheath_loads[37])*4+4570 (sheath_loads[44]+sheath_loads[45])*4+4571 (sheath_loads[53]+sheath_loads[53])*4+4572 (sheath_loads[60]+sheath_loads[61])*4+4573 (sheath_loads[69]+sheath_loads[69])*4+4574 (sheath_loads[76]+sheath_loads[77])*4+4575 (sheath_loads[85]+sheath_loads[85])*4+4576 (sheath_loads[92]+sheath_loads[93])*4)-bottom_2045774578bottom_21 = ((sheath_loads[5]+sheath_loads[5])*(math.cos(math.radians(22.62))*2)*4+4579 (sheath_loads[13]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+4580 (sheath_loads[21]+sheath_loads[21])*(math.cos(math.radians(22.62))*10)*4+4581 (sheath_loads[29]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+4582 (sheath_loads[37]+sheath_loads[37])*(math.cos(math.radians(22.62))*18)*4+4583 (sheath_loads[45]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+4584 (sheath_loads[53]+sheath_loads[53])*(math.cos(math.radians(22.62))*26)*4+4585 (sheath_loads[61]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+4586 (sheath_loads[69]+sheath_loads[69])*(math.cos(math.radians(22.62))*34)*4+4587 (sheath_loads[77]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+4588 (sheath_loads[85]+sheath_loads[85])*(math.cos(math.radians(22.62))*42)*4+4589 (sheath_loads[93]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/444590top_21 = ((sheath_loads[5]+sheath_loads[5])*4+4591 (sheath_loads[13]+sheath_loads[13])*4+4592 (sheath_loads[21]+sheath_loads[21])*4+4593 (sheath_loads[29]+sheath_loads[29])*4+4594 (sheath_loads[37]+sheath_loads[37])*4+4595 (sheath_loads[45]+sheath_loads[45])*4+4596 (sheath_loads[53]+sheath_loads[53])*4+4597 (sheath_loads[61]+sheath_loads[61])*4+4598 (sheath_loads[69]+sheath_loads[69])*4+4599 (sheath_loads[77]+sheath_loads[77])*4+4600 (sheath_loads[85]+sheath_loads[85])*4+4601 (sheath_loads[93]+sheath_loads[93])*4)-bottom_2146024603bottom_22 = ((sheath_loads[5]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+4604 (sheath_loads[13]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+4605 (sheath_loads[21]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+4606 (sheath_loads[29]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+4607 (sheath_loads[37]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+4608 (sheath_loads[45]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+4609 (sheath_loads[53]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+4610 (sheath_loads[61]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+4611 (sheath_loads[69]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+4612 (sheath_loads[77]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+4613 (sheath_loads[85]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+4614 (sheath_loads[93]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/444615top_22 = ((sheath_loads[5]+sheath_loads[6])*4+4616 (sheath_loads[13]+sheath_loads[13])*4+4617 (sheath_loads[21]+sheath_loads[22])*4+4618 (sheath_loads[29]+sheath_loads[29])*4+4619 (sheath_loads[37]+sheath_loads[38])*4+4620 (sheath_loads[45]+sheath_loads[45])*4+4621 (sheath_loads[53]+sheath_loads[54])*4+4622 (sheath_loads[61]+sheath_loads[61])*4+4623 (sheath_loads[69]+sheath_loads[70])*4+4624 (sheath_loads[77]+sheath_loads[77])*4+4625 (sheath_loads[85]+sheath_loads[86])*4+4626 (sheath_loads[93]+sheath_loads[93])*4)-bottom_2246274628bottom_23 = ((sheath_loads[6]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+4629 (sheath_loads[13]+sheath_loads[13])*(math.cos(math.radians(22.62))*6)*4+4630 (sheath_loads[22]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+4631 (sheath_loads[29]+sheath_loads[29])*(math.cos(math.radians(22.62))*14)*4+4632 (sheath_loads[38]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+4633 (sheath_loads[45]+sheath_loads[45])*(math.cos(math.radians(22.62))*22)*4+4634 (sheath_loads[54]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+4635 (sheath_loads[61]+sheath_loads[61])*(math.cos(math.radians(22.62))*30)*4+4636 (sheath_loads[70]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+4637 (sheath_loads[77]+sheath_loads[77])*(math.cos(math.radians(22.62))*38)*4+4638 (sheath_loads[86]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+4639 (sheath_loads[93]+sheath_loads[93])*(math.cos(math.radians(22.62))*46)*4)/444640top_23 = ((sheath_loads[6]+sheath_loads[6])*4+4641 (sheath_loads[13]+sheath_loads[13])*4+4642 (sheath_loads[22]+sheath_loads[22])*4+4643 (sheath_loads[29]+sheath_loads[29])*4+4644 (sheath_loads[38]+sheath_loads[38])*4+4645 (sheath_loads[45]+sheath_loads[45])*4+4646 (sheath_loads[54]+sheath_loads[54])*4+4647 (sheath_loads[61]+sheath_loads[61])*4+4648 (sheath_loads[70]+sheath_loads[70])*4+4649 (sheath_loads[77]+sheath_loads[77])*4+4650 (sheath_loads[86]+sheath_loads[86])*4+4651 (sheath_loads[93]+sheath_loads[93])*4)-bottom_2346524653bottom_24 = ((sheath_loads[6]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+4654 (sheath_loads[13]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+4655 (sheath_loads[22]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+4656 (sheath_loads[29]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+4657 (sheath_loads[38]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+4658 (sheath_loads[45]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+4659 (sheath_loads[54]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+4660 (sheath_loads[61]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+4661 (sheath_loads[70]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+4662 (sheath_loads[77]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+4663 (sheath_loads[86]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+4664 (sheath_loads[93]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/444665top_24 = ((sheath_loads[6]+sheath_loads[6])*4+4666 (sheath_loads[13]+sheath_loads[14])*4+4667 (sheath_loads[22]+sheath_loads[22])*4+4668 (sheath_loads[29]+sheath_loads[30])*4+4669 (sheath_loads[38]+sheath_loads[38])*4+4670 (sheath_loads[45]+sheath_loads[46])*4+4671 (sheath_loads[54]+sheath_loads[54])*4+4672 (sheath_loads[61]+sheath_loads[62])*4+4673 (sheath_loads[70]+sheath_loads[70])*4+4674 (sheath_loads[77]+sheath_loads[78])*4+4675 (sheath_loads[86]+sheath_loads[86])*4+4676 (sheath_loads[93]+sheath_loads[94])*4)-bottom_2446774678bottom_25 = ((sheath_loads[6]+sheath_loads[6])*(math.cos(math.radians(22.62))*2)*4+4679 (sheath_loads[14]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+4680 (sheath_loads[22]+sheath_loads[22])*(math.cos(math.radians(22.62))*10)*4+4681 (sheath_loads[30]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+4682 (sheath_loads[38]+sheath_loads[38])*(math.cos(math.radians(22.62))*18)*4+4683 (sheath_loads[46]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+4684 (sheath_loads[54]+sheath_loads[54])*(math.cos(math.radians(22.62))*26)*4+4685 (sheath_loads[62]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+4686 (sheath_loads[70]+sheath_loads[70])*(math.cos(math.radians(22.62))*34)*4+4687 (sheath_loads[78]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+4688 (sheath_loads[86]+sheath_loads[86])*(math.cos(math.radians(22.62))*42)*4+4689 (sheath_loads[94]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/444690top_25 = ((sheath_loads[6]+sheath_loads[6])*4+4691 (sheath_loads[14]+sheath_loads[14])*4+4692 (sheath_loads[22]+sheath_loads[22])*4+4693 (sheath_loads[30]+sheath_loads[30])*4+4694 (sheath_loads[38]+sheath_loads[38])*4+4695 (sheath_loads[46]+sheath_loads[46])*4+4696 (sheath_loads[54]+sheath_loads[54])*4+4697 (sheath_loads[62]+sheath_loads[62])*4+4698 (sheath_loads[70]+sheath_loads[70])*4+4699 (sheath_loads[78]+sheath_loads[78])*4+4700 (sheath_loads[86]+sheath_loads[86])*4+4701 (sheath_loads[94]+sheath_loads[94])*4)-bottom_2547024703bottom_26 = ((sheath_loads[6]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+4704 (sheath_loads[14]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+4705 (sheath_loads[22]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+4706 (sheath_loads[30]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+4707 (sheath_loads[38]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+4708 (sheath_loads[46]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+4709 (sheath_loads[54]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+4710 (sheath_loads[62]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+4711 (sheath_loads[70]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+4712 (sheath_loads[78]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+4713 (sheath_loads[86]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+4714 (sheath_loads[94]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/444715top_26 = ((sheath_loads[6]+sheath_loads[7])*4+4716 (sheath_loads[14]+sheath_loads[14])*4+4717 (sheath_loads[22]+sheath_loads[23])*4+4718 (sheath_loads[30]+sheath_loads[30])*4+4719 (sheath_loads[38]+sheath_loads[39])*4+4720 (sheath_loads[46]+sheath_loads[46])*4+4721 (sheath_loads[54]+sheath_loads[55])*4+4722 (sheath_loads[62]+sheath_loads[62])*4+4723 (sheath_loads[70]+sheath_loads[71])*4+4724 (sheath_loads[78]+sheath_loads[78])*4+4725 (sheath_loads[86]+sheath_loads[87])*4+4726 (sheath_loads[94]+sheath_loads[94])*4)-bottom_2647274728bottom_27 = ((sheath_loads[7]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+4729 (sheath_loads[14]+sheath_loads[14])*(math.cos(math.radians(22.62))*6)*4+4730 (sheath_loads[23]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+4731 (sheath_loads[30]+sheath_loads[30])*(math.cos(math.radians(22.62))*14)*4+4732 (sheath_loads[39]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+4733 (sheath_loads[46]+sheath_loads[46])*(math.cos(math.radians(22.62))*22)*4+4734 (sheath_loads[55]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+4735 (sheath_loads[62]+sheath_loads[62])*(math.cos(math.radians(22.62))*30)*4+4736 (sheath_loads[71]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+4737 (sheath_loads[78]+sheath_loads[78])*(math.cos(math.radians(22.62))*38)*4+4738 (sheath_loads[87]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+4739 (sheath_loads[94]+sheath_loads[94])*(math.cos(math.radians(22.62))*46)*4)/444740top_27 = ((sheath_loads[7]+sheath_loads[7])*4+4741 (sheath_loads[14]+sheath_loads[14])*4+4742 (sheath_loads[23]+sheath_loads[23])*4+4743 (sheath_loads[30]+sheath_loads[30])*4+4744 (sheath_loads[39]+sheath_loads[39])*4+4745 (sheath_loads[46]+sheath_loads[46])*4+4746 (sheath_loads[55]+sheath_loads[55])*4+4747 (sheath_loads[62]+sheath_loads[62])*4+4748 (sheath_loads[71]+sheath_loads[71])*4+4749 (sheath_loads[78]+sheath_loads[78])*4+4750 (sheath_loads[87]+sheath_loads[87])*4+4751 (sheath_loads[94]+sheath_loads[94])*4)-bottom_2747524753bottom_28 = ((sheath_loads[7]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+4754 (sheath_loads[14]+sheath_loads[15])*(math.cos(math.radians(22.62))*6)*4+4755 (sheath_loads[23]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+4756 (sheath_loads[30]+sheath_loads[31])*(math.cos(math.radians(22.62))*14)*4+4757 (sheath_loads[39]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+4758 (sheath_loads[46]+sheath_loads[47])*(math.cos(math.radians(22.62))*22)*4+4759 (sheath_loads[55]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+4760 (sheath_loads[62]+sheath_loads[63])*(math.cos(math.radians(22.62))*30)*4+4761 (sheath_loads[71]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+4762 (sheath_loads[78]+sheath_loads[79])*(math.cos(math.radians(22.62))*38)*4+4763 (sheath_loads[87]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+4764 (sheath_loads[94]+sheath_loads[95])*(math.cos(math.radians(22.62))*46)*4)/444765top_28 = ((sheath_loads[7]+sheath_loads[7])*4+4766 (sheath_loads[14]+sheath_loads[15])*4+4767 (sheath_loads[23]+sheath_loads[23])*4+4768 (sheath_loads[30]+sheath_loads[31])*4+4769 (sheath_loads[39]+sheath_loads[39])*4+4770 (sheath_loads[46]+sheath_loads[47])*4+4771 (sheath_loads[55]+sheath_loads[55])*4+4772 (sheath_loads[62]+sheath_loads[63])*4+4773 (sheath_loads[71]+sheath_loads[71])*4+4774 (sheath_loads[78]+sheath_loads[79])*4+4775 (sheath_loads[87]+sheath_loads[87])*4+4776 (sheath_loads[94]+sheath_loads[95])*4)-bottom_2847774778bottom_29 = ((sheath_loads[7]+sheath_loads[7])*(math.cos(math.radians(22.62))*2)*4+4779 (sheath_loads[15]+sheath_loads[15])*(math.cos(math.radians(22.62))*6)*4+4780 (sheath_loads[23]+sheath_loads[23])*(math.cos(math.radians(22.62))*10)*4+4781 (sheath_loads[32]+sheath_loads[31])*(math.cos(math.radians(22.62))*14)*4+4782 (sheath_loads[39]+sheath_loads[39])*(math.cos(math.radians(22.62))*18)*4+4783 (sheath_loads[47]+sheath_loads[47])*(math.cos(math.radians(22.62))*22)*4+4784 (sheath_loads[55]+sheath_loads[55])*(math.cos(math.radians(22.62))*26)*4+4785 (sheath_loads[63]+sheath_loads[63])*(math.cos(math.radians(22.62))*30)*4+4786 (sheath_loads[71]+sheath_loads[71])*(math.cos(math.radians(22.62))*34)*4+4787 (sheath_loads[79]+sheath_loads[79])*(math.cos(math.radians(22.62))*38)*4+4788 (sheath_loads[87]+sheath_loads[87])*(math.cos(math.radians(22.62))*42)*4+4789 (sheath_loads[95]+sheath_loads[95])*(math.cos(math.radians(22.62))*46)*4)/444790top_29 = ((sheath_loads[7]+sheath_loads[7])*4+4791 (sheath_loads[15]+sheath_loads[15])*4+4792 (sheath_loads[23]+sheath_loads[23])*4+4793 (sheath_loads[31]+sheath_loads[31])*4+4794 (sheath_loads[39]+sheath_loads[39])*4+4795 (sheath_loads[47]+sheath_loads[47])*4+4796 (sheath_loads[55]+sheath_loads[55])*4+4797 (sheath_loads[63]+sheath_loads[63])*4+4798 (sheath_loads[71]+sheath_loads[71])*4+4799 (sheath_loads[79]+sheath_loads[79])*4+4800 (sheath_loads[87]+sheath_loads[87])*4+4801 (sheath_loads[95]+sheath_loads[95])*4)-bottom_2948024803connection_loads = [left_end_truss, top_1, top_2, top_3, top_4, top_5, top_6, top_7, top_8, top_9, top_10, top_11,4804 top_12, top_13, top_14, top_15, top_16, top_17, top_18, top_19, top_20, top_21, top_22, top_23,4805 top_24, top_25, top_26, top_27, top_28, top_29, right_end_truss, right_end_truss, right_end_truss,4806 right_end_truss, right_end_truss, right_end_truss, right_end_truss, right_end_truss, bottom_29,4807 bottom_28, bottom_27, bottom_26, bottom_25, bottom_24, bottom_23, bottom_22, bottom_21, bottom_20,4808 bottom_19, bottom_18, bottom_17, bottom_16, bottom_15, bottom_14, bottom_13, bottom_12, bottom_11,4809 bottom_10, bottom_9, bottom_8, bottom_7, bottom_6, bottom_5, bottom_4, bottom_3, bottom_2, 4810 bottom_1, left_end_truss, left_end_truss, left_end_truss, left_end_truss, left_end_truss,4811 left_end_truss, left_end_truss]48124813failed_connections = np.full(74,1)4814for i in range(len(failed_connections)):4815 if connection_loads[i] > connection_capacities[i]:4816 failed_connections[i] = 04817 connection_loads[i-1] = connection_loads[i-1] + (connection_loads[i]/2)4818 connection_loads[i+1] = connection_loads[i+1] + (connection_loads[i]/2)4819 connection_loads[i] = 04820 4821zz = np.count_nonzero(failed_connections==0)4822if zz != 0:4823 zz_old = zz + 14824 while zz > zz_old:4825 zz_old = zz4826 for i in range(len(failed_connections)):4827 if connection_loads[i] > connection_capacities[i]:4828 failed_connections[i] = 04829 connection_loads[i-1] = connection_loads[i-1] + (connection_loads[i]/2)4830 connection_loads[i+1] = connection_loads[i+1] + (connection_loads[i]/2)4831 connection_loads[i] = 04832 zz = np.count_nonzero(failed_connections==0)48334834back_wall_connections = [failed_connections[1],failed_connections[2],failed_connections[3],failed_connections[4],failed_connections[5],4835 failed_connections[6],failed_connections[7],failed_connections[8],failed_connections[9],failed_connections[10],4836 failed_connections[11],failed_connections[12],failed_connections[13],failed_connections[14],failed_connections[15],4837 failed_connections[16],failed_connections[17],failed_connections[18],failed_connections[19],failed_connections[20],4838 failed_connections[21],failed_connections[22],failed_connections[23],failed_connections[24],failed_connections[25], 4839 failed_connections[26],failed_connections[27],failed_connections[28]]; 4840front_wall_connections = [failed_connections[37],failed_connections[38],failed_connections[39],failed_connections[40],failed_connections[41],4841 failed_connections[42],failed_connections[43],failed_connections[44],failed_connections[45],failed_connections[46],4842 failed_connections[47],failed_connections[48],failed_connections[49],failed_connections[50],failed_connections[51],4843 failed_connections[52],failed_connections[53],failed_connections[54],failed_connections[55],failed_connections[56],4844 failed_connections[57],failed_connections[58],failed_connections[59],failed_connections[60],failed_connections[61],4845 failed_connections[62],failed_connections[63],failed_connections[64]]; 4846right_wall_connections = [failed_connections[29],failed_connections[30],failed_connections[31],failed_connections[32],failed_connections[33],4847 failed_connections[34],failed_connections[35],failed_connections[36]];4848left_wall_connections = [failed_connections[65],failed_connections[66],failed_connections[67],failed_connections[68],failed_connections[69],4849 failed_connections[70],failed_connections[71],failed_connections[0]];4850back_fail_conn_count = np.count_nonzero(back_wall_connections==0)4851front_fail_conn_count = np.count_nonzero(front_wall_connections==0)4852right_fail_conn_count = np.count_nonzero(right_wall_connections==0)4853left_fail_conn_count = np.count_nonzero(left_wall_connections==0)48544855## wall uplift4856back_wall_uplift = (connection_loads[1]+connection_loads[2]+connection_loads[3]+connection_loads[4]+connection_loads[5]+4857 connection_loads[6]+connection_loads[7]+connection_loads[8]+connection_loads[9]+connection_loads[10]+4858 connection_loads[11]+connection_loads[12]+connection_loads[13]+connection_loads[14]+connection_loads[15]+4859 connection_loads[16]+connection_loads[17]+connection_loads[18]+connection_loads[19]+connection_loads[20]+4860 connection_loads[21]+connection_loads[22]+connection_loads[23]+connection_loads[24]+connection_loads[25]+ 4861 connection_loads[26]+connection_loads[27]+connection_loads[28])/60; 4862front_wall_uplift = (connection_loads[37]+connection_loads[38]+connection_loads[39]+connection_loads[40]+connection_loads[41]+4863 connection_loads[42]+connection_loads[43]+connection_loads[44]+connection_loads[45]+connection_loads[46]+4864 connection_loads[47]+connection_loads[48]+connection_loads[49]+connection_loads[50]+connection_loads[51]+4865 connection_loads[52]+connection_loads[53]+connection_loads[54]+connection_loads[55]+connection_loads[56]+4866 connection_loads[57]+connection_loads[58]+connection_loads[59]+connection_loads[60]+connection_loads[61]+ 4867 connection_loads[62]+connection_loads[63]+connection_loads[64])/60; 4868right_wall_uplift = (connection_loads[29]+connection_loads[30]+connection_loads[31]+connection_loads[32]+connection_loads[33]+4869 connection_loads[34]+connection_loads[35]+connection_loads[36])/444870left_wall_uplift = (connection_loads[65]+connection_loads[66]+connection_loads[67]+connection_loads[68]+connection_loads[69]+4871 connection_loads[70]+connection_loads[71]+connection_loads[0])/4448724873uplift_loads = [front_wall_uplift,left_wall_uplift,back_wall_uplift,right_wall_uplift]48744875## wall bending4876if direction == 1:4877 front_wall_bending = abs((p_windward_CC*10**2)/8)4878 back_wall_bending = abs((p_leeward_CC*10**2)/8)4879 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)4880 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)4881 left_wall_bending = max(left_wall_bending1, left_wall_bending2)4882 right_wall_bending = left_wall_bending4883if direction == 2:4884 front_wall_bending = abs((p_windward_CC*10**2)/8)4885 back_wall_bending1 = abs((p_side_CC*10**2)/8)4886 back_wall_bending2 = abs((p_sideleading_CC*10**2)/8)4887 back_wall_bending = max(back_wall_bending1, back_wall_bending2)4888 left_wall_bending = abs((p_windward_CC*19.167**2)/8)4889 right_wall_bending1 = abs((p_side_CC*19.167**2)/8)4890 right_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)4891 right_wall_bending = max(right_wall_bending1, right_wall_bending2)4892if direction == 3:4893 front_wall_bending1 = abs((p_side_CC*10**2)/8)4894 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)4895 front_wall_bending = max(front_wall_bending1, front_wall_bending2)4896 back_wall_bending = front_wall_bending4897 left_wall_bending = abs((p_windward_CC*19.167**2)/8)4898 right_wall_bending = abs((p_leeward_CC*19.167**2)/8)4899if direction == 4:4900 back_wall_bending = abs((p_windward_CC*10**2)/8)4901 front_wall_bending1 = abs((p_side_CC*10**2)/8)4902 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)4903 front_wall_bending = max(front_wall_bending1, front_wall_bending2)4904 left_wall_bending = abs((p_windward_CC*19.167**2)/8)4905 right_wall_bending1 = abs((p_side_CC*19.167**2)/8)4906 right_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)4907 right_wall_bending = max(right_wall_bending1, right_wall_bending2) 4908if direction == 5:4909 back_wall_bending = abs((p_windward_CC*10**2)/8)4910 front_wall_bending = abs((p_leeward_CC*10**2)/8)4911 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)4912 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)4913 left_wall_bending = max(left_wall_bending1, left_wall_bending2)4914 right_wall_bending = left_wall_bending 4915if direction == 6:4916 back_wall_bending = abs((p_windward_CC*10**2)/8)4917 front_wall_bending1 = abs((p_side_CC*10**2)/8)4918 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)4919 front_wall_bending = max(front_wall_bending1, front_wall_bending2)4920 right_wall_bending = abs((p_windward_CC*19.167**2)/8)4921 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)4922 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)4923 left_wall_bending = max(left_wall_bending1, left_wall_bending2) 4924if direction == 7:4925 front_wall_bending1 = abs((p_side_CC*10**2)/8)4926 front_wall_bending2 = abs((p_sideleading_CC*10**2)/8)4927 front_wall_bending = max(front_wall_bending1, front_wall_bending2)4928 back_wall_bending = front_wall_bending4929 right_wall_bending = abs((p_windward_CC*19.167**2)/8)4930 left_wall_bending = abs((p_leeward_CC*19.167**2)/8) 4931if direction == 8:4932 front_wall_bending = abs((p_windward_CC*10**2)/8)4933 back_wall_bending1 = abs((p_side_CC*10**2)/8)4934 back_wall_bending2 = abs((p_sideleading_CC*10**2)/8)4935 back_wall_bending = max(back_wall_bending1, back_wall_bending2)4936 right_wall_bending = abs((p_windward_CC*19.167**2)/8)4937 left_wall_bending1 = abs((p_side_CC*19.167**2)/8)4938 left_wall_bending2 = abs((p_sideleading_CC*11.833**2)/8)4939 left_wall_bending = max(left_wall_bending1, left_wall_bending2) 49404941if back_fail_conn_count > 14:4942 back_wall_bending = back_wall_bending*2.84943if front_fail_conn_count > 14:4944 front_wall_bending = front_wall_bending*2.84945if right_fail_conn_count > 4:4946 right_wall_bending = right_wall_bending*2.84947if left_fail_conn_count > 4:4948 left_wall_bending = left_wall_bending*2.84949 4950bending_loads = [front_wall_bending,left_wall_bending,back_wall_bending,right_wall_bending]49514952## lateral loads4953if direction == 1:4954 if front_fail_conn_count <= 14:4955 front_lateral = p_windward_CC*3*30*10/24956 elif front_fail_conn_count > 14:4957 front_lateral = p_windward_CC*0.5*30*104958 4959 if left_fail_conn_count <= 4:4960 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)4961 elif left_fail_conn_count > 4:4962 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)4963 4964 if back_fail_conn_count <= 14:4965 back_lateral = p_leeward_CC*3*30*10/24966 elif back_fail_conn_count > 14:4967 back_lateral = p_leeward_CC*0.5*30*104968 4969 if right_fail_conn_count <= 4:4970 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)4971 elif right_fail_conn_count > 4:4972 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)4973if direction == 2:4974 if front_fail_conn_count <= 14:4975 front_lateral = p_windward_CC*3*30*10/24976 elif front_fail_conn_count > 14:4977 front_lateral = p_windward_CC*0.5*30*104978 4979 if left_fail_conn_count <= 4:4980 left_lateral = p_windward_CC*3*22*14.583/24981 elif left_fail_conn_count > 4:4982 left_lateral = p_windward_CC*0.5*22*14.5834983 4984 if back_fail_conn_count <= 14:4985 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)4986 elif back_fail_conn_count > 14:4987 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)4988 4989 if right_fail_conn_count <= 4:4990 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)4991 elif right_fail_conn_count > 4:4992 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)4993if direction == 3:4994 if front_fail_conn_count <= 14:4995 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)4996 elif front_fail_conn_count > 14:4997 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)4998 4999 if left_fail_conn_count <= 4:5000 left_lateral = p_windward_CC*3*22*14.583/25001 elif left_fail_conn_count > 4:5002 left_lateral = p_windward_CC*0.5*22*14.583 5003 5004 if back_fail_conn_count <= 14:5005 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5006 elif back_fail_conn_count > 14:5007 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93) 5008 5009 if right_fail_conn_count <= 4:5010 right_lateral = p_leeward_CC*3*22*14.583/25011 elif right_fail_conn_count > 4:5012 right_lateral = p_leeward_CC*0.5*22*14.5835013if direction == 4:5014 if front_fail_conn_count <= 14:5015 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5016 elif front_fail_conn_count > 14:5017 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5018 5019 if left_fail_conn_count <= 4:5020 left_lateral = p_windward_CC*3*22*14.583/25021 elif left_fail_conn_count > 4:5022 left_lateral = p_windward_CC*0.5*22*14.583 5023 5024 if back_fail_conn_count <= 14:5025 back_lateral = p_windward_CC*3*30*10/25026 elif back_fail_conn_count > 14:5027 back_lateral = p_windward_CC*0.5*30*105028 5029 if right_fail_conn_count <= 4:5030 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5031 elif right_fail_conn_count > 4:5032 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5033if direction == 5:5034 if front_fail_conn_count <= 14:5035 front_lateral = p_leeward_CC*3*30*10/25036 elif front_fail_conn_count > 14:5037 front_lateral = p_leeward_CC*0.5*30*105038 5039 if left_fail_conn_count <= 4:5040 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5041 elif left_fail_conn_count > 4:5042 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5043 5044 if back_fail_conn_count <= 14:5045 back_lateral = p_windward_CC*3*30*10/25046 elif back_fail_conn_count > 14:5047 back_lateral = p_windward_CC*0.5*30*105048 5049 if right_fail_conn_count <= 4:5050 right_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5051 elif right_fail_conn_count > 4:5052 right_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5053if direction == 6:5054 if front_fail_conn_count <= 14:5055 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5056 elif front_fail_conn_count > 14:5057 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5058 5059 if left_fail_conn_count <= 4:5060 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5061 elif left_fail_conn_count > 4:5062 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5063 5064 if back_fail_conn_count <= 14:5065 back_lateral = p_windward_CC*3*30*10/25066 elif back_fail_conn_count > 14:5067 back_lateral = p_windward_CC*0.5*30*105068 5069 if right_fail_conn_count <= 4:5070 right_lateral = p_windward_CC*3*22*14.583/25071 elif right_fail_conn_count > 4:5072 right_lateral = p_windward_CC*0.5*22*14.583 5073if direction == 7:5074 if front_fail_conn_count <= 14:5075 front_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5076 elif front_fail_conn_count > 14:5077 front_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)50785079 if left_fail_conn_count <= 4:5080 left_lateral = p_leeward_CC*3*22*14.583/25081 elif left_fail_conn_count > 4:5082 left_lateral = p_leeward_CC*0.5*22*14.5835083 5084 if back_fail_conn_count <= 14:5085 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5086 elif back_fail_conn_count > 14:5087 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93) 50885089 if right_fail_conn_count <= 4:5090 right_lateral = p_windward_CC*3*22*14.583/25091 elif right_fail_conn_count > 4:5092 right_lateral = p_windward_CC*0.5*22*14.583 5093if direction == 8:5094 if front_fail_conn_count <= 14:5095 front_lateral = p_windward_CC*3*30*10/25096 elif front_fail_conn_count > 14:5097 front_lateral = p_windward_CC*0.5*30*105098 5099 if left_fail_conn_count <= 4:5100 left_lateral = (p_side_CC*3*22*14.583/2)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5101 elif left_fail_conn_count > 4:5102 left_lateral = (p_side_CC*0.5*22*14.583)-(p_side_CC*0.5*4.4*5.83)+(p_sideleading_CC*0.5*4.4*5.83)5103 5104 if back_fail_conn_count <= 14:5105 back_lateral = (p_side_CC*3*30*10/2)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93)5106 elif back_fail_conn_count > 14:5107 back_lateral = (p_side_CC*0.5*30*10)-(p_side_CC*0.5*4.4*2.93)+(p_sideleading_CC*0.5*4.4*2.93) 51085109 if right_fail_conn_count <= 4:5110 right_lateral = p_windward_CC*3*22*14.583/25111 elif right_fail_conn_count > 4:5112 right_lateral = p_windward_CC*0.5*22*14.583 51135114front_lateral = abs(front_lateral)/455115left_lateral = abs(left_lateral)/335116back_lateral = abs(back_lateral)/455117right_lateral = abs(right_lateral)/335118lateral_loads = [front_lateral,left_lateral,back_lateral,right_lateral]51195120## wall sheathing5121if direction == 1:5122 wall_sheath_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5123 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5124 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5125 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5126 p_windward_CC, p_windward_CC, p_windward_CC,5127 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5128 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5129 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5130 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5131 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5132 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5133 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5134 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5135 p_leeward_CC, p_leeward_CC, p_leeward_CC,5136 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5137 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5138 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5139 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]5140if direction == 2:5141 wall_sheath_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5142 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5143 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5144 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5145 p_windward_CC, p_windward_CC, p_windward_CC,5146 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5147 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5148 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5149 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5150 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5151 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5152 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5153 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5154 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5155 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5156 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5157 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5158 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]5159if direction == 3:5160 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5161 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5162 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5163 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5164 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5165 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5166 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5167 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5168 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5169 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5170 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5171 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5172 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5173 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5174 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5175 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5176 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5177 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC]5178if direction == 4:5179 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5180 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5181 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5182 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5183 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5184 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5185 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5186 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5187 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5188 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5189 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5190 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5191 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5192 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5193 p_windward_CC,5194 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5195 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5196 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5197 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]5198if direction == 5:5199 wall_sheath_loads = [p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5200 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5201 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5202 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5203 p_leeward_CC, p_leeward_CC, p_leeward_CC, 5204 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5205 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5206 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5207 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5208 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5209 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5210 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5211 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5212 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5213 p_windward_CC,5214 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5215 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5216 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5217 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC]5218if direction == 6:5219 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5220 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5221 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5222 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5223 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5224 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5225 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5226 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5227 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5228 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5229 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5230 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5231 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5232 p_windward_CC,5233 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5234 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5235 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5236 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5237 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]5238if direction == 7:5239 wall_sheath_loads = [p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5240 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5241 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5242 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5243 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5244 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5245 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5246 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5247 p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC, p_leeward_CC,5248 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5249 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5250 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5251 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5252 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5253 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5254 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5255 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5256 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]5257if direction == 8:5258 wall_sheath_loads = [p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5259 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5260 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5261 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5262 p_windward_CC, p_windward_CC, p_windward_CC,5263 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5264 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5265 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5266 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5267 p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_sideleading_CC, p_side_CC, p_side_CC,5268 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, 5269 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5270 p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC, p_side_CC,5271 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5272 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5273 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5274 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC,5275 p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC, p_windward_CC]5276 5277wall_sheath_loads = np.absolute(wall_sheath_loads)52785279if walls ==1:5280 for i in range(len(failed_walls_uplift)):5281 if uplift_loads[i] > total_uplift_capacity[i]:5282 failed_walls_uplift[i] = 05283 for i in range(len(failed_walls_lateral)):5284 if lateral_loads[i] > total_lateral_capacity[i]:5285 failed_walls_lateral[i] = 05286 failed_walls_sheath = np.full(118, 1)5287 for i in range(len(failed_walls_sheath)):5288 if wall_sheath_loads[i] > wall_sheath_capacity[i]:5289 failed_walls_sheath[i] = 052905291 for i in range(len(failed_walls)):5292 if failed_walls_uplift[i] < 1:5293 failed_walls[i] = 05294 if failed_walls_lateral[i] < 1:5295 failed_walls[i] = 0 5296 5297elif walls == 2:5298 u_front = (front_wall_bending/front_bending_capacity)+(front_wall_uplift/front_uplift_capacity)5299 u_left = (left_wall_bending/left_bending_capacity)+(left_wall_uplift/left_uplift_capacity)5300 u_back = (back_wall_bending/back_bending_capacity)+(back_wall_uplift/back_uplift_capacity)5301 u_right = (right_wall_bending/right_bending_capacity)+(right_wall_uplift/right_uplift_capacity)5302 u = [u_front, u_left, u_back, u_right]5303 5304 for i in range(len(failed_walls_u)):5305 if u[i] > 1:5306 failed_walls_u[i] = 05307 5308 failed_walls = failed_walls_u5309 53105311### percentages of exterior failure5312failed_cover_count = len(np.where(failed_cover == 0)[0])5313failed_cover_percentage = (failed_cover_count/(len(failed_cover)))*1005314not_failed_cover_percentage = 100 - failed_cover_percentage5315cover_array = np.array([failed_cover_percentage, not_failed_cover_percentage])53165317failed_sheath_count = len(np.where(failed_sheath == 0)[0])5318failed_sheath_percentage = (failed_sheath_count/(len(failed_sheath)))*1005319not_failed_sheath_percentage = 100 - failed_sheath_percentage5320sheath_array = np.array([failed_sheath_percentage, not_failed_sheath_percentage])53215322failed_windows_total = np.concatenate((failed_leftwindows, failed_rightwindows, failed_frontwindows, failed_backwindows))5323failed_window_count = len(np.where(failed_windows_total == 0)[0])5324failed_window_percentage = (failed_window_count/(len(failed_windows_total)))*10053255326if garage_fail == 1:5327 failed_garage_percentage = 05328elif garage_fail == 0:5329 failed_garage_percentage = 10053305331failed_connections_count = len(np.where(failed_connections == 0)[0])5332failed_connections_percentage = (failed_connections_count/(len(failed_connections)))*10053335334door_fail = [back_door_fail, front_door_fail]5335failed_door_count = 2 - np.count_nonzero(door_fail)5336failed_door_percentage = (failed_door_count/2)*10053375338failed_walls_count = 4 - np.count_nonzero(failed_walls)5339failed_walls_percentage = (failed_walls_count/4)*10053405341### interior damages5342fen_failures = [front_door_fail, back_door_fail, failed_frontwindows[0], failed_frontwindows[1],5343 failed_frontwindows[2], failed_leftwindows[0], failed_leftwindows[1], failed_leftwindows[2],5344 failed_leftwindows[3], failed_backwindows[0], failed_backwindows[1], failed_backwindows[2],5345 failed_backwindows[3], failed_rightwindows[0], failed_rightwindows[1], failed_rightwindows[2],5346 failed_rightwindows[3], garage_fail]5347fen_failed_count = 18 - np.count_nonzero(fen_failures) 5348fen_failed_percent = fen_failed_count/18*10053495350i_cover = failed_cover_percentage*0.55351i_sheath = failed_sheath_percentage*1.85352i_fen = fen_failed_percent*1.053535354interior_damage = max(i_cover, i_sheath, i_fen)53555356### water loadings5357failed_cover_water = np.full(96, 1, dtype = int)5358if ds > 11.53:5359 failed_cover_water = [0,0,0,0,0,0,0,0,5360 1,1,1,1,1,1,1,1,5361 1,1,1,1,1,1,1,1,5362 1,1,1,1,1,1,1,1,5363 1,1,1,1,1,1,1,1,5364 1,1,1,1,1,1,1,1,5365 1,1,1,1,1,1,1,1,5366 1,1,1,1,1,1,1,1,5367 1,1,1,1,1,1,1,1,5368 1,1,1,1,1,1,1,1,5369 1,1,1,1,1,1,1,1,5370 0,0,0,0,0,0,0,0]5371if ds > 13.07:5372 failed_cover_water = [0,0,0,0,0,0,0,0,5373 0,0,0,0,0,0,0,0,5374 1,1,1,1,1,1,1,1,5375 1,1,1,1,1,1,1,1,5376 1,1,1,1,1,1,1,1,5377 1,1,1,1,1,1,1,1,5378 1,1,1,1,1,1,1,1,5379 1,1,1,1,1,1,1,1,5380 1,1,1,1,1,1,1,1,5381 1,1,1,1,1,1,1,1,5382 0,0,0,0,0,0,0,0,5383 0,0,0,0,0,0,0,0]5384if ds > 14.61:5385 failed_cover_water = [0,0,0,0,0,0,0,0,5386 0,0,0,0,0,0,0,0,5387 0,0,0,0,0,0,0,0,5388 1,1,1,1,1,1,1,1,5389 1,1,1,1,1,1,1,1,5390 1,1,1,1,1,1,1,1,5391 1,1,1,1,1,1,1,1,5392 1,1,1,1,1,1,1,1,5393 1,1,1,1,1,1,1,1,5394 0,0,0,0,0,0,0,0,5395 0,0,0,0,0,0,0,0,5396 0,0,0,0,0,0,0,0]5397if ds > 16.16:5398 failed_cover_water = [0,0,0,0,0,0,0,0,5399 0,0,0,0,0,0,0,0,5400 0,0,0,0,0,0,0,0,5401 0,0,0,0,0,0,0,0,5402 1,1,1,1,1,1,1,1,5403 1,1,1,1,1,1,1,1,5404 1,1,1,1,1,1,1,1,5405 1,1,1,1,1,1,1,1,5406 0,0,0,0,0,0,0,0,5407 0,0,0,0,0,0,0,0,5408 0,0,0,0,0,0,0,0,5409 0,0,0,0,0,0,0,0]5410if ds > 17.7:5411 failed_cover_water = [0,0,0,0,0,0,0,0,5412 0,0,0,0,0,0,0,0,5413 0,0,0,0,0,0,0,0,5414 0,0,0,0,0,0,0,0,5415 0,0,0,0,0,0,0,0,5416 1,1,1,1,1,1,1,1,5417 1,1,1,1,1,1,1,1,5418 0,0,0,0,0,0,0,0,5419 0,0,0,0,0,0,0,0,5420 0,0,0,0,0,0,0,0,5421 0,0,0,0,0,0,0,0,5422 0,0,0,0,0,0,0,0]5423if ds > 18.64:5424 failed_cover_water = [0,0,0,0,0,0,0,0,5425 0,0,0,0,0,0,0,0,5426 0,0,0,0,0,0,0,0,5427 0,0,0,0,0,0,0,0,5428 0,0,0,0,0,0,0,0,5429 0,0,0,0,0,0,0,0,5430 0,0,0,0,0,0,0,0,5431 0,0,0,0,0,0,0,0,5432 0,0,0,0,0,0,0,0,5433 0,0,0,0,0,0,0,0,5434 0,0,0,0,0,0,0,0,5435 0,0,0,0,0,0,0,0] 54365437failed_leftwindows_water = np.full(4, 1)5438failed_rightwindows_water = np.full(4, 1)5439failed_backwindows_water = np.full(4, 1)5440failed_frontwindows_water = np.full(3, 1)54415442if ds > 3:5443 failed_frontwindows_water = [0,0,0]5444 failed_backwindows_water = [0,0,0,0]5445if ds > 4:5446 failed_leftwindows_water = [0,0,0,0]5447 failed_rightwindows_water = [0,0,0,0]54485449front_door_fail_water = 15450back_door_fail_water = 15451if ds > 1:5452 front_door_fail_water = 05453if ds > 2:5454 back_door_fail_water = 0 5455 5456ds_round = round(ds)5457if ds_round > 16:5458 ds_round = 1654595460y_no_base_structure = [0,0,0,0,0,0,0,2.5,13.4,23.3,32.1,40.1,47.1,53.2,58.6,63.2,67.2,70.5,73.2,75.4,77.2,78.5,79.5,80.2,80.7]5461x_no_base_structure = [-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]5462y_no_base_content = [0,0,0,0,0,0,0,2.4,8.1,13.3,17.9,22,25.7,28.8,31.5,33.8,35.7,37.2,38.4,39.2,39.7,40,40,40,40]5463x_no_base_content = [-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]5464y_base_structure = [0,0.7,0.8,2.4,5.2,9,13.8,19.4,25.5,32,38.7,45.5,52.2,58.6,64.5,69.8,74.2,77.7,80.1,81.1,81.1,81.1,81.1,81.1,81.1]5465x_base_structure = [-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]5466y_base_content = [0,0,0,0,33,33,33,35.4,41.1,46.3,50.9,55,58.7,61.8,64.5,66.8,68.7,70.2,71.4,72.2,72.7,73,73,73,73]5467x_base_content = [-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]54685469std_structure_basement = [0,1.34,1.06,0.94,0.91,0.88,0.85,0.83,0.85,0.96,1.14,1.37,1.63,1.89,2.14,2.35,2.52,2.66,2.77,2.88,2.88,2.88,2.88,2.88,2.88]5470std_contents_basement = [1.6,1.16,0.92,0.81,0.78,0.76,0.74,0.72,0.74,0.83,0.98,1.17,1.39,1.6,1.81,1.99,2.13,2.25,2.35,2.45,2.45,2.45,2.45,2.45,2.45]5471std_structure_no_basement = [0,0,0,0,0,0,0,2.7,2,1.6,1.8,1.9,2,2.1,2.2,2.3,2.4,2.7,3,3.3,3.7,4.1,4.5,4.9]5472std_contents_no_basement = [0,0,0,0,0,0,0,2.1,1.5,1.2,1.2,1.4,1.5,1.6,1.6,1.7,1.8,1.9,2.1,2.3,2.6,2.9,3.2,3.5,3.8]54735474x_position = x_no_base_structure.index(ds_round)5475if basement == 1:5476 std_structure = std_structure_basement5477 std_contents = std_contents_basement5478 y_structure = y_base_structure5479 y_contents = y_base_content5480elif basement == 2:5481 std_structure = std_structure_no_basement5482 std_contents = std_contents_no_basement 5483 y_structure = y_no_base_structure5484 y_contents = y_no_base_content54855486y_structure_modified = [i*0.516 for i in y_structure]5487y_combined = np.zeros(25)5488for i in range(25):5489 y_combined[i] = y_structure_modified[i]+y_contents[i]54905491contents_mean = float(y_combined[x_position])5492contents_std = std_contents[x_position]5493upper_contents_limit = contents_mean + 2*contents_std5494lower_contents_limit = contents_mean - 2*contents_std5495contents_water_failure = np.random.normal(contents_mean, contents_std, size = (1))54965497too_high_indices = np.where(contents_water_failure > upper_contents_limit)5498while np.any(too_high_indices):5499 contents_water_failure[too_high_indices] = np.random.normal(5500 contents_mean, contents_std, size=len(too_high_indices))5501 too_high_indices = np.where(contents_water_failure > upper_contents_limit)55025503too_low_indices = np.where(contents_water_failure < lower_contents_limit)5504while np.any(too_low_indices):5505 contents_water_failure[too_low_indices] = np.random.normal(5506 contents_mean, contents_std, size=len(too_low_indices))5507 too_low_indices = np.where(contents_water_failure < lower_contents_limit)55085509contents_water_failure = float(contents_water_failure)55105511### combination of water and wind failures5512interior_damage_combined = ((interior_damage/100) + (contents_water_failure/100) - ((interior_damage/100)*(contents_water_failure/100)))*10055135514failed_cover_combined = np.full(96,1, dtype = int)5515for i in range(len(failed_cover_combined)):5516 if failed_cover[i] == 0:5517 failed_cover_combined[i] = 05518 if failed_cover_water[i] == 0:5519 failed_cover_combined[i] = 055205521failed_frontwindows_combined = np.full(3,1)5522failed_backwindows_combined = np.full(4,1)5523failed_leftwindows_combined = np.full(4,1)5524failed_rightwindows_combined = np.full(4,1)5525for i in range(len(failed_frontwindows_combined)):5526 if failed_frontwindows[i] == 0:5527 failed_frontwindows_combined[i] = 05528 if failed_frontwindows_water[i] == 0:5529 failed_frontwindows_combined[i] = 05530for i in range(len(failed_backwindows_combined)):5531 if failed_backwindows[i] == 0:5532 failed_backwindows_combined[i] = 05533 if failed_backwindows_water[i] == 0:5534 failed_backwindows_combined[i] = 0 5535for i in range(len(failed_leftwindows_combined)):5536 if failed_leftwindows[i] == 0:5537 failed_leftwindows_combined[i] = 05538 if failed_leftwindows_water[i] == 0:5539 failed_leftwindows_combined[i] = 05540for i in range(len(failed_rightwindows_combined)):5541 if failed_rightwindows[i] == 0:5542 failed_rightwindows_combined[i] = 05543 if failed_rightwindows_water[i] == 0:5544 failed_rightwindows_combined[i] = 055455546front_door_fail_combined = 15547back_door_fail_combined = 15548if front_door_fail == 0 or front_door_fail_water == 0:5549 front_door_fail_combined = 05550if back_door_fail == 0 or back_door_fail_water == 0:5551 back_door_fail_combined = 055525553failed_cover_count = len(np.where(failed_cover_combined == 0)[0])5554failed_cover_percentage = (failed_cover_count/(len(failed_cover_combined)))*1005555not_failed_cover_percentage = 100 - failed_cover_percentage5556cover_array = np.array([failed_cover_percentage, not_failed_cover_percentage])55575558failed_windows_total = np.concatenate((failed_leftwindows_combined, failed_rightwindows_combined, failed_frontwindows_combined, failed_backwindows_combined))5559failed_window_count = len(np.where(failed_windows_total == 0)[0])5560failed_window_percentage = (failed_window_count/(len(failed_windows_total)))*10055615562door_fail = [back_door_fail_combined, front_door_fail_combined]5563failed_door_count = 2 - np.count_nonzero(door_fail)5564failed_door_percentage = (failed_door_count/2)*10055655566### utilities damages5567electrical_damage = interior_damage_combined*0.55568plumbing_damage = interior_damage_combined*0.355569mechanical_damage = interior_damage_combined*0.455705571if electrical_damage > 100:5572 electrical_damage = 1005573if plumbing_damage > 100:5574 plumbing_damage = 1005575if mechanical_damage > 100:5576 mechanical_damage = 10055775578### print failures5579print("Cover:" , failed_cover_combined)5580print("Sheathing:" , failed_sheath)5581print("Front Door: ", front_door_fail_combined)5582print("Back Door: ", back_door_fail_combined)5583print("Garage Door: ", garage_fail)5584print("Left side windows:", failed_leftwindows_combined)5585print("Right side windows:", failed_rightwindows_combined)5586print("Front Windows: ", failed_frontwindows_combined)5587print("Back Windows: ", failed_backwindows_combined)5588print("Connections:" , failed_connections)5589print("Walls:" , failed_walls)5590print("Percentage of failed cover: ", failed_cover_percentage, "%")5591print("Percentage of failed sheathing: ", failed_sheath_percentage, "%")5592print("Percentage of failed windows: ", failed_window_percentage, "%")5593print("Percentage of failed connections: ", failed_connections_percentage, "%")5594print("Percentage of failed doors: ", failed_door_percentage, "%")5595print("Percentage of failed garage doors: ", failed_garage_percentage, "%")5596print("Percentage of failed walls: ", failed_walls_percentage, "%")5597print("Percentage of interior damage: ", interior_damage_combined, "%")5598print("Percentage of failed utilities: \n Electrical damage: ", electrical_damage, "% \n Plumbing damage: ", plumbing_damage, "% \n Mechanical damage: ", mechanical_damage, "%")55995600percentages = [failed_cover_percentage, failed_sheath_percentage, failed_window_percentage, failed_door_percentage, failed_garage_percentage, failed_connections_percentage, failed_walls_percentage]5601components = ['Roof Cover', 'Roof Sheathing', 'Windows', 'Exterior Doors', 'Garage Doors', 'Connections', 'Exterior Walls']56025603fen_failures_combined = [front_door_fail_combined, back_door_fail_combined, failed_frontwindows_combined[0], failed_frontwindows_combined[1],5604 failed_frontwindows_combined[2], failed_leftwindows_combined[0], failed_leftwindows_combined[1], failed_leftwindows_combined[2],5605 failed_leftwindows_combined[3], failed_backwindows_combined[0], failed_backwindows_combined[1], failed_backwindows_combined[2],5606 failed_backwindows_combined[3], failed_rightwindows_combined[0], failed_rightwindows_combined[1], failed_rightwindows_combined[2],5607 failed_rightwindows_combined[3], garage_fail]56085609## write text files5610file = open("Roof_Cover_Failure","w")5611failed_cover_string = np.array2string(failed_cover_combined, separator="\n")5612failed_cover_string = str(failed_cover_string)[1:-1]5613file.write(failed_cover_string)5614file.flush()56155616file = open("Roof_Sheath_Failure","w")5617failed_sheath_string = np.array2string(failed_sheath, separator="\n")5618failed_sheath_string = str(failed_sheath_string)[1:-1]5619file.write(failed_sheath_string)5620file.flush()56215622file = open("Wall_Sheath_Failure","w")5623failed_wallsheath_string = np.array2string(failed_walls_sheath, separator="\n")5624failed_wallsheath_string = str(failed_wallsheath_string)[1:-1]5625file.write(failed_wallsheath_string)5626file.flush()56275628file = open("Open_Failure","w")5629fen_failures_combined = np.array(fen_failures_combined, dtype = int)5630failed_fen_string = np.array2string(fen_failures_combined, separator="\n")5631failed_fen_string = str(failed_fen_string)[1:-1]5632file.write(failed_fen_string)5633file.flush()56345635user_input = [walls, roof, exposure, vegetation, category]5636file = open("User_Input", "w")5637user_input = np.array(user_input, dtype = int)5638user_input_string = np.array2string(user_input, separator="\n")5639user_input_string = str(user_input_string)[1:-1]5640file.write(user_input_string)5641file.flush()56425643utilities = [round(electrical_damage,1), round(plumbing_damage,1), round(mechanical_damage,1)]5644file = open("Utility_Percentage", "w")5645utilities = np.array(utilities)5646utilities_string = np.array2string(utilities, separator="\n")5647utilities_string = str(utilities_string)[1:-1]5648file.write(utilities_string)5649file.flush()56505651file = open("Water_Height", "w")5652ds_string = str(ds)5653file.write(ds_string)5654file.flush()565556565657# wait for participant to run virtual reality simulation5658root5 = tk.Tk()5659root5.title('Pause')5660root5.geometry("400x400")56615662question15 = tk.Label(root5, text = "Please find research assistant to set up virtual reality model.\n Press continue to move onto the reflection section \n after completing the simulation.")5663question15.pack()56645665response = requests.get('https://github.com/gfusco19/VR_V1/blob/main/wait.png?raw=true')5666img = Image.open(BytesIO(response.content))5667img = img.resize((250, 250))5668tkimage = ImageTk.PhotoImage(img)5669tk.Label(root5, image=tkimage).pack()56705671exit_button = tk.Button(root5, text = "Continue", command = root5.destroy)5672exit_button.pack(side=BOTTOM)56735674root5.mainloop()5675567656775678# collect information on virtual reality reflection5679root6 = tk.Tk()5680root6.title('Reflection')5681root6.geometry("400x400")568256835684clicked16 = tk.StringVar(root6)5685clicked16.set("Choose Option")56865687clicked17 = tk.StringVar(root6)5688clicked17.set("Choose Option")56895690clicked18 = tk.StringVar(root6)5691clicked18.set("Choose Option")5692569356945695question16 = tk.Label(root6, text = "How did you think your structure would perform in \n comparison to the virtual reality model?")5696question16.pack()56975698drop16 = tk.OptionMenu(root6,clicked16,"I thought my home would perform better", "The virtual reality matched my perception", "I thought my home would perform worse")5699drop16.pack()57005701question17 = tk.Label(root6, text = "Would you choose to evacuate or shelter in place?")5702question17.pack()57035704drop17 = tk.OptionMenu(root6,clicked17, "Evacuate", "Shelter in place", "I don't know")5705drop17.pack()57065707question18 = tk.Label(root6, text = "Did the virtual reality model impact your evacuation decision")5708question18.pack()57095710drop18 = tk.OptionMenu(root6,clicked18, "Yes", "No")5711drop18.pack()571257135714exit_button = tk.Button(root6, text = "Submit", command = root6.destroy)5715exit_button.pack(side=BOTTOM)57165717 ...

Full Screen

Full Screen

load_test.py

Source:load_test.py Github

copy

Full Screen

...17import math18import pytest19from .context import procyon, pntest20def test_constants():21 assert procyon.loads("null") is None22 assert procyon.loads("true") is True23 assert procyon.loads("false") is False24 assert procyon.loads("inf") == float("inf")25 assert procyon.loads("+inf") == float("inf")26 assert procyon.loads("-inf") == float("-inf")27 assert math.isnan(procyon.loads("nan"))28 with pytest.raises(procyon.ProcyonDecodeError):29 procyon.loads("floop")30def test_integer():31 assert procyon.loads("0") == 032 assert procyon.loads("1") == 133 assert procyon.loads("9223372036854775807") == ((2**63) - 1)34 with pytest.raises(procyon.ProcyonDecodeError):35 procyon.loads("9223372036854775808")36 assert procyon.loads("-9223372036854775808") == -(2**63)37 with pytest.raises(procyon.ProcyonDecodeError):38 procyon.loads("-9223372036854775809")39def test_float():40 assert procyon.loads("0.0") == 0.041 assert procyon.loads("0.5") == 0.542 assert procyon.loads("0e0") == 0.043 assert procyon.loads("0.5e0") == 0.544def test_data():45 assert procyon.loads("$") == b""46 with pytest.raises(procyon.ProcyonDecodeError):47 procyon.loads("$0")48 assert procyon.loads("$00") == b"\x00"49 assert procyon.loads("$ 00") == b"\x00"50 with pytest.raises(procyon.ProcyonDecodeError):51 procyon.loads("$ 0 0")52 assert procyon.loads("$00112233") == b"\x00\x11\x22\x33"53 with pytest.raises(procyon.ProcyonDecodeError):54 procyon.loads("$ 00 $ 01")55 assert procyon.loads("$ 00\n" #56 "$ 01\n") == b"\x00\x01"57 assert procyon.loads("# 00\n" #58 "$ 01\n" #59 "# 02\n" #60 "$ 03\n" #61 "# 04\n") == b"\x01\x03"62 assert procyon.loads("[$, $1f, $ffff, $ 0f 1e 2d 3c]") == [63 b"", b"\x1f", b"\xff\xff", b"\x0f\x1e\x2d\x3c"64 ]65 with pytest.raises(procyon.ProcyonDecodeError):66 procyon.loads("[$abcd\n" #67 "$1234]\n")68def test_string():69 assert procyon.loads("\"\"") == ""70 assert procyon.loads("\"yo whaddup\"") == "yo whaddup"71 assert procyon.loads("\"\\/\\\"\\\\\\b\\f\\n\\r\\t\"") == "/\"\\\b\f\n\r\t"72 with pytest.raises(procyon.ProcyonDecodeError):73 procyon.loads("\"\\v\"")74 with pytest.raises(procyon.ProcyonDecodeError):75 procyon.loads("\"\\u000\"")76 assert procyon.loads("\"\\u0001\"") == "\001"77 assert procyon.loads("\"\\u0012\"") == "\022"78 assert procyon.loads("\"\\u0123\"") == "\u0123"79 assert procyon.loads("\"\\u1234\"") == "\u1234"80def test_xstring():81 assert procyon.loads(">") == "\n"82 assert procyon.loads("|") == "\n"83 assert procyon.loads("!") == ""84 assert procyon.loads("> ") == "\n"85 assert procyon.loads("| ") == "\n"86 assert procyon.loads("! ") == ""87 assert procyon.loads(">\t") == "\n"88 assert procyon.loads("|\t") == "\n"89 assert procyon.loads("!\t") == ""90 assert procyon.loads(">>") == ">\n"91 assert procyon.loads("||") == "|\n"92 with pytest.raises(procyon.ProcyonDecodeError):93 procyon.loads("!!")94 with pytest.raises(procyon.ProcyonDecodeError):95 procyon.loads("!\n>\n")96 with pytest.raises(procyon.ProcyonDecodeError):97 procyon.loads("!\n|\n")98 with pytest.raises(procyon.ProcyonDecodeError):99 procyon.loads("!\n!\n")100 assert procyon.loads("> one") == "one\n"101 assert procyon.loads("| one") == "one\n"102 with pytest.raises(procyon.ProcyonDecodeError):103 procyon.loads("! one")104 assert procyon.loads("| one\n" #105 "| two") == "one\ntwo\n"106 assert procyon.loads("| one\n" #107 "> two\n" #108 "!\n") == "one two"109 assert procyon.loads("| one\n" #110 "!\n" #111 "# two\n") == "one"112 assert procyon.loads(">\n"113 "> Line two\n"114 "> of three.\n"115 ">\n") == ("\n"116 "Line two of three.\n"117 "\n")118 assert procyon.loads(">\n"119 ">\n"120 "> Line three\n"121 "> of five.\n"122 ">\n"123 ">\n") == ("\n\n"124 "Line three of five.\n"125 "\n\n")126 assert procyon.loads("> Paragraph\n"127 "> one.\n"128 ">\n"129 "> Paragraph\n"130 "> two.\n") == ("Paragraph one.\n"131 "\n"132 "Paragraph two.\n")133 assert procyon.loads("> One.\n" #134 ">\n" #135 "> Two.\n" #136 "!\n") == (137 "One.\n" #138 "\n" #139 "Two.")140 assert procyon.loads("| Four score and seven years ago our fathers brought forth on this\n"141 "> continent a new nation, conceived in liberty, and dedicated to the\n"142 "> proposition that all men are created equal.\n"143 "!\n") == ("Four score and seven years ago our fathers brought forth on "144 "this continent a new nation, conceived in liberty, and "145 "dedicated to the proposition that all men are created equal.")146 assert procyon.loads(147 "| Space: the final frontier.\n"148 ">\n"149 "| These are the voyages of the starship Enterprise. Its five-year mission:\n"150 "> to explore strange new worlds, to seek out new life and new\n"151 "> civilizations, to boldly go where no man has gone before.\n") == (152 "Space: the final frontier.\n"153 "\n"154 "These are the voyages of the starship Enterprise. Its five-year "155 "mission: to explore strange new worlds, to seek out new life and new "156 "civilizations, to boldly go where no man has gone before.\n")157def test_list():158 assert procyon.loads("[]") == []159 assert procyon.loads("[0]") == [0]160 assert procyon.loads("[[[0]]]") == [[[0]]]161 assert procyon.loads("[1, 2, 3]") == [1, 2, 3]162 assert procyon.loads("[1, [2, [3]]]") == [1, [2, [3]]]163 with pytest.raises(procyon.ProcyonDecodeError):164 procyon.loads("[")165 with pytest.raises(procyon.ProcyonDecodeError):166 procyon.loads("[1")167 with pytest.raises(procyon.ProcyonDecodeError):168 procyon.loads("[1,")169 with pytest.raises(procyon.ProcyonDecodeError):170 procyon.loads("[}")171 with pytest.raises(procyon.ProcyonDecodeError):172 procyon.loads("[1}")173 with pytest.raises(procyon.ProcyonDecodeError):174 procyon.loads("[1, }")175def test_xlist():176 assert procyon.loads("* 0") == [0]177 assert procyon.loads("* * * 0") == [[[0]]]178 assert procyon.loads("* 1\n" #179 "* 2\n" #180 "* 3\n") == [1, 2, 3]181 assert procyon.loads("* 1\n" #182 "* * 2\n" #183 " * * 3\n") == [1, [2, [3]]]184 assert procyon.loads("*\n"185 " 1\n"186 "*\n"187 " *\n"188 " 2\n"189 " *\n"190 " *\n"191 " 3\n") == [1, [2, [3]]]192 assert procyon.loads("* 1\n" #193 "# :)\n" #194 "* 2\n" #195 " # :(\n" #196 "* 3\n" #197 "# :|\n") == [1, 2, 3]198 with pytest.raises(procyon.ProcyonDecodeError):199 procyon.loads("* 1\n" #200 " * 2\n" #201 " * 3\n")202 with pytest.raises(procyon.ProcyonDecodeError):203 procyon.loads("* * 1\n" #204 " * 2\n")205 with pytest.raises(procyon.ProcyonDecodeError):206 procyon.loads("*")207def test_map():208 assert procyon.loads("{}") == {}209 assert procyon.loads("{0: false}") == {"0": False}210 assert procyon.loads("{0: {1: {2: 3}}}") == {"0": {"1": {"2": 3}}}211 assert procyon.loads("{one: 1, two: 2, three: 3}") == {"one": 1, "two": 2, "three": 3}212 assert procyon.loads("{one: 1, and: {two: 2, and: {three: 3}}}") == {213 "one": 1,214 "and": {215 "two": 2,216 "and": {217 "three": 3218 },219 },220 }221 with pytest.raises(procyon.ProcyonDecodeError):222 procyon.loads("{")223 with pytest.raises(procyon.ProcyonDecodeError):224 procyon.loads("{1")225 with pytest.raises(procyon.ProcyonDecodeError):226 procyon.loads("{1,")227 with pytest.raises(procyon.ProcyonDecodeError):228 procyon.loads("{1:")229 with pytest.raises(procyon.ProcyonDecodeError):230 procyon.loads("{1: 1")231 with pytest.raises(procyon.ProcyonDecodeError):232 procyon.loads("{1: 1,")233 with pytest.raises(procyon.ProcyonDecodeError):234 procyon.loads("{]")235 with pytest.raises(procyon.ProcyonDecodeError):236 procyon.loads("{1: ]")237 with pytest.raises(procyon.ProcyonDecodeError):238 procyon.loads("{1: 1 ]")239 with pytest.raises(procyon.ProcyonDecodeError):240 procyon.loads("{1: 1, ]")241def test_xmap():242 assert procyon.loads(": null") == {"": None}243 assert procyon.loads("zero: 0") == {"zero": 0}244 assert procyon.loads("one:\n" #245 " two:\n" #246 " three: 0") == {247 "one": {248 "two": {249 "three": 0250 }251 }252 }253 assert procyon.loads("one: 1\n" #254 "two: 2\n" #255 "three: 3\n") == {256 "one": 1,257 "two": 2,258 "three": 3259 }260 assert procyon.loads("one: 1\n"261 "and:\n"262 " two: 2\n"263 " and:\n"264 " three: 3\n") == {265 "one": 1,266 "and": {267 "two": 2,268 "and": {269 "three": 3270 },271 },272 }273 assert procyon.loads("one:\n"274 " 1\n"275 "and:\n"276 " two:\n"277 " 2\n"278 " and:\n"279 " three:\n"280 " 3\n") == {281 "one": 1,282 "and": {283 "two": 2,284 "and": {285 "three": 3286 },287 },288 }289 assert procyon.loads("one:\n"290 "\n"291 " 1\n"292 "two:\n"293 " \n"294 " 2\n"295 "three:\n"296 "\t\n"297 " 3\n") == {298 "one": 1,299 "two": 2,300 "three": 3301 }302 with pytest.raises(procyon.ProcyonDecodeError):303 procyon.loads("one: 1\n" #304 " two: 2\n" #305 " three: 3\n"),306 assert procyon.loads("one: 1\n"307 "# :)\n"308 "two: 2\n"309 " # :(\n"310 "three: 3\n") == {311 "one": 1,312 "two": 2,313 "three": 3314 }315 assert procyon.loads("one: 1\n"316 "# :)\n"317 "two: 2\n"318 " # :)\n" # doesn't match indentation of '2'319 "three: 3\n") == {320 "one": 1,321 "two": 2,322 "three": 3323 }324 assert procyon.loads("\"\": \"\"\n" #325 "\":\": \":\"\n") == {326 "": "",327 ":": ":"328 }329 assert procyon.loads("\"\\u0001\": $01\n"330 "\"\\n\": $0a\n"331 "\"\\u007f\": $7f\n"332 "\"\\u0080\": $c280\n"333 "\"\\u72ac\\u524d\": $e78aac e5898d\n") == {334 "\1": b"\1",335 "\n": b"\n",336 "\177": b"\177",337 "\u0080": b"\302\200",338 "\u72ac\u524d": b"\347\212\254\345\211\215",339 }340def test_equivalents():341 assert procyon.loads("!") == procyon.loads("\"\"")342 assert procyon.loads("|\n!") == procyon.loads("\"\"")343 assert procyon.loads("|") == procyon.loads("\"\\n\"")344 assert procyon.loads("|\n>\n!") == procyon.loads("\"\\n\"")345 assert procyon.loads("{1: 2}") == procyon.loads("1: 2")346 assert procyon.loads("[1]") == procyon.loads("* 1")347def test_composite():348 assert procyon.loads("us:\n"349 " name: \"United States of America\"\n"350 " ratio: 1.9\n"351 " stars: 50\n"352 " stripes: 13\n"353 " colors: [$b22234, $ffffff, $3c3b6e]\n"354 " nicknames:\n"355 " * \"The Stars and Stripes\"\n"356 " * \"Old Glory\"\n"357 " * \"The Star-Spangled Banner\"\n"358 "cl:\n"359 " name: \"Republic of Chile\"\n"360 " ratio: 1.5\n"361 " stars: 1\n"362 " stripes: 2\n"363 " colors: [$da291c, $ffffff, $0033a0]\n"364 "cu:\n"365 " name: \"Republic of Cuba\"\n"366 " ratio: 2.0\n"367 " stars: 1\n"368 " stripes: 5\n"369 " colors: [$cb1515, $ffffff, $002a8f]\n") == {370 "us": {371 "name":372 "United States of America",373 "ratio":374 1.9,375 "stars":376 50,377 "stripes":378 13,379 "colors": [b"\xb2\x22\x34", b"\xff\xff\xff", b"\x3c\x3b\x6e"],380 "nicknames": [381 "The Stars and Stripes",382 "Old Glory",383 "The Star-Spangled Banner",384 ],385 },386 "cl": {387 "name": "Republic of Chile",388 "ratio": 1.5,389 "stars": 1,390 "stripes": 2,391 "colors": [b"\xda\x29\x1c", b"\xff\xff\xff", b"\x00\x33\xa0"],392 },393 "cu": {394 "name": "Republic of Cuba",395 "ratio": 2.0,396 "stars": 1,397 "stripes": 5,398 "colors": [b"\xcb\x15\x15", b"\xff\xff\xff", b"\x00\x2a\x8f"],399 },400 }401def test_comment():402 with pytest.raises(procyon.ProcyonDecodeError):403 procyon.loads("# comment")404 with pytest.raises(procyon.ProcyonDecodeError):405 procyon.loads("* # comment")406 assert procyon.loads("true# comment") == True407 assert procyon.loads("true # comment") == True408 assert procyon.loads("true\n# comment") == True409 assert procyon.loads("1# comment") == 1410 assert procyon.loads("1 # comment") == 1411 assert procyon.loads("1\n# comment") == 1412 assert procyon.loads("\"\"# comment") == ""413 assert procyon.loads("\"\" # comment") == ""414 assert procyon.loads("\"\"\n# comment") == ""415 assert procyon.loads("$00# comment") == b"\0"416 assert procyon.loads("$00 # comment") == b"\0"417 assert procyon.loads("$00\n# comment") == b"\0"418 assert procyon.loads("># comment") == "# comment\n"419 assert procyon.loads("> # comment") == "# comment\n"420 assert procyon.loads(">\n# comment") == "\n"421 assert procyon.loads("* # comment\n" #422 " 1\n") == [1]423 assert procyon.loads("* # comment\n" #424 " # etc\n"425 " 1\n") == [1]426 assert procyon.loads("* 1\n" #427 " # comment\n") == [1]428 assert procyon.loads("* 1\n" #429 " # comment\n"430 " # etc\n") == [1]431 assert procyon.loads("* 1\n" #432 "# parent\n"433 " # child\n") == [1]434def test_same_line():435 with pytest.raises(procyon.ProcyonDecodeError):436 procyon.loads("1 1")437 with pytest.raises(procyon.ProcyonDecodeError):438 procyon.loads("1\n1")439def test_bad():440 with pytest.raises(procyon.ProcyonDecodeError):441 procyon.loads("&")442 with pytest.raises(procyon.ProcyonDecodeError):443 procyon.loads("")444 with pytest.raises(procyon.ProcyonDecodeError):445 procyon.loads("]")446def test_stack_smash():447 procyon.loads(("*" * 63) + "null") # doesn’t throw448 with pytest.raises(procyon.ProcyonDecodeError):449 procyon.loads(("*" * 64) + "null")450 with pytest.raises(procyon.ProcyonDecodeError):451 procyon.loads(("*" * 100) + "null")452 with pytest.raises(procyon.ProcyonDecodeError):453 procyon.loads(("*" * 512) + "null")454if __name__ == "__main__":455 import pytest...

Full Screen

Full Screen

test_load.py

Source:test_load.py Github

copy

Full Screen

1# -*- coding: utf-8 -*-2# @Time : 6/24/2021 10:51 PM3# @Author : Rodolfo Londero4# @Email : rodolfpl@gmail.com5# @File : test_load.py6# @Software: PyCharm7import platform8import pytest9class TestLoad13Bus:10 @pytest.fixture(scope='function')11 def dss(self, solve_snap_13bus):12 dss = solve_snap_13bus13 dss.solution.solve14 dss.loads.name = '671'15 # dss.circuit_set_active_element('load.671')16 return dss17 # ===================================================================18 # Integer methods19 # ===================================================================20 def test_loads_count(self, dss):21 expected = 1522 actual = dss.loads.count23 assert actual == expected24 def test_loads_first(self, dss):25 expected = 126 actual = dss.loads.first27 assert actual == expected28 def test_loads_next(self, dss):29 expected = 230 actual = dss.loads.next31 assert actual == expected32 def test_loads_read_idx(self, dss):33 expected = 134 actual = dss.loads.idx35 assert actual == expected36 def test_loads_write_idx(self, dss):37 expected = 238 actual = dss.loads.idx39 assert actual == expected40 def test_loads_read_class(self, dss):41 expected = 142 actual = dss.loads.class_number43 assert actual == expected44 def test_loads_write_class(self, dss):45 expected = 246 dss.loads.class_number = expected47 actual = dss.loads.class_number48 assert actual == expected49 def test_loads_read_model(self, dss):50 expected = 151 actual = dss.loads.model52 assert actual == expected53 def test_loads_write_model(self, dss):54 expected = 255 dss.loads.model = expected56 actual = dss.loads.model57 assert actual == expected58 def test_loads_read_num_cust(self, dss):59 expected = 160 actual = dss.loads.num_cust61 assert actual == expected62 def test_loads_write_num_cust(self, dss):63 expected = 1264 dss.loads.num_cust = expected65 actual = dss.loads.num_cust66 assert actual == expected67 def test_loads_read_status(self, dss):68 expected = 069 actual = dss.loads.status70 assert actual == expected71 def test_loads_write_status(self, dss):72 expected = 173 dss.loads.status = expected74 actual = dss.loads.status75 assert actual == expected76 def test_loads_read_is_delta(self, dss):77 expected = 178 actual = dss.loads.is_delta79 assert actual == expected80 def test_loads_write_is_delta(self, dss):81 expected = 082 dss.loads.is_delta = expected83 actual = dss.loads.is_delta84 assert actual == expected85 # ===================================================================86 # String methods87 # ===================================================================88 def test_loads_read_name(self, dss):89 expected = '671'90 actual = dss.loads.name91 assert actual == expected92 def test_loads_write_name(self, dss):93 expected = '634a'94 dss.loads.name = expected95 actual = dss.loads.name96 assert actual == expected97 def test_loads_read_cvr_curve(self, dss):98 expected = ''99 actual = dss.loads.cvr_curve100 assert actual == expected101 def test_loads_write_cvr_curve(self, dss):102 dss.text("New Loadshape.Test npts=24 interval=1 "103 "mult= "104 "(0.18000001 0.19000000 0.23999999 0.33000001 0.38999999 0.41000000 "105 "0.64999998 1.23000002 1.88999999 1.88999999 1.96000004 1.98000002 "106 "1.45000005 1.62000000 1.88999999 1.79999995 1.78999996 1.19000006 "107 "0.80000001 0.66000003 0.51999998 0.40000001 0.28000000 0.23000000)")108 expected = 'Test'109 dss.loads.cvr_curve = expected110 actual = dss.loads.cvr_curve111 assert actual == expected112 def test_loads_read_daily(self, dss):113 expected = ''114 actual = dss.loads.daily115 assert actual == expected116 def test_loads_write_daily(self, dss):117 dss.text("New Loadshape.Test npts=24 interval=1 "118 "mult= "119 "(0.18000001 0.19000000 0.23999999 0.33000001 0.38999999 0.41000000 "120 "0.64999998 1.23000002 1.88999999 1.88999999 1.96000004 1.98000002 "121 "1.45000005 1.62000000 1.88999999 1.79999995 1.78999996 1.19000006 "122 "0.80000001 0.66000003 0.51999998 0.40000001 0.28000000 0.23000000)")123 expected = 'Test'124 dss.loads.daily = expected125 actual = dss.loads.daily126 assert actual == expected127 def test_loads_read_duty(self, dss):128 expected = ''129 actual = dss.loads.duty130 assert actual == expected131 def test_loads_read_spectrum(self, dss):132 expected = 'defaultload'133 actual = dss.loads.spectrum134 assert actual == expected135 def test_loads_write_spectrum(self, dss):136 dss.text("New Spectrum.Test "137 "NumHarm=7 "138 "harmonic=(1, 3, 5, 7, 9, 11, 13, ) "139 "%mag=(100, 1.5, 20, 14, 1, 9, 7, ) "140 "angle=(0, 180, 180, 180, 180, 180, 180, )")141 expected = 'Test'142 dss.loads.spectrum = expected143 actual = dss.loads.spectrum144 assert actual == expected145 def test_loads_read_yearly(self, dss):146 expected = ''147 actual = dss.loads.yearly148 assert actual == expected149 def test_loads_write_yearly(self, dss):150 dss.text("New Loadshape.Test npts=24 interval=1 "151 "mult= "152 "(0.18000001 0.19000000 0.23999999 0.33000001 0.38999999 0.41000000 "153 "0.64999998 1.23000002 1.88999999 1.88999999 1.96000004 1.98000002 "154 "1.45000005 1.62000000 1.88999999 1.79999995 1.78999996 1.19000006 "155 "0.80000001 0.66000003 0.51999998 0.40000001 0.28000000 0.23000000)")156 expected = 'Test'157 dss.loads.yearly = expected158 actual = dss.loads.yearly159 assert actual == expected160 def test_loads_read_growth(self, dss):161 expected = ''162 actual = dss.loads.growth163 assert actual == expected164 def test_loads_write_growth(self, dss):165 dss.text("New GrowthShape.default npts=2 year=(1, 20, ) mult=(1.025, 1.025, )")166 expected = 'default'167 dss.loads.growth = expected168 actual = dss.loads.growth169 assert actual == expected170 # ===================================================================171 # Float methods172 # ===================================================================173 def test_loads_read_kv(self, dss):174 expected = 4.16175 actual = dss.loads.kv176 assert actual == expected177 def test_loads_write_kv(self, dss):178 expected = 0.48179 dss.loads.kv = expected180 actual = dss.loads.kv181 assert actual == expected182 def test_loads_read_kw(self, dss):183 expected = 1155184 actual = dss.loads.kw185 assert actual == expected186 def test_loads_write_kw(self, dss):187 expected = 1000188 dss.loads.kw = expected189 actual = dss.loads.kw190 assert actual == expected191 def test_loads_read_kvar(self, dss):192 expected = 660193 actual = dss.loads.kvar194 assert actual == expected195 def test_loads_write_kvar(self, dss):196 expected = 600197 dss.loads.kvar = expected198 actual = dss.loads.kvar199 assert actual == expected200 def test_loads_read_pf(self, dss):201 if platform.architecture()[0] == "64bit":202 expected = 0.8682431421244591203 actual = dss.loads.pf204 assert actual == expected205 def test_loads_write_pf(self, dss):206 expected = 1207 dss.loads.pf = expected208 actual = dss.loads.pf209 assert actual == expected210 def test_loads_read_pct_mean(self, dss):211 expected = 50212 actual = dss.loads.pct_mean213 assert actual == expected214 def test_loads_write_pct_mean(self, dss):215 expected = 123216 dss.loads.pct_mean = expected217 actual = dss.loads.pct_mean218 assert actual == expected219 def test_loads_read_pct_std_dev(self, dss):220 expected = 10221 actual = dss.loads.pct_std_dev222 assert actual == expected223 def test_loads_write_pct_std_dev(self, dss):224 expected = 123225 dss.loads.pct_std_dev = expected226 actual = dss.loads.pct_std_dev227 assert actual == expected228 def test_loads_read_pct_series_rl(self, dss):229 expected = 50230 actual = dss.loads.rl231 assert actual == expected232 def test_loads_write_pct_series_rl(self, dss):233 expected = 123234 dss.loads.rl = expected235 actual = dss.loads.rl236 assert actual == expected237 def test_loads_read_allocation_factor(self, dss):238 expected = 0.5239 actual = dss.loads.allocation_factor240 assert actual == expected241 def test_loads_write_allocation_factor(self, dss):242 expected = 123243 dss.loads.allocation_factor = expected244 actual = dss.loads.allocation_factor245 assert actual == expected246 def test_loads_read_c_factor(self, dss):247 expected = 4248 actual = dss.loads.c_factor249 assert actual == expected250 def test_loads_write_c_factor(self, dss):251 expected = 123252 dss.loads.c_factor = expected253 actual = dss.loads.c_factor254 assert actual == expected255 def test_loads_read_cvr_watts(self, dss):256 expected = 1257 actual = dss.loads.cvr_watts258 assert actual == expected259 def test_loads_write_cvr_watts(self, dss):260 expected = 123261 dss.loads.cvr_watts = expected262 actual = dss.loads.cvr_watts263 assert actual == expected264 def test_loads_read_cvr_vars(self, dss):265 expected = 2266 actual = dss.loads.cvr_vars267 assert actual == expected268 def test_loads_write_cvr_vars(self, dss):269 expected = 123270 dss.loads.cvr_vars = expected271 actual = dss.loads.cvr_vars272 assert actual == expected273 def test_loads_read_kva(self, dss):274 if platform.architecture()[0] == "64bit":275 expected = (dss.loads.kw ** 2 + dss.loads.kvar ** 2) ** (1 / 2)276 actual = dss.loads.kva277 assert actual == expected278 def test_loads_write_kva(self, dss):279 expected = 1500280 dss.loads.kva = expected281 actual = dss.loads.kva282 assert actual == expected283 def test_loads_read_kwh(self, dss):284 expected = 0285 actual = dss.loads.kwh286 assert actual == expected287 def test_loads_write_kwh(self, dss):288 expected = 123289 dss.loads.kwh = expected290 actual = dss.loads.kwh291 assert actual == expected292 def test_loads_read_kwh_days(self, dss):293 expected = 30294 actual = dss.loads.kwh_days295 assert actual == expected296 def test_loads_write_kwh_days(self, dss):297 expected = 60298 dss.loads.kwh_days = expected299 actual = dss.loads.kwh_days300 assert actual == expected301 def test_loads_read_r_neut(self, dss):302 expected = -1303 actual = dss.loads.r_neut304 assert actual == expected305 def test_loads_write_r_neut(self, dss):306 expected = 60.0307 dss.loads.r_neut = expected308 actual = dss.loads.r_neut309 assert actual == expected310 def test_loads_read_x_neut(self, dss):311 expected = 0312 actual = dss.loads.x_neut313 assert actual == expected314 def test_loads_write_x_neut(self, dss):315 expected = 60.0316 dss.loads.x_neut = expected317 actual = dss.loads.x_neut318 assert actual == expected319 def test_loads_read_vmax_pu(self, dss):320 expected = 1.05321 actual = dss.loads.vmax_pu322 assert actual == expected323 def test_loads_write_vmax_pu(self, dss):324 expected = 1.1325 dss.loads.vmax_pu = expected326 actual = dss.loads.vmax_pu327 assert actual == expected328 def test_loads_read_vmin_pu(self, dss):329 expected = 0.95330 actual = dss.loads.vmin_pu331 assert actual == expected332 def test_loads_write_vmin_pu(self, dss):333 expected = 0.9334 dss.loads.vmin_pu = expected335 actual = dss.loads.vmin_pu336 assert actual == expected337 def test_loads_read_vmin_emerg(self, dss):338 expected = 0339 actual = dss.loads.vmin_emerg340 assert actual == expected341 def test_loads_write_vmin_emerg(self, dss):342 expected = 0.5343 dss.loads.vmin_emerg = expected344 actual = dss.loads.vmin_emerg345 assert actual == expected346 def test_loads_read_vmin_norm(self, dss):347 expected = 0348 actual = dss.loads.vmin_norm349 assert actual == expected350 def test_loads_write_vmin_norm(self, dss):351 expected = 0.8352 dss.loads.vmin_norm = expected353 actual = dss.loads.vmin_norm354 assert actual == expected355 def test_loads_read_xfkva(self, dss):356 expected = 0357 actual = dss.loads.xfkva358 assert actual == expected359 def test_loads_write_xfkva(self, dss):360 expected = 123.1361 dss.loads.xfkva = expected362 actual = dss.loads.xfkva363 assert actual == expected364 def test_loads_read_rel_weight(self, dss):365 expected = 1366 actual = dss.loads.rel_weight367 assert actual == expected368 def test_loads_write_rel_weight(self, dss):369 expected = 123.1370 dss.loads.rel_weight = expected371 actual = dss.loads.rel_weight372 assert actual == expected373 # ===================================================================374 # Variant methods375 # ===================================================================376 def test_loads_all_names(self, dss):377 expected = ['671', '634a', '634b', '634c', '645', '646', '692',378 '675a', '675b', '675c', '611', '652', '670a', '670b',379 '670c']380 actual = dss.loads.names381 assert actual == expected382 def test_loads_read_zipv(self, dss):383 expected = []384 actual = dss.loads.zipv385 assert actual == expected386 def test_loads_write_zipv(self, dss):387 expected = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]388 dss.loads.zipv = str(expected)389 actual = dss.loads.zipv...

Full Screen

Full Screen

18_Example_Loads.py

Source:18_Example_Loads.py Github

copy

Full Screen

1# -*- encoding: utf-8 -*-2"""3 Created by Ênio Viana at 15/05/20214"""5from py_dss_interface.models.Example.ExampleBase import ExampleBase6dss = ExampleBase("13").dss7# Integer methods8print(45 * '=' + ' Integer Methods' + 45 * '=')9print(f'dss.loads_first(): {dss.first()}')10print(f'dss.loads_next(): {dss.next()}')11print(f'dss.loads_read_idx(): {dss.idx_read()}')12print(f'dss.loads_write_idx(): {dss.idx_write(1)}')13print(f'dss.loads_count(): {dss.count()}')14print(f'dss.loads_read_class(): {dss.class_read()}')15print(f'dss.loads_write_class(): {dss.class_write(1)}')16print(f'dss.loads_read_class(): {dss.class_read()}')17print(f'dss.loads_read_model(): {dss.model_read()}')18print(f'dss.loads_write_model(): {dss.model_write(2)}')19print(f'dss.loads_read_model(): {dss.model_read()}')20print(f'dss.loads_read_num_cust(): {dss.num_cust_read()}')21print(f'dss.loads_write_num_cust(): {dss.num_cust_write(12)}')22print(f'dss.loads_read_num_cust(): {dss.num_cust_read()}')23print(f'dss.loads_read_status(): {dss.status_read()}')24print(f'dss.loads_write_status(): {dss.status_write(1)}')25print(f'dss.loads_read_status(): {dss.status_read()}')26print(f'dss.loads_read_is_delta(): {dss.is_delta()}')27print(f'dss.loads_write_is_delta(): {dss.is_delta_write(0)}')28print(f'dss.loads_read_is_delta(): {dss.is_delta()}')29# String methods30print(45 * '=' + ' String Methods' + 45 * '=')31print(f'dss.loads_read_name(): {dss.name_read()}')32print(f'dss.loads_write_name(): {dss.name_write("634a")}')33print(f'dss.loads_read_name(): {dss.name_read()}')34print(f'dss.loads_read_cvr_curve(): {dss.cvr_curve_read()}')35# print(f'dss.loads_write_cvr_curve(): {dss.loads_write_cvr_curve("")}')36print(f'dss.loads_read_daily(): {dss.daily_read()}')37# print(f'dss.loads_write_daily(): {dss.loads_write_daily("")}')38print(f'dss.loads_read_daily(): {dss.daily_read()}')39print(f'dss.loads_read_duty(): {dss.duty_read()}')40# print(f'dss.loads_write_duty(): {dss.loads_write_duty("12")}')41print(f'dss.loads_read_duty(): {dss.duty_read()}')42print(f'dss.loads_read_spectrum(): {dss.spectrum_read()}')43# print(f'dss.loads_write_spectrum(): {dss.loads_write_spectrum("")}')44print(f'dss.loads_read_spectrum(): {dss.spectrum_read()}')45print(f'dss.loads_read_yearly(): {dss.yearly_read()}')46# print(f'dss.loads_write_yearly(): {dss.loads_write_yearly("")}')47print(f'dss.loads_read_yearly(): {dss.yearly_read()}')48print(f'dss.loads_read_growth(): {dss.growth_read()}')49# print(f'dss.loads_write_growth(): {dss.loads_write_growth("")}')50print(f'dss.loads_read_growth(): {dss.growth_read()}')51# Float methods52print(45 * '=' + ' Float Methods' + 45 * '=')53print(f'dss.loads_read_kw(): {dss.kw_read()}')54print(f'dss.loads_write_kw(): {dss.kw_write(123.1)}')55print(f'dss.loads_read_kw(): {dss.kw_read()}')56print(f'dss.loads_read_kv(): {dss.kv_read()}')57print(f'dss.loads_write_kv(): {dss.kv_write(123.1)}')58print(f'dss.loads_read_kv(): {dss.kv_read()}')59print(f'dss.loads_read_kvar(): {dss.kvar_read()}')60print(f'dss.loads_write_kvar(): {dss.kvar_write(123.1)}')61print(f'dss.loads_read_kvar(): {dss.kvar_read()}')62print(f'dss.loads_read_pf(): {dss.pf_read()}')63print(f'dss.loads_write_pf(): {dss.pf_write(123.1)}')64print(f'dss.loads_read_pf(): {dss.pf_read()}')65print(f'dss.loads_read_pct_mean(): {dss.pct_mean_read()}')66print(f'dss.loads_write_pct_mean(): {dss.pct_mean_write(123.1)}')67print(f'dss.loads_read_pct_mean(): {dss.pct_mean_read()}')68print(f'dss.loads_read_pct_std_dev(): {dss.pct_std_dev_read()}')69print(f'dss.loads_write_pct_std_dev(): {dss.pct_std_dev_write(123.1)}')70print(f'dss.loads_read_pct_std_dev(): {dss.pct_std_dev_read()}')71print(f'dss.loads_read_allocation_factor(): {dss.allocation_factor_read()}')72print(f'dss.loads_write_allocation_factor(): {dss.allocation_factor_write(123.1)}')73print(f'dss.loads_read_allocation_factor(): {dss.allocation_factor_read()}')74print(f'dss.loads_read_c_factor(): {dss.c_factor_read()}')75print(f'dss.loads_write_c_factor(): {dss.c_factor_write(123.1)}')76print(f'dss.loads_read_c_factor(): {dss.c_factor_read()}')77print(f'dss.loads_read_cvr_watts(): {dss.cvr_watts_read()}')78print(f'dss.loads_write_cvr_watts(): {dss.cvr_watts_write(123.1)}')79print(f'dss.loads_read_cvr_watts(): {dss.cvr_watts_read()}')80print(f'dss.loads_read_cvr_vars(): {dss.cvr_vars_read()}')81print(f'dss.loads_write_cvr_vars(): {dss.cvr_vars_write(123.1)}')82print(f'dss.loads_read_cvr_vars(): {dss.cvr_vars_read()}')83print(f'dss.loads_read_kva(): {dss.kva_read()}')84print(f'dss.loads_write_kva(): {dss.kva_write(123.1)}')85print(f'dss.loads_read_kva(): {dss.kva_read()}')86print(f'dss.loads_read_kwh(): {dss.kwh_read()}')87print(f'dss.loads_write_kwh(): {dss.kwh_write(123.1)}')88print(f'dss.loads_read_kwh(): {dss.kwh_read()}')89print(f'dss.loads_read_kwh_days(): {dss.kwh_days_read()}')90print(f'dss.loads_write_kwh_days(): {dss.kwh_days_write(123.1)}')91print(f'dss.loads_read_kwh_days(): {dss.kwh_days_read()}')92print(f'dss.loads_read_r_neut(): {dss.r_neut_read()}')93print(f'dss.loads_write_r_neut(): {dss.r_neut_write(123.1)}')94print(f'dss.loads_read_r_neut(): {dss.r_neut_read()}')95print(f'dss.loads_read_vmax_pu(): {dss.vmax_pu_read()}')96print(f'dss.loads_write_vmax_pu(): {dss.loads_write_vmax_pu(123.1)}')97print(f'dss.loads_read_vmax_pu(): {dss.vmax_pu_read()}')98print(f'dss.loads_read_vmin_emerg(): {dss.vmin_emerg_read()}')99print(f'dss.loads_write_vmin_emerg(): {dss.vmin_emerg_write(123.1)}')100print(f'dss.loads_read_vmin_emerg(): {dss.vmin_emerg_read()}')101print(f'dss.loads_read_vmin_norm(): {dss.vmin_norm_read()}')102print(f'dss.loads_write_vmin_norm(): {dss.vmin_norm_write(123.1)}')103print(f'dss.loads_read_vmin_norm(): {dss.vmin_norm_read()}')104print(f'dss.loads_read_vmin_pu(): {dss.vmin_pu_read()}')105print(f'dss.loads_write_vmin_pu(): {dss.vmin_pu_write(123.1)}')106print(f'dss.loads_read_vmin_pu(): {dss.vmin_pu_read()}')107print(f'dss.loads_read_xfkva(): {dss.xfkva_read()}')108print(f'dss.loads_write_xfkva(): {dss.xfkva_write(123.1)}')109print(f'dss.loads_read_xfkva(): {dss.xfkva_read()}')110print(f'dss.loads_read_x_neut(): {dss.x_neut_read()}')111print(f'dss.loads_write_x_neut(): {dss.x_neut_write(123.1)}')112print(f'dss.loads_read_x_neut(): {dss.x_neut_read()}')113print(f'dss.loads_read_pct_series_rl(): {dss.rl_read()}')114print(f'dss.loads_write_pct_series_rl(): {dss.rl_write(123.1)}')115print(f'dss.loads_read_pct_series_rl(): {dss.rl_read()}')116print(f'dss.loads_read_rel_weight(): {dss.rel_weight_read()}')117print(f'dss.loads_write_rel_weight(): {dss.rel_weight_write(123.1)}')118print(f'dss.loads_read_rel_weight(): {dss.rel_weight_read()}')119# Variant methods120print(45 * '=' + ' Variant Methods' + 45 * '=')121print(f'dss.loads_all_names(): {dss.names()}')122print(f'dss.loads_read_zipv(): {dss.zipv_read()}')123print(f'dss.loads_write_zipv(): {dss.zipv_write("[1 2 3 4 5 6 7]")}')...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful