Commit 282df4c4 authored by Julian Zobel's avatar Julian Zobel
Browse files

POM update and WIP changes to iupdates

parent 8cc66195
......@@ -29,42 +29,12 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</execution>
</executions>
</plugin>
</plugin>
</plugins>
<extensions>
<!-- Enabling the use of SSH -->
......@@ -79,6 +49,7 @@
<repositories>
<!-- simonstrator-repository -->
<!--
<repository>
<id>simonstrator</id>
<url>https://dev.kom.e-technik.tu-darmstadt.de/mvn/</url>
......@@ -89,6 +60,7 @@
<updatePolicy>always</updatePolicy>
</releases>
</repository>
-->
<!-- local kom repository -->
<!-- <repository>
......@@ -97,10 +69,12 @@
</repository> -->
<!-- jgrapht can be found there -->
<!--
<repository>
<id>conjars.org</id>
<url>http://conjars.org/repo</url>
</repository>
-->
<!-- uk maven central, since the local central server is slow as hell -->
<!--
......@@ -127,16 +101,30 @@
<dependencies>
<!-- XML -->
<!-- https://mvnrepository.com/artifact/org.dom4j/dom4j -->
<!--
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.3</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/stax/stax -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
<version>1.2.0</version>
</dependency>
<!--
<dependency>
<groupId>stax</groupId>
<artifactId>utils</artifactId>
<version>1.0.0</version>
</dependency>
-->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
......@@ -157,7 +145,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.0</version>
<version>4.13</version>
</dependency>
<dependency>
<groupId>junit-addons</groupId>
......@@ -197,12 +185,19 @@
</dependency>
<!-- Graphs -->
<!--
<dependency>
<groupId>thirdparty</groupId>
<artifactId>jgrapht-jdk1.6</artifactId>
<version>0.8.2</version>
</dependency>
-->
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
<version>1.5.0</version>
</dependency>
<!-- Chart creation -->
<!-- unused? <dependency> <groupId>jfree</groupId> <artifactId>jcommon</artifactId>
<version>1.0.16</version> </dependency> -->
......@@ -290,11 +285,19 @@
<version>1.2.1</version> </dependency> -->
<!-- Math -->
<!-- https://mvnrepository.com/artifact/ca.umontreal.iro.simul/ssj -->
<dependency>
<groupId>ca.umontreal.iro.simul</groupId>
<artifactId>ssj</artifactId>
<version>3.3.1</version>
</dependency>
<!--
<dependency>
<groupId>umontreal.iro.lecuyer</groupId>
<artifactId>ssj</artifactId>
<version>1.1.9</version>
</dependency>
-->
<!-- Date & Time calculations -->
<dependency>
......@@ -309,6 +312,7 @@
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- unused <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId>
<version>1.0.4</version> </dependency> <dependency> <groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId> <version>1.2</version> </dependency>
......@@ -402,11 +406,14 @@
</dependency>
<!-- Traci as a Service -->
<!--
<dependency>
<groupId>maki</groupId>
<artifactId>simonstrator-traci</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
-->
</dependencies>
</project>
......@@ -34,7 +34,7 @@ import de.tud.kom.p2psim.impl.network.gnp.topology.PingErLookup;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
import umontreal.iro.lecuyer.probdist.LognormalDist;
import umontreal.ssj.probdist.LognormalDist;
public class GnpLatencyModel implements NetLatencyModel {
......
......@@ -35,7 +35,6 @@ import java.util.Set;
import org.dom4j.Element;
import org.dom4j.tree.DefaultElement;
import umontreal.iro.lecuyer.probdist.LognormalDist;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB.Country;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB.GlobalSummaryRelation;
......@@ -44,6 +43,7 @@ import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB.RegionRegionSu
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB.SummaryRelation;
import de.tudarmstadt.maki.simonstrator.api.Monitor;
import de.tudarmstadt.maki.simonstrator.api.Monitor.Level;
import umontreal.ssj.probdist.LognormalDist;
/**
* This Class Implements a container for the PingER summary reports used as a
......
......@@ -23,8 +23,7 @@ package de.tud.kom.p2psim.impl.network.modular.common;
import java.util.ArrayList;
import java.util.Collections;
import umontreal.iro.lecuyer.probdist.LognormalDist;
import umontreal.ssj.probdist.LognormalDist;
/**
*
......
......@@ -36,7 +36,6 @@ import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import umontreal.iro.lecuyer.probdist.LognormalDist;
import de.tud.kom.p2psim.impl.network.IPv4NetID;
import de.tud.kom.p2psim.impl.network.modular.common.PingErToolkit;
import de.tud.kom.p2psim.impl.util.BackToXMLWritable;
......@@ -44,6 +43,7 @@ import de.tud.kom.p2psim.impl.util.SymmetricRelation;
import de.tud.kom.p2psim.impl.util.Tuple;
import de.tud.kom.p2psim.impl.util.db.relational.DBInstantiationException;
import de.tud.kom.p2psim.impl.util.db.relational.RelationalDB;
import umontreal.ssj.probdist.LognormalDist;
/**
* Database format for measurements of network characteristics for the Modular Network Layer.
......
......@@ -22,8 +22,7 @@
package de.tud.kom.p2psim.impl.network.modular.st.jitter;
import java.util.Random;
import umontreal.iro.lecuyer.probdist.LognormalDist;
import umontreal.ssj.probdist.LognormalDist;
import de.tud.kom.p2psim.api.network.NetMessage;
import de.tud.kom.p2psim.impl.network.modular.ModularNetLayer;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB;
......
......@@ -23,7 +23,7 @@ package de.tud.kom.p2psim.impl.topology.waypoints.graph;
import java.util.Set;
import java.util.WeakHashMap;
import org.jgrapht.EdgeFactory;
import org.jgrapht.graph.SimpleWeightedGraph;
/**
......@@ -42,14 +42,10 @@ public class DefaultWeightedEdgeRetrievableGraph<V, E> extends SimpleWeightedGra
private WeakHashMap<E, Object> edgeMap = new WeakHashMap<E, Object>();
@SuppressWarnings("unchecked")
public DefaultWeightedEdgeRetrievableGraph(EdgeFactory edgefactory) {
super(edgefactory);
}
@SuppressWarnings("unchecked")
public DefaultWeightedEdgeRetrievableGraph(Class class1) {
super(class1);
public DefaultWeightedEdgeRetrievableGraph(Class<? extends E> edgeClass) {
super(edgeClass);
}
/**
* Add an edge to the graph by specifying the
......
......@@ -28,14 +28,18 @@ import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Set;
import org.jgrapht.alg.ConnectivityInspector;
import org.jgrapht.alg.DijkstraShortestPath;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import com.google.common.collect.Sets;
import org.jgrapht.Graph;
import org.jgrapht.GraphPath;
import org.jgrapht.alg.connectivity.ConnectivityInspector;
import org.jgrapht.alg.shortestpath.DijkstraShortestPath;
import org.jgrapht.graph.DefaultWeightedEdge;
import org.jgrapht.graph.SimpleWeightedGraph;
import de.tud.kom.p2psim.api.scenario.ConfigurationException;
import de.tud.kom.p2psim.api.topology.obstacles.Obstacle;
import de.tud.kom.p2psim.api.util.geo.maps.Map;
......@@ -54,8 +58,7 @@ public abstract class AbstractMap implements Map {
private List<Path> paths = Lists.newLinkedList();
protected DefaultWeightedEdgeRetrievableGraph<Waypoint, Path> graph = new DefaultWeightedEdgeRetrievableGraph<Waypoint, Path>(
new PathEdgeFactory());
protected Graph<Waypoint, DefaultWeightedEdge> graph = new SimpleWeightedGraph<>(DefaultWeightedEdge.class);
private Multimap<Class, Waypoint> typeWaypointMap = ArrayListMultimap.create();
......@@ -106,8 +109,7 @@ public abstract class AbstractMap implements Map {
}
protected void buildGraph() {
graph = new DefaultWeightedEdgeRetrievableGraph<Waypoint, Path>(
new PathEdgeFactory());
graph = new SimpleWeightedGraph<>(DefaultWeightedEdge.class);
for (Path path : paths) {
graph.addVertex(path.getSource());
......@@ -258,10 +260,9 @@ public abstract class AbstractMap implements Map {
}
public List<Path> getShortestPath(Waypoint start, Waypoint end) {
DijkstraShortestPath<Waypoint, Path> dijkstrashortestpath = new DijkstraShortestPath<Waypoint, Path>(
graph, start, end);
return dijkstrashortestpath.getPathEdgeList();
DijkstraShortestPath<Waypoint, Path> dijkstrashortestpath = new DijkstraShortestPath<Waypoint, Path>(graph);
GraphPath<Waypoint, Path> path = dijkstrashortestpath.getPath(start, end);
return path.getEdgeList();
}
public void addWaypoint(Waypoint wp) {
......
......@@ -25,7 +25,7 @@ package de.tud.kom.p2psim.impl.util.stat.distributions;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.util.Distribution;
import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor;
import umontreal.iro.lecuyer.probdist.LognormalDist;
import umontreal.ssj.probdist.LognormalDist;
public class LognormalDistribution implements Distribution {
......
......@@ -25,7 +25,7 @@ package de.tud.kom.p2psim.impl.util.stat.distributions;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.util.Distribution;
import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor;
import umontreal.iro.lecuyer.probdist.LognormalDist;
import umontreal.ssj.probdist.LognormalDist;
public class MixedLogNormalDistribution implements Distribution {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment