SUMARI 1 I. CLASSES DEL SUBPROGRAMA DE CÀLCUL 3. A. Classe CEstructura...3 B. Classe CElement...74 II. MÒDULS DEL SUBPROGRAMA DE CÀLCUL 127

Size: px
Start display at page:

Download "SUMARI 1 I. CLASSES DEL SUBPROGRAMA DE CÀLCUL 3. A. Classe CEstructura...3 B. Classe CElement...74 II. MÒDULS DEL SUBPROGRAMA DE CÀLCUL 127"

Transcription

1 1 Sumari SUMARI 1 I. CLASSES DEL SUBPROGRAMA DE CÀLCUL 3 A. Classe CEstructura...3 B. Classe CElement...74 II. MÒDULS DEL SUBPROGRAMA DE CÀLCUL 127 A. Mòdul principal...127

2

3 3 I. Classes del subprograma de càlcul A. Classe CEstructura Option Explicit Const Tiny = 1E-30 Private m_colbarra As CColBarra Private m_colnode As CColNode Private m_nom As String Private m_colaccio As CColAccio Private m_matriuderigidesaglobal As Variant Private m_matriuderigidesareduida As Variant Private m_matriuderigidesareduidacalculada As Boolean Private m_matriuderigidesareduidainvertida As Variant Private m_matriuderigidesareduidainvertidacalculada As Boolean Private m_vectordecarregaglobal As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_matriudecarregaglobal As Variant Private m_vectordecarregareduit As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_matriudecarregareduida As Variant Private m_vectordecorrimentsnodalsreduit As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_matriudecorrimentsnodalsreduit As Variant Private m_vectordecorrimentsnodalsglobal As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_matriudecorrimentsnodalsglobal As Variant Private m_vectordereaccionsnodalsglobal As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_matriudereaccionsnodalsglobal As Variant Private m_matriudeconnectivitat As Variant Private m_vectorsdecorrimentselementals As Collection 'NO ES FA SERVIR Private m_vectorsdecorrimentselementalscalculats As Boolean 'NO ES FA SERVIR Private m_vectorsdecarregueselementals As Collection 'NO ES FA SERVIR 'VARIABLES DEL CÀLCUL NO LINEAL 'PRIMER IMPLEMENTO EL MÈTODE DE NEWTON-RAPHSON NO MODIFICAT Private m_matriuderigidesaglobalnewton As Variant 'OK Private m_matriuderigidesareduidanewton As Variant 'OK Private m_vectordecorrimentsnodalsreduitparcialnewton As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_vectordecorrimentsnodalsglobalparcialnewton As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_vectordecorrimentsnodalsreduitnewton As Variant 'EN PROCÉS DE SUBSTITUCIÓ

4 4 Private m_vectordecorrimentsnodalsglobalnewton As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_matriudevectorsdecarregaincrementals As Variant 'NOU PER AL CÀLCUL INCREMENTAL Private m_matriudevectorsdecarreganoequilibrats As Variant 'NOU PER AL CÀLCUL INCREMENTAL Private m_matriudevectorsdecorrimentsnodalsreduitnewton As Variant 'NOU PER AL CÀLCUL INCREMENTAL Private m_matriudevectorsdecorrimentsnodalsglobalnewton As Variant 'NOU PER AL CÀLCUL INCREMENTAL Private m_vectordecarregareduitnewton As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_matriuderigidesareduidanewtoninvertida As Variant 'OK Private m_matriuderigidesareduidanewtonmodificatinvertida As Variant 'OK Private m_vectorsdecorrimentselementalsnewton As Collection ' Private m_vectorcarreganoequilibradanewton As Variant 'EN PROCÉS DE SUBSTITUCIÓ Private m_vectordecorrimentsnodalsglobalnewtonacumulat As Variant Private m_vectordecarregadereferencianewton As Variant Private m_tin As Double Private m_modalitatdecalcullineal As Integer '1 DESCOMPOSICIÓ LU '2 GAUSS-JORDAN '3 ELIMINACIÓ GAUSSIANA '4 DESCOMPOSICIÓ CHOLESKY Private m_accioactivada As Long Private m_tramsdelcalculincremental As Long Private m_nombremaximditeracions As Long Private m_modalitatdecalculnolineal As Integer '1 MÈTODE INCREMENTAL '2 MÈTODE NEWTON-RAPHSON '3 MÈTODE NEWTON-RAPHSON MODIFICAT '4 MÈTODE NEWTON-RAPHSON INCREMENTAL '5 MÈTODE NEWTON-RAPHSON INCREMENTAL MODIFICAT Sub CalculaMatriuDeVectorsDeCarregaNoEquilibradaNR(Iteracio As Long, AccioActivada As Long) Dim MReal() As Double Dim MNoEq() As Double Dim CIni() As Double Dim i As Long, imax As Long Dim MRealAcum() As Double Dim SumaParcial As Double Dim j As Long

5 5 imax = UBound(Estructura.MatriuDeCarregaReduida, 1) ReDim CIni(1 To imax, 1 To 1) ReDim MRealAcum(i To imax, 1 To 1) For i = 1 To imax CIni(i, 1) = Estructura.MatriuDeCarregaReduida(i, AccioActivada) Next i AssignaVariantAMatriu m_matriudevectorsdecarregaincrementals, MReal For i = 1 To imax SumaParcial = 0 For j = 1 To Iteracio SumaParcial = SumaParcial + MReal(i, j) Next j MRealAcum(i, 1) = SumaParcial Next i AssignaVariantAMatriu m_matriudevectorsdecarreganoequilibrats, MNoEq For i = 1 To imax MNoEq(i, Iteracio) = CIni(i, 1) - MRealAcum(i, 1) Next i m_matriudevectorsdecarreganoequilibrats = MNoEq Sub CalculaMatriuDeVectorsDeCarregaRealNR(Iteracio As Long) Dim MCor() As Double Dim MCorAcum() As Double Dim KR() As Double Dim F() As Double Dim CReal() As Double Dim i As Long, imax As Long Dim j As Long Dim SumaParcial As Double AssignaVariantAMatriu m_matriudevectorsdecorrimentsnodalsreduitnewton, MCor AssignaVariantAMatriu Estructura.MatriuDeRigidesaReduidaNewton, KR imax = UBound(MCor, 1) ReDim MCorAcum(1 To imax, 1 To 1) 'For i = 1 To imax

6 6 ' SumaParcial = 0 ' For j = 1 To Iteracio ' SumaParcial = SumaParcial + MCor(i, j) ' Next j ' MCorAcum(i, 1) = SumaParcial 'Next i For i = 1 To imax SumaParcial = 0 If Iteracio > 1 Then For j = Iteracio - 1 To Iteracio - 1 SumaParcial = SumaParcial + MCor(i, j) Next j Else SumaParcial = 0 MCorAcum(i, 1) = SumaParcial Next i MultiplicaMatrius KR, MCorAcum, F AssignaVariantAMatriu m_matriudevectorsdecarregaincrementals, CReal For i = 1 To imax CReal(i, Iteracio) = F(i, 1) Next i m_matriudevectorsdecarregaincrementals = CReal Sub InicialitzaMatriuDeVectorsDeCarregaNoEquilibradaReduitsNR(AccioActivada As Long, MaxIteracio As Long) Dim A() As Long Dim Max As Long Dim i As Long Max = UBound(Estructura.MatriuDeCarregaReduida, 1) ReDim A(1 To Max, 1 To MaxIteracio) 'For i = 1 To Max 'A(i, 1) = Estructura.MatriuDeCarregaReduida(i, AccioActivada) 'Next i m_matriudevectorsdecarreganoequilibrats = A

7 7 Property Get MatriuDeVectorsDeCorrimentsNodalsGlobalNewton() As Long MatriuDeVectorsDeCorrimentsNodalsGlobalNewton = m_matriudevectorsdecorrimentsnodalsglobalnewton Property Let MatriuDeVectorsDeCorrimentsNodalsGlobalNewton(ByVal Val As Long) m_matriudevectorsdecorrimentsnodalsglobalnewton = Val Property Get ModalitatDeCalculNOLineal() As Long ModalitatDeCalculNOLineal = m_modalitatdecalculnolineal Property Let ModalitatDeCalculNOLineal(ByVal Val As Long) m_modalitatdecalculnolineal = Val Property Get AccioActivada() As Long AccioActivada = m_accioactivada Property Let AccioActivada(ByVal Val As Long) m_accioactivada = Val Property Get TramsDelCalculIncremental() As Long TramsDelCalculIncremental = m_tramsdelcalculincremental Property Let TramsDelCalculIncremental(ByVal Val As Long) m_tramsdelcalculincremental = Val Property Get NombreMaximDIteracions() As Long NombreMaximDIteracions = m_nombremaximditeracions Property Let NombreMaximDIteracions(ByVal Val As Long) m_nombremaximditeracions = Val Property Get MatriuDeVectorsDeCarregaIncrementals() As Variant MatriuDeVectorsDeCarregaIncrementals = m_matriudevectorsdecarregaincrementals Property Let MatriuDeVectorsDeCarregaIncrementals(ByVal Val As Variant) m_matriudevectorsdecarregaincrementals = Val Property Get Tin() As Double 'AQUEST VALOR ÉS GAMMA PIVOT Tin = m_tin Property Let Tin(ByVal Val As Double) m_tin = Val

8 8 Property Get ModalitatDeCalculLineal() As Integer ModalitatDeCalculLineal = m_modalitatdecalcullineal Property Let ModalitatDeCalculLineal(ByVal Val As Integer) m_modalitatdecalcullineal = Val Sub CalculaMatriuDeVectorsDeCarregaIncrementalsReduits(NumeroDeIteracions As Long, _ AccioActivada As Long) Dim MVC() As Double 'MATRIUS DE VECTORS DE CÀRREGA PER A CADA ITERACIÓ Dim IteracioEnCurs As Long Dim i As Long, maxi As Long, j As Long, maxj As Long Dim Multiplicador As Double Estructura.CalculaMatriuDeCarregaGlobal Estructura.CalculaMatriuDeCarregaReduida maxi = UBound(Estructura.MatriuDeCarregaReduida, 1) maxj = NumeroDeIteracions ReDim MVC(1 To maxi, 1 To maxj) For j = 1 To maxj Multiplicador = 1 / maxj For i = 1 To maxi MVC(i, j) = Multiplicador * Estructura.MatriuDeCarregaReduida(i, AccioActivada) Next i Next j Estructura.MatriuDeVectorsDeCarregaIncrementals = MVC Sub InicialitzaMatriuDeVectorsDeCarregaNoRepartida(NumeroDeIteracions As Long, _ AccioActivada As Long) Dim MVC() As Double 'MATRIUS DE VECTORS DE CÀRREGA PER A CADA ITERACIÓ Dim IteracioEnCurs As Long Dim i As Long, maxi As Long, j As Long, maxj As Long Dim Multiplicador As Double

9 9 Estructura.CalculaMatriuDeCarregaGlobal Estructura.CalculaMatriuDeCarregaReduida maxi = UBound(Estructura.MatriuDeCarregaReduida, 1) maxj = NumeroDeIteracions ReDim MVC(1 To maxi, 1 To maxj) For j = 1 To maxj Multiplicador = 1 / maxj For i = 1 To maxi MVC(i, j) = Multiplicador * Estructura.MatriuDeCarregaReduida(i, AccioActivada) Next i Next j Estructura.MatriuDeVectorsDeCarregaIncrementals = MVC Public Sub EsborraFilaDUnaMatriu(MatriuOrigen() As Double, MatriuDesti() As Double, Fila As Long) Dim i As Long, j As Long ReDim MatriuDesti(1 To UBound(MatriuOrigen, 1) - 1, 1 To UBound(MatriuOrigen, 2)) For i = 1 To UBound(MatriuOrigen, 1) For j = 1 To UBound(MatriuOrigen, 2) Select Case Fila Case Is > i MatriuDesti(i, j) = MatriuOrigen(i, j) Case Is = i 'NO FAI RES Case Is < i MatriuDesti(i - 1, j) = MatriuOrigen(i, j) End Select Next j Next i Public Sub EsborraColumnaDUnaMatriu(MatriuOrigen() As Double, MatriuDesti() As Double, Columna As Long)

10 10 Dim i As Long, j As Long ReDim MatriuDesti(1 To UBound(MatriuOrigen, 1), 1 To UBound(MatriuOrigen, 2) - 1) For i = 1 To UBound(MatriuOrigen, 1) For j = 1 To UBound(MatriuOrigen, 2) Select Case Columna Case Is > j MatriuDesti(i, j) = MatriuOrigen(i, j) Case Is = j 'NO FAI RES Case Is < j MatriuDesti(i, j - 1) = MatriuOrigen(i, j) End Select Next j Next i Public Function ExisteixElNumeroEnElVector(Vector() As Double, Numero As Double) As Boolean Dim i As Long, imax As Long imax = UBound(Vector, 1) For i = 1 To imax If Vector(i) = Numero Then ExisteixElNumeroEnElVector = True Exit Function ExisteixElNumeroEnElVector = False Next i End Function Sub InversaMatriuLU(MatriuAInvertir() As Double, MatriuInvertida() As Double) Dim d As Double Dim col() As Double Dim i As Long, j As Long, indx() As Long Estructura.LUDescomposicio MatriuAInvertir, indx, d ReDim col(1 To UBound(MatriuAInvertir, 1)) ReDim MatriuInvertida(1 To UBound(MatriuAInvertir, 1), 1 To UBound(MatriuAInvertir, 1)) For j = 1 To UBound(MatriuAInvertir, 1) For i = 1 To UBound(MatriuAInvertir, 1)

11 11 col(i) = 0 Next i col(j) = 1 Estructura.LUbksb MatriuAInvertir, indx, col For i = 1 To UBound(MatriuAInvertir, 1) MatriuInvertida(i, j) = col(i) Next i Principal.Escrollant UBound(MatriuAInvertir, 1), j, "Inversió LU" 'Principal.ProgresText UBound(MatriuAInvertir, 1), j, "LU Etapa ", True Next j Public Property Let MatriuDeReaccionsNodalsGlobal(ByVal Val As Variant) m_matriudereaccionsnodalsglobal = Val Public Property Get MatriuDeReaccionsNodalsGlobal() As Variant MatriuDeReaccionsNodalsGlobal = m_matriudereaccionsnodalsglobal Public Property Let MatriuDeCorrimentsNodalsGlobal(ByVal Val As Variant) m_matriudecorrimentsnodalsglobal = Val Public Property Get MatriuDeCorrimentsNodalsGlobal() As Variant MatriuDeCorrimentsNodalsGlobal = m_matriudecorrimentsnodalsglobal Public Property Let ColAccio(ByVal Val As CColAccio) Set m_colaccio = Val Public Property Get ColAccio() As CColAccio Set ColAccio = m_colaccio Public Property Let VectorDeCarregaDeReferenciaNewton(ByVal Val As Variant) m_vectordecarregadereferencianewton = Val Public Property Get VectorDeCarregaDeReferenciaNewton() As Variant VectorDeCarregaDeReferenciaNewton = m_vectordecarregadereferencianewton Public Property Let VectorDeCorrimentsNodalsGlobalNewtonAcumulat(ByVal Val As Variant) m_vectordecorrimentsnodalsglobalnewtonacumulat = Val Public Property Get VectorDeCorrimentsNodalsGlobalNewtonAcumulat() As Variant VectorDeCorrimentsNodalsGlobalNewtonAcumulat = m_vectordecorrimentsnodalsglobalnewtonacumulat

12 12 Sub InicialitzaMatriuDeVectorsCorrimentsNodalsReduitNewtonIncrementalAcumulats() Dim i As Long, j As Long Dim B() As Double i = UBound(m_MatriuDeVectorsDeCarregaIncrementals, 1) j = UBound(m_MatriuDeVectorsDeCarregaIncrementals, 2) ReDim B(1 To i, 1 To j) m_matriudevectorsdecorrimentsnodalsreduitnewton = B Sub InicialitzaMatriuDeVectorsCorrimentsNodalsReduitNRAcumulats() Dim i As Long, j As Long Dim B() As Double i = UBound(m_MatriuDeVectorsDeCarregaIncrementals, 1) j = UBound(m_MatriuDeVectorsDeCarregaIncrementals, 2) ReDim B(1 To i, 1 To j) m_matriudevectorsdecorrimentsnodalsreduitnewton = B Sub InicialitzaMatriuDeVectorsCorrimentsNodalsGlobalNewtonIncrementalAcumulats() Dim i As Long, j As Long Dim B() As Double i = Estructura.ColNode.Count * 6 j = UBound(m_MatriuDeVectorsDeCarregaIncrementals, 2) ReDim B(1 To i, 1 To j) m_matriudevectorsdecorrimentsnodalsglobalnewton = B Sub InicialitzaMatriuDeVectorsCorrimentsNodalsGlobalNRAcumulats() Dim i As Long, j As Long Dim B() As Double i = Estructura.ColNode.Count * 6 j = UBound(m_MatriuDeVectorsDeCarregaIncrementals, 2) ReDim B(1 To i, 1 To j) m_matriudevectorsdecorrimentsnodalsglobalnewton = B Sub MultiplicaVectorPerNumero(ByVal VectorADividir As Variant, ByVal Numero As Double, ByRef Resultat As Variant) Dim i As Long Dim imax As Long

13 13 imax = UBound(VectorADividir, 1) ReDim Resultat(1 To imax, 1 To 1) For i = 1 To imax Resultat(i, 1) = VectorADividir(i, 1) * Numero Next i Public Property Let VectorCarregaNoEquilibradaNewton(ByVal Val As Variant) m_vectorcarreganoequilibradanewton = Val Public Property Get VectorCarregaNoEquilibradaNewton() As Variant VectorCarregaNoEquilibradaNewton = m_vectorcarreganoequilibradanewton Public Property Let VectorDeCorrimentsNodalsReduitParcialNewton(ByVal Val As Variant) m_vectordecorrimentsnodalsreduitparcialnewton = Val Public Property Get VectorDeCorrimentsNodalsReduitParcialNewton() As Variant VectorDeCorrimentsNodalsReduitParcialNewton = m_vectordecorrimentsnodalsreduitparcialnewton Sub AssignaResultatsNewtonAVectorOrdinari() Dim NodeEnCurs As Long Dim MaxNode As Long Dim i As Integer 'm_vectordecorrimentsnodalsglobal = _ m_vectordecorrimentsnodalsglobalnewton MaxNode = m_colnode.count For NodeEnCurs = 1 To MaxNode m_colnode.item(nodeencurs).vectorcorriments(1) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 1, 1) m_colnode.item(nodeencurs).vectorcorriments(2) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 2, 1) m_colnode.item(nodeencurs).vectorcorriments(3) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 3, 1) m_colnode.item(nodeencurs).vectorcorriments(4) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 4, 1) m_colnode.item(nodeencurs).vectorcorriments(5) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 5, 1) m_colnode.item(nodeencurs).vectorcorriments(6) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 6, 1) 'For i = 1 To 6 ' If Abs(m_ColNode.Item(NodeEnCurs).VectorCorriments(i)) > # Then ' MsgBox "L'algorisme de Newton-Raphson no ha convergit", vbcritical, "Error" ' Exit Sub ' ' 'Next i Next NodeEnCurs

14 14 'MsgBox " Algorisme de Newton-Raphson realitzat satisfactòriament", vbinformation Sub AssignaResultatsNewtonIncrementalAVectorOrdinari() Dim NodeEnCurs As Long Dim MaxNode As Long Dim i As Integer 'm_vectordecorrimentsnodalsglobal = _ m_vectordecorrimentsnodalsglobalnewton MaxNode = m_colnode.count For NodeEnCurs = 1 To MaxNode m_colnode.item(nodeencurs).vectorcorriments(1) = m_vectordecorrimentsnodalsglobalnewtonacumulat((nodeencurs - 1) * 6 + 1, 1) m_colnode.item(nodeencurs).vectorcorriments(2) = m_vectordecorrimentsnodalsglobalnewtonacumulat((nodeencurs - 1) * 6 + 2, 1) m_colnode.item(nodeencurs).vectorcorriments(3) = m_vectordecorrimentsnodalsglobalnewtonacumulat((nodeencurs - 1) * 6 + 3, 1) m_colnode.item(nodeencurs).vectorcorriments(4) = m_vectordecorrimentsnodalsglobalnewtonacumulat((nodeencurs - 1) * 6 + 4, 1) m_colnode.item(nodeencurs).vectorcorriments(5) = m_vectordecorrimentsnodalsglobalnewtonacumulat((nodeencurs - 1) * 6 + 5, 1) m_colnode.item(nodeencurs).vectorcorriments(6) = m_vectordecorrimentsnodalsglobalnewtonacumulat((nodeencurs - 1) * 6 + 6, 1) For i = 1 To 6 If Abs(m_ColNode.Item(NodeEnCurs).VectorCorriments(i)) > # Then MsgBox "L'algorisme de Newton-Raphson Incremental no ha convergit", vbcritical, "Error" Exit Sub Next i Next NodeEnCurs MsgBox " L' Algorisme Newton-Raphson Incremental ha Convergit Correctament", vbinformation Sub AssignaResultatsIncrementalsAVectorOrdinari() Dim NodeEnCurs As Long Dim MaxNode As Long Dim i As Integer 'm_vectordecorrimentsnodalsglobal = _ m_vectordecorrimentsnodalsglobalnewton MaxNode = m_colnode.count For NodeEnCurs = 1 To MaxNode m_colnode.item(nodeencurs).vectorcorriments(1) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 1, 1) m_colnode.item(nodeencurs).vectorcorriments(2) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 2, 1) m_colnode.item(nodeencurs).vectorcorriments(3) =

15 15 m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 3, 1) m_colnode.item(nodeencurs).vectorcorriments(4) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 4, 1) m_colnode.item(nodeencurs).vectorcorriments(5) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 5, 1) m_colnode.item(nodeencurs).vectorcorriments(6) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 6, 1) For i = 1 To 6 If Abs(m_ColNode.Item(NodeEnCurs).VectorCorriments(i)) > # Then MsgBox "L'algorisme de Newton-Raphson no ha convergit", vbcritical, "Error" Exit Sub Next i Next NodeEnCurs MsgBox " L'Algorisme Incremental ha Convergit Correctament", vbinformation Sub AssignaResultatsNewtonModificatAVectorOrdinari() Dim NodeEnCurs As Long Dim MaxNode As Long Dim i As Integer 'm_vectordecorrimentsnodalsglobal = _ m_vectordecorrimentsnodalsglobalnewton MaxNode = m_colnode.count For NodeEnCurs = 1 To MaxNode m_colnode.item(nodeencurs).vectorcorriments(1) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 1, 1) m_colnode.item(nodeencurs).vectorcorriments(2) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 2, 1) m_colnode.item(nodeencurs).vectorcorriments(3) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 3, 1) m_colnode.item(nodeencurs).vectorcorriments(4) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 4, 1) m_colnode.item(nodeencurs).vectorcorriments(5) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 5, 1) m_colnode.item(nodeencurs).vectorcorriments(6) = m_vectordecorrimentsnodalsglobalnewton((nodeencurs - 1) * 6 + 6, 1) For i = 1 To 6 If Abs(m_ColNode.Item(NodeEnCurs).VectorCorriments(i)) > # Then MsgBox "L'algorisme de Newton-Raphson no ha convergit", vbcritical, "Error" Exit Sub Next i Next NodeEnCurs MsgBox " L'algorisme de Newton-Raphson ha convergit", vbinformation Property Get MatriuDeRigidesaReduidaNewtonInvertida() As Variant

16 16 MatriuDeRigidesaReduidaNewtonInvertida = m_matriuderigidesareduidanewtoninvertida Sub RessetejaMatriuDeRigidesaGlobalNewton(EsElPrimerCop As Long) Dim i As Long, imax As Long Dim j As Long, jmax As Long If EsElPrimerCop = 1 Then Exit Sub i = UBound(m_MatriuDeRigidesaGlobalNewton, 1) j = UBound(m_MatriuDeRigidesaGlobalNewton, 2) For i = 1 To imax For j = 1 To jmax m_matriuderigidesaglobalnewton(i, j) = 0 Next j Next i Property Get VectorDeCarregaReduitNewton() As Variant VectorDeCarregaReduitNewton = m_vectordecarregareduitnewton 'Property Get VectorDeCorrimentsNodalsReduitParcialNewton() As Variant 'VectorDeCorrimentsNodalsReduitParcialNewton = m_vectordecorrimentsnodalsreduitparcialnewton ' Property Get VectorDeCorrimentsNodalsReduitNewton() As Variant VectorDeCorrimentsNodalsReduitNewton = m_vectordecorrimentsnodalsreduitnewton Property Get MatriuDeRigidesaGlobalNewton() As Variant MatriuDeRigidesaGlobalNewton = m_matriuderigidesaglobalnewton Property Get MatriuDeRigidesaReduidaNewton() As Variant MatriuDeRigidesaReduidaNewton = m_matriuderigidesareduidanewton Public Property Get MatriuDeRigidesaReduidaInvertida() As Variant MatriuDeRigidesaReduidaInvertida = m_matriuderigidesareduidainvertida Sub CalculaMatriuDeRigidesaReduidaInvertida() Dim A() As Double Dim B() As Double Dim Omega() As Double Dim Enter As Integer Dim CasEnCurs As Integer

17 17 CasEnCurs = Estructura.ModalitatDeCalculLineal 'CalculaMatriuDeRigidesaReduida AssignaVariantAMatriu m_matriuderigidesareduida, B If m_matriuderigidesareduidainvertidacalculada = False Then Select Case CasEnCurs Case 1 Estructura.InversaMatriuLU B, A Case 2 InversaMatPereSancho B, A 'BY PERE SANCHO Case 3 InversaMatriu B, A 'BY TON (M'HI VAIG PASSAR UN PUTO MATÍ SENCER) Case 4 Estructura.InversaMatriuLU B, A End Select m_matriuderigidesareduidainvertidacalculada = True m_matriuderigidesareduidainvertida = A Sub CalculaMatriuDeRigidesaReduidaMillorada() Dim MaxNodes As Long Dim ElemEnCurs As Long Dim j As Long Dim i As Long Dim MatriuEliminadora() As Double Dim MatriuEliminadoraTrasposta() As Double Dim MatriuAuxiliar() As Double Dim MG() As Double Dim m() As Double Dim FilesiColumnesAEsborrar() As Double Dim FilaEnCurs As Long, ColumnaEnCurs As Long If m_matriuderigidesareduidacalculada = True Then Exit Sub MaxNodes = m_colnode.count 'Primer hem de calcular les dimensions de la matriu de rigidesa _ reduïda j = 0 For ElemEnCurs = 1 To MaxNodes

18 18 'Principal.ProgresText 0, 0, "Etapa 1/3", True If m_colnode.item((elemencurs)).xblock = False Then j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then j = j + 1 If m_colnode.item((elemencurs)).mxblock = False Then j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then j = j + 1 'ProgresMatriuDeRigidesaReduida1 MaxNodes, ElemEncurs Next ElemEnCurs 'FiProgres ReDim m(1 To j, 1 To j) ReDim FilesiColumnesAEsborrar(1 To MaxNodes * 6 - j) j = 1 For ElemEnCurs = MaxNodes To 1 Step -1 'Principal.ProgresText 0, 0, "Etapa 2/3", True If m_colnode.item((elemencurs)).mzblock = True Then FilesiColumnesAEsborrar(j) = ((ElemEnCurs - 1) * 6 + 6) j = j + 1 If m_colnode.item((elemencurs)).myblock = True Then FilesiColumnesAEsborrar(j) = ((ElemEnCurs - 1) * 6 + 5) j = j + 1 If m_colnode.item((elemencurs)).mxblock = True Then FilesiColumnesAEsborrar(j) = ((ElemEnCurs - 1) * 6 + 4) j = j + 1

19 19 If m_colnode.item((elemencurs)).zblock = True Then FilesiColumnesAEsborrar(j) = ((ElemEnCurs - 1) * 6 + 3) j = j + 1 If m_colnode.item((elemencurs)).yblock = True Then FilesiColumnesAEsborrar(j) = ((ElemEnCurs - 1) * 6 + 2) j = j + 1 If m_colnode.item((elemencurs)).xblock = True Then FilesiColumnesAEsborrar(j) = ((ElemEnCurs - 1) * 6 + 1) j = j + 1 Next ElemEnCurs 'ARA COMENÇA LA CHICHA... i = 0 j = 0 AssignaVariantAMatriu m_matriuderigidesaglobal, MG For FilaEnCurs = 1 To MaxNodes * 6 If Estructura.ExisteixElNumeroEnElVector(FilesiColumnesAEsborrar, (FilaEnCurs)) = False Then i = i + 1 Else GoTo Etiqueta2 For ColumnaEnCurs = 1 To MaxNodes * 6 If Estructura.ExisteixElNumeroEnElVector(FilesiColumnesAEsborrar, (ColumnaEnCurs)) = False Then j = j + 1 m(i, j) = MG(FilaEnCurs, ColumnaEnCurs) Else Etiqueta1: Next ColumnaEnCurs j = 0 'Principal.ProgresText MaxNodes * 6, FilaEnCurs, "Element ", True Etiqueta2: Next FilaEnCurs

20 20 m_matriuderigidesareduida = m m_matriuderigidesareduidacalculada = True Sub CalculaMatriuDeRigidesaReduidaNewtonInvertida() Dim A() As Double Dim B() As Double AssignaVariantAMatriu m_matriuderigidesareduidanewton, B 'InversaMatriu b, a InversaMatPereSancho B, A m_matriuderigidesareduidanewtoninvertida = A 'm_matriuderigidesareduidanewtoninvertida = b Sub CalculaMatriuDeRigidesaReduidaNewtonModificatInvertida() Dim A() As Double Dim B() As Double AssignaVariantAMatriu m_matriuderigidesareduidanewton, B 'InversaMatriu b, a InversaMatPereSancho B, A m_matriuderigidesareduidanewtonmodificatinvertida = A 'm_matriuderigidesareduidanewtonmodificatinvertida = b Public Property Let MatriuDeRigidesaReduidaCalculada(ByVal Val As Boolean) m_matriuderigidesareduidacalculada = Val Public Property Get MatriuDeRigidesaReduidaCalculada() As Boolean MatriuDeRigidesaReduidaCalculada = m_matriuderigidesareduidacalculada Property Get VectorsDeCorrimentsElementals(vntIndClave As Variant) As Variant If m_vectorsdecorrimentselementalscalculats = False Then CalculaVectorsDeCorrimentsElementals m_vectorsdecorrimentselementalscalculats = True VectorsDeCorrimentsElementals = m_vectorsdecorrimentselementals(vntindclave) Property Get MatriuDeConnectivitat() As Variant

21 21 Dim MaxElems As Long Dim ElemEnCurs As Long Dim MC() As Long MaxElems = m_colbarra.count ReDim MC(1 To MaxElems, 1 To 2) 'Construeix la matriu de connectivitat For ElemEnCurs = 1 To MaxElems MC(ElemEnCurs, 1) = _ m_colbarra.item(elemencurs).numnode1 MC(ElemEnCurs, 2) = _ m_colbarra.item(elemencurs).numnode2 Next ElemEnCurs MatriuDeConnectivitat = MC Property Get VectorDeCorrimentsNodalsGlobal() As Variant CalculaVectorDeCorrimentsNodalsGlobal VectorDeCorrimentsNodalsGlobal = m_vectordecorrimentsnodalsglobal Property Get VectorDeCorrimentsNodalsReduit() As Variant CalculaVectorDeCorrimentsNodalsReduit VectorDeCorrimentsNodalsReduit = m_vectordecorrimentsnodalsreduit Property Get MatriuDeRigidesaReduida() As Variant 'CalculaMatriuDeRigidesaReduida MatriuDeRigidesaReduida = m_matriuderigidesareduida Property Get MatriuDeCarregaGlobal() As Variant MatriuDeCarregaGlobal = m_matriudecarregaglobal Property Let MatriuDeCarregaGlobal(Val As Variant) m_matriudecarregaglobal = Val Property Get MatriuDeCarregaReduida() As Variant MatriuDeCarregaReduida = m_matriudecarregareduida Property Let MatriuDeCarregaReduida(Val As Variant) m_matriudecarregareduida = Val Property Get MatriuDeCorrimentsNodalsReduit() As Variant

22 22 MatriuDeCorrimentsNodalsReduit = m_matriudecorrimentsnodalsreduit Property Let MatriuDeCorrimentsNodalsReduit(Val As Variant) m_matriudecorrimentsnodalsreduit = Val Property Get MatriudeRigidesaGlobal() As Variant 'CalculaMatriuDeRigidesaGlobal MatriudeRigidesaGlobal = m_matriuderigidesaglobal Public Property Get ColBarra() As CColBarra 'Propietat per accedir a la col.lecció de barres Set ColBarra = m_colbarra Public Property Let ColBarra(ByVal Val As CColBarra) Set m_colbarra = Val Public Property Get ColNode() As CColNode 'Propietat per accedir a la col.lecció de barres Set ColNode = m_colnode Public Property Let ColNode(ByVal Val As CColNode) Set m_colnode = Val Public Property Let Nom(ByVal Val As String) 'Propietat per assignar la dada nom m_nom = Val Public Property Get Nom() As String Nom = m_nom Private Sub Class_Initialize() Set m_colbarra = New CColBarra Set m_colnode = New CColNode Set m_vectorsdecorrimentselementals = New Collection Set m_vectorsdecarregueselementals = New Collection Set m_colaccio = New CColAccio Private Sub Class_Terminate() Set m_colbarra = Nothing Set m_colnode = Nothing Set m_colaccio = Nothing Public Sub CalculaMatriuDeRigidesaGlobal() Dim K() As Double Dim MaxElemsNodes As Long Dim MaxElemsBarres As Long Dim ElemEnCurs As Long Dim NumNode1 As Long

23 23 Dim NumNode2 As Long Dim i As Integer Dim j As Integer Static Calculat As Boolean If Calculat = True Then Exit Sub MaxElemsNodes = m_colnode.count MaxElemsBarres = m_colbarra.count ReDim K(1 To MaxElemsNodes * 6, 1 To MaxElemsNodes * 6) For ElemEnCurs = 1 To MaxElemsBarres NumNode1 = m_colbarra.item((elemencurs)).numnode1 NumNode2 = m_colbarra.item((elemencurs)).numnode2 For i = 1 To 6 For j = 1 To 6 K((NumNode1-1) * 6 _ + i, (NumNode1-1) * 6 + j) = _ K((NumNode1-1) * 6 _ + i, (NumNode1-1) * 6 + j) + _ m_colbarra.item((elemencurs)).matriuderigidesaglobalelemental(i, j) Next j Next i For i = 1 To 6 For j = 1 To 6 K((NumNode2-1) * 6 _ + i, (NumNode2-1) * 6 + j) = _ K((NumNode2-1) * 6 _ + i, (NumNode2-1) * 6 + j) + _ m_colbarra.item((elemencurs)).matriuderigidesaglobalelemental(i + 6, j + 6) Next j Next i For i = 1 To 6 For j = 1 To 6 K((NumNode1-1) * 6 _ + i, (NumNode2-1) * 6 + j) = _ K((NumNode1-1) * 6 _

24 24 + i, (NumNode2-1) * 6 + j) + _ m_colbarra.item((elemencurs)).matriuderigidesaglobalelemental(i, j + 6) Next j Next i For i = 1 To 6 For j = 1 To 6 K((NumNode2-1) * 6 _ + i, (NumNode1-1) * 6 + j) = _ K((NumNode2-1) * 6 _ + i, (NumNode1-1) * 6 + j) + _ m_colbarra.item((elemencurs)).matriuderigidesaglobalelemental(i + 6, j) Next j Next i 'Principal.ProgresText MaxElemsBarres, ElemEnCurs, "Element :", True Principal.Escrollant MaxElemsBarres, ElemEnCurs, "Construcció Matriu de rigidesa global" Next ElemEnCurs 'FiProgres m_matriuderigidesaglobal = K Calculat = True Sub CalculaMatriuDeRigidesaGlobalNewton() Dim K() As Double Dim MaxElemsNodes As Long Dim MaxElemsBarres As Long Dim ElemEnCurs As Long Dim NumNode1 As Long Dim NumNode2 As Long Dim i As Integer Dim j As Integer MaxElemsNodes = m_colnode.count MaxElemsBarres = m_colbarra.count ReDim K(1 To MaxElemsNodes * 6, 1 To MaxElemsNodes * 6) For ElemEnCurs = 1 To MaxElemsBarres NumNode1 = m_colbarra.item((elemencurs)).numnode1 NumNode2 = m_colbarra.item((elemencurs)).numnode2

25 25 For i = 1 To 6 For j = 1 To 6 j) K((NumNode1-1) * 6 _ + i, (NumNode1-1) * 6 + j) = _ K((NumNode1-1) * 6 _ + i, (NumNode1-1) * 6 + j) + _ m_colbarra.item((elemencurs)).matriuderigidesaglobalelementalnewton(i, Next j Next i For i = 1 To 6 For j = 1 To 6 6, j + 6) K((NumNode2-1) * 6 _ + i, (NumNode2-1) * 6 + j) = _ K((NumNode2-1) * 6 _ + i, (NumNode2-1) * 6 + j) + _ m_colbarra.item((elemencurs)).matriuderigidesaglobalelementalnewton(i + Next j Next i For i = 1 To 6 For j = 1 To 6 + 6) K((NumNode1-1) * 6 _ + i, (NumNode2-1) * 6 + j) = _ K((NumNode1-1) * 6 _ + i, (NumNode2-1) * 6 + j) + _ m_colbarra.item((elemencurs)).matriuderigidesaglobalelementalnewton(i, j Next j Next i For i = 1 To 6 For j = 1 To 6 K((NumNode2-1) * 6 _ + i, (NumNode1-1) * 6 + j) = _ K((NumNode2-1) * 6 _ + i, (NumNode1-1) * 6 + j) + _

26 26 6, j) m_colbarra.item((elemencurs)).matriuderigidesaglobalelementalnewton(i + Next j Next i Next ElemEnCurs 'FiProgres m_matriuderigidesaglobalnewton = K Private Sub CalculaVectorDeCarregaGlobalXXXXXXXXXXXXX() Dim MaxElemsNodes As Long Dim MaxElemsBarres As Long Dim ElemEnCurs As Long Dim NumNode1 As Long Dim NumNode2 As Long Dim V() As Double Static Calculat As Double If Calculat = True Then Exit Sub MaxElemsNodes = m_colnode.count MaxElemsBarres = m_colbarra.count ReDim V(1 To MaxElemsNodes * 6, 1 To 1) 'OWA For ElemEnCurs = 1 To MaxElemsBarres NumNode1 = m_colbarra.item((elemencurs)).numnode1 NumNode2 = m_colbarra.item((elemencurs)).numnode2 V((NumNode1-1) * 6 + 1, 1) = _ V((NumNode1-1) * 6 + 1, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(1) V((NumNode1-1) * 6 + 2, 1) = _

27 27 V((NumNode1-1) * 6 + 2, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(2) V((NumNode1-1) * 6 + 3, 1) = _ V((NumNode1-1) * 6 + 3, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(3) V((NumNode1-1) * 6 + 4, 1) = _ V((NumNode1-1) * 6 + 4, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(4) V((NumNode1-1) * 6 + 5, 1) = _ V((NumNode1-1) * 6 + 5, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(5) V((NumNode1-1) * 6 + 6, 1) = _ V((NumNode1-1) * 6 + 6, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(6) V((NumNode2-1) * 6 + 1, 1) = _ V((NumNode2-1) * 6 + 1, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(7) V((NumNode2-1) * 6 + 2, 1) = _ V((NumNode2-1) * 6 + 2, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(8) V((NumNode2-1) * 6 + 3, 1) = _ V((NumNode2-1) * 6 + 3, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(9) V((NumNode2-1) * 6 + 4, 1) = _ V((NumNode2-1) * 6 + 4, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(10) V((NumNode2-1) * 6 + 5, 1) = _ V((NumNode2-1) * 6 + 5, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(11) V((NumNode2-1) * 6 + 6, 1) = _ V((NumNode2-1) * 6 + 6, 1) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(12) Next ElemEnCurs 'Afegeixo els valors concentrats en els nodes For ElemEnCurs = 1 To MaxElemsNodes V((ElemEnCurs - 1) * 6 + 1, 1) = _ V((ElemEnCurs - 1) * 6 + 1, 1) + _ m_colnode.item((elemencurs)).fx V((ElemEnCurs - 1) * 6 + 2, 1) = _

28 28 V((ElemEnCurs - 1) * 6 + 2, 1) + _ m_colnode.item((elemencurs)).fy V((ElemEnCurs - 1) * 6 + 3, 1) = _ V((ElemEnCurs - 1) * 6 + 3, 1) + _ m_colnode.item((elemencurs)).fz V((ElemEnCurs - 1) * 6 + 4, 1) = _ V((ElemEnCurs - 1) * 6 + 4, 1) + _ m_colnode.item((elemencurs)).momentx V((ElemEnCurs - 1) * 6 + 5, 1) = _ V((ElemEnCurs - 1) * 6 + 5, 1) + _ m_colnode.item((elemencurs)).momenty V((ElemEnCurs - 1) * 6 + 6, 1) = _ V((ElemEnCurs - 1) * 6 + 6, 1) + _ m_colnode.item((elemencurs)).momentz Next ElemEnCurs m_vectordecarregaglobal = V Calculat = False Sub CalculaMatriuDeCarregaGlobal() Dim MaxElemsNodes As Long Dim MaxElemsBarres As Long Dim ElemEnCurs As Long Dim NumNode1 As Long Dim NumNode2 As Long Dim m() As Double Static Calculat As Double Dim AccioEnCurs As Long, MaxAccio As Long If Calculat = True Then Exit Sub MaxElemsNodes = m_colnode.count MaxElemsBarres = m_colbarra.count MaxAccio = m_colaccio.count ReDim m(1 To MaxElemsNodes * 6, 1 To MaxAccio) For AccioEnCurs = 1 To MaxAccio 'OWA For ElemEnCurs = 1 To MaxElemsBarres NumNode1 = m_colbarra.item((elemencurs)).numnode1 NumNode2 = m_colbarra.item((elemencurs)).numnode2 m((numnode1-1) * 6 + 1, AccioEnCurs) = _

29 29 m((numnode1-1) * 6 + 1, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(1, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(1, AccioEnCurs) m((numnode1-1) * 6 + 2, AccioEnCurs) = _ m((numnode1-1) * 6 + 2, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(2, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(2, AccioEnCurs) m((numnode1-1) * 6 + 3, AccioEnCurs) = _ m((numnode1-1) * 6 + 3, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(3, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(3, AccioEnCurs) m((numnode1-1) * 6 + 4, AccioEnCurs) = _ m((numnode1-1) * 6 + 4, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(4, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(4, AccioEnCurs) m((numnode1-1) * 6 + 5, AccioEnCurs) = _ m((numnode1-1) * 6 + 5, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(5, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(5, AccioEnCurs) m((numnode1-1) * 6 + 6, AccioEnCurs) = _ m((numnode1-1) * 6 + 6, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(6, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(6, AccioEnCurs) m((numnode2-1) * 6 + 1, AccioEnCurs) = _ m((numnode2-1) * 6 + 1, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(7, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(7, AccioEnCurs)

30 30 m((numnode2-1) * 6 + 2, AccioEnCurs) = _ m((numnode2-1) * 6 + 2, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(8, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(8, AccioEnCurs) m((numnode2-1) * 6 + 3, AccioEnCurs) = _ m((numnode2-1) * 6 + 3, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(9, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(9, AccioEnCurs) m((numnode2-1) * 6 + 4, AccioEnCurs) = _ m((numnode2-1) * 6 + 4, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(10, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(10, AccioEnCurs) m((numnode2-1) * 6 + 5, AccioEnCurs) = _ m((numnode2-1) * 6 + 5, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(11, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(11, AccioEnCurs) m((numnode2-1) * 6 + 6, AccioEnCurs) = _ m((numnode2-1) * 6 + 6, AccioEnCurs) + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(12, AccioEnCurs) _ + m_colbarra.item((elemencurs)).carreguesnodalsequivalentsapuntualsglobals(12, AccioEnCurs) Next ElemEnCurs Next AccioEnCurs 'HI SUMO ELS VALORS DE LES CÀRREGUES NODALS For AccioEnCurs = 1 To MaxAccio For ElemEnCurs = 1 To MaxElemsNodes m((elemencurs - 1) * 6 + 1, AccioEnCurs) = _ m((elemencurs - 1) * 6 + 1, AccioEnCurs) + _ m_colnode.item((elemencurs)).colsolicitacionodal.item(accioencurs).fx m((elemencurs - 1) * 6 + 2, AccioEnCurs) = _

31 31 m((elemencurs - 1) * 6 + 2, AccioEnCurs) + _ m_colnode.item((elemencurs)).colsolicitacionodal.item(accioencurs).fy m((elemencurs - 1) * 6 + 3, AccioEnCurs) = _ m((elemencurs - 1) * 6 + 3, AccioEnCurs) + _ m_colnode.item((elemencurs)).colsolicitacionodal.item(accioencurs).fz m((elemencurs - 1) * 6 + 4, AccioEnCurs) = _ m((elemencurs - 1) * 6 + 4, AccioEnCurs) + _ m_colnode.item((elemencurs)).colsolicitacionodal.item(accioencurs).mx m((elemencurs - 1) * 6 + 5, AccioEnCurs) = _ m((elemencurs - 1) * 6 + 5, AccioEnCurs) + _ m_colnode.item((elemencurs)).colsolicitacionodal.item(accioencurs).my m((elemencurs - 1) * 6 + 6, AccioEnCurs) = _ m((elemencurs - 1) * 6 + 6, AccioEnCurs) + _ m_colnode.item((elemencurs)).colsolicitacionodal.item(accioencurs).mz Next ElemEnCurs Next AccioEnCurs m_matriudecarregaglobal = m Calculat = False Sub CalculaMatriuDeCarregaReduida() Dim MaxNodes As Long Dim MaxElems As Long Dim ElemEnCurs As Long Dim V() As Double Dim B() As Double Dim i As Long Dim j As Long Dim MaxAccio As Long, AccioEnCurs As Long Dim MatriuEliminadora() As Double MaxNodes = m_colnode.count 'MaxElems = m_colbarra.count MaxAccio = m_colaccio.count 'CREACIÓ DE LA MATRIU ELIMINADORA '0 si s'ha d'eliminar i 1 en cas contrari 'Per eliminar, per exemple la segona i tercera fileres 'es tindria (0 1 0) ' (0 0 1) 'Primer hem de calcular quants elements tindrà la matriu eliminadora j = 0 For ElemEnCurs = 1 To MaxNodes

32 32 If m_colnode.item((elemencurs)).xblock = False Then j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then j = j + 1 If m_colnode.item((elemencurs)).mxblock = False Then j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then j = j + 1 'ProgresMatriuDeRigidesaReduida1 MaxNodes, ElemEncurs Next ElemEnCurs 'FiProgres 'ReDim M(1 To j, 1 To j) ReDim MatriuEliminadora(1 To j, 1 To MaxNodes * 6) j = 1 For ElemEnCurs = 1 To MaxNodes If m_colnode.item((elemencurs)).xblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 1) = 1 j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 2) = 1 j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 3) = 1 j = j + 1 If m_colnode.item((elemencurs)).mxblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 4) = 1 j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 5) = 1

33 33 j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 6) = 1 j = j + 1 Next ElemEnCurs Principal.AssignaVariantAMatriu m_matriudecarregaglobal, B Principal.MultiplicaMatrius MatriuEliminadora, B, V m_matriudecarregareduida = V Sub CalculaVectorDeCarregaReduitXXXXXXXXXXXXXXXXXX() Dim MaxNodes As Long Dim MaxElems As Long Dim ElemEnCurs As Long Dim V() As Double Dim i As Long Dim j As Long MaxNodes = m_colnode.count MaxElems = m_colbarra.count 'Primer hem de calcular quants elements tindrà el vector de _ càrrega reduït j = 0 For ElemEnCurs = 1 To MaxNodes If m_colnode.item((elemencurs)).xblock = False Then j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then j = j + 1 If m_colnode.item((elemencurs)).mxblock = False Then j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then j = j + 1

34 34 If m_colnode.item((elemencurs)).mzblock = False Then j = j + 1 Next ElemEnCurs ReDim V(1 To j, 1 To 1) For ElemEnCurs = 1 To MaxElems m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).fx = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).fx + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(1) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).fy = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).fy + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(2) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).fz = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).fz + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(3) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).momentx = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).momentx + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(4) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).momenty = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).momenty + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(5) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).momentz = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode1)).momentz + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(6) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).fx = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).fx + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(7) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).fy = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).fy + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(8) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).fz = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).fz + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(9) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).momentx = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).momentx + _

35 35 m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(10) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).momenty = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).momenty + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(11) m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).momentz = _ m_colnode.item(str(m_colbarra.item((elemencurs)).numnode2)).momentz + _ m_colbarra.item((elemencurs)).carreguesnodalsequivalentsglobals(12) Next ElemEnCurs j = 1 For ElemEnCurs = 1 To MaxNodes If m_colnode.item((elemencurs)).xblock = False Then V(j, 1) = _ m_colnode.item((elemencurs)).fx j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then V(j, 1) = _ m_colnode.item((elemencurs)).fy j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then V(j, 1) = _ m_colnode.item((elemencurs)).fz j = j + 1 If m_colnode.item((elemencurs)).mxblock = False Then V(j, 1) = _ m_colnode.item((elemencurs)).momentx j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then V(j, 1) = _ m_colnode.item((elemencurs)).momenty j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then V(j, 1) = _ m_colnode.item((elemencurs)).momentz j = j + 1

36 36 Next ElemEnCurs m_vectordecarregareduit = V Public Sub CalculaMatriuDeRigidesaReduida() Dim MaxNodes As Long Dim ElemEnCurs As Long Dim j As Long Dim i As Long Dim MatriuEliminadora() As Double Dim MatriuEliminadoraTrasposta() As Double Dim MatriuAuxiliar() As Double Dim MG() As Double Dim m() As Double 'CREACIÓ DE LA MATRIU ELIMINADORA '0 si s'ha d'eliminar i 1 en cas contrari 'Per eliminar, per exemple la segona i tercera fileres 'es tindria (0 1 0) ' (0 0 1) If m_matriuderigidesareduidacalculada = True Then Exit Sub MaxNodes = m_colnode.count 'CalculaMatriuDeRigidesaGlobal ' per si no estava calculada 'Primer hem de calcular les dimensions de la matriu de rigidesa _ reduïda j = 0 For ElemEnCurs = 1 To MaxNodes If m_colnode.item((elemencurs)).xblock = False Then j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then j = j + 1

37 37 If m_colnode.item((elemencurs)).mxblock = False Then j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then j = j + 1 'ProgresMatriuDeRigidesaReduida1 MaxNodes, ElemEncurs Next ElemEnCurs 'FiProgres ReDim m(1 To j, 1 To j) ReDim MatriuEliminadora(1 To j, 1 To MaxNodes * 6) 'Ara posem els elements a la matriu eliminadora j = 1 For ElemEnCurs = 1 To MaxNodes If m_colnode.item((elemencurs)).xblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 1) = 1 j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 2) = 1 j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 3) = 1 j = j + 1 If m_colnode.item((elemencurs)).mxblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 4) = 1 j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 5) = 1 j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 6) = 1 j = j + 1 'ProgresMatriuDeRigidesaReduida2 MaxNodes, ElemEncurs Next ElemEnCurs

38 38 'FiProgres 'Faig la multiplicació que em donarà el resultat final TrasposaMatriu MatriuEliminadora, MatriuEliminadoraTrasposta AssignaVariantAMatriu m_matriuderigidesaglobal, MG MultiplicaMatrius MatriuEliminadora, MG, _ MatriuAuxiliar MultiplicaMatrius MatriuAuxiliar, MatriuEliminadoraTrasposta, _ m m_matriuderigidesareduida = m m_matriuderigidesareduidacalculada = True Sub CalculaMatriuDeRigidesaReduidaNewton() Dim MaxNodes As Long Dim ElemEnCurs As Long Dim j As Long Dim i As Long Dim MatriuEliminadora() As Double Dim MatriuEliminadoraTrasposta() As Double Dim MatriuAuxiliar() As Double Dim MG() As Double Dim m() As Double '0 si s'ha d'eliminar i 1 en cas contrari 'Per eliminar, per exemple la segona i tercera fileres 'es tindria (0 1 0) ' (0 0 1) MaxNodes = m_colnode.count j = 0 For ElemEnCurs = 1 To MaxNodes If m_colnode.item((elemencurs)).xblock = False Then j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then j = j + 1

39 39 If m_colnode.item((elemencurs)).mxblock = False Then j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then j = j + 1 ProgresMatriuDeRigidesaReduida1 MaxNodes, ElemEnCurs Next ElemEnCurs 'FiProgres ReDim m(1 To j, 1 To j) ReDim MatriuEliminadora(1 To j, 1 To MaxNodes * 6) 'Ara posem els elements a la matriu eliminadora j = 1 For ElemEnCurs = 1 To MaxNodes If m_colnode.item((elemencurs)).xblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 1) = 1 j = j + 1 If m_colnode.item((elemencurs)).yblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 2) = 1 j = j + 1 If m_colnode.item((elemencurs)).zblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 3) = 1 j = j + 1 If m_colnode.item((elemencurs)).mxblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 4) = 1 j = j + 1 If m_colnode.item((elemencurs)).myblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 5) = 1 j = j + 1 If m_colnode.item((elemencurs)).mzblock = False Then MatriuEliminadora(j, (ElemEnCurs - 1) * 6 + 6) = 1 j = j + 1 'ProgresMatriuDeRigidesaReduida2 MaxNodes, ElemEncurs

40 40 Next ElemEnCurs 'FiProgres 'Faig la multiplicació que em donarà el resultat final TrasposaMatriu MatriuEliminadora, MatriuEliminadoraTrasposta AssignaVariantAMatriu m_matriuderigidesaglobalnewton, MG MultiplicaMatrius MatriuEliminadora, MG, _ MatriuAuxiliar MultiplicaMatrius MatriuAuxiliar, MatriuEliminadoraTrasposta, _ m m_matriuderigidesareduidanewton = m Private Sub AssignaVariantAMatriu(Origen As Variant, Desti() As Double) Dim imin As Long Dim imax As Long Dim jmin As Long Dim jmax As Long Dim i As Long Dim j As Long imax = UBound(Origen, 1) imin = LBound(Origen, 1) jmax = UBound(Origen, 2) jmin = LBound(Origen, 2) ReDim Desti(imin To imax, jmin To jmax) For i = imin To imax For j = jmin To jmax Desti(i, j) = Origen(i, j) Next j ' Principal.ProgresText imax, i, " Assigna a Matriu : ", True Next i Public Sub AssignaMatriuAMatriu(Origen() As Double, Desti() As Double) Dim imin As Long Dim imax As Long

41 41 Dim jmin As Long Dim jmax As Long Dim i As Long Dim j As Long imax = UBound(Origen, 1) imin = LBound(Origen, 1) jmax = UBound(Origen, 2) jmin = LBound(Origen, 2) ReDim Desti(imin To imax, jmin To jmax) For i = imin To imax For j = jmin To jmax Desti(i, j) = Origen(i, j) Next j Next i Private Sub TrasposaMatriu(MatriuOrigen() As Double, MatriuDesti() As Double) Dim i As Integer Dim j As Integer Dim Origen() As Double ReDim Origen(1 To UBound(MatriuOrigen, 1), 1 To UBound(MatriuOrigen, 2)) ReDim MatriuDesti(1 To UBound(Origen, 2), 1 To UBound(Origen, 1)) For i = 1 To UBound(Origen, 1) For j = 1 To UBound(Origen, 2) Origen(i, j) = MatriuOrigen(i, j) Next j Next i For i = LBound(Origen, 1) To UBound(Origen, 1) For j = LBound(Origen, 2) To UBound(Origen, 2) MatriuDesti(j, i) = Origen(i, j) Next j Next i Private Sub InversaMatriu(MatriuOrigen() As Double, MatriuDesti() As Double)

42 42 Dim Ix As Long Dim jx As Long Dim ix2 As Long Dim jx2 As Long Dim A As Long Dim Apuja As Long Dim Trobat As Boolean Dim Matraux() As Double Dim Ks As Double Dim Ki As Double Dim aux1 As Double Dim aux2 As Double Dim p As Long Dim Rang As Long Dim i As Long Dim j As Long Dim Origen() As Double 'On Error GoTo Error Rang = UBound(MatriuOrigen, 1) ReDim Matraux(1 To Rang, 1 To Rang) ReDim Origen(1 To Rang, 1 To Rang) ReDim MatriuDesti(1 To Rang, 1 To Rang) 'Assignem a la matriu Origen la matriu MatriuOrigen per _ evitar modificar la matriu d'entrada For i = 1 To Rang For j = 1 To Rang Origen(i, j) = MatriuOrigen(i, j) Next j Next i 'crea la matriu identitat nxn For Ix = 1 To Rang For jx = 1 To Rang If Ix = jx Then Matraux(Ix, jx) = 1 Next jx Next Ix

Function: function procedures and sub procedures share the same characteristics, with

Function: function procedures and sub procedures share the same characteristics, with Function: function procedures and sub procedures share the same characteristics, with one important difference- function procedures return a value (e.g., give a value back) to the caller, whereas sub procedures

More information

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) AGENDA 3. Executing VBA

More information

DroidBasic Syntax Contents

DroidBasic Syntax Contents DroidBasic Syntax Contents DroidBasic Syntax...1 First Edition...3 Conventions Used In This Book / Way Of Writing...3 DroidBasic-Syntax...3 Variable...4 Declaration...4 Dim...4 Public...4 Private...4 Static...4

More information

'... '... '... Module created: unknown '... Proj finished: March 21, 2012 '... '...

'... '... '... Module created: unknown '... Proj finished: March 21, 2012 '... '... ThisWorkbook - 1 If g_bdebugmode Then '... Module created: unknown '... Proj finished: March 21, 2012 '************************* CLASS-LEVEL DECLARATIONS ************************** Option Explicit Option

More information

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is InputBox( ) Function An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is A = InputBox ( Question or Phrase, Window Title, ) Example1: Integer:

More information

Please answer questions in the space provided. Question point values are shown in parentheses.

Please answer questions in the space provided. Question point values are shown in parentheses. IS 320 Spring 99 Page 1 Please answer questions in the space provided. Question point values are shown in parentheses. 1. (15) Assume you have the following variable declarations and assignments: Dim A

More information

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6 HARP_VB projet en VB6 Option Explicit Dim Value As Integer Dim i As Integer Dim il As Long Dim LL, L1S, L250µS, L500µS, L1mS, L2mS, L5mS, L10mS As Single Dim offsetdepart As Long Dim police(256, 8) As

More information

IDENTIFYING UNIQUE VALUES IN AN ARRAY OR RANGE (VBA)

IDENTIFYING UNIQUE VALUES IN AN ARRAY OR RANGE (VBA) Date: 20/11/2012 Procedure: Identifying Unique Values In An Array Or Range (VBA) Source: LINK Permalink: LINK Created by: HeelpBook Staff Document Version: 1.0 IDENTIFYING UNIQUE VALUES IN AN ARRAY OR

More information

ANNEX. CODI FONT DE LES CLASSES DESENVOLUPADES

ANNEX. CODI FONT DE LES CLASSES DESENVOLUPADES ANNEX. CODI FONT DE LES CLASSES DESENVOLUPADES CLASSE FORMULARI

More information

Syntax. Table of Contents

Syntax. Table of Contents Syntax Table of Contents First Edition2 Conventions Used In This Book / Way Of Writing..2 KBasic-Syntax..3 Variable.4 Declaration4 Dim4 Public..4 Private.4 Protected.4 Static.4 As..4 Assignment4 User Defined

More information

Programming Concepts and Skills. Arrays continued and Functions

Programming Concepts and Skills. Arrays continued and Functions Programming Concepts and Skills Arrays continued and Functions Fixed-Size vs. Dynamic Arrays A fixed-size array has a limited number of spots you can place information in. Dim strcdrack(0 to 2) As String

More information

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses. IS 320 Spring 96 Page 1 Please use your own paper to answer the following questions. Point values are shown in parentheses. 1. (10) Consider the following segment of code: If txtansicode.text < "0" Or

More information

Projecte Final de Carrera - Domotització d un jardí domèstic Annex 1

Projecte Final de Carrera - Domotització d un jardí domèstic Annex 1 Marc Flores Nogués Juny 2009 Projecte Final de Carrera - Domotització d un jardí domèstic Annex 1 Public Sector1 As Boolean Public Sector2 As Boolean Public Sector3 As Boolean Public Sector6 As Boolean

More information

NHS e-referral Service

NHS e-referral Service Extracting Advice and Guidance data Published July 2017 Copyright 2016 Health and Social Care Information Centre. The Health and Social Care Information Centre is a non-departmental body created by statute,

More information

Programming with visual Basic:

Programming with visual Basic: Programming with visual Basic: 1-Introdution to Visual Basics 2-Forms and Control tools. 3-Project explorer, properties and events. 4-make project, save it and its applications. 5- Files projects and exercises.

More information

Write the code for the click event for the Move>> button that emulates the behavior described above. Assume you already have the following code:

Write the code for the click event for the Move>> button that emulates the behavior described above. Assume you already have the following code: IS 320 Spring 2000 page 1 1. (13) The figures below show two list boxes before and after the user has clicked on the Move>> button. Notice that the selected items have been moved to the new list in the

More information

Basic Programming Algorithms. 1-D Arrays

Basic Programming Algorithms. 1-D Arrays Basic Programming Algorithms 1-D Arrays 1-D fixed-size array Dim arr(5) As Double 0-base, 6 elements Dim arr(0 to 5) As Double 0-base, 6 elements Dim arr(1 to 5) As Double 1-base, 5 elements Option Base

More information

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type >

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type > VBA Handout References, tutorials, books Excel and VBA tutorials Excel VBA Made Easy (Book) Excel 2013 Power Programming with VBA (online library reference) VBA for Modelers (Book on Amazon) Code basics

More information

A Back-End Link Checker for Your Access Database

A Back-End Link Checker for Your Access Database A Back-End for Your Access Database Published: 30 September 2018 Author: Martin Green Screenshots: Access 2016, Windows 10 For Access Versions: 2007, 2010, 2013, 2016 Working with Split Databases When

More information

Learning VB.Net. Tutorial 19 Classes and Inheritance

Learning VB.Net. Tutorial 19 Classes and Inheritance Learning VB.Net Tutorial 19 Classes and Inheritance Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you

More information

CMPT 110 MIDTERM OCTOBER 18, 2001

CMPT 110 MIDTERM OCTOBER 18, 2001 CMPT 110 MIDTERM OCTOBER 18, 2001 1 What will be displayed when the command button is clicked? 7% Level of difficulty 7 (out of 10) Assume there is a command button called cmdbutton Assume there is a picturebox

More information

Anexos. Diseño y construcción de un puente grúa automatizado de precisión

Anexos. Diseño y construcción de un puente grúa automatizado de precisión Anexos Diseño y construcción de un puente grúa automatizado de precisión Nombre: Daniel Andrade García Especialidad: Ingeniería Electrónica Industrial y Automática Tutor: Inmaculada Martínez Teixidor Cotutor:

More information

ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions

ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions ENGG1811 UNSW, CRICOS Provider No: 00098G1 W7 slide 1 References Chapra (Part 2 of ENGG1811 Text)

More information

Compiladores Prof. Bruno Lopes Lista 1

Compiladores Prof. Bruno Lopes Lista 1 1. Coteje as etapas do processo de compilação. 2. Seja a seguinte BNF da linguagem Pascal. Compiladores 2016.2 Prof. Bruno Lopes Lista 1 program ::= program identifier ; uses declaration ; block. uses

More information

NOTES: Procedures (module 15)

NOTES: Procedures (module 15) Computer Science 110 NAME: NOTES: Procedures (module 15) Introduction to Procedures When you use a top-down, structured program design, you take a problem, analyze it to determine what the outcome should

More information

UNIT 4. CONTROL FLOW. Programming Year Grade in Industrial Technology Engineering. Paula de Toledo. David Griol

UNIT 4. CONTROL FLOW. Programming Year Grade in Industrial Technology Engineering. Paula de Toledo. David Griol Programming Unit 4. Control flow Haga clic para modificar el estilo de texto del patrón UNIT 4. CONTROL FLOW Programming Year 2017-2018 Grade in Industrial Technology Engineering Paula de Toledo. David

More information

Chapter 2.4: Common facilities of procedural languages

Chapter 2.4: Common facilities of procedural languages Chapter 2.4: Common facilities of procedural languages 2.4 (a) Understand and use assignment statements. Assignment An assignment is an instruction in a program that places a value into a specified variable.

More information

Code for VBA Homeworks

Code for VBA Homeworks Code for VBA Homeworks (HW1point1, HW1point2, HW2, and HW3. See vba-homeworks.xls.) vba-homework-slides.tex. For class on February 15 and 17, 1999. 1 Option Explicit Sub HW1point1() Dim AbleStartValue

More information

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types Managing Data Unit 4 Managing Data Introduction Lesson 4.1 Data types We come across many types of information and data in our daily life. For example, we need to handle data such as name, address, money,

More information

In this appendix we provide a very brief description of how VBA functions are

In this appendix we provide a very brief description of how VBA functions are Option Pricing Models and Volatility Using Excel VBA By Fabrice Douglas Rouah and Gregory Vainberg Copyright 2007 by Fabrice Douglas Rouah and Gregory Vainberg APPENDIX A A VBA Primer In this appendix

More information

Advanced VBA Techniques. Alison Balter InfoTech Services Group

Advanced VBA Techniques. Alison Balter InfoTech Services Group Advanced VBA Techniques Alison Balter InfoTech Services Group About Me Started InfoTech Services Group in 1990 Wrote first book for SAMS on Access 2.0 Have written 15 books on Access and SQL Server Have

More information

MIS 216 SPRING 2018 PROJECT 4

MIS 216 SPRING 2018 PROJECT 4 MIS 216 SPRING 2018 PROJECT 4 Subs / Functions Arrays / Classes 1. Start a new project a. Create a folder on your desktop name it yourinitialsproject3 as in tnjproject3. b. FILE NEW PROJECT c. Change the

More information

'... '... '... Developer: William H. White (consultant) '... With: TEKsystems Inc. '... For: AIG. Financial Information Systems

'... '... '... Developer: William H. White (consultant) '... With: TEKsystems Inc.   '... For: AIG. Financial Information Systems ThisWorkbook - 1 Developer: William H. White (consultant) With: TEKsystems Inc. www.teksystems.com For: AIG Financial Information Systems 1 NY Plaza, 15th floor Current contact: william.white@aig.com (212)

More information

Using a 74HCT259 8 Bit Addressable Latch with BasicX

Using a 74HCT259 8 Bit Addressable Latch with BasicX Basic Express Application Note Using a 74HCT259 8 Bit Addressable Latch with BasicX Introduction This application note illustrates how to use a 74HCT259 8-bit addressable latch with a BasicX system. The

More information

VISUAL BASIC SERVER INTERFACE CODE. Visual Basic 6 Graphical Interface 103. Visual Basic Module rtsscomm.bas Code.115

VISUAL BASIC SERVER INTERFACE CODE. Visual Basic 6 Graphical Interface 103. Visual Basic Module rtsscomm.bas Code.115 APPENDIX E VISUAL BASIC SERVER INTERFACE CODE Page E.1: E.2: E.3: E.4: E.5: Visual Basic 6 Graphical Interface 103 Visual Basic Form gyrofront.frm Code.....104 Visual Basic Module mydatatypes.bas Code..114

More information

Language Fundamentals

Language Fundamentals Language Fundamentals VBA Concepts Sept. 2013 CEE 3804 Faculty Language Fundamentals 1. Statements 2. Data Types 3. Variables and Constants 4. Functions 5. Subroutines Data Types 1. Numeric Integer Long

More information

VISUAL BASIC 2005 EXPRESS: NOW PLAYING

VISUAL BASIC 2005 EXPRESS: NOW PLAYING VISUAL BASIC 2005 EXPRESS: NOW PLAYING by Wallace Wang San Francisco ADVANCED DATA STRUCTURES: QUEUES, STACKS, AND HASH TABLES Using a Queue To provide greater flexibility in storing information, Visual

More information

Revision for Final Examination (Second Semester) Grade 9

Revision for Final Examination (Second Semester) Grade 9 Revision for Final Examination (Second Semester) Grade 9 Name: Date: Part 1: Answer the questions given below based on your knowledge about Visual Basic 2008: Question 1 What is the benefit of using Visual

More information

FORMAS DE IMPLEMENTAR LOS OYENTES. A).- El oyente en una clase independiente con el constructor con un argumento y usando el método getactioncommand.

FORMAS DE IMPLEMENTAR LOS OYENTES. A).- El oyente en una clase independiente con el constructor con un argumento y usando el método getactioncommand. FORMAS DE IMPLEMENTAR LOS OYENTES A).- El oyente en una clase independiente con el constructor con un argumento y usando el método getactioncommand. public class VentanaOyente extends Frame{ private Oyente

More information

VBSCRIPT - INTERVIEW QUESTIONS

VBSCRIPT - INTERVIEW QUESTIONS VBSCRIPT - INTERVIEW QUESTIONS http://www.tutorialspoint.com/vbscript/vbscript_interview_questions.htm Copyright tutorialspoint.com Dear readers, these VBScript Interview Questions have been designed specially

More information

Birotică Profesională. Cursul 12

Birotică Profesională. Cursul 12 Birotică Profesională Cursul 12 Sumar Visual Basic for Applications (VBA) Tipuri de date Structuri de control Funcţii si proceduri Obiecte si colecţii VBA Mediu de programare destinat in special realizării

More information

References. Iteration For. Iteration (Repetition) Iteration While. For loop examples

References. Iteration For. Iteration (Repetition) Iteration While. For loop examples References ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions Chapra (Part 2 of ENGG1811 Text) Topic 19 (chapter 12) Loops Topic 17 (section 10.1)

More information

20. VB Programming Fundamentals Variables and Procedures

20. VB Programming Fundamentals Variables and Procedures 20. VB Programming Fundamentals Variables and Procedures 20.1 Variables and Constants VB, like other programming languages, uses variables for storing values. Variables have a name and a data type. Array

More information

Appendix E SLAMM Source Code

Appendix E SLAMM Source Code Appendix E SLAMM Source Code Attribute VB_Name = "CalcMainModule"... 2 Attribute VB_Name = "CalcPollutants"... 38 Attribute VB_Name = "Procedures"... 50 Attribute VB_Name = "CalcWetDetention"... 91 Attribute

More information

How to Create a MindManager Add-in With Visual Studio in 7 Steps

How to Create a MindManager Add-in With Visual Studio in 7 Steps How to Create a MindManager Add-in With Visual Studio in 7 Steps Prerequisites: MindManager 7, 8 or 9 installed Visual Studio 2005, 2008 or 2010 installed Step One The first thing to do is download this

More information

10/18/18. Outline. Semantic Analysis. Two types of semantic rules. Syntax vs. Semantics. Static Semantics. Static Semantics.

10/18/18. Outline. Semantic Analysis. Two types of semantic rules. Syntax vs. Semantics. Static Semantics. Static Semantics. Outline Semantic Analysis In Text: Chapter 3 Static semantics Attribute grammars Dynamic semantics Operational semantics Denotational semantics N. Meng, S. Arthur 2 Syntax vs. Semantics Syntax concerns

More information

IS 320 A/B Winter 1998 Page 1 Exam 1

IS 320 A/B Winter 1998 Page 1 Exam 1 IS 320 A/B Winter 1998 Page 1 Use your own paper to answer the questions. You may do work on this document but transfer your answers to separate sheets of paper. Turn in this document as well as your answers

More information

Bulk Transfers Using Visual Basic 6.0

Bulk Transfers Using Visual Basic 6.0 Revision 0.BMay 11, 2001 Introduction This document describes Bulk_XferVB, a small Windows application that uses Bulk Transfers to move data in and out of EZ-USB / EZ-USB FX devices using the EZ-USB General

More information

Agenda. Arrays 01/12/2009 INTRODUCTION TO VBA PROGRAMMING. Arrays Matrices.

Agenda. Arrays 01/12/2009 INTRODUCTION TO VBA PROGRAMMING. Arrays Matrices. INTRODUCTION TO VBA PROGRAMMING LESSON6 dario.bonino@polito.it Agenda Matrices 1 Allow to store vectorial data Geometric vectors Sets of data having something in common... Declared as Dim array_name (begin

More information

TD 2. Correction TP info

TD 2. Correction TP info TP 2 Exercice 3 : Impôts Sub impot() Dim montant As Integer montant = Cells(1, 1).Value Dim montanttot As Integer Select Case montant Case 0 To 1000 montanttot = 0.1 * montant Case 1001 To 5000 montanttot

More information

Propedéutico de Programación

Propedéutico de Programación Propedéutico de Programación Coordinación de Ciencias Computacionales Semana 4, Segunda Parte Dra. Pilar Gómez Gil Versión 1. 24.06.08 http://ccc.inaoep.mx/~pgomez/cursos/programacion/ Chapter 3 ADT Unsorted

More information

Balloon OCX by SkySof Software Inc. last updated: 10/26/05

Balloon OCX by SkySof Software Inc. last updated: 10/26/05 Balloon OCX by SkySof Software Inc. last updated: 10/26/05 Balloon OCX is an ActiveX Control for creating cool, customized tooltips for all of your Visual Basic controls. To add the Balloon OCX component

More information

Sébastien Mathier wwwexcel-pratiquecom/en Variables : Variables make it possible to store all sorts of information Here's the first example : 'Display the value of the variable in a dialog box 'Declaring

More information

Using BasicX to Derive Acceleration From GARMIN GPS Text Data

Using BasicX to Derive Acceleration From GARMIN GPS Text Data Basic Express Application Note Using BasicX to Derive Acceleration From GARMIN GPS Text Data Introduction Global Positioning System (GPS) receivers are typically able to measure position, velocity and

More information

variables programming statements

variables programming statements 1 VB PROGRAMMERS GUIDE LESSON 1 File: VbGuideL1.doc Date Started: May 24, 2002 Last Update: Dec 27, 2002 ISBN: 0-9730824-9-6 Version: 0.0 INTRODUCTION TO VB PROGRAMMING VB stands for Visual Basic. Visual

More information

Creating a Dynamo with VBA Scripts

Creating a Dynamo with VBA Scripts Creating a Dynamo with VBA Scripts Creating a Dynamo with VBA 1 Table of Contents 1. CREATING A DYNAMO WITH VBA... 3 1.1 NAMING CONVENTIONS FOR DYNAMO OBJECTS...3 1.2 CREATING A DYNAMO...4 1.3 DESIGNING

More information

Sequence structure. The computer executes java statements one after the other in the order in which they are written. Total = total +grade;

Sequence structure. The computer executes java statements one after the other in the order in which they are written. Total = total +grade; Control Statements Control Statements All programs could be written in terms of only one of three control structures: Sequence Structure Selection Structure Repetition Structure Sequence structure The

More information

Angel International School - Manipay 1 st Term Examination November, 2015

Angel International School - Manipay 1 st Term Examination November, 2015 Grade 10 Angel International School - Manipay 1 st Term Examination November, 2015 Information & Communication Technology Duration: 3.00 Hours Part 1 Choose the appropriate answer 1) Find the correct type

More information

% & (! *+)? ) /! %*) &

% & (! *+)? ) /! %*) & # emerge pgadmin3 [postgres@palocortado]$ postmaster -D /var/lib/postgresql/data -d 2 -p 5432 prewikka2pgadminsql.sh awk -f /var/lib/postgresql/prewikka-sql/prewikka2pgadminsql.awk /var/lib/postgresql/data/pg_log/postgre*.log

More information

ADVANCED ALGORITHMS TABLE OF CONTENTS

ADVANCED ALGORITHMS TABLE OF CONTENTS ADVANCED ALGORITHMS TABLE OF CONTENTS ADVANCED ALGORITHMS TABLE OF CONTENTS...1 SOLVING A LARGE PROBLEM BY SPLITTING IT INTO SEVERAL SMALLER SUB-PROBLEMS CASE STUDY: THE DOOMSDAY ALGORITHM... INTRODUCTION

More information

Sébastien Mathier wwwexcel-pratiquecom/en While : Loops make it possible to repeat instructions a number of times, which can save a lot of time The following code puts sequential numbers into each of the

More information

Quick Reference Guide

Quick Reference Guide SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD mikroelektronika Development tools - Books - Compilers Quick Reference Quick Reference Guide with EXAMPLES for Basic language This reference guide

More information

The name of this type library is LabelManager2 with the TK Labeling Interface reference.

The name of this type library is LabelManager2 with the TK Labeling Interface reference. Page 1 of 10 What is an ActiveX object? ActiveX objects support the COM (Component Object Model) - Microsoft technology. An ActiveX component is an application or library that is able to create one or

More information

Rietveld Basic. 1. Data types: Examples: DIM A[10] // single array A DOUBLE F, W STRING s1, s2, s3, s4. 2. Operations: Examples: 3.

Rietveld Basic. 1. Data types: Examples: DIM A[10] // single array A DOUBLE F, W STRING s1, s2, s3, s4. 2. Operations: Examples: 3. 1. Data types: Rietveld Basic BOOLEAN true/false INTEGER -2147483648.. 2147483647 SINGLE 1.5 * 10-45.. 3.4 * 10 38 (7 significant figures) DOUBLE 5.0 * 10-324.. 1.7 * 10 308 (15 significant figures) STRING

More information

Iteration -- Once Is Not Enough

Iteration -- Once Is Not Enough Iteration -- Once Is Not Enough ),7 Congratulations! The Day Find project is done! -- Reflect This is a significant accomplishment Understand a fundamental algorithm -- binary search Know how to search

More information

May not be distributed except as part of a system distributed by a registered AltFileSearch licensee

May not be distributed except as part of a system distributed by a registered AltFileSearch licensee Class AltFileSearch AltFileSearch Copyright  Codematic Limited 2008. All rights reserved. May not be distributed except as part of a system distributed by a registered AltFileSearch licensee If you received

More information

Modbus Server. ARSoft International

Modbus Server. ARSoft International Modbus Server ARSoft International Description The ModBus server allows: The cyclic or acyclique interrogation of equipments connected to the serial comport COM1 to COM10. Up to 115200 Bauds. The communication

More information

Random numbers program

Random numbers program Fundamentals of Computer Science 2010-2011 Laboratory 11 Vectors (1) Objectives: Acquire abilities in the use of vectors (one-dimensional arrays) Get to know the generation of pseudo-random numbers Lower

More information

EGR1301_Linear_Equation_Solver_ docx. 1. Select Options 2. Select Add Ins. 3. Select Solver Add in and press OK.

EGR1301_Linear_Equation_Solver_ docx. 1. Select Options 2. Select Add Ins. 3. Select Solver Add in and press OK. 1. Select Options 2. Select Add Ins 3. Select Solver Add in and press OK Page 1 of 13 4. Select Analysis ToolPak and press OK 5. Select Analysis ToolPak VBA and press OK Page 2 of 13 6. From Quick Access

More information

CS313D: ADVANCED PROGRAMMING LANGUAGE

CS313D: ADVANCED PROGRAMMING LANGUAGE CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 2 : C# Language Basics Lecture Contents 2 The C# language First program Variables and constants Input/output Expressions and casting

More information

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 Name :. Roll No. :..... Invigilator s Signature :.. 2011 INTRODUCTION TO PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give

More information

OCTOBEAM. LED Lighting Effect USER MANUAL / MANUAL DE USUARIO

OCTOBEAM. LED Lighting Effect USER MANUAL / MANUAL DE USUARIO LED Lighting Effect USER MANUAL / MANUAL DE USUARIO PLEASE READ THE INSTRUCTIONS CAREFULLY BEFORE USE / POR FAVOR LEA LAS INSTRUCCIÓNES ANTES DE USAR 1. Overview OctoBeam White is a LED Lighting Bar with

More information

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples:

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples: VBA program units: Subroutines and Functions Subs: a chunk of VBA code that can be executed by running it from Excel, from the VBE, or by being called by another VBA subprogram can be created with the

More information

Universitas Sumatera Utara

Universitas Sumatera Utara Option Explicit DefLng A-Z '--------------------------------------------------------------------------------------------- #Const Test = False '---------------------------------------------------------------------------------------------

More information

Learning VB.Net. Tutorial 16 Modules

Learning VB.Net. Tutorial 16 Modules Learning VB.Net Tutorial 16 Modules Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If

More information

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net UNIT 1 Introduction to Microsoft.NET framework and Basics of VB.Net 1 SYLLABUS 1.1 Overview of Microsoft.NET Framework 1.2 The.NET Framework components 1.3 The Common Language Runtime (CLR) Environment

More information

The following are required to duplicate the process outlined in this document.

The following are required to duplicate the process outlined in this document. Technical Note ClientAce WPF Project Example 1. Introduction Traditional Windows forms are being replaced by Windows Presentation Foundation 1 (WPF) forms. WPF forms are fundamentally different and designed

More information

Statements and Operators

Statements and Operators Statements and Operators Old Content - visit altium.com/documentation Mod ifi ed by Rob Eva ns on Feb 15, 201 7 Parent page: EnableBasic Enable Basic Statements Do...Loop Conditional statement that repeats

More information

How to modify convert task to use variable value from source file in output file name

How to modify convert task to use variable value from source file in output file name Page 1 of 6 How to modify convert task to use variable value from source file in output file name The default SolidWorks convert task add-in does not have support for extracting variable values from the

More information

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and VBA AND MACROS VBA is a major division of the stand-alone Visual Basic programming language. It is integrated into Microsoft Office applications. It is the macro language of Microsoft Office Suite. Previously

More information

Outline. Midterm Review. Using Excel. Midterm Review: Excel Basics. Using VBA. Sample Exam Question. Midterm Review April 4, 2014

Outline. Midterm Review. Using Excel. Midterm Review: Excel Basics. Using VBA. Sample Exam Question. Midterm Review April 4, 2014 Midterm Review Larry Caretto Mechanical Engineering 209 Computer Programming for Mechanical Engineers April 4, 2017 Outline Excel spreadsheet basics Use of VBA functions and subs Declaring/using variables

More information

GENERAL INFORMATICS Chapter 3. The Representation of Processing Algorithms Algorithm definition Steps in computer problem solving process

GENERAL INFORMATICS Chapter 3. The Representation of Processing Algorithms Algorithm definition Steps in computer problem solving process GENERAL INFORMATICS Chapter 3. The Representation of Processing Algorithms 3.1. Algorithm definition 3.2. Steps in computer problem solving process 3.3. Steps for preparing a program for execution 3.4.

More information

1) Identify the recording mode, by which you can record the non-standard object in QTP

1) Identify the recording mode, by which you can record the non-standard object in QTP 1) Identify the recording mode, by which you can record the non-standard object in QTP A) Standard recording B) Analog recording C) Low level recording D) None 2) By default, how many no of tables would

More information

Review for Programming Exam and Final May 4-9, Ribbon with icons for commands Quick access toolbar (more at lecture end)

Review for Programming Exam and Final May 4-9, Ribbon with icons for commands Quick access toolbar (more at lecture end) Review for Programming Exam and Final Larry Caretto Mechanical Engineering 209 Computer Programming for Mechanical Engineers May 4-9, 2017 Outline Schedule Excel Basics VBA Editor and programming variables

More information

...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb

...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb ...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb 1 1 Option Strict On 2 3 Public Class frmescape 4 5 ' Class variables. 6 7 Private _intonehour As Integer = 1 8 Private _inttwohour As Integer

More information

CSC Java Programming, Fall Java Data Types and Control Constructs

CSC Java Programming, Fall Java Data Types and Control Constructs CSC 243 - Java Programming, Fall 2016 Java Data Types and Control Constructs Java Types In general, a type is collection of possible values Main categories of Java types: Primitive/built-in Object/Reference

More information

Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice

Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice Visual Basic Lab Sheet 4: Non Object-Oriented Programming Practice This lab sheet builds on the basic programming you have done so far, bringing elements of file handling, data structuring and information

More information

PSEUDOCODE. It is a conventional code to represent an algorithm

PSEUDOCODE. It is a conventional code to represent an algorithm PSEUDOCODE It is a conventional code to represent an algorithm PSEUDOCODE It is a conventional code to represent an algorithm PSEUDOCODE NOTATION Refers the syntax used to write an algorithm in pseudocode

More information

Sébastien Mathier wwwexcel-pratiquecom/en Arrays are "variables" that allow many values to be stored We have already covered this topic in Lesson 3, but now we will go into greater depth Why use arrays?

More information

ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration

ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration ENGG1811 UNSW, CRICOS Provider No: 00098G W9 slide 1 References & Info Chapra (Part 2 of ENGG1811 Text) Topic 21 (chapter

More information

Level 3 Computing Year 2 Lecturer: Phil Smith

Level 3 Computing Year 2 Lecturer: Phil Smith Level 3 Computing Year 2 Lecturer: Phil Smith Previously We started to build a GUI program using visual studio 2010 and vb.net. We have a form designed. We have started to write the code to provided the

More information

4- PHP introduc.on. Course: Developing web- based applica.ons. Cris*na Puente, Rafael Palacios

4- PHP introduc.on. Course: Developing web- based applica.ons. Cris*na Puente, Rafael Palacios 4- PHP introduc.on Course: Cris*na Puente, Rafael Palacios 2010- 1 PHP Overview What is PHP? A server- side scrip*ng language It is compa*ble with almost all browsers and servers used today It is free

More information

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions Between the comments included with the code and the code itself, you shouldn t have any problems understanding what

More information

Déclaration du module

Déclaration du module Déclaration du module Imports System.IO Module ModuleStagiaires Public Structure Stagiaire Private m_code As Long Private m_nom As String Private m_prenom As String Public Property code() As Long Get Return

More information

The New Trisection and Trisection Plus Root- Seeking Algorithms by Namir Shammas

The New Trisection and Trisection Plus Root- Seeking Algorithms by Namir Shammas The New Trisection Algorithms 1 The New Trisection and Trisection Plus Root- Seeking Algorithms by Namir Shammas Introduction This article presents a new root-bracketing algorithm and it s variant. The

More information

d2vbaref.doc Page 1 of 22 05/11/02 14:21

d2vbaref.doc Page 1 of 22 05/11/02 14:21 Database Design 2 1. VBA or Macros?... 2 1.1 Advantages of VBA:... 2 1.2 When to use macros... 3 1.3 From here...... 3 2. A simple event procedure... 4 2.1 The code explained... 4 2.2 How does the error

More information

An efficient algorithm for sparse PCA

An efficient algorithm for sparse PCA An efficient algorithm for sparse PCA Yunlong He Georgia Institute of Technology School of Mathematics heyunlong@gatech.edu Renato D.C. Monteiro Georgia Institute of Technology School of Industrial & System

More information

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II)

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II) Session 1 Start Visual Basic Use the Visual Basic programming environment Understand Essential Visual Basic menu commands and programming procedure Change Property setting Use Online Help and Exit Visual

More information

OpenOffice.org 3.2 BASIC Guide

OpenOffice.org 3.2 BASIC Guide OpenOffice.org 3.2 BASIC Guide Copyright The contents of this document are subject to the Public Documentation License. You may only use this document if you comply with the terms of the license. See:

More information

IFA/QFN VBA Tutorial Notes prepared by Keith Wong

IFA/QFN VBA Tutorial Notes prepared by Keith Wong Chapter 2: Basic Visual Basic programming 2-1: What is Visual Basic IFA/QFN VBA Tutorial Notes prepared by Keith Wong BASIC is an acronym for Beginner's All-purpose Symbolic Instruction Code. It is a type

More information