diff --git a/jmetal4.5.2/src/jmetal/problems/EBEs.java b/jmetal4.5.2/src/jmetal/problems/EBEs.java index 1c97eb6..f95aea1 100644 --- a/jmetal4.5.2/src/jmetal/problems/EBEs.java +++ b/jmetal4.5.2/src/jmetal/problems/EBEs.java @@ -188,7 +188,7 @@ public void setNumberOfConstraintsNodes(int numberOfConstraintsNodes) { } // set numberOfConstraintsNodes public int getNumberOfConstraintsNodes() { - return numberOfWeigthHypothesis_ ; + return numberOfConstraintsNodes_ ; } // get numberOfRestrictionNodes /** @@ -2277,6 +2277,17 @@ public void EBEsMat3DL_iRig_jRig(int e) throws JMException{ double E=Groups_[idx][E_]; // elastic transversal modulus double G=Groups_[idx][G_]; + if (Math.abs(Lij) < 1e-9) { + for (int i = 0; i < 6; i++) { + for (int j = 0; j < 6; j++) { + Kii[i][j] = 0; + Kij[i][j] = 0; + Kji[i][j] = 0; + Kjj[i][j] = 0; + } + } + return; + } // esfuerzos en nudo j por reacción de desplazamientos en i + esfuerzo en i Kii[0][0] = E * S / Lij; Kii[0][1] = 0; @@ -4687,7 +4698,7 @@ public String EBEsReadProblems() { input.close(); } catch (Exception ex) { - System.out.println("Error: data file EBEs not readed"); + throw new RuntimeException("Error: data file EBEs not readed", ex); } return txt; @@ -4911,7 +4922,6 @@ public final void EBEsReadDataFile(String fileName) throws JMException{ yj = Node_[nj][aY_]; zj = Node_[nj][aZ_]; Element_[i][L_]=Math.sqrt(Math.pow((xj - xi), 2.0) + Math.pow((yj - yi), 2.0) + Math.pow((zj - zi), 2.0)); - if(Element_[i][L_] < 0.001) Element_[i][L_] = 0.0; } txt=input.nextLine(); txt=input.nextLine(); @@ -4956,7 +4966,7 @@ public final void EBEsReadDataFile(String fileName) throws JMException{ input.close(); } catch (Exception ex) { - System.out.println("Error: data file EBEs not readed"); + throw new RuntimeException("Error: data file EBEs not readed", ex); } }