Package hu.u_szeged.nbo.geometria.type

Examples of hu.u_szeged.nbo.geometria.type.GeomIntVektor


    }
  }
 
  public static TreeMap beolvas(String fileName) throws GeomWrongFileTypeException, IOException, GeomWrongIndexException {
    TreeMap map = new TreeMap();
    workIndexes = new GeomIntVektor();
    int sor = 1;
    try {
      BufferedReader buf = new BufferedReader(new FileReader(fileName));
      int id, type, priority, base, begin, end, length, rec, loseUnit;
      StringTokenizer st;
View Full Code Here


    }
  }
 
  public static TreeMap beolvas(String fileName) throws GeomWrongFileTypeException, IOException, GeomWrongIndexException {
    TreeMap map = new TreeMap();
    teamIndexes = new GeomIntVektor();
    int sor = 1;
    try {
      BufferedReader buf = new BufferedReader(new FileReader(fileName));
      int id, type, begin, end, base;
      StringTokenizer st;
View Full Code Here

    return /*getID() + "-" +*/ getName();
  }

  public static TreeMap beolvas(String fileName) throws GeomWrongFileTypeException, IOException, GeomWrongIndexException {
    TreeMap map = new TreeMap();
    placeIndexes = new GeomIntVektor();
    int sor = 1;
    try{
      BufferedReader buf = new BufferedReader(new FileReader(fileName));
      int id;
      String nev;
View Full Code Here

          for(int j=1; j<=munkaTipusokSzama; j++)
            tiltas.setElement(i, j, 1-resources.matrixTypePair.getElement(i,j));
          tiltas.setElement(i, munkaTipusokSzama+1, 0);
        }
        GeomSzallitasiFeladat sz = new GeomSzallitasiFeladat();
        GeomIntVektor a = ltr.getSorVektorByIndex(placeId);
        GeomIntVektor b = ktr.getSorVektorByIndex(placeId);
        b.addElement(delta);
        GeomIntMatrix szallitas = sz.solve(tiltas, a, b);
        if(szallitas.elemekSzorzatOsszege(tiltas)!=0){
          for(int j=1; j<=tiltas.getMeret().getY(); j++){
            int nemTiltottElemSora = 0;
            for(int i=1; i<=tiltas.getMeret().getX(); i++){
              if(tiltas.getElement(i,j)==0 && nemTiltottElemSora==0){
                nemTiltottElemSora = i;
              }
              if(tiltas.getElement(i,j)*szallitas.getElement(i,j)>0){
                if(nemTiltottElemSora==0){
                  for(int l=i+1; l<=tiltas.getMeret().getX(); l++){
                    if(tiltas.getElement(l,j)==0 && nemTiltottElemSora==0){
                      nemTiltottElemSora = l;
                      break;
                    }
                  }
                  if(nemTiltottElemSora==0) throw new GeomKAPMatrixFillException();
                }
                int diff = szallitas.getElement(i,j);
                szallitas.setElementAdd(nemTiltottElemSora, szallitas.getMeret().getY(), -diff);
                szallitas.setElementAdd(i, szallitas.getMeret().getY(), diff);
              }
            }
          }
         
        }
        KAPij.setSorVektorByIndex(placeId, szallitas.getOszlopVektor(szallitas.getMeret().getY()));
      }else{      /// 8/b
        delta = 0-delta;
        GeomTeam team = new GeomTeam()//fiktiv
        GeomIntMatrix tiltas = new GeomIntMatrix(eroforrasTipusokSzama+1, munkaTipusokSzama);
        for(int i=1; i<=eroforrasTipusokSzama; i++){
          for(int j=1; j<=munkaTipusokSzama; j++)
            tiltas.setElement(i, j, 1-resources.matrixTypePair.getElement(i,j));
        }
        for(int j=1; j<=munkaTipusokSzama; j++)
          tiltas.setElement(eroforrasTipusokSzama+1, j, 0);
        GeomSzallitasiFeladat sz = new GeomSzallitasiFeladat();
        GeomIntVektor a = ltr.getSorVektorByIndex(placeId);
        GeomIntVektor b = ktr.getSorVektorByIndex(placeId);
        a.addElement(delta);
        GeomIntMatrix szallitas = sz.solve(tiltas, a, b);
        GeomIntVektor kapacitasHiany = new GeomIntVektor(eroforrasTipusokSzama);
        if(szallitas.elemekSzorzatOsszege(tiltas)!=0){
          for(int i=1; i<=eroforrasTipusokSzama; i++){
            for(int j=1; j<=munkaTipusokSzama; j++){
              if(tiltas.getElement(i,j)*szallitas.getElement(i,j)>0){
                kapacitasHiany.setElementAdd(i, 0-szallitas.getElement(i,j));
              }
            }
          }
        }
        for(int j=1; j<=munkaTipusokSzama; j++){
          int munkaKapacitasa = szallitas.getSorVektor(eroforrasTipusokSzama+1).getElement(j);
          if(munkaKapacitasa!=0)
            for(int i=1; i<=eroforrasTipusokSzama; i++){
              if(resources.matrixTypePair.getElement(i,j)==1){
                kapacitasHiany.setElementAdd(i, 0-munkaKapacitasa);
                break;
              }
            }
        }
        KAPij.setSorVektorByIndex(placeId, kapacitasHiany);
View Full Code Here

TOP

Related Classes of hu.u_szeged.nbo.geometria.type.GeomIntVektor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.