Package jmt.engine.jaba

Examples of jmt.engine.jaba.EngineConvex2D


    String[] classNames;
    Vector<newPoint> vertices;
    SectorEngine calc;
    Vector<Object> saturationSects;
    double prop;
    EngineConvex2D convexEngine;
    Vector<Point2D> v;
   
    stations = model.getStations();
    //Solver solver = null;
    stationNames = model.getStationNames();
    classNames = model.getClassNames();
    serviceTimes = model.getServiceTimes();
    visits = model.getVisits();
    vertices = new Vector<newPoint>();
    prop = 100;

    for (int i = 0; i < stations; i++) {
      // Crea il vettore da passare a Calc2D
      //System.out.println(i);
      // il giusto sarebbe moltiplicare per 1000000, ma dà problemi
      int a = (int) (serviceTimes[i][0][0] * prop * visits[i][0]);
      int b = (int) (serviceTimes[i][1][0] * prop * visits[i][1]);
      //System.out.println(i+": "+a+" "+b);
      vertices.addElement(new newPoint(a, b));
    }

    calc = new SectorEngine();
    JabaResults jres = new JabaResults();
    saturationSects = calc.Calc2D(vertices, stationNames, classNames);
    jres.setSaturationSectors(saturationSects);

    v = new Vector<Point2D>();
    for (int k = 0; k < stationNames.length; k++) {
      v.add(new DPoint(serviceTimes[k][0][0],
          serviceTimes[k][1][0], stationNames[k]));
    }
    convexEngine = new EngineConvex2D(v, saturationSects);
    jres.setConvex(convexEngine.getConvex());
    jres.setAllConvex(convexEngine.getAllConvex());
    jres.setAllDominants(convexEngine.getAllDominants());
    jres.setDominants(convexEngine.getDominants());
    jres.setFiltDominats(convexEngine.getFiltDominants());
    jres.setFiltConvex(convexEngine.getFiltConvex());
    jres.setFiltDominates(convexEngine.getFiltDominates());
    jres.setPoints(convexEngine.getPoints());
    jres.setDominates(convexEngine.getDominates());
    jres.setFilteredArea(convexEngine.getFilteredArea());
    jres.setAllPoints(convexEngine.getAllPoints());
   
    PerformanceEngine performanceEngine = new PerformanceEngine(serviceTimes, saturationSects, stationNames);
   
    jres.setUtilization(performanceEngine.getUtilization());
    //jres.setEquiUtilizationPoint(calc.calcEquiUtilizationPoint(vertices));
View Full Code Here

TOP

Related Classes of jmt.engine.jaba.EngineConvex2D

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.