1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Public Sub NiveauP()
Dim Alpha_vitre As Variant, A As Variant, AlphaP As Variant, AlphaM As Variant
Dim LpGlobal As Single, LpTot As Single, S As Variant
Dim Lpvoisin As Variant, Lw As Variant, Lwtrans As Variant, Lv As Variant
Dim PondA As Variant
Dim sigmaM As Variant, Alpha As Variant
Dim LpTotvoisin As Double, LpGlobalvoisin As Double
Dim inpt, Oupt
S = CDbl(UserForm1.TxtHteurMit.Value) * CDbl(UserForm1.TxtLargMit.Value)
inpt = Worksheets("Feuil4").Range("A5:N25")
Oupt = Worksheets("Feuil3").Range("A2:J22")
AlphaP = AlphaPlancher(i, n, inpt)
AlphaM = AlphaMur(i, n, inpt)
For i = 1 To 21
'Alpha = inpt(i, 3) 'Worksheets("Feuil4").Range("C" & i)
Alpha_vitre = inpt(i, 12) 'Worksheets("Feuil4").Range("L" & i)
PondA = inpt(i, 2) 'Worksheets("Feuil4").Range("B" & i)
R = Oupt(i, 2) 'Worksheets("Feuil3").Range("B" & i - 3)
Lwatot = Oupt(i, 7) 'Worksheets("Feuil3").Range("G" & i - 3)
sigmaM = Oupt(i, 1) 'Worksheets("Feuil3").Range("A" & i - 3)
A = (AlphaP * ((2 * CDbl(UserForm1.TxtLargPlanch.Value) * CDbl(UserForm1.TxtLongPlanch.Value)))) + _
((AlphaM * CDbl(UserForm1.TxtHteurPlaf.Value) * 2 * (CDbl(UserForm1.TxtLargPlanch.Value) + CDbl(UserForm1.TxtLongPlanch.Value))) - _
UserForm1.cboOuvAutLoc.Value - UserForm1.cboSurFen.Value) + _
(Alpha_vitre * (100 - UserForm1.cboPourcOuv.Value) * UserForm1.cboSurFen.Value / 100) + UserForm1.cboOuvAutLoc.Value + _
(UserForm1.cboPourcOuv.Value * UserForm1.cboSurFen.Value / 100)
Lp = Lwatot + 6 - (10 * Logd(A))
LpTot = LpTot + 10 ^ (0.1 * (Lp + PondA))
)
Lw = Lp + (10 * Logd(S))
Lwtrans = Lw - R
Lv = Lwtrans - (10 * Logd(sigmaM * S))
Lpvoisin = Lv + (10 * Logd(4 * sigmaM * S / Avoisin))
LpTotvoisin = LpTotvoisin + 10 ^ (0.1 * (Lpvoisin + PondA))
Oupt(i, 9) = Lp 'ThisWorkbook.Worksheets("Feuil3").Cells(j, 9).Value = Lp
Oupt(i, 10) = Lpvoisin 'ThisWorkbook.Worksheets("Feuil3").Cells(j, 10).Value = Lpvoisin
Next i
Worksheets("Feuil4").Range("A5:L25") = inpt
Worksheets("Feuil3").Range("A2:J22") = Oupt
end sub |
Partager