Ejemplo n.º 1
0
 public void run() {
   WebGenRequest twgreq = WebGenRequestExecuter.callService(parameters, webgenserver, operation);
   ConstrainedFeatureCollection fcNew =
       (ConstrainedFeatureCollection) twgreq.getParameter("result");
   if (fcNew == null) fcNew = (ConstrainedFeatureCollection) twgreq.getResult("result");
   if (fcNew != null) {
     // LOGGER.info("Evaluation for - " + operationName);
     WebGenRequest ewgreq = new WebGenRequest();
     ewgreq.addParameters(parameters);
     ewgreq.addFeatureCollection("geom", fcNew);
     Double[] costVec = evalPartitions(ewgreq);
     double costAllCurrent = getCostFromCostVector(costVec);
     ConstrainedFeatureCollectionSorted sortedFeatureCollection =
         new ConstrainedFeatureCollectionSorted(costAllCurrent, fcNew, operationName);
     sortedFeatureCollectionVector.add(sortedFeatureCollection);
   }
 }
Ejemplo n.º 2
0
 private Double[] evalPartitions(WebGenRequest wgreq) {
   (new Eval_GMFeat_All()).run(wgreq);
   Double[] partitionCost = (Double[]) wgreq.getResult("severities");
   for (int i = 4; i < 8; i++) partitionCost[i] *= 0.25;
   return partitionCost;
 }