diff --git a/jdeeco-core/model/RuntimeModel.ecore b/jdeeco-core/model/RuntimeModel.ecore
index 7ebece4fc..b82514f2d 100644
--- a/jdeeco-core/model/RuntimeModel.ecore
+++ b/jdeeco-core/model/RuntimeModel.ecore
@@ -44,7 +44,7 @@
+ eType="#//ObjectToObjectMap" containment="true"/>
@@ -96,8 +96,8 @@
-
-
+
+
diff --git a/jdeeco-core/model/RuntimeModel.ecorediag b/jdeeco-core/model/RuntimeModel.ecorediag
index 3c13cb685..a30f1a34a 100644
--- a/jdeeco-core/model/RuntimeModel.ecorediag
+++ b/jdeeco-core/model/RuntimeModel.ecorediag
@@ -404,11 +404,11 @@
-
+
-
+
@@ -421,7 +421,7 @@
-
+
diff --git a/jdeeco-core/model/RuntimeModel.genmodel b/jdeeco-core/model/RuntimeModel.genmodel
index 87913a354..dd5d99e38 100644
--- a/jdeeco-core/model/RuntimeModel.genmodel
+++ b/jdeeco-core/model/RuntimeModel.genmodel
@@ -16,9 +16,11 @@
-
-
-
+
+
+
+
+
@@ -42,14 +44,16 @@
-
+
+
+
@@ -62,6 +66,7 @@
+
@@ -74,5 +79,9 @@
+
+
+
+
diff --git a/jdeeco-core/plugin.xml b/jdeeco-core/plugin.xml
index 8b0779b75..6094797c1 100644
--- a/jdeeco-core/plugin.xml
+++ b/jdeeco-core/plugin.xml
@@ -9,8 +9,8 @@
diff --git a/jdeeco-core/pom.xml b/jdeeco-core/pom.xml
index 4811e3385..fb8dcb4a7 100644
--- a/jdeeco-core/pom.xml
+++ b/jdeeco-core/pom.xml
@@ -10,12 +10,6 @@
cz.cuni.mff.d3s.jdeeco.core
jar
- ../dist
- jdeeco.jar
- ${dist}/lib
- cloner.jar
- objenesis.jar
- UTF-8
src
@@ -35,92 +29,7 @@
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.6
-
-
- copy
- install
-
- copy
-
-
-
-
- ${project.groupId}
- ${project.artifactId}
- ${project.version}
- ${project.packaging}
- ${coreJar}
- ${dist}
-
-
-
-
-
- install
-
- copy-dependencies
-
-
- ${dist}
- compile
-
-
-
-
-
- maven-clean-plugin
- 2.5
-
-
- clean-dist
-
- clean
-
- clean
-
- true
-
-
-
-
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- [1.0.0,)
-
- unpack
-
- copy-dependencies
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/Host.java b/jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/Host.java
index 7fce302a0..c66d3a30d 100644
--- a/jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/Host.java
+++ b/jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/Host.java
@@ -19,7 +19,6 @@ public class Host implements CurrentTimeProvider, NetworkInterface {
private final NetworkProvider networkProvider;
private final CurrentTimeProvider timeProvider;
-
protected Host(NetworkProvider networkProvider, CurrentTimeProvider timeProvider, String jDEECoAppModuleId, boolean hasMANETNic, boolean hasIPNic) {
this.networkProvider = networkProvider;
this.timeProvider = timeProvider;
diff --git a/jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/PositionProvider.java b/jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/PositionProvider.java
deleted file mode 100644
index ed758a1a9..000000000
--- a/jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/PositionProvider.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package cz.cuni.mff.d3s.deeco.network;
-
-public interface PositionProvider {
- public boolean isPositionSensorAvailable(Host host);
- public double getPositionX(Host host);
- public double getPositionY(Host host);
- public double getPositionZ(Host host);
-}
diff --git a/jdeeco-parent/pom.xml b/jdeeco-parent/pom.xml
index 1d9685923..8bd2fe7c8 100644
--- a/jdeeco-parent/pom.xml
+++ b/jdeeco-parent/pom.xml
@@ -6,28 +6,14 @@
pom
cz.cuni.mff.d3s.jdeeco
- ../dist
- ../jdeeco-core/src
- default
+ UTF-8
-
-
- default
-
- true
-
-
- default
-
-
- ../jdeeco-core
- ../jdeeco-demo
- ../jdeeco-core-osgi
- ../jdeeco-simulation
- ../jdeeco-simulation-demo
-
-
-
+
+ ../jdeeco-core
+
+ ../jdeeco-simulation
+
+
@@ -38,33 +24,46 @@
1.7
1.7
-
-
- maven-clean-plugin
- 2.5
-
-
- clean-dist
-
- clean
-
- clean
-
-
-
- ${dist}
-
-
-
-
-
+
+
+
+
+ org.eclipse.m2e
+ lifecycle-mapping
+ 1.0.0
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ [1.0.0,)
+
+ unpack
+
+ copy-dependencies
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- sonatype.releases
- http://oss.sonatype.org/content/repositories/releases/
-
+ sonatype.releases
+ http://oss.sonatype.org/content/repositories/releases/
+
\ No newline at end of file
diff --git a/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Main.java b/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Main.java
index af33dca19..e00d75ce8 100644
--- a/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Main.java
+++ b/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Main.java
@@ -20,6 +20,7 @@
import cz.cuni.mff.d3s.deeco.annotations.processor.AnnotationProcessor;
import cz.cuni.mff.d3s.deeco.annotations.processor.AnnotationProcessorException;
import cz.cuni.mff.d3s.deeco.logging.Log;
+import cz.cuni.mff.d3s.deeco.model.runtime.api.ComponentInstance;
import cz.cuni.mff.d3s.deeco.model.runtime.api.RuntimeMetadata;
import cz.cuni.mff.d3s.deeco.model.runtime.custom.RuntimeMetadataFactoryExt;
import cz.cuni.mff.d3s.deeco.network.DirectGossipStrategy;
@@ -30,8 +31,8 @@
import cz.cuni.mff.d3s.deeco.network.PublisherTask;
import cz.cuni.mff.d3s.deeco.runtime.RuntimeFramework;
import cz.cuni.mff.d3s.deeco.simulation.SimulationHost;
+import cz.cuni.mff.d3s.deeco.simulation.SimulationRuntimeBuilder;
import cz.cuni.mff.d3s.deeco.simulation.omnet.OMNetSimulation;
-import cz.cuni.mff.d3s.deeco.simulation.omnet.OMNetSimulationRuntimeBuilder;
/**
* Main class for launching the CBSE evaluation demo.
@@ -65,7 +66,7 @@ public static void main(String[] args) throws AnnotationProcessorException, IOEx
OMNetSimulation sim = new OMNetSimulation();
AnnotationProcessor processor = new AnnotationProcessor(RuntimeMetadataFactoryExt.eINSTANCE);
- OMNetSimulationRuntimeBuilder builder = new OMNetSimulationRuntimeBuilder();
+ SimulationRuntimeBuilder builder = new SimulationRuntimeBuilder();
SiteConfigParser siteParser = new SiteConfigParser(siteCfg);
Position topRight = siteParser.parseTopRightCorner();
@@ -143,7 +144,9 @@ public Collection filterRecipients(
AreaNetworkRegistry.INSTANCE.addComponent(component);
// there is only one component instance
- model.getComponentInstances().get(0).getInternalData().put(PositionAwareComponent.HOST_REFERENCE, host);
+ for (ComponentInstance ci: model.getComponentInstances()) {
+ PositionAwareComponent.initialize(ci, new PositionSensor(host, sim));
+ }
Collection recipientSelectors = null;
if (component.hasIP) {
recipientSelectors = Arrays.asList((DirectRecipientSelector) directRecipientSelector);
diff --git a/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Member.java b/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Member.java
index 301edeaa8..0ba0b4b40 100644
--- a/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Member.java
+++ b/jdeeco-simulation-demo/src/cz/cuni/mff/d3s/jdeeco/simulation/demo/Member.java
@@ -18,14 +18,12 @@
import java.util.Map;
import java.util.Random;
-import cz.cuni.mff.d3s.deeco.DeecoProperties;
import cz.cuni.mff.d3s.deeco.annotations.In;
import cz.cuni.mff.d3s.deeco.annotations.Out;
import cz.cuni.mff.d3s.deeco.annotations.PeriodicScheduling;
import cz.cuni.mff.d3s.deeco.annotations.Process;
import cz.cuni.mff.d3s.deeco.annotations.Component;
import cz.cuni.mff.d3s.deeco.logging.Log;
-import cz.cuni.mff.d3s.deeco.network.PublisherTask;
import cz.cuni.mff.d3s.deeco.task.ParamHolder;
import cz.cuni.mff.d3s.deeco.task.ProcessContext;
@@ -55,7 +53,7 @@ public Member(String id, String team_id, Position position, boolean hasIP) {
@PeriodicScheduling(500)
public static void measureMemberData(@In("id") String id,
@Out("memberData") ParamHolder memberData) {
- Map internal = ProcessContext.getCurrentProcess().getComponentInstance().getInternalData().map();
+ Map