Skip to content
Snippets Groups Projects
Commit 8e98c6eb authored by Dominik Huml's avatar Dominik Huml
Browse files

not functional stand

parent fac71f12
No related branches found
No related tags found
No related merge requests found
Showing
with 6313 additions and 78 deletions
package de.tudresden.inf.st.pnml.flatter;
import beaver.Parser;
import de.tudresden.inf.st.pnml.base.constants.PnmlConstants;
import de.tudresden.inf.st.pnml.flatter.graph.ServiceGraph;
import de.tudresden.inf.st.pnml.flatter.transform.ReferenceFlatter;
import de.tudresden.inf.st.pnml.flatter.transform.TransformationUtils;
import de.tudresden.inf.st.pnml.jastadd.model.*;
......@@ -12,20 +10,26 @@ import fr.lip6.move.pnml.framework.utils.exception.InvalidIDException;
import de.tudresden.inf.st.pnml.flatter.tina.NdrioProxy;
import de.tudresden.inf.st.pnml.jastadd.model.PetriNet;
import java.io.IOException;
import java.io.*;
import java.lang.reflect.Type;
import java.util.*;
// for json parsing
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.JsonNode;
import javax.swing.*;
public class Main {
public static void main(String[] args) throws InvalidIDException, InterruptedException, IOException, Parser.Exception {
public class Main {
public static void main(String[] args) throws Exception {
/*
// Display help if no arguments or `--help` is passed
if (args.length == 0 || Arrays.asList(args).contains("--help")) {
printUsage();
return;
}
// Parse arguments with clear flags
boolean flagInhibitor = Boolean.parseBoolean(getArgumentValue(args, "--inhibitor", "false"));
boolean flagSignal = Boolean.parseBoolean(getArgumentValue(args, "--signal", "false"));
......@@ -36,6 +40,8 @@ public class Main {
// String configPath = getArgumentValue(args, "--config", null);
String pnmlPath = getArgumentValue(args, "--pnml", null);
System.out.println("pnmlPath: " + pnmlPath);
//String pnml = getArgumentValue(args, "--pnml", null)
// Validate required arguments
if (pnmlPath == null) {
......@@ -57,12 +63,12 @@ public class Main {
// Application logic here (replace this with your actual logic)
System.out.println("Application started successfully.");
*/
boolean flagOutArcs = false;
boolean flagNoSignal = false;
doFlattening(pnmlPath, flagInhibitor, flagSignal, flagPurge, flagOverrideInstanceCount, flagOutArcs, flagNoSignal, tinaPath, tinaVersion);
// doFlattening("", "/home/sebastian/git/sesac-exercise/tools/model-top.pnml", false, false, false, false, false, false, null);
//doFlattening(pnmlPath, flagInhibitor, flagSignal, flagPurge, flagOverrideInstanceCount, flagOutArcs, flagNoSignal, tinaPath, tinaVersion);
doFlattening("/home/dome/MA/dineros_v2/dineros/pnml-relast-tools/pnml-relast-flattener/src/main/resources/system.pnml", false, false, false, false, false, false, null, null);
}
......@@ -91,65 +97,439 @@ public class Main {
System.out.println(" --help Show this help message and exit");
}
private static PetriNet findStaticPetriNet(String petriNetName) throws Exception {
String resourcePath = "/static_pages/" + petriNetName + ".pnml";
PetriNet petriNet;
try (InputStream pageStream = Main.class.getResourceAsStream(resourcePath)) {
if (pageStream == null) {
throw new FileNotFoundException("PNML-File in /resource path not found: " + resourcePath);
}
// Temporäre Datei anlegen
File tempFile = File.createTempFile(petriNetName, ".pnml");
tempFile.deleteOnExit();
// Inhalt von InputStream in temporäre Datei schreiben
try (FileOutputStream out = new FileOutputStream(tempFile)) {
pageStream.transferTo(out);
}
// parse staticPage PNML and get first and only <page> element
petriNet = PnmlParser.parsePnml(tempFile.getAbsolutePath(), true).get(0);
}
if (petriNet.getNumPage() == 0) {
throw new IllegalArgumentException("No Page in file: " + resourcePath);
}
return petriNet;
}
private static void addDefaultToolInfoToPage(Page page) {
ToolInfo info = new ToolInfo();
info.setTool("de.tudresden.inf.st.pnml.distributedPN");
info.setVersion("0.1");
//info.setFormattedXMLBuffer("<type>page</type>");
page.addToolspecific(info);
}
public static void ensureToolInfos(PetriNet net) {
for (Place p : net.allPlaces()) {
ToolInfo ti = (p.getNumToolspecific() > 0) ? p.getToolspecific(0) : null;
if (ti == null) {
System.out.println("[WARN] Place ohne (gültige) ToolInfo: " + p.getId());
ti = new ToolInfo();
ti.setTool("de.tudresden.inf.st.pnml.distributedPN");
ti.setVersion("0.1");
//ti.setFormattedXMLBuffer("<type>place</type>");
p.addToolspecific(ti);
}
}
for (Page pg : net.allPages()) {
ToolInfo ti = (pg.getNumToolspecific() > 0) ? pg.getToolspecific(0) : null;
if (ti == null) {
System.out.println("[WARN] Page ohne (gültige) ToolInfo: " + pg.getId());
ti = new ToolInfo();
ti.setTool("de.tudresden.inf.st.pnml.distributedPN");
ti.setVersion("0.1");
//ti.setFormattedXMLBuffer("<type>page</type>");
pg.addToolspecific(ti);
}
}
for (Transition t : net.allTransitions()) {
ToolInfo ti = (t.getNumToolspecific() > 0) ? t.getToolspecific(0) : null;
if (ti == null) {
System.out.println("[WARN] Transition ohne (gültige) ToolInfo: " + t.getId());
ti = new ToolInfo();
ti.setTool("de.tudresden.inf.st.pnml.distributedPN");
ti.setVersion("0.1");
//ti.setFormattedXMLBuffer("<type>transition</type>");
t.addToolspecific(ti);
}
}
}
private static Page create_sensordata_page(String robotAlias) throws Exception {
Page sensordataCollectionPage = new Page();
sensordataCollectionPage.setId("sensordata_collection");
addDefaultToolInfoToPage(sensordataCollectionPage);
InputStream configStream = Main.class.getResourceAsStream("/config.json");
List<Map<String, String>> sensorList = new ArrayList<>();
//boolean handoverPossible = false;
//boolean allowInterruptions = false;
try {
ObjectMapper objectMapper = new ObjectMapper();
JsonNode config = objectMapper.readTree(configStream);
if (config == null || !config.has("robots")) {
System.out.println("Config oder robots nicht gefunden.");
return sensordataCollectionPage;
}
JsonNode robots = config.get("robots");
for (JsonNode robot : robots) {
JsonNode nameNode = robot.get("name");
if (nameNode != null && nameNode.asText().equalsIgnoreCase(robotAlias)) {
JsonNode sensors = robot.get("sensors");
if (sensors != null && sensors.isArray()) {
for (JsonNode sensor : sensors) {
Map<String, String> sensorMap = new HashMap<>();
sensorMap.put("name", sensor.get("name").asText());
sensorMap.put("kind", sensor.get("kind").asText());
sensorList.add(sensorMap);
}
}
//handoverPossible = robot.path("handoverPossible").asBoolean(false);
//allowInterruptions = robot.path("allowInterruptions").asBoolean(false);
break; // found robot
}
}
} catch (IOException e) {
System.err.println("Error reading config.json: " + e.getMessage());
return sensordataCollectionPage;
}
// create dummy-petrinet and add sensordata_collection page
PetriNet dummyNet = new PetriNet();
dummyNet.addPage(sensordataCollectionPage);
dummyNet.flushTreeCache();
// custom places
for (Map<String, String> sensor : sensorList) {
String name = sensor.get("name");
Place place = new Place();
place.setId("p_" + name + "_" + robotAlias);
place.setName(new Name().setText(name + "_" + robotAlias));
sensordataCollectionPage.addObject(place);
}
// transitions
ToolInfo info = new ToolInfo();
info.setTool("de.tudresden.inf.st.pnml.distributedPN");
info.setVersion("0.1");
Transition t_read_sensordata = new Transition().setId("t_read_sensordata").setName(new Name().setText("t_read_sensordata")).addToolspecific(info);
Transition t_no_cam = new Transition().setId("t_no_cam").setName(new Name().setText("t_no_cam")).addToolspecific(info);
Transition t_no_tf = new Transition().setId("t_no_tf").setName(new Name().setText("t_no_tf")).addToolspecific(info);
sensordataCollectionPage.addObject(t_read_sensordata);
sensordataCollectionPage.addObject(t_no_cam);
sensordataCollectionPage.addObject(t_no_tf);
// custom arcs
for (Map<String, String> sensor : sensorList) {
String sensorName = sensor.get("name");
String sensorKind = sensor.get("kind");
Place arcStart = sensordataCollectionPage.petriNet().getPlaceById("p_" + sensorName + "_" + robotAlias);
Arc arc = new Arc();
arc.setId("a_" + sensorName + "_to_read");
arc.setSource(arcStart);
arc.setTarget(t_read_sensordata);
sensordataCollectionPage.addObject(arc);
if (sensorKind.equals("camera")) {
TransformationUtils.createAndIncludeInhibitorArc(sensordataCollectionPage, sensorName + "_to_no_cam", arcStart, t_no_cam);
} else {
Arc arc2 = new Arc();
arc2.setId("a_" + sensorName + "_to_no_cam");
arc2.setSource(arcStart);
arc2.setTarget(t_no_cam);
sensordataCollectionPage.addObject(arc2);
}
if (sensorKind.equals("tf")) {
TransformationUtils.createAndIncludeInhibitorArc(sensordataCollectionPage, sensorName + "_to_no_tf", arcStart, t_no_tf);
} else {
Arc arc3 = new Arc();
arc3.setId("a_" + sensorName + "_to_no_tf");
arc3.setSource(arcStart);
arc3.setTarget(t_no_tf);
sensordataCollectionPage.addObject(arc3);
}
}
// standard places
ToolInfo toolInfo = new ToolInfo();
toolInfo.setTool("de.tudresden.inf.st.pnml.distributedPN");
toolInfo.setVersion("0.1");
//toolInfo.setFormattedXMLBuffer("<type>place</type>");
Place p_read = new Place().setId("p_read_sensordata").setName(new Name().setText("p_read_sensordata")).addToolspecific(toolInfo);;
Place p_no_cam = new Place().setId("p_no_cam").setName(new Name().setText("p_no_cam")).addToolspecific(toolInfo);;
Place p_no_tf = new Place().setId("p_no_tf").setName(new Name().setText("p_no_tf")).addToolspecific(toolInfo);;
sensordataCollectionPage.addObject(p_read);
sensordataCollectionPage.addObject(p_no_cam);
sensordataCollectionPage.addObject(p_no_tf);
// standard arcs
// arcs to read_sensordata
for (Transition t : sensordataCollectionPage.petriNet().allTransitions()) {
Arc arc = new Arc();
arc.setId("arc_" + t.getId() + "_to_p_read");
arc.setSource(t);
arc.setTarget(p_read);
sensordataCollectionPage.addObject(arc);
}
// arcs to no_cam / no_tf
Arc arcNoCam = new Arc().setId("arc_t_no_cam_to_p_no_cam").setSource(t_no_cam).setTarget(p_no_cam);
Arc arcNoTf = new Arc().setId("arc_t_no_tf_to_p_no_tf").setSource(t_no_tf).setTarget(p_no_tf);
sensordataCollectionPage.addObject(arcNoCam);
sensordataCollectionPage.addObject(arcNoTf);
/*
// define publishing ports
TopicTransitionInformation sti = new TopicTransitionInformation();
//dinerosTransition.setMutableTransitionInformation(sti);
dinerosTransition.setMutableTransitionInformation(sti);
publishPort.setId("pub_read_sensordata");
publishPort.setName(new Name().setText(publishPort.getId()));
portType.setText("publisher");
publishPort.setType(portType);
publishPort.setId("pub_no_cam");
publishPort.setName(new Name().setText("pub_no_cam"));
portType.setText("publisher");
publishPort.setType(portType);
publishPort.setId("pub_no_tf");
publishPort.setName(new Name().setText("pub_no_tf"));
portType.setText("publisher");
publishPort.setType(portType);
*/
// flush
//petriNet.addPage(sensordataCollectionPage);
//petriNet.flushTreeCache();
//petriNet.flushAttrAndCollectionCache();
return sensordataCollectionPage;
}
/*
private void rerouteArcs(Place refPlace, Place originalPlace) {
// Eingehende Arcs (auf refPlace): Ziel umleiten auf originalPlace
for (Arc arc : new ArrayList<>(refPlace.getInArcs())) {
arc.setTarget(originalPlace);
System.out.println(" → Incoming Arc umgeleitet: " + arc.getId());
}
// Ausgehende Arcs (von refPlace): Quelle umleiten auf originalPlace
for (Arc arc : new ArrayList<>(refPlace.getOutArcs())) {
arc.setSource(originalPlace);
System.out.println(" → Outgoing Arc umgeleitet: " + arc.getId());
}
}
public void inlineSubpagesToController(Page blockPage) {
// Finde alle Subpages (alle außer controller selbst)
List<Page> subpages = allPages.stream()
.filter(p -> !p.getId().equals(controllerPage.getId()))
.collect(Collectors.toList());
// check subpages
if (subpages.isEmpty()) {
System.out.println("[INFO] Controller enthält keine Subpages – keine Aktion notwendig.");
return;
}
// check for "_ref-Place"
boolean hasRefPlaces = subpages.stream()
.flatMap(p -> p.getPlaces().stream())
.anyMatch(place -> place.getId().endsWith("_ref"));
if (!hasRefPlaces) {
System.out.println("[INFO] Keine _ref-Places gefunden – keine Umleitungen notwendig.");
return;
}
// resolve static/dynamic subpages to blockpages
System.out.println("[INFO] Inlining der Subpages in die Controller-Page gestartet…");
for (Page subpage : subpages) {
System.out.println("→ Subpage: " + subpage.getId());
// PLACES
for (Place place : new ArrayList<>(subpage.getPlaces())) {
if (place.getId().endsWith("_ref")) {
String targetId = place.getId().replace("_ref", "");
Place target = blockPage.getPlaceById(targetId);
if (target != null) {
rerouteArcs(place, target);
subpage.removePlace(place);
System.out.println(" - _ref-Place entfernt: " + place.getId() + " → umgeleitet zu: " + target.getId());
} else {
System.err.println(" [WARNUNG] Kein Ziel für _ref-Place gefunden: " + place.getId());
}
} else {
controllerPage.addPlace(place);
subpage.removePlace(place);
System.out.println(" + Place übernommen: " + place.getId());
}
}
// TRANSITIONS
for (Transition transition : new ArrayList<>(subpage.getTransitions())) {
blockPage.addTransition(transition);
subpage.removeTransition(transition);
System.out.println(" + Transition übernommen: " + transition.getId());
}
// ARCS
for (Arc arc : new ArrayList<>(subpage.getArcs())) {
blockPage.addArc(arc);
subpage.removeArc(arc);
System.out.println(" + Arc übernommen: " + arc.getId());
}
// Subpage entfernen
blockPage.removePage(subpage);
System.out.println("✓ Subpage gelöscht: " + subpage.getId());
}
System.out.println("[INFO] Inlining abgeschlossen.");
} //*/
private static void doFlattening(String pnmlPath, boolean flagInhibitor,
boolean flagSignal, boolean flagPurge, boolean flagOverrideInstanceCount,
boolean flagOutArcs, boolean flagNoSignal, String tinaPath, String tinaVersion)
throws InvalidIDException, IOException, InterruptedException, Parser.Exception {
throws Exception {
if (pnmlPath == null) {
System.out.println("[ERROR] No model found on given input path.");
return;
}
// if (configPath == null || configPath.isEmpty()) {
// System.out.println("[WARNING] No config path configured, no model checking will be executed.");
// }
// parse the global not flatted petri net
PetriNet petriNet = PnmlParser.parsePnml(pnmlPath, true).get(0);
Map<String, Integer> bounds = null;
if (flagPurge) {
bounds = TransformationUtils.getPlaceToBoundMapping
(pnmlPath, petriNet, TransformationUtils.getSourceNodePages(petriNet), tinaPath, tinaVersion);
}
// [STAGE 1] Resolve service prototype pages
ServiceGraph serviceGraph = new ServiceGraph();
serviceGraph.init(petriNet);
Map<String, PnObject> addedInstanceObjects = new HashMap<>();
TransformationUtils.transformPrototypePagesRecursive(petriNet.getPage(0), null,
petriNet, serviceGraph, addedInstanceObjects, flagOverrideInstanceCount);
petriNet.flushAttrAndCollectionCache();
/////////////////////// STAGES ///////////////////////
// Paths
InputStream topologyStream = Main.class.getResourceAsStream("/collaboration_system_topology.json");
InputStream configStream = Main.class.getResourceAsStream("/config.json");
try {
ObjectMapper mapper = new ObjectMapper();
JsonNode system = mapper.readTree(topologyStream);
JsonNode config = mapper.readTree(configStream);
// read all pages from coordinator or roboter module
JsonNode modules = system.get("modules");
if (modules == null) { System.err.println("No modules defined in collaboration_system_topology.json"); return;}
JsonNode blocks = system.get("blocks");
if (blocks == null) { System.err.println("No blocks defined in collaboration_system_topology.json"); return;}
// [STAGE ] Create all blocks
// define top level page 'collaboration_system' from the template
Page systemPage = petriNet.getPage(0);
addDefaultToolInfoToPage(systemPage);
// iterate all modules objects (coordinator, robotX)
for (JsonNode module : modules) {
// parse module object and find key (f.e. "coordinator")
Iterator<String> moduleNames = module.fieldNames();
while (moduleNames.hasNext()) {
String moduleName = moduleNames.next();
Page modulePage = new Page().setId(moduleName);
addDefaultToolInfoToPage(modulePage);
JsonNode blockList = module.get(moduleName);
for (JsonNode blockEntry : blockList) {
String blockName = blockEntry.get("block").asText(); // f.e. "environment", "actor", etc.
Page blockPage = new Page().setId(blockName);
addDefaultToolInfoToPage(blockPage);
// find the matching block in blockList f.e. "environment"
for (JsonNode block : blocks) {
if (block.has(blockName)) {
JsonNode pages = block.get(blockName);
for (JsonNode pageEntry : pages) {
JsonNode page = pageEntry.get("page");
if (page != null && !page.asText().isEmpty()) {
PetriNet staticPetriNet = findStaticPetriNet(page.asText());
Page staticPage = staticPetriNet.getPage(0);
//Page staticPage = new Page().setId(page.asText());
// add toolspecifics from staticPage
System.out.println("staticPageID: " + staticPage.getId());
System.out.println("staticPageNum: " + staticPetriNet.getNumPage());
//ToolInfo info = staticPage.getToolspecific(0);
//System.out.println("staticPageToolInfoREF: " + info);
//System.out.println("staticPageToolInfo: " + info.getFormattedXMLBuffer());
if (staticPetriNet.getNumToolspecific() > 0) {
ToolInfo i = staticPetriNet.getToolspecific(0);
staticPage.addToolspecific(i);
}
blockPage.addObject(staticPage);
staticPetriNet.flushTreeCache();
}
}
// add dynamic read_sensordata-page in perceiver-block
/*
System.out.println("HIER WÄRE DAS EINFÜGEN MÖGLICH: " + blockName);
if (blockName.equals("perceiver")) {
System.out.println("ADDING sensordata_collection page for robot: " + blockName);
Page dynamicPage = create_sensordata_page("robo1");
blockPage.addObject(dynamicPage);
}
System.out.println();LeftCellObjectsTopicTransition
//*/
//if (blockName.equals("roboter")) {
// [STAGE 2] Transform topic transitions
for (DinerosTransition dt : petriNet.allDinerosTransitions()) {
if (dt.canTransformTopicTransition()) {
Page topicTransformedPage = dt.transformTopicElement(bounds, flagInhibitor, flagPurge);
for (int i = 0; i < dt.ContainingPage().getNumObject(); i++) {
if (dt.ContainingPage().getObject(i).getId().equals(dt.getId())) {
dt.ContainingPage().setObject(topicTransformedPage, i);
}
//}
}
petriNet.flushTreeCache();
}
modulePage.addObject(blockPage);
}
petriNet.flushTreeCache();
// [STAGE 3] Transform service transitions
for (DinerosTransition dt : petriNet.allDinerosTransitions()) {
if (dt.canTransformServiceTransition()) {
Page serviceTransformedPage = dt.transformServiceElement(addedInstanceObjects);
for (int i = 0; i < dt.ContainingPage().getNumObject(); i++) {
if (dt.ContainingPage().getObject(i).getId().equals(dt.getId())) {
dt.ContainingPage().setObject(serviceTransformedPage, i);
systemPage.addObject(modulePage);
systemPage.flushTreeCache();
}
}
petriNet.flushTreeCache();
}
catch (Exception e) {
System.err.println("Error while reading collaboration_system_topology.json: " + e.getMessage());
}
// [STAGE C] Create as many sensor blocks as sensor entries of all robots together
/*
if (!flagNoSignal) {
// [STAGE 4] Transform signals
Page signalValuePage = new Page();
......@@ -167,7 +547,9 @@ public class Main {
petriNet.flushTreeCache();
}
//*/
/*
// [STAGE 5] make sure that we have a valid marking
System.out.println("[FLATTENER] Checking marking.");
for (Place p : petriNet.allPlaces()) {
......@@ -187,6 +569,41 @@ public class Main {
break;
}
}
*/
// debugging and repais: check if all places got toolspecifics
for (Place p : petriNet.allPlaces()) {
if (p.getNumToolspecific() == 0 || p.getToolspecific(0) == null) {
System.out.println("[WARN] Place ohne ToolInfo: " + p.getId());
// repair
ToolInfo ti = new ToolInfo();
ti.setTool("de.tudresden.inf.st.pnml.distributedPN");
ti.setVersion("0.1");
//ti.setFormattedXMLBuffer("<type>place</type>");
p.addToolspecific(ti);
}
}
// debugging and repair: check if all pages got toolspecifics
for (Page pg : petriNet.allPages()) {
if (pg.getNumToolspecific() == 0 || pg.getToolspecific(0) == null) {
System.out.println("[WARN] Page ohne ToolInfo: " + pg.getId());
addDefaultToolInfoToPage(pg);
}
}
// debugging and repair: check if all transitions got toolspecifics
for (Transition t : petriNet.allTransitions()) {
if (t.getNumToolspecific() == 0 || t.getToolspecific(0) == null) {
System.out.println("[WARN] Transition ohne ToolInfo: " + t.getId());
// repair
ToolInfo ti = new ToolInfo();
ti.setTool("de.tudresden.inf.st.pnml.distributedPN");
ti.setVersion("0.1");
//ti.setFormattedXMLBuffer("<type>transition</type>");
t.addToolspecific(ti);
}
}
// [STAGE 7] Postprocessing
System.out.println("[FLATTENER] Running postprocessing.");
......@@ -196,6 +613,7 @@ public class Main {
petriNet.flushTreeCache();
}
ensureToolInfos(petriNet);
printNet(petriNet, false, false);
// [STAGE 8] export flatted net to pnml
......@@ -219,35 +637,6 @@ public class Main {
ndrioProxy.pnml2net(pnmlExportPath, ndrioTargetPath, tinaPath, tinaVersion);
ndrioProxy.includeInhibitorArcs(petriNet, ndrioTargetPath, inhibitorTargetPath);
// [STAGE 9] Analyze
// read config for analyzer from file
/* if (configPath != null && !configPath.isEmpty() && !configPath.equals("-nc")) {
ConfigReader cr = new ConfigReader(configPath);
String[] tinaConfig = cr.getTinaConfigParams();
String[] siftConfig = cr.getSiftConfigParams();
// insert into tina
if (tinaConfig.length > 1) {
System.out.println("[FLATTENER] Inserting into tina.");
TinaProxy tinaProxy = new TinaProxy();
String tinaTargetPath = homeDirectory + "/temp/tina/" + "tina-result-" + exportId + ".txt";
tinaProxy.analyzePetriNet(inhibitorTargetPath, tinaTargetPath, tinaConfig);
}
// insert into sift
if (siftConfig.length > 1) {
System.out.println("[FLATTENER] Inserting into sift.");
SiftProxy siftProxy = new SiftProxy();
String siftTargetPath = homeDirectory + "/temp/sift/" + "sift-result-" + exportId + ".ktz";
siftProxy.analyzePetriNet(inhibitorTargetPath, siftTargetPath, siftConfig);
System.out.println("[FLATTENER] Converting with ktzio.");
KtzioProxy ktzioProxy = new KtzioProxy();
String ktzioPath = homeDirectory + "/temp/sift/" + "sift-result-converted-" + exportId + ".txt";
ktzioProxy.convertBinaryToText(siftTargetPath, ktzioPath);
}
}*/
System.out.println("[FLATTENER] Finished.");
}
......@@ -257,6 +646,7 @@ public class Main {
System.out.println("----------------- PLACES ----------------");
for (Place p : petriNet.allPlaces()) {
System.out.println("Place " + p.asDinerosPlace().getId());
System.out.println("Place " + p.asDinerosPlace().getId() + " -- " + p.asDinerosPlace().getStaticPlaceInformation().getSubNet());
if (p.getInitialMarking() != null) {
System.out.println("--- Marking: " + p.getInitialMarking().getText());
......
{
"modules" : [
{
"coordinator": [
{ "block": "environment" },
{ "block": "reflexes"},
{ "block": "collision_control"}
]
},
{
"roboter": [
{ "block": "perceiver"},
{ "block": "selector"},
{ "block": "actor"},
{ "block": "executor"},
{ "block": "controller"}
]
}
],
"blocks" : [
{
"environment": [
{"page": "analyse_scene"},
{"page": "determine_hazards"}
]
},
{
"reflexes": [
{"page": "extract_reflexzones"},
{"page": "create_reflexes"}
]
},
{
"collisioncontrol": [
{"page": "collision_control"}
]
},
{
"perceiver": []
},
{
"selector": [
{"page": "get_task"}
]
},
{
"actor": [
{"page": "simple_action"},
{"page": "handover_receiver"},
{"page": "handover_giver"},
{"page": "action_categorization"}
]
},
{
"executor": [
{"page": "new_action"},
{"page": "create_trajectory"},
{"page": "allow_trajectory"}
]
},
{
"controller": [
{"page": "interruption_request"},
{"page": "update_taskqueue"},
{"page": "task_safety"},
{"page": "interruption_safety"}
]
}
]
}
{
"robots": [
{
"name": "robot1",
"sensors": [
{ "name": "cam1", "kind": "camera"},
{ "name": "mic1", "kind": "microphone" }
],
"handoverPossible": true,
"allowInterruptions": true
},
{
"name": "robot2",
"sensors": [
{ "name": "cam2", "kind": "camera"}
],
"handoverPossible": true,
"allowInterruptions": true
}
]
}
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="robot" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="action_categorization">
<name>
<text>Aufgabenstellung kathegorisieren</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_action_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "id" : "actionID", "data" : "actiondescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Tätigkeit</text>
</name>
</place>
<place id="p_simple_action_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "id" : "actionID", "data" : "actiondescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>einfache Tätigkeit</text>
</name>
</place>
<place id="p_demand_handover_intention_receiver_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "id" : "actionID", "data" : "actiondescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>HO Intension fordern</text>
</name>
</place>
<place id="p_communicate_handover_intention_giver_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "id" : "actionID", "data" : "actiondescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>HO Intension kommunizieren</text>
</name>
</place>
<!-- transitions -->
<transition id="t_simple_action_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>einfache Tätigkeit</text>
</name>
</transition>
<transition id="t_handover_giver_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Handover Geber</text>
</name>
</transition>
<transition id="t_handover_receiver_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Handover Nehmer</text>
</name>
</transition>
<!-- arcs -->
<arc id="tc1_alias" source="p_action_alias" target="t_simple_action_alias">
</arc>
<arc id="tc2_alias" source="p_action_alias" target="t_handover_giver_alias">
</arc>
<arc id="tc3_alias" source="p_action_alias" target="t_handover_receiver_alias">
</arc>
<arc id="tc4_alias" source="t_simple_action_alias" target="p_simple_action_alias">
</arc>
<arc id="tc5_alias" source="t_handover_giver_alias" target="p_communicate_handover_intention_giver_alias">
</arc>
<arc id="tc6_alias" source="t_handover_receiver_alias" target="p_demand_handover_intention_receiver_alias">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="robot" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="allow_trajectory">
<name>
<text>Trajektorienfreigabe</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_trajectory_alias_ref">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date" , "trajectory" : "path" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorie</text>
</name>
</place>
<place id="p_trajectory_execution_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date" , "trajectory" : "path" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorien Ausführung</text>
</name>
</place>
<place id="p_allow_trajectory_execution_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date" , "trajectory" : "path" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>no_cam or no_ft</text>
</name>
</place>
<!--transitions-->
<transition id="t_allow_trajectory_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Freigabe</text>
</name>
</transition>
<!-- arcs -->
<arc id="at1_alias" source="p_trajectory_alias_ref" target="t_allow_trajectory_alias">
</arc>
<arc id="at2_alias" source="t_allow_trajectory_alias" target="p_trajectory_execution_alias">
</arc>
<arc id="at3_alias" source="p_allow_trajectory_execution_alias" target="t_allow_trajectory_alias">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="coordinator" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="analyse_scene">
<name>
<text>Szene auswerten</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_sensordata_captured">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<node>nodeA</node>
<subnet>locA</subnet>
<balloonMarking>
<tokens>
<token> { "id" : "xxx", "data" : "image" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>1</text>
</initialMarking>
<name>
<text>Bilddaten erfassen</text>
</name>
</place>
<place id="p_objects_captured">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<node>nodeA</node>
<subnet>locA</subnet>
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "data" : "objects", "location" : "xyz" , "contour" : "faces" , "function" : "xxx" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>1</text>
</initialMarking>
<name>
<text>Objekte erfasst</text>
</name>
</place>
<!--transitions-->
<transition id="t_identify_objects">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Objekte identifizieren</text>
</name>
</transition>
<!-- arcs -->
<arc id="as1" source="p_sensordata_captured" target="t_identify_objects">
</arc>
<arc id="as2" source="t_identify_objects" target="p_objects_captured">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="coordinator" type="http://www.pnml.org/version-2009/grammar/ptnet">
<page id="collision_control">
<name>
<text>Kollisionskontrolle</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_hazardzones">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "kind" : "xxx", "location" : "x y z", "area" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Gefahrenbereiche</text>
</name>
</place>
<place id="p_virtual_trajectory">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "status" : "xxx", "trajectory" : "path" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>virtuelle Trajektorie</text>
</name>
</place>
<place id="p_trajectory_suggestion">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorienvorschlag</text>
</name>
</place>
<place id="p_freedom_of_collision">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Kollisionsfreiheit</text>
</name>
</place>
<place id="p_risk_of_collision">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "reflex" : "trajectory" , "placeOfCollision" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Kollisionsgefahr</text>
</name>
</place>
<!--transitions-->
<transition id="t_check_collision">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Kollsion überprüfen</text>
</name>
</transition>
<transition id="t_incomplete_data">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>unzureichende Datenlage</text>
</name>
</transition>
<transition id="t_collision_freedom">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Kollisionsfreiheit</text>
</name>
</transition>
<transition id="t_collision_risk">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Kollisionsgefahr</text>
</name>
</transition>
<!-- arcs -->
<arc id="cc1" source="p_hazardzones" target="t_check_collision">
</arc>
<arc id="cc2" source="p_hazardzones" target="t_incomplete_data">
</arc>
<arc id="cc3" source="p_trajectory_suggestion" target="t_check_collision">
</arc>
<arc id="cc4" source="t_check_collision" target="p_virtual_trajectory">
</arc>
<arc id="cc5" source="p_virtual_trajectory" target="t_collision_freedom">
</arc>
<arc id="cc6" source="p_virtual_trajectory" target="t_collision_risk">
</arc>
<arc id="cc7" source="t_collision_risk" target="p_risk_of_collision">
</arc>
<arc id="cc8" source="t_incomplete_data" target="p_risk_of_collision">
</arc>
<arc id="cc9" source="t_collision_freedom" target="p_freedom_of_collision">
</arc>
</page>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="coordinator" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="create_reflexes">
<name>
<text>Reflexe erstellen</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_reflexzones_ref">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "location" : "x y z", "area" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Reflexzonen</text>
</name>
</place>
<place id="p_trajectory_suggestion">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorienvorschlag</text>
</name>
</place>
<place id="p_reflex_suggestion_accepted">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Reflexvorschlag akzeptiert</text>
</name>
</place>
<place id="p_risk_of_collision">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" , "placeOfCollision" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Kollisionsgefahr</text>
</name>
</place>
<place id="p_freedom_of_collision">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Kollisionsfreiheit</text>
</name>
</place>
<!--transitions-->
<transition id="t_create_reflex_suggestion">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Reflexvorschlag erstellen</text>
</name>
</transition>
<transition id="t_accept_reflex_suggestion">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Reflexvorschlag annehmen</text>
</name>
</transition>
<!-- arcs -->
<arc id="cr1" source="p_reflexzones_ref" target="t_create_reflex_suggestion">
</arc>
<arc id="cr2" source="t_create_reflex_suggestion" target="p_trajectory_suggestion">
</arc>
<arc id="cr3" source="t_accept_reflex_suggestion" target="p_reflex_suggestion_accepted">
</arc>
<arc id="cr4" source="p_risk_of_collision" target="t_create_reflex_suggestion">
</arc>
<arc id="cr5" source="p_freedom_of_collision" target="t_accept_reflex_suggestion">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="robot" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="create_trajectory">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_trajectory_request_ref">
<name>
<text>Trajektorie erstellen</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "robot_id" : "id" , "data" : "taskdescription" , "trajectory_goal" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorienanfrage Referenz</text>
</name>
</place>
<place id="p_hazardzones">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "kind" : "xxx", "location" : "x y z", "area" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Gefahrenbereiche</text>
</name>
</place>
<place id="p_freedom_of_collision">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Kollisionsfreiheit</text>
</name>
</place>
<place id="p_risk_of_collision">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "reflex" , "placeOfCollision" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Kollisionsgefahr</text>
</name>
</place>
<place id="p_trajectory_suggestion">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "path" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorienvorschlag</text>
</name>
</place>
<place id="p_trajectory">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "robot_id" : "id" , "trajectory" : "path" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorie</text>
</name>
</place>
<!--transitions-->
<transition id="t_create_trajectory">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Trajektorie erstellen</text>
</name>
</transition>
<transition id="t_collision_freedom">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Feststellung Kollisionsfreiheit</text>
</name>
</transition>
<transition id="t_collision_risk">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Feststellung Kollisionsgefahr</text>
</name>
</transition>
<!-- arcs -->
<arc id="pt_trajectory_request" source="p_trajectory_request_ref" target="t_create_trajectory">
</arc>
<arc id="pt_hazardzones" source="p_hazardzones" target="t_create_trajectory">
</arc>
<arc id="tp_create_trajectory" source="t_create_trajectory" target="p_trajectory_suggestion">
</arc>
<arc id="pt_freedom_of_collision" source="p_freedom_of_collision" target="t_collision_freedom">
</arc>
<arc id="pt_risk_of_collision" source="p_risk_of_collision" target="t_collision_risk">
</arc>
<arc id="tp_collision_freedom" source="t_collision_freedom" target="p_trajectory">
</arc>
<arc id="tp_collision_risk" source="t_collision_risk" target="p_trajectory_request_ref">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="coordinator" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="determine_hazards">
<name>
<text>Gefahrenbereiche ermitteln</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_objects_captured_ref">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "data" : "objects", "location" : "xyz" , "contour" : "faces" , "function" : "xxx" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Objekte erfasst</text>
</name>
</place>
<place id="p_hazards_identified">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "kind" : "xxx", "location" : "xyz" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>pot. Gefahren ermittelt</text>
</name>
</place>
<place id="p_hazard_status">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "status" : "xxx" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Gefahrenbereiche ermitteln</text>
</name>
</place>
<place id="p_hazard_zones">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "kind" : "xxx", "location" : "x y z", "area" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Gefahrenbereiche</text>
</name>
</place>
<!--transitions-->
<transition id="t_analyse_hazards">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>pot. Gefahren analysieren</text>
</name>
</transition>
<transition id="t_determine_hazardzones">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Gefahrenbereiche ermitteln</text>
</name>
</transition>
<!-- arcs -->
<arc id="dh1" source="p_objects_captured_ref" target="t_analyse_hazards">
</arc>
<arc id="dh2" source="t_analyse_hazards" target="p_hazards_identified">
</arc>
<arc id="dh3" source="p_hazards_identified" target="t_determine_hazardzones">
</arc>
<arc id="dh4" source="t_determine_hazardzones" target="p_hazard_status">
</arc>
<arc id="dh5" source="t_determine_hazardzones" target="p_hazard_zones">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="coordinator" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="extract_reflexzones">
<name>
<text>Reflexzonen erstellen</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_hazardzones">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "kind" : "xxx", "location" : "x y z", "area" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Gefahrenbereiche</text>
</name>
</place>
<place id="p_reflexzones">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "timestamp" : "date", "location" : "x y z", "area" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Reflexzonen</text>
</name>
</place>
<!--transitions-->
<transition id="t_determine_reflexzones">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Reflexzonen bestimmen</text>
</name>
</transition>
<!-- arcs -->
<arc id="er1" source="p_hazardzones" target="t_determine_reflexzones">
</arc>
<arc id="er2" source="t_determine_reflexzones" target="p_reflexzones">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="robot" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific>
<page id="get_task">
<name>
<text>Aufgabenstellung erfassen</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_task_from_sensordata_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "id" : "taskID", "data" : "taskdescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Aufgabenstellung durch Sensordaten</text>
</name>
</place>
<place id="p_task_from_other_channels_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "id" : "taskID", "data" : "taskdescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>1</text>
</initialMarking>
<name>
<text>Aufgabenstellung aus anderen Kanälen</text>
</name>
</place>
<place id="p_task_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "id" : "taskID", "data" : "taskdescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Aufgabe</text>
</name>
</place>
<!-- transitions -->
<transition id="t_extract_task_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Aufgabenextraktion</text>
</name>
</transition>
<transition id="t_register_task_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Aufgabenerfassung</text>
</name>
</transition>
<!-- arcs -->
<arc id="gt1_alias" source="p_task_from_sensordata_alias" target="t_extract_task_alias">
</arc>
<arc id="gt2_alias" source="p_task_from_other_channels_alias" target="t_register_task_alias">
</arc>
<arc id="gt3_alias" source="t_extract_task_alias" target="p_task_alias">
</arc>
<arc id="gt4_alias" source="t_register_task_alias" target="p_task_alias">
</arc>
<arc id="gt5_alias" source="t_register_task_alias" target="p_task_from_other_channels_alias">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="robot" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific><page id="interruption_safety">
<name>
<text>Unterbrechbarkeitsbewertung der aktuellen Aufgabe</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_safety_evaluation_alias_ref">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "robot_id" : "id" , "data" : "taskdescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Sicherheitsbewertung</text>
</name>
</place>
<place id="p_task_uninterruptable_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "robot_id" : "id" , "status" : "true" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Signal: Tätigkeit ununterbrechbar</text>
</name>
</place>
<place id="p_task_interruptable_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "robot_id" : "id" , "status" : "true" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Signal: Tätigkeit unterbrechbar</text>
</name>
</place>
<!--transitions-->
<transition id="t_uninterruptable_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Einstufung: Tätigkeit ununterbrechbar</text>
</name>
</transition>
<transition id="t_interruptable_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Einstufung: Tätigkeit unterbrechbar</text>
</name>
</transition>
<!-- arcs -->
<arc id="is1_alias" source="p_safety_evaluation_alias_ref" target="t_uninterruptable_alias">
</arc>
<arc id="is2_alias" source="p_safety_evaluation_alias_ref" target="t_interruptable_alias">
</arc>
<arc id="is3_alias" source="t_uninterruptable_alias" target="p_task_uninterruptable_alias">
</arc>
<arc id="is4_alias" source="t_interruptable_alias" target="p_task_interruptable_alias">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="robot" type="http://www.pnml.org/version-2009/grammar/ptnet">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
</toolspecific><page id="new_task">
<name>
<text>neue Tätigkeit</text>
</name>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<type>nodePage</type>
</toolspecific>
<!-- places -->
<place id="p_goal_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "robot_id" : "id" , "data" : "taskdescription" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Zielvorgabe</text>
</name>
</place>
<place id="p_trajectory_request_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<balloonMarking>
<tokens>
<token> { "robot_id" : "id" , "data" : "taskdescription" , "trajectory_goal" : "x y z" } </token>
</tokens>
</balloonMarking>
</toolspecific>
<initialMarking>
<text>0</text>
</initialMarking>
<name>
<text>Trajektorienanfrage</text>
</name>
</place>
<!--transitions-->
<transition id="t_request_trajectory_alias">
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<!--node>n3</node-->
<!--subnet>s3</subnet-->
<type>discreteTransitionType</type>
<inputsignalclause></inputsignalclause>
</toolspecific>
<name>
<text>Trajektorie anfragen</text>
</name>
</transition>
<!-- arcs -->
<arc id="na1" source="p_goal_alias" target="t_request_trajectory_alias">
</arc>
<arc id="na2" source="t_request_trajectory_alias" target="p_trajectory_request_alias">
</arc>
</page>
</net>
</pnml>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment