diff --git a/livrables/petriNet.aird b/livrables/PetriNet.aird
similarity index 93%
rename from livrables/petriNet.aird
rename to livrables/PetriNet.aird
index 8d6e5bf..c654529 100644
--- a/livrables/petriNet.aird
+++ b/livrables/PetriNet.aird
@@ -1,13 +1,13 @@
- petriNet.ecore
- petriNet.genmodel
+ PetriNet.ecore
+ PetriNet.genmodel
-
+
@@ -202,8 +202,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -212,8 +212,8 @@
-
-
+
+
bold
@@ -221,8 +221,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -232,8 +232,8 @@
-
-
+
+
bold
@@ -241,8 +241,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -251,8 +251,8 @@
-
-
+
+
bold
@@ -260,8 +260,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -270,16 +270,16 @@
-
-
+
+
bold
-
-
+
+
bold
@@ -287,8 +287,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -298,8 +298,8 @@
-
-
+
+
@@ -310,8 +310,8 @@
-
-
+
+
@@ -322,9 +322,9 @@
-
-
-
+
+
+
@@ -332,9 +332,9 @@
-
-
-
+
+
+
bold
@@ -346,9 +346,9 @@
-
-
-
+
+
+
@@ -362,6 +362,6 @@
-
+
diff --git a/livrables/petriNet.ecore b/livrables/PetriNet.ecore
similarity index 100%
rename from livrables/petriNet.ecore
rename to livrables/PetriNet.ecore
diff --git a/livrables/petriNet.ocl b/livrables/PetriNet.ocl
similarity index 94%
rename from livrables/petriNet.ocl
rename to livrables/PetriNet.ocl
index f44a2e3..73e6301 100644
--- a/livrables/petriNet.ocl
+++ b/livrables/PetriNet.ocl
@@ -1,4 +1,4 @@
-import 'petriNet.ecore'
+import 'PetriNet.ecore'
package petrinet
diff --git a/livrables/petriNet.png b/livrables/PetriNet.png
similarity index 100%
rename from livrables/petriNet.png
rename to livrables/PetriNet.png
diff --git a/livrables/toTINA.mtl b/livrables/PetriNet2TINA.mtl
similarity index 96%
rename from livrables/toTINA.mtl
rename to livrables/PetriNet2TINA.mtl
index 601544f..3fd622d 100644
--- a/livrables/toTINA.mtl
+++ b/livrables/PetriNet2TINA.mtl
@@ -1,5 +1,5 @@
[comment encoding = UTF-8 /]
-[module toTINA('http://petrinet')]
+[module PetriNet2TINA('http://petrinet')]
[template public networkToTINA(aNetwork : Network)]
[comment @main/]
diff --git a/livrables/simplePDL.aird b/livrables/SimplePDL.aird
similarity index 93%
rename from livrables/simplePDL.aird
rename to livrables/SimplePDL.aird
index f896f3a..73747f2 100644
--- a/livrables/simplePDL.aird
+++ b/livrables/SimplePDL.aird
@@ -1,12 +1,12 @@
- simplePDL.ecore
+ SimplePDL.ecore
-
+
@@ -332,8 +332,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -342,32 +342,32 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -375,8 +375,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -387,8 +387,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -397,8 +397,8 @@
-
-
+
+
bold
@@ -406,8 +406,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -416,8 +416,8 @@
-
-
+
+
bold
@@ -425,8 +425,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -435,8 +435,8 @@
-
-
+
+
bold
@@ -444,8 +444,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -454,8 +454,8 @@
-
-
+
+
bold
@@ -463,8 +463,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -473,16 +473,16 @@
-
-
+
+
bold
-
-
+
+
bold
@@ -490,8 +490,8 @@
-
-
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -500,8 +500,8 @@
-
-
+
+
bold
@@ -509,8 +509,8 @@
-
-
+
+
@@ -521,8 +521,8 @@
-
-
+
+
@@ -533,8 +533,8 @@
-
-
+
+
@@ -545,8 +545,8 @@
-
-
+
+
@@ -557,9 +557,9 @@
-
-
-
+
+
+
@@ -568,9 +568,9 @@
-
-
-
+
+
+
@@ -579,9 +579,9 @@
-
-
-
+
+
+
bold
@@ -593,9 +593,9 @@
-
-
-
+
+
+
@@ -604,9 +604,9 @@
-
-
-
+
+
+
@@ -614,9 +614,9 @@
-
-
-
+
+
+
@@ -630,6 +630,6 @@
-
+
diff --git a/livrables/simplePDL.ecore b/livrables/SimplePDL.ecore
similarity index 100%
rename from livrables/simplePDL.ecore
rename to livrables/SimplePDL.ecore
diff --git a/livrables/simplePDL.ocl b/livrables/SimplePDL.ocl
similarity index 98%
rename from livrables/simplePDL.ocl
rename to livrables/SimplePDL.ocl
index 4e7a91f..8a43e16 100644
--- a/livrables/simplePDL.ocl
+++ b/livrables/SimplePDL.ocl
@@ -1,4 +1,4 @@
-import 'simplePDL.ecore'
+import 'SimplePDL.ecore'
package simplepdl
diff --git a/livrables/PDL.xtext b/livrables/SimplePDL.xtext
similarity index 100%
rename from livrables/PDL.xtext
rename to livrables/SimplePDL.xtext
diff --git a/livrables/simplepdl2petrinet.java b/livrables/SimplePDL2PetriNet.java
similarity index 94%
rename from livrables/simplepdl2petrinet.java
rename to livrables/SimplePDL2PetriNet.java
index a18c63e..2013ab1 100644
--- a/livrables/simplepdl2petrinet.java
+++ b/livrables/SimplePDL2PetriNet.java
@@ -24,33 +24,34 @@ import simplepdl.WorkSequence;
import simplepdl.WorkSequenceType;
import simplepdl.Request;
-public class simplepdl2petrinet {
+public class SimplePDL2PetriNet {
public static void main(String[] args) {
-
- // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse.
+
+ // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le
+ // registre d'Eclipse.
SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE;
PetrinetPackage packageInstance2 = PetrinetPackage.eINSTANCE;
-
+
// Enregistrer l'extension ".xmi" comme devant être ouverte à
// l'aide d'un objet "XMIResourceFactoryImpl"
Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
Map m = reg.getExtensionToFactoryMap();
m.put("xmi", new XMIResourceFactoryImpl());
-
+
// Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle)
ResourceSet resSet = new ResourceSetImpl();
// Charger la ressource (notre modèle)
URI modelURI = URI.createURI("models/developpement.xmi");
Resource resource = resSet.getResource(modelURI, true);
-
+
// Récupérer le premier élément du modèle (élément racine)
Process process = (Process) resource.getContents().get(0);
-
+
// La fabrique pour fabriquer les éléments de PetriNET
- PetrinetFactory myFactory = PetrinetFactory.eINSTANCE;
-
+ PetrinetFactory myFactory = PetrinetFactory.eINSTANCE;
+
// Créer un élément Network
Network network = myFactory.createNetwork();
network.setName(process.getName());
@@ -58,25 +59,25 @@ public class simplepdl2petrinet {
// Conversion des Resource en Places
for (Object o : process.getProcessElements()) {
if (o instanceof simplepdl.Resource) {
-
+
simplepdl.Resource r = (simplepdl.Resource) o;
String name = r.getName();
int qty = r.getQuantity();
-
+
Place res = myFactory.createPlace();
res.setName(name + "_resource");
res.setTokens(qty);
-
+
network.getNodes().add(res);
}
}
-
+
// Conversion des WorkDefinition en Node et Transition
for (Object o : process.getProcessElements()) {
if (o instanceof WorkDefinition) {
WorkDefinition wd = (WorkDefinition) o;
String name = wd.getName();
-
+
Place idle = myFactory.createPlace();
idle.setName(name + "_idle");
idle.setTokens(1);
@@ -89,7 +90,7 @@ public class simplepdl2petrinet {
Place finished = myFactory.createPlace();
finished.setName(name + "_finished");
finished.setTokens(0);
-
+
Arc pause2start = myFactory.createArc();
pause2start.setPlace(idle);
pause2start.setOutgoing(false);
@@ -107,7 +108,7 @@ public class simplepdl2petrinet {
start.getArcs().add(pause2start);
start.getArcs().add(start2running);
start.getArcs().add(start2started);
-
+
Arc running2finish = myFactory.createArc();
running2finish.setPlace(running);
running2finish.setOutgoing(false);
@@ -120,20 +121,20 @@ public class simplepdl2petrinet {
finish.setName(name + "_finish");
finish.getArcs().add(running2finish);
finish.getArcs().add(finish2finished);
-
+
network.getNodes().add(idle);
network.getNodes().add(start);
network.getNodes().add(started);
network.getNodes().add(running);
network.getNodes().add(finish);
network.getNodes().add(finished);
-
- // Conversion des Requests s'il y en a
+
+ // Conversion des Requests s'il y en a
for (Request req : wd.getRequests()) {
-
+
int qty = req.getQuantity();
Place target = null;
-
+
for (Node node : network.getNodes()) {
if (node instanceof Place) {
Place place = (Place) node;
@@ -142,7 +143,7 @@ public class simplepdl2petrinet {
}
}
}
-
+
Arc res2start = myFactory.createArc();
res2start.setPlace(target);
res2start.setOutgoing(false);
@@ -151,13 +152,13 @@ public class simplepdl2petrinet {
finish2res.setPlace(target);
finish2res.setOutgoing(true);
finish2res.setWeight(qty);
-
+
start.getArcs().add(res2start);
finish.getArcs().add(finish2res);
}
}
}
-
+
// Conversion des WorkSequence en Node et Transition
for (Object o : process.getProcessElements()) {
if (o instanceof WorkSequence) {
@@ -165,10 +166,10 @@ public class simplepdl2petrinet {
WorkSequenceType type = ws.getLinkType();
WorkDefinition predecessor = ws.getPredecessor();
WorkDefinition successor = ws.getSuccessor();
-
+
// creation des suffixs permettant la recherche des noeuds
String predecessor_suffix = new String();
- String successor_suffix = new String();
+ String successor_suffix = new String();
switch (type) {
case START_TO_START:
predecessor_suffix = "_started";
@@ -190,7 +191,7 @@ public class simplepdl2petrinet {
System.out.print("the fuck ?");
break;
}
-
+
// creation du read-arc
Arc arc1 = myFactory.createArc();
arc1.setOutgoing(false);
@@ -198,7 +199,7 @@ public class simplepdl2petrinet {
Arc arc2 = myFactory.createArc();
arc2.setOutgoing(true);
arc2.setWeight(1);
-
+
for (Node node : network.getNodes()) {
if (node instanceof Place) {
Place place = (Place) node;
@@ -215,20 +216,19 @@ public class simplepdl2petrinet {
}
}
}
- }
+ }
}
-
-
+
// Créer le nouveau xmi (modèle convertit)
URI convURI = URI.createURI("../fr.n7.petrinet/models/gen/developpement_java.xmi");
Resource conv = resSet.createResource(convURI);
// Ajouter le Network dans le nouveau modèle
conv.getContents().add(network);
-
+
// Sauver la ressource
- try {
- conv.save(Collections.EMPTY_MAP);
+ try {
+ conv.save(Collections.EMPTY_MAP);
} catch (IOException e) {
e.printStackTrace();
}
diff --git a/livrables/ko-net.xmi b/livrables/ko-net.xmi
index ada751d..68aaee7 100644
--- a/livrables/ko-net.xmi
+++ b/livrables/ko-net.xmi
@@ -4,7 +4,7 @@
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:petrinet="http://petrinet"
- xsi:schemaLocation="http://petrinet petriNET.ecore"
+ xsi:schemaLocation="http://petrinet PetriNet.ecore"
name="mauvaisNetwork">
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/livrables/ko-pdl2.xmi b/livrables/ko-pdl2.xmi
index 1ae0113..3364886 100644
--- a/livrables/ko-pdl2.xmi
+++ b/livrables/ko-pdl2.xmi
@@ -1,32 +1,9 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/livrables/net.xmi b/livrables/net.xmi
index d223b9d..8c84885 100644
--- a/livrables/net.xmi
+++ b/livrables/net.xmi
@@ -1,24 +1,9 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/livrables/rapport.pdf b/livrables/rapport.pdf
new file mode 100644
index 0000000..14ec419
Binary files /dev/null and b/livrables/rapport.pdf differ
diff --git a/livrables/simplePDL-editor.png b/livrables/simplePDL-editor.png
new file mode 100644
index 0000000..2183421
Binary files /dev/null and b/livrables/simplePDL-editor.png differ