Outils pour utilisateurs

Outils du site


Panneau latéral

Accueil

Select other language :


Apprentissage

Enseignements

Enseignements Département Informatique SI5 et Master IFI

Enseignements Département Bâtiment Polytech'Nice

Autres Formations française et étrangère

Activités administratives, Ingénierie et Innovation Pédagogiques

Apprentissage Département Informatique SI5/Master 2 ingénierie informatique EUR DS4H


Recherche

Valorisation de la Recherche

Dépôts Logiciels à l’Agence de Protection des Programme (APP)

Valorisation des résultats de recherche et transfert

Diffusion de la Culture scientifique et Technologique

Communications de presse

Séminaire ENSI Tunis

Pédagogie Innovante

Relations industrielles et socio-économique

Organisation de Manifestations

  • Conférence sur les FabLabs, Alexandre Schneider, Professeur Agrégé en Génie Mécanique, Université de Reims Champagne-Ardenne Web
  • Journées UbiMob'14 Site Web

Animation de la Recherche

U-Santé

Privé

Outils

Sources d'Informations

projet:projetsi4_0114_fuzzy_contexter

Please write all the text in English !

Fuzzy Contexter

New Tools for Capture and Analysis of Digital Context and Fuzzy Logic

Group Composition :
  • Olivier Fauvel-Jaeger
  • Anthony Soulier
  • Benjamin Vella
  • Michel Vedrine
Report :
Slides of the presentation :
Source Code (Temporary)

Software Specifications :

List of new Beans

Bean <name>
  • purpose of the bean
  • input interface (exposed methods)
  • output interface (emitted events)
  • internal algorithm or simply used librairies (and dependencies)
  • links on the documentation of such librairies
  • link to the binary code other .Net (dll of the bean<name> and other requested librairies)
  • link to the VS solution with C# source code to compile the bean
