@OPERATION void update() { logger.info("HHH updating clusterM"); updateObsProperty("clusterAlloc", model.getAlloc()); // logger.info("HHH updated clusterL with kPTC = "+model.getPrefkPTC()); updateObsProperty("clusterCenters", model.getCenters()); // logger.info("HHH updated clusterL with kPTC = "+model.getPrefkPTC()); updateObsProperty("clusterData", model.getData()); updateObsProperty("clusterMap", model.getMap()); // int[] MaxDist= model.getMaxDist(); // String str = new String(); // for(int i = 0;i<MaxDist.length;i++){ // str+=","+MaxDist[i]; // } // logger.info("HHHJ"+str); updateObsProperty("clusterRadius", model.getMaxDist()); updateObsProperty("clusterNumCows", model.getNumCows()); updateObsProperty("clusterNumber", model.getNumberOfCluster()); updateObsProperty("clusterPrefNCows", model.getPrefNCows()); updateObsProperty("clusterPrefRadius", model.getPrefRadius()); updateObsProperty("clusterPrefKPTC", model.getPrefkPTC()); logger.info("HHH updated clusterL with kPTC = " + model.getPrefkPTC()); }
@OPERATION void init() { new Thread((Runnable) model).start(); // defineObsProperty("clusterAssign",calculate()); defineObsProperty("clusterAlloc", model.getAlloc()); // logger.info("HHH init passou alloc"); defineObsProperty("clusterCenters", model.getCenters()); // logger.info("HHH init passou centers"); defineObsProperty("clusterData", model.getData()); // logger.info("HHH init passou data"); defineObsProperty("clusterMap", model.getMap()); // logger.info("HHH init passou map"); defineObsProperty("clusterRadius", model.getMaxDist()); // logger.info("HHH init passou maxdist"); defineObsProperty("clusterNumCows", model.getNumCows()); // logger.info("HHH init passou humcows"); defineObsProperty("clusterNumber", model.getNumberOfCluster()); // logger.info("HHH init passou numberofcluster"); defineObsProperty("clusterPrefNCows", model.getPrefNCows()); // logger.info("HHH init passou prefncows"); defineObsProperty("clusterPrefRadius", model.getPrefRadius()); // logger.info("HHH init passou prefradius"); defineObsProperty("clusterPrefKPTC", model.getPrefkPTC()); // logger.info("HHH init passou prefkptc"); logger.info("inicializou"); }
@OPERATION void updateClusterNumber() { updateObsProperty("clusterNumber", model.getNumberOfCluster()); }