bibliothèque java de programmation chimique cédric andreolli chloé boulanger olivier clÉro...
TRANSCRIPT
![Page 1: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/1.jpg)
Bibliothèque JAVA de programmation chimique
Cédric ANDREOLLIChloé BOULANGEROlivier CLÉROAntoine GUELLIERSébastien GUILLOUXArthur TEMPLÉ
Projet 4INFO
Encadrant : Jean-Louis Pazat
Démonstration05/2012
![Page 2: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/2.jpg)
2
Bibliothèque JAVA de programmation chimique – Démonstration
Sommaire
Exemples simplesIndexProvider : Preuves de fonctionnalitésFoxes’n RabbitsVitrine technologique musicale
![Page 3: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/3.jpg)
3
Bibliothèque JAVA de programmation chimique – Démonstration
Utilisation de la bibliothèque
ReactionRule
Règle de réaction = classe implémentant l’interface ReactionRule
Méthodes :- computeSelect() : conditions sur le choix des réactifs- computeReact() : réaction en elle-même
Solution- Ajout de réactifs avec add(Object o) (n’importe quel objet
Java, y compris des sous-solutions et des ReactionRule)- Lancement de la réaction : react()
![Page 4: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/4.jpg)
4
Bibliothèque JAVA de programmation chimique – Démonstration
Exemples simples
Nombres premiers
En entrée : une solution contenant des nombres de 2 à n
Réaction : – ComputeSelect : sélectionne les nombres divisibles entre
eux– ComputeReact : ajoute à la solution le nombre qui divise, et
n’ajoute pas celui qui est divisé
En sortie : ensemble des nombres premiers de 2 à n appartenant à l’intervalle [2;n]
![Page 5: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/5.jpg)
5
Bibliothèque JAVA de programmation chimique – Démonstration
Exemples simples
Sentence Creator
A wild Pikachu
SubjectType
Chloé Boulanger
The dog The cat VerbType
Is sexy and knows it
runs
appearseats
ChooseSubjectRR
PutWordsTogether
ChooseVerbRRChooseComplementRR
PrepositionType
inon
abovebelow
PlaceType
The roof The garden
The kitchen
![Page 6: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/6.jpg)
6
Bibliothèque JAVA de programmation chimique – Démonstration
IndexProvider
Preuves de fonctionnalité
L’IndexProvider : coeur et point sensible du problèmeFournit toutes les combinaisons possibles d’index des réactifs en solution
Nécessaire de vérifier que l’IndexProvider: - sélectionne des combinaisons valides- parcourt toutes les combinaisons possibles- fonctionne avec les SubSolutions
D’où réalisation de tests indispensable... qui a révélé de nombreux problèmes et bugs corrigés par la suite.
![Page 7: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/7.jpg)
7
Bibliothèque JAVA de programmation chimique – Démonstration
Foxes’n Rabbits
Présentation
Simulation d’une population de renards et de lapins
Règles- Chaque espèce peut se déplacer sur une case vide- Chaque espèce a une espérance de vie et finit par mourir naturellement- Chaque espèce peut se reproduire - Les lapins peuvent se faire manger par les renards
L’ensemble est géré par un système de probabilités- Probabilité de se faire manger, de se reproduire... qui diffère selon l’espèce
En théorie- Système aléatoire et indéterministe- Mais globalement stable et équilibré- Selon un bon paramétrage des différentes probabilités
![Page 8: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/8.jpg)
8
Bibliothèque JAVA de programmation chimique – Démonstration
Vitrine technologique musicale
Eléments de la réaction
CountNb
mesures restantes à
créer
BarNumberNuméro de la
mesure à créer
DegreeImplDegré de la mesure à
créer
Note1
ChordImpl1
ChordImpl2
BarNumber
Note2Note
3
Note1
ChordImpl1
BarNumber
Note2Note
3 Note4
Note5
Note1
ChordImpl1
BarNumber
Note2Note
3 Note4
![Page 9: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/9.jpg)
9
Bibliothèque JAVA de programmation chimique – Démonstration
Vitrine technologique musicale
Exemple de réaction : création du rythme de la mélodieRythmicRR prend les réactifs suivants :
MeasureNumber1
ChordImpl1
ChordImpl2
Pitch
MelodicRRmax = 0
activated = false
RythmicRRChordNumber = 1
max = 0
2
RythmPull
RythmPatternEEQ2
RythmPatternEEQQQ4
RythmPatternQQEEQ4
RythmPatternEQP2
A est pris par B comme réactif
A B
![Page 10: Bibliothèque JAVA de programmation chimique Cédric ANDREOLLI Chloé BOULANGER Olivier CLÉRO Antoine GUELLIER Sébastien GUILLOUX Arthur TEMPLÉ Projet 4INFO](https://reader036.vdocuments.mx/reader036/viewer/2022062622/551d9db5497959293b8d9a0d/html5/thumbnails/10.jpg)
10
Bibliothèque JAVA de programmation chimique – Démonstration
Vitrine technologique musicale
Exemple de réaction : création du rythme de la mélodieRythmicRR remet en solution les produits suivants :
MeasureNumber1
ChordImpl1
ChordImpl2
Pitch
MelodicRRmax = 5
activated = false
RythmicRRChordNumber = 2
max = 5
2
RythmPull
RythmPatternEEQ2
RythmPatternEEQQQ4
RythmPatternQQEEQ4
RythmPatternEQP2
NotePosition=0
NotePosition=1
NotePosition=2
NotePosition=3
NotePosition=4
NotePosition=5
B remet A en solutionB A