public void run(int sessionId, String hostname, int tempValue, int ultrasonicValue, int hour, int minute) {
        flc = new FuzzyLogicController();
        String date = null;
        String context;
        d = new Date();
        cal = new GregorianCalendar();
        double time;

        SystemProcessUtil.SystemTime util = new SystemProcessUtil.SystemTime();
        time = (double) cal.get(Calendar.HOUR_OF_DAY);
        time += (double) (Double.valueOf(new SimpleDateFormat("mm").format(new Date())) / 100);
        System.out.println("The time is: " + time);

        DecimalFormat df = new DecimalFormat("#.00");
        time = Double.valueOf(df.format(time));

        // if it is not 17.30pm
        if (time != SystemProcessUtil.terminate_time) {
            
            String tempContext = "temperature";
            String ultraContext = "movement";

            
            // day, month, year
            String day = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
            String month = String.valueOf(cal.get(Calendar.MONTH) + 1);
            int year = cal.get(Calendar.YEAR);
                        
            // apply a fuzzy logic controller
            // NB: we will need to return a set of data to write to the database/JSON/XML file
            // agent controller??
            // generate and update a fuzzy logic model based on defined and pre-defined rules 
            
            /*
             * temperature
             */  
            flc.create(tempValue, tempContext);
                        
            // persistInitialContextSession the generated fuzzy model to a MySQL database table
            flc.persistInitialContextSession(sessionId, hostname, hour, minute, day, month, year);
            
            
            /*
             * ultrasonic
             */
            entry = flc.create(ultrasonicValue, ultraContext);
            
            // persistInitialContextSession the generated fuzzy model to a MySQL database table
            flc.persistInitialContextSession(sessionId, hostname, hour, minute, day, month, year);
        }
    }