Bean OutlookMailsChecker
  • purpose of the bean
    This bean is in charge of the extraction of Outlook email.
  • input interface (exposed methods)
    • void ReadAllReceivedMailsToJsonString
      read all e-mails in the inbox and send them on a JSON string by event ( NewReceivedMessagesJsonString )
    • void ReadAllSentMailsToJsonString \\read all e-mails in the outbox and send them on a JSON string by event ( NewSentMessagesJsonString )
    • void ReadMailReceivedFormDateTimeToJsonString(DateTime d)
      read all e-mails in the inbox from the date “d” and send them on a JSON string by event ( NewReceivedMessagesJsonString )
    • void ReadSentMailFormDateTimeToJsonString(DateTime d)
      read all e-mails in the outbox from the date “d” and send them on a JSON string by event ( NewSentMessagesJsonString )
    • void ReadMailReceivedFormDateTimeToJsonString()
      read all e-mails in the inbox from the attribute “ReceivedOnDate” and send them on a JSON string by event ( NewReceivedMessagesJsonString )
    • void ReadSentMailFormDateTimeToJsonString()
      read all e-mails in the outbox from the attribute “SentOnDate” and send them on a JSON string by event ( NewSentMessagesJsonString )
    • void AllGroupsOfContact()
      get all groups of contacts in the outlook’s adressbook and send them by event ( GroupsUpdateEvent )
    • void AllEmailsAddress()
      get all e-mail address in the outlook’s adressbook and send them by event ( ContactsUpdateEvent )
    • void ContactsForGroup(List<string> nameOfGroups)
      get all email address in the outlook’s adressbook belong to the given groups and send them by event ( ContactsUpdateEvent )
    • void GroupsForEMail(string email) :\\get all groups for a given email address and send them by event ( ContactsUpdateEvent )
  • output interface (emitted events)
    • NewReceivedMessagesJsonString(string json)
      event when new e-mails are received (automatically sent when the user received a new e-mail in Outlook).
    • NewSentMessagesJsonString(string json)
      event when new e-mails are sent (automatically sent when the user sent a new e-mail in Outlook).
    • GroupsUpdateEvent
      event when the group of contacts are update.
    • ContactsUpdateEvent
      event when the contacts are update.
  • Used librairies
    • Microsoft.Office.Interop.Outlook (API provide by Microsoft, Outlook must be installed Outlook API
  • link to the binary code other .Net (dll of the bean<name> and other requested librairies)
  • link to the VS solution with C# source code to compile the bean
Bean Core
  • Purpose:
    This bean is in charge of the fuzzification of the input values and apply logic rules on the results. First it must be initialized with linguistic variables.
  • Input interface:
    • InitializeSystem(List<LinguisticVariable> lingVars, List<string> varsToEval, string rulesFilePath)
      This method needs AForge.Fuzzy objects (LinguisticVariable) and some other informations to initialize the machine for the given scenario.
    • Evaluate(Dictionary<string, float> varsToSet)
      The method called when a fuzzy evaluation is needed on the system.
  • Output interface:
    • FireRulesAForgeResultEvent(List<FuzzyOutput> fuzzyOutputs)
      This event carry the results from the evaluation in the form of AForge.Fuzzy objects. This is useful if another Bean using AForge.Fuzzy objects grab this event right after the evaluation (an AForge defuzzifier for example).
    • FireRulesJSONResultEvent(string json)
      This event carry the results from the evaluation in the form of a JSON string. Useful for compatibilities reasons with others Beans/Services.
  • Internal algorithm:
    Most of the heavy lifting is left to the already functional Fuzzy library from the AForge.NET framework.
  • Libraries used:
  • VS Project: .csproj
  • DLLs:
Bean Configurator
  • Purpose:
    This bean is in charge of the initialization of the Core Bean. It reads through one configuration file given by the user.
  • Input interface:
    • ReadConfig()
      This method reads the configuration file and create fuzzy objects (linguistic variables, fuzzy sets, …).
  • Output interface:
    • FireConfigCompletedEvent(List<LinguisticVariable> lingVars, List<string> varsToEval, string rulesFilePath)
      Event carrying the fuzzy objects and the informations needed by the machine for its initialization.
  • Internal algorithm:
    The ReadConfig() method reads line by line the configuration file and constructs objects needed by the machine.
  • Libraries used:
  • VS Project: .csproj
  • DLLs:
Bean CentroidDefuzzifier
  • Purpose:
    This bean is in charge of the defuzzification of the Core Bean output. The result is a list of numerical values calculated with the centroid method.
  • Input interface:
    • Defuzzy(List<FuzzyOutput> fuzzyOutputs)
      Defuzzify a list of outputs from the Core Bean.
  • Output interface:
    • FireCentroidDefuzzyCompletedEvent(Dictionary<string, float> d)
      Return the result in the form of a dictionary containing the name of the linguistic variable associated with the numeric value.
  • FireJSONCentroidDefuzzyCompletedEvent(string json)
    Return the previous result in the form of a JSON.
  • Internal algorithm:
    Each FuzzyOutput is processed by a centroid defuzzifier (an AForge object).
  • Libraries used:
  • VS Project: .csproj
  • DLLs:
Bean MaxDefuzzifier
  • Purpose:
    This bean is in charge of the defuzzification of the Core Bean output. The result is a list of numerical values calculated with the max method.
  • Input interface:
    • Defuzzy(List<FuzzyOutput> fuzzyOutputs)
      Defuzzify a list of outputs from the Core Bean.
  • Output interface:
    • FireMaxDefuzzyCompletedEvent(Dictionary<string, string> d)
      Return the result in the form of a dictionary containing the name of the linguistic variable associated with the name of the fuzzy set with the maximum strength.
    • FireJSONMaxDefuzzyCompletedEvent(string json)
      Return the previous result in the form of a JSON.
  • Internal algorithm:
    In each FuzzyOutput is extracted the name of the fuzzy set with the highest strength. And the list is returned.
  • Libraries used:
  • VS Project: .csproj
  • DLLs:
Bean Expediteur
  • purpose of the bean
    This bean is very specific to the logic core : its purpose is to create the group curves for the fuzzification: a mail sender is part of some groups, and the fuzzy core needs curves to find those groups. For n groups, there are 2^n - 1 possible ways to group someone. We had to let the machine do that for us.
  • input interface (exposed methods)
    • public void Initialisation(List<string> groupes)
      Fix the numbers we will have to use to create curves : Memorize the groups, set the number of group possibilities…
    • public void GetGroups(List<string> groupes)
      This method is called by Initialisation. We can call it directly if the function curves have already been created. If they don't, this function creates the curves and write them in a configuration file.
    • public void GetFloat(string json)
      Given a list of groups in a property of a json object, find (and send) the correct abscissa.
  • output interface (emitted events)
    • NeedGroups()
      Event sent at the initialization, when this bean needs all the groups to create curves and/or to set the important numbers for the algorithm.
    • ValeurExpediteur(n)
      Event sent after having found the abscissa of a sender. The argument is a JObject containing the value.
  • internal algorithm or simply used librairies (and dependencies)
    • To set the curves and find the abscissa of a mail sender (thanks to its groups), the algorithm uses the binary count : 00000001 means “is only in the first group”, 001001 means “in the first and the fourth”, … So we just had to add 1 from 0 to 2^n - 1 to access every group value possibilities.
  • links on the documentation of such librairies
  • link to the binary code other .Net (dll of the bean<name> and other requested librairies)
  • link to the VS solution with C# source code to compile the bean
Bean JSONToCSV
  • Purpose:
    This bean transform a json string or a json file to csv file. The json must begin by an array.
  • input interface (exposed methods)
    • void ConvertJsonFileToCSV(string pathToJson, string pathToCSV)
    • void ConvertJsonStringToCSV(string json, string pathToCSV)
    • void ConvertJsonFileToCSV(string pathToJson)
    • void ConvertJsonFileToCSV()
    • void ConvertJsonStringToCSV(string json)

All of these methods convert a json file or a json string to a CSV file, if the path of the json file or the cdv file are not in parameter the methods use the attribute “PathCSV” for the CSV file and the attribute “PathToJson” for the json file.
You can also set the CSV’s delimiter with the attribute “Delimiter” and the attribute “AppendCSVFile“ allow you to append or replace the csv file if it exist already .

  • output interface (emitted events)
    • CSVFileCreate(string path)
      event sent when the csv file is created.
  • link to the binary code other .Net (dll of the bean<name> and other requested librairies)
  • link to the VS solution with C# source code to compile the bean
Bean Json2Dictionary
  • Purpose:
    This bean transform a json string or a json file into a Dictionary<string,float>. The json must begin by an array or an object. This bean has been created to make easier the manipulation of specific information like a string and its float value.
  • input interface (exposed method)
    • public void GetJSon(string JSon)

This method takes in argument a string, parse the json inside, and analyze each object. The analyze constructs a Dictionary for each object, and send it via an event.

  • output interface (emitted events)
    • InformationsToTreat(data)
      event sent when a new Dictionary<string,float> has been created.
  • link to the binary code other .Net (dll of the bean<name> and other requested librairies)
  • link to the VS solution with C# source code to compile the bean
Bean NotificationIcon
  • Purpose

Encapsulate the Microsoft ’s NotifyIcon class in a bean

  • input interface (exposed methods)==
    • void ShowNotification()
    • void ShowNotification(int time)
    • void ShowNotification(int time, string balloonTipText)
    • void ShowNotification(string balloonTipText)

Show a notification in the Windows’ notification area. The balloonTipText must be set to display the notification.

  • output interface (emitted events) : The bean provide different event of the NotifyIcon class.
    • event EventHandler BalloonTipClicked
    • event EventHandler BalloonTipClosed
    • event EventHandler BalloonTipShown
    • event EventHandler Click
    • event EventHandler DoubleClick
  • link to the binary code other .Net (dll of the bean<name> and other requested librairies)
  • link to the VS solution with C# source code to compile the bean
Bean Synchronisateur
  • purpose of the bean
    The goal of this bean is to group information to a big one. We can use it for treatment from multiple inputs. It stores data when they come, and, to never loose any information, it sends all of them when an already stored kind of data comes.
  • input interface (exposed methods)
    • public void GetNewData(string json)
      Extract (and store) information from an objet or an array. For each property, if the value is a float, it sends all others if needed and then store it. If it's not a float, it send an event, expecting than another bean would be able to translate that into float (such as Expediteur)
    • public void getInfosFromArray(string json)
      Should be the answer to the event called if the property is not a float. The argument must be the string of a json object, and every property must have a float as value.
  • output interface (emitted events)
    • InformationsToTreat(json)
      Send the json with all the last received values of each kind. This json represents an object with multiple properties String Name - Float Value.
    • NeedInfoArray(json)
      Send a json representing a property in wich the value is not a float. Potentially, another bean should be able to translate this value into a float and send it back.
  • internal algorithm or simply used librairies (and dependencies)
  • links on the documentation of such librairies
  • link to the binary code other .Net (dll of the bean<name> and other requested librairies)
  • link to the VS solution with C# source code to compile the bean

List of various beans assemblies

Assembly <name>
  • purpose of the assembly
  • screen shot of the assembly
  • link on the corresponding wcc file

Configuration Files

Syntax of the configuration files
  • Fuzzy sets (one declaration by line)
    • declaration of linguistic variables
      variable;[variable name];[start of the interval]|[end of the interval

      ex: variable;Food;0|10

    • declarations of trapezoidal fuzzy sets
      trapezoid;[variable name];[fuzzy set name];[parameters]|[of]|[trapezoid]

      ex: trapezoid;Food;Bad;1|7|right

    • declarations of linear variables
      linear;[variable name];[fuzzy set name];[point1.X:point1.Y]|[point2.X:point2.Y]|...

      ex: linear;Food;Bad;1:0,5|7:0,8|8:1

    • declarations of the variables to be evaluated by the machine
      evaluate;[variable name]

      ex: evaluate;Tip

    • declaration of the path of the rule file
      rules;[path of the file]

      ex: rules;rules.txt

  • Fuzzy rules (one rule by line)
    IF [variable] IS (NOT)[fuzzy set] (AND|OR [variable] IS (NOT)[fuzzy set])* THEN [variable] IS [fuzzy set]
Example of configuration
  • config.txt
    // variables linguistiques
    variable;Nourriture;0,10
    variable;Service;0,10
    variable;Pourboire;0,30
    
    // ensembles flous trapezes
    trapezoid;Nourriture;Execrable;1,7,right
    trapezoid;Nourriture;Delicieux;7,9,left
    trapezoid;Service;Excellent;5,10,left
    trapezoid;Service;Bon;0,5,10
    trapezoid;Service;Mauvais;0,5,right
    trapezoid;Pourboire;Bas;0,5,10
    trapezoid;Pourboire;Moyen;10,15,20
    trapezoid;Pourboire;Eleve;20,25,30
    
    // variables à evaluer
    evaluate;Pourboire
    
    // fichier de regles
    rules;rules.txt
  • rules.txt
    IF QualiteService IS Mauvais OR Nourriture IS Execrable THEN Pourboire IS Faible
    IF QualiteService IS Bon THEN Pourboire IS Moyen
    IF QualiteService IS Excellent OR Nourriture IS Delicieux THEN Pourboire IS Eleve

Documentation and Tutorial

On the Outlook SDK
On Fuzzy AForge .Net Librairies

Various scenarios to illustrate the project

  • With Extracteur 1 : (visualisation des données extraites sous Excel)
  • With Extracteur 2 : (visualisation des données extraites sous Excel)
  • With Extracteur 3 : (visualisation des données extraites sous Excel)
  • With Synchonisation : (visualisation des données de sorties sous Excel)
  • With Fuzzy Reasonning : (visualisation des données de sorties avant defuzzification sous Excel)
  • With Fuzzy Reasonning : (visualisation des données de sorties après defussification sous Excel)

Prospects :

projet/projetsi4_0114_fuzzy_contexter.txt · Dernière modification: 2014/03/10 14:37 par bvella