docs: private void evaluateConstraints(DoubleSolution solution) {
      double [] constraint = new double[this.getNumberOfConstraints()];
      double[] x = new double[getNumberOfVariables()] ;
  
      for (int i = 0; i < getNumberOfVariables(); i++) {
        x[i] = solution.getVariableValue(i) ;
      }
  
      double x1, x2, x3, x4;
      int var=0;
      int con=0;
  
      // restricciones de relaciÃƒÂ³n de forma en las paredes b/t
      for (int gr=0; gr<numberOfGroupElements_;gr++){
  
        var+=Groups_[gr][VARIABLES];
        con+=Groups_[gr][CONSTRAINT];
  
        if (Groups_[gr][SHAPE]==CIRCLE){
          x1=x[var-1]; // diameter
        }
        else if (Groups_[gr][SHAPE]==HOLE_CIRCLE){
          x1=x[var-2]; // diameter
          x2=x[var-1]; // tickness plate
  
          double ratio=x1/x2;
          if(ratio<x2/x1) ratio=x2/x1;
          constraint[con-1]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base
        }
        else if (Groups_[gr][SHAPE]==RECTANGLE){
          x1=x[var-2]; // higth (y axis)
          x2=x[var-1]; // witdth (z axis)
  
          double ratio = x1/x2;
          constraint[con-2]=+ratio-Groups_[gr][RATIO_YZ]*0.75; // relaciÃƒÂ³n entre altura y base maxima
          constraint[con-1]=-ratio+Groups_[gr][RATIO_YZ]*1.5; // relaciÃƒÂ³n entre altura y base minima
  
        }
  
        else if (Groups_[gr][SHAPE]==HOLE_RECTANGLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (z axis)
          x3=x[var-2]; // tickness along Y axis => tickness of width  plate
          x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
  
          double ratio=x1/x2;
          constraint[con-4]=+ratio-Groups_[gr][RATIO_YZ]*0.75; // relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=-ratio+Groups_[gr][RATIO_YZ]*1.25; // relaciÃƒÂ³n entre altura y base minima
  
          double tb1=-x3*15+x1;
          double tb2=+x3*30-x1;
          double ta1=-x4*10+x2;
          double ta2=+x4*20-x2;
          //double ta2=-x2/x4+27;//0.3*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-2]=Math.min(tb1, tb2);//-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=Math.min(ta1, ta2);//-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
  
        }
  
        else if (Groups_[gr][SHAPE]==I_SINGLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // tickness along Y axis => tickness of width  plate
          x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
  
          double ratio=x1/x2;
          constraint[con-4]=+ratio-Groups_[gr][RATIO_YZ]*0.75; // relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=-ratio+Groups_[gr][RATIO_YZ]*1.25; // relaciÃƒÂ³n entre altura y base minima
  
          double tb1=-x3*15+x1;
          double tb2=+x3*30-x1;
          double ta1=-x4*10+x2;
          double ta2=+x4*20-x2;
  
          //double tb1=-x3*20+x1;
          //double tb2=-x1/x3+35;//0.6*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          //double ta1=-x4*15+x2;
          //double ta2=-x2/x4+27;//0.3*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-2]=Math.min(tb1, tb2);//-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=Math.min(ta1, ta2);//-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
  
        }
  
        else if (Groups_[gr][SHAPE]==I_DOUBLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // tickness along Y axis => tickness of width  plate
          x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
          double ratio=x1/x2;
          constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]*0.85; // /2.0 relaciÃƒÂ³n entre altura y base minima
          constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=-x2/x4+0.35*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS_CUT]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        }
        else if (Groups_[gr][SHAPE]==H_SINGLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // tickness along Y axis => tickness of width  plate
          x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
          double ratio=x1/x2;
          constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]*0.85; // /2.0 relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
          constraint[con-2]=-x1/x3+0.35*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS_CUT]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        }
        else if (Groups_[gr][SHAPE]==H_DOUBLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // thickness along Y axis => thickness of width  plate
          x4=x[var-1]; // thickness along Z axis => thickness of heigth plate
          double ratio=x1/x2;
          constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]*0.1; // 2.0 relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
          constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS_CUT]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        }
        else if (Groups_[gr][SHAPE]==L_SINGLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // thickness along Y axis => thickness of width  plate
          x4=x[var-1]; // thickness along Z axis => thickness heigth plate
          double ratio=x1/x2;
          constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // ratio between height and base
          constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
          constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        }
        else if (Groups_[gr][SHAPE]==L_DOUBLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // tickness along Y axis => tickness of width  plate
          x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
          double ratio=x1/x2;
          constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
          constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        }
        else if (Groups_[gr][SHAPE]==T_SINGLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // tickness along Y axis => tickness of width  plate
          x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
          double ratio=x1/x2;
          constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]*0.9; // 2.0 relaciÃƒÂ³n entre altura y base minima
          constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        }
        else if (Groups_[gr][SHAPE]==T_DOUBLE){
          x1=x[var-4]; // height (y axis)
          x2=x[var-3]; // width (Z axis)
          x3=x[var-2]; // tickness along Y axis => tickness of width  plate
          x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
          double ratio=x1/x2;
          constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
          constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]*0.9; // 2.0 relaciÃƒÂ³n entre altura y base minima
          constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
          constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        }
        else{
          System.out.println("Error in constraint: transverse section not considerated for: " + gr + " group") ;
        }
      } // next gr
  
  /*
      // LONGITUD TOTAL DE LA VIGA
      double l=0;
      for(int ba=0; ba<numberOfElements_; ba++){
          l+=Element_[ba][2];
      }
  */
  
      // RESTRICCIONES POR TENSIÃ“N
      for(int hi=0; hi<numberOfWeigthHypothesis_; hi++){
        for(int gr=0; gr<numberOfGroupElements_; gr++){
  
          // RESTRICCIONES DEBIDO A LA TENSIÃƒÂ³N DE TRACCIÃƒÂ³N
          constraint[con]=(-StrainMax_[gr][hi]+Groups_[gr][STRESS]); // -StrainMax_[gr][hi]*1.001+Groups_[gr][STRESS]
          con += 1;
  
          //constraint[con]=(-StrainMax_[gr][hi]+Groups_[gr][STRESS]*0.50); // -StrainMax_[gr][hi]*1.001+Groups_[gr][STRESS]
          //con += 1;
  
          // RESTRICCIONES DEBIDO A LA TENSIÃƒÂ³N DE COMPRESIÃƒÂ³N
          constraint[con]=(+StrainMin_[gr][hi]-Groups_[gr][COMPRESSION]); // +StrainMin_[gr][hi]*0.999-Groups_[gr][COMPRESSION]
          con += 1;
  
          //constraint[con]=(+StrainMin_[gr][hi]+Groups_[gr][COMPRESSION]*0.50); // +StrainMin_[gr][hi]*0.999-Groups_[gr][COMPRESSION]
          //con += 1;
  
          // RESTRICCIONES DEBIDO A LA TENSIÃƒâ€œN DE CORTE
          constraint[con]=(-StrainCutMax_[gr][hi]+Groups_[gr][STRESS_CUT]); // -StrainCutMax_[gr][hi]*1.001+Groups_[gr][STRESS_CUT]
          con += 1;
        }
      }
  
  
      for(int hi=0; hi<numberOfWeigthHypothesis_; hi++){
        // constraint of node displacement structure
        double deltaN=0;
        for(int i=0;i<nodeCheck_.length;i++){
          double xn=DisplacementNodes_[numberOfLibertyDegree_ * (int)nodeCheck_[i][0]+aX_][hi];
          double yn=DisplacementNodes_[numberOfLibertyDegree_ * (int)nodeCheck_[i][0]+aY_][hi];
          double zn=DisplacementNodes_[numberOfLibertyDegree_ * (int)nodeCheck_[i][0]+aZ_][hi];
          deltaN= Math.sqrt(Math.pow(xn,2)+Math.pow(yn,2)+Math.pow(zn,2));
          constraint[con]= (-deltaN +nodeCheck_[i][1]);
          con+=1;
        }
      }
  
      //constraint[0]=Math.sqrt(Math.pow(x, 2)+Math.pow(y, 2)+Math.pow(z, 2))+0.005;
      //descenso mÃƒÂ¡ximo en un nudo
      //constraint[1]=StrainResidual_[0][hi];
  
  
      double total = 0.0;
      //int number = 0;
      for (int i = 0; i < this.getNumberOfConstraints(); i++)
        if (constraint[i]<0.0){
          total+=constraint[i];
          //number++;
        }
      overallConstraintViolationDegree.setAttribute(solution, total);
      //solution.setOverallConstraintViolationDegree(total);
      //solution.setNumberOfViolatedConstraint(number);
  
    }