**TI92P*mainT:å§øä6&§”ÀŸ“'T§:å:å§ŸåV%§ÐŽRC_AC_MUL¥ZÁ() Prgm ©Progetto capannone multipiano in acciaio Local Vers,Data,Tit ©*********************** "c_ac_mul"Tit ©Autori: ing. P.Benetti © : prof.A.Carotti "25/06/2005"Data " 0.0.1"Vers ©*********************** ©Global OldMode ©Inizio del programma*** Local choice, index Local OldDir Local strMnu ©Subroutines declaration Local DesIPE,DesHEA,StfHrz,StfVrt Define DesIPE() = Prgm Local bRetry, i, row, col © Reset the global values if required If NOT IsNum(dist) 3dist If NOT ISNum(length) 6length truebRetry while (bRetry) ClrIo String(dist)strDist String(length)strLen Dialog Title "Geometria edificio" Request "Interasse travi (m)",strDist Request "Luce travi (m)",strLen EndDlog If ok=0 Then Return EndIf Expr(strDist)dist Expr(strLen)length If (IsNum(dist) AND IsNum(length)) Then If (dist ž 2 AND dist œ 6) AND (length ž 2 AND length œ 6) Then falsebRetry Else Text("Range: (2-6) m") EndIf EndIf EndWhile © Find the row index {2,3,4,5,6}Temp 1i while (dist>Temp[i]) i+1i EndWhile irow © Find the column index 1i while (length>Temp[i]) i+1i EndWhile icol ZLib\OutputEx(1,"Altezza trave suggerita","L") ZLib\OutputEx(2,"IPE: "&String(tabIPE[row,col]) &" mm","L") EndPrgm Define DesHEA() = Prgm Local bRetry, i, row, col © Reset the global values if required If NOT IsNum(load) 500load If NOT ISNum(heigth) 3heigth truebRetry while (bRetry) ClrIo String(load)strLoa String(heigth)strHei Dialog Title "Geometria edificio" Request "Carico colonne (kN)", strLoa Request "h o Lo (m)",strHei EndDlog If ok=0 Then Return EndIf Expr(strLoa)load Expr(strHei)heigth If (IsNum(load) AND IsNum(heigth)) Then If (load ž 100 AND load œ 1750) AND (heigth ž 3 AND heigth œ 4) Then falsebRetry Else Dialog Title "Fuori intervallo" Text "Range:" Text "100 kN œ P œ 1750 kN" Text "3.0 m œ h,Lo œ 4.0 m" EndDlog EndIf EndIf EndWhile © Find the row index {100,250,500,750,1000,1250,1500,1750}Temp 1i while (load>Temp[i]) i+1i EndWhile irow © Find the column index {3,3.50,4}Temp 1i while (heigth>Temp[i]) i+1i EndWhile icol ZLib\OutputEx(1,"Altezza colonna suggerita","L") ZLib\OutputEx(2,"HEA: "&String(tabHEA[row,col]) &" mm","L") EndPrgm Define StfHrz() = Prgm Local bRetry, i, next, prev Local x1_,x2_,y1_,y2_,K Local weight © Reset the global values if required If NOT ISNum(length) 50length If NOT IsNum(load) 150load truebRetry while (bRetry) ClrIo String(length)strLen String(load)strLoa Dialog Title "Dati" Text "Luce trave orizzontale" Request "L(m)", strlen Text "Pressione del vento" Request "q (daN/m²)",strLoa EndDlog If ok=0 Then Return EndIf Expr(strLen)length Expr(strLoa)load If (IsNum(length) AND IsNum(load)) Then If (load ž 70 AND load œ 180) AND (length ž 20 AND length œ 80) Then falsebRetry Else Dialog Title "Fuori intervallo" Text "Range:" Text "20 m œ L œ 80 m" Text "70 daN/m² œ q œ 180 daN/m²" EndDlog EndIf EndIf EndWhile © Find the previous and the next point {20,30,40,50,60,70,80}Temp 1i while (length>Temp[i]) i+1i EndWhile inext If next = 1 ©The first point 2next next-1prev Temp[prev]x1_ Temp[next]x2_ ©Interpolation on the wind pressure (tabStH[prev,2]-tabStH[prev,1])/(180-70)K tabStH[prev,1]+K*(load-70)y1_ (tabStH[next,2]-tabSth[next,1])/(180-70)K tabSth[next,1]+K*(load-70)y2_ ©Interpolation on the length of the bean (y2_-y1_)/(x2_-x1_)K y1_+K*(length-x1_)weight ZLib\OutputEx(1,"Peso controventi","L") ZLib\OutputEx(2,"orizzontali:","L") ZLib\OutputEx(3,"P = " & String(weight) &" daN","L") EndPrgm Define StfVrt() = Prgm Local bRetry, i Local w300, w2000, K, weight © Reset the global values if required If NOT IsNum(floors) 8floors: ©index of the fl. (starts at 3) If floors < 1 OR floors >10 8floors If NOT IsNum(load) 1000load If load < 300 OR load > 2000 1000load truebRetry while (bRetry) ClrIo String(load)strLoa Dialog Title "Dati" Dropdown "Num. piani", Seq(String(i),i,3,12),floors Text "Carico Orizzontale" Request "w (daN/m²)",strLoa EndDlog If ok=0 Then Return EndIf Expr(strLoa)load If IsNum(load)Then If (load ž 300 AND load œ 2000) Then falsebRetry Else Dialog Title "Fuori intervallo" Text "Range:" Text "300 daN/m² œ w œ 2000 daN/m²" EndDlog EndIf EndIf EndWhile © Find the first and the last point of the line tabStV[floors,1]w300 tabStV[floors,2]w2000 ©Interpolation (tabStV[floors,2]-tabStV[floors,1])/(2000-300)K tabStV[floors,1]+K*(load-300)weight ZLib\OutputEx(1,"Peso controventi","L") ZLib\OutputEx(2,"verticali:","L") ZLib\OutputEx(3,"P = " & String(weight) &" daN","L") EndPrgm ©Create and set the Temp Folder getFold()OldDir try ZLib\ChngFold("Temp") ZLib\ChngMode() Else Dialog Title "Errore" Text "L'installazione non e' stata" Text "eseguita correttamente oppure" Text "e' corrotta." Text "Copiare il programma Setup_IA" Text "sulla TI-89 ed eseguirlo." EndDlog Return EndTry © Create the common func and data in the Temp folder Define IsNum(checkVar) = Func If GetType(checkVar)="NUM" Then return true Else return false EndIf EndFunc ©Data Initialization [[120,160,200,270,300][140,200,240,300,360][160,220,270,330,400][180,240,300,360,450][180,240,300,440,500]]tabIPE [[120,120,120][140,140,160][180,200,200][220,240,240][240,260,260][280,280,300][300,300,320][320,340,360]]tabHEA [[300,300][450,510][900,990][1400,1700][2050,2250][2800,3100][3700,3850]]tabStH [[200,450][250,750][300,1100][350,1600][450,2100][550,2600][650,3300][750,4000][850,4700][1000,5600]]tabStV ClrIo Disp ZLib\Splash(Tit,Vers,Data) Lbl start ClrIo ZLib\OutputEx (6, "CAPANNONE MULTIPIANO", "C") ZLib\OutputEx (7, "SELEZIONA IL CALCOLO", "C") {"Prog.travi","Prog.colonne","Controv.orizz.","Controv.vert.","Esci"}strMnu 1choice PopUp strMnu, choice If choice = Dim(strMnu) Goto blExit choiceindex If index = 1 Then DesIPE() ElseIf index = 2 Then DesHEA() ElseIf index = 3 Then StfHrz() ElseIf index = 4 Then StfVrt() Endif ZLib\OutputEx (7, "Premi ENTER", "R") Pause Goto Start Lbl blExit Dialog Title "fine programma" Text " " EndDlog If ok=0 Then Goto Start EndIf SetMode(OldMode) DelVar OldMode SetFold(#OldDir) EndPrgm äåÜBŽ