Commit eff5d429 authored by Julian Zobel's avatar Julian Zobel 🦄
Browse files

Merge branch 'master' into 'cherry-pick-7698d9d7'

# Conflicts:
#   src/de/tud/kom/p2psim/impl/analyzer/metric/output/MetricOutputDAO.java
#   src/de/tud/kom/p2psim/impl/util/db/dao/DAO.java
parents 1c7f20ec 37020b44
......@@ -23,7 +23,7 @@ package de.tud.kom.p2psim.impl.energy.configs;
import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.api.energy.EnergyConfiguration;
import de.tud.kom.p2psim.api.linklayer.mac.PhyType;
import de.tud.kom.p2psim.impl.energy.SmartphoneCommunicationEnergyComponent;
import de.tud.kom.p2psim.impl.energy.components.SmartphoneCommunicationEnergyComponent;
public class TimeBased implements
EnergyConfiguration<SmartphoneCommunicationEnergyComponent> {
......
......@@ -23,7 +23,7 @@ package de.tud.kom.p2psim.impl.energy.configs;
import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.api.energy.EnergyConfiguration;
import de.tud.kom.p2psim.api.linklayer.mac.PhyType;
import de.tud.kom.p2psim.impl.energy.StateEnergyCommunicationComponent;
import de.tud.kom.p2psim.impl.energy.components.StateEnergyCommunicationComponent;
/**
* This class is a configuration for the
......
......@@ -18,7 +18,7 @@
*
*/
package de.tud.kom.p2psim.impl.energy;
package de.tud.kom.p2psim.impl.energy.models;
import java.util.List;
import java.util.Set;
......@@ -26,15 +26,12 @@ import java.util.Vector;
import de.tud.kom.p2psim.api.analyzer.EnergyAnalyzer;
import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.api.energy.Battery;
import de.tud.kom.p2psim.api.energy.ComponentType;
import de.tud.kom.p2psim.api.energy.EnergyComponent;
import de.tud.kom.p2psim.api.energy.EnergyEventListener;
import de.tud.kom.p2psim.api.energy.EnergyInfo;
import de.tud.kom.p2psim.api.energy.EnergyModel;
import de.tud.kom.p2psim.api.energy.EnergyState;
import de.tud.kom.p2psim.api.network.SimNetInterface;
import de.tudarmstadt.maki.simonstrator.api.Monitor;
import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.common.graph.INodeID;
import de.tudarmstadt.maki.simonstrator.api.component.ComponentNotAvailableException;
import de.tudarmstadt.maki.simonstrator.api.component.core.MonitorComponent.AnalyzerNotAvailableException;
......@@ -47,32 +44,25 @@ import de.tudarmstadt.maki.simonstrator.api.component.sis.exception.InformationN
import de.tudarmstadt.maki.simonstrator.api.component.sis.type.SiSTypes;
/**
* The default energy model that is composed of different
* {@link EnergyComponent}s and configured via the factory. In contrast to the
* <i>old</i> EnergyModels these are Host components, ie. there is one instance
* for each host.
* The default functionalities for energy models, composed of different
* {@link EnergyComponent}s and configured via the factory.
*
* @author Bjoern Richerzhagen
* @version 1.0, 27.02.2012
* @author Julian Zobel
* @version 1.0, 07.09.2018
*/
public class ModularEnergyModel implements EnergyModel, EnergyEventListener,
EnergyInfo, BatterySensor {
// private static Logger log =
// SimLogger.getLogger(ModularEnergyModel.class);
private SimHost host;
private List<EnergyComponent> energyComponents;
private Battery bat;
public ModularEnergyModel(SimHost host, Battery bat) {
public abstract class AbstractEnergyModel implements EnergyModel, BatterySensor, EnergyInfo {
protected SimHost host;
protected List<EnergyComponent> energyComponents;
protected Battery bat;
public AbstractEnergyModel(SimHost host, Battery bat) {
energyComponents = new Vector<EnergyComponent>();
this.bat = bat;
this.host = host;
}
@Override
public void initialize() {
//
......@@ -137,13 +127,7 @@ public class ModularEnergyModel implements EnergyModel, EnergyEventListener,
// OK
}
}
@Override
public void shutdown() {
throw new AssertionError(
"You are not supposed to shutdown this component.");
}
@Override
public <T extends EnergyComponent> List<T> getComponents(
ComponentType type, Class<T> componentClass) {
......@@ -168,15 +152,15 @@ public class ModularEnergyModel implements EnergyModel, EnergyEventListener,
}
return null;
}
@Override
public EnergyInfo getInfo() {
public EnergyInfo getEnergyInfo() {
/*
* We export our status to interested applications via this interface
*/
return this;
}
@Override
public Battery getBattery() {
return bat;
......@@ -189,68 +173,47 @@ public class ModularEnergyModel implements EnergyModel, EnergyEventListener,
@Override
public double getCurrentEnergyLevel() {
return bat.getCurrentEnergyLevel();
return bat.getCurrentEnergy();
}
@Override
public void registerComponent(EnergyComponent comp) {
comp.setEnergyEventListener(this);
energyComponents.add(comp);
public SimHost getHost() {
return host;
}
@Override
public void switchedState(EnergyComponent component, EnergyState oldState,
EnergyState newState, long timeSpentInOldState) {
if (!bat.isEmpty()) {
double consumedEnergy = oldState.getEnergyConsumption()
* (timeSpentInOldState / (double) Time.SECOND);
bat.consumeEnergy(consumedEnergy);
/*
* TODO Refactor the Energy-Analyzer to support EnergyComponents
* directly, rather than strings.
*/
try {
Monitor.get(EnergyAnalyzer.class).consumeEnergy(getHost(),
consumedEnergy, component);
} catch (AnalyzerNotAvailableException e1) {
//
}
// log.debug(component.toString() + " consumed " + consumedEnergy
// + " uJ in State " + oldState.getName() + " after spending "
// + (timeSpentInOldState/Simulator.SECOND_UNIT) + " sec there.");
if (bat.isEmpty()) {
/*
* Battery is now empty. Go offline.
*/
try {
Monitor.get(EnergyAnalyzer.class).batteryIsEmpty(getHost());
} catch (AnalyzerNotAvailableException e) {
//
}
for (SimNetInterface net : getHost().getNetworkComponent()
.getSimNetworkInterfaces()) {
net.goOffline();
}
}
}
public void shutdown() {
throw new AssertionError(
"You are not supposed to shutdown this component.");
}
@Override
public boolean turnOn(EnergyComponent component) {
return !bat.isEmpty();
public void reset() {
throw new AssertionError(
"You are not supposed to reset this component.");
}
@Override
public SimHost getHost() {
return host;
protected void monitorEnergyConsumation(EnergyComponent component, double consumedEnergy) {
/*
* TODO Refactor the Energy-Analyzer to support EnergyComponents
* directly, rather than strings.
*/
try {
Monitor.get(EnergyAnalyzer.class).consumeEnergy(getHost(),
consumedEnergy, component);
} catch (AnalyzerNotAvailableException e1) {
//
}
}
@Override
public void reset() {
bat.reset();
protected void monitorEmptyBattery() {
/*
* Battery is now empty.
*/
try {
Monitor.get(EnergyAnalyzer.class).batteryIsEmpty(getHost());
} catch (AnalyzerNotAvailableException e) {
//
}
}
}
/*
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of PeerfactSim.KOM.
*
* PeerfactSim.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
*/
package de.tud.kom.p2psim.impl.energy.models;
import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.api.energy.Battery;
import de.tud.kom.p2psim.api.energy.EnergyComponent;
import de.tud.kom.p2psim.api.energy.EnergyEventListener;
import de.tud.kom.p2psim.api.network.SimNetInterface;
import de.tud.kom.p2psim.impl.energy.components.StatefulActuatorComponent;
/**
* Energy Model based on multiple exchangeable components. Each component states the amount of consumed energy,
* which the energy model than will remove from the battery.
*
* @author Julian Zobel
* @version 1.0, 11.09.2018
*/
public class ComponentBasedEnergyModel extends AbstractEnergyModel implements EnergyEventListener {
public ComponentBasedEnergyModel(SimHost host, Battery bat) {
super(host, bat);
}
@Override
public void registerComponent(EnergyComponent comp) {
energyComponents.add(comp);
comp.setEnergyEventListener(this);
}
@Override
public void componentConsumedEnergy(EnergyComponent component, double consumedEnergy) {
if (!bat.isEmpty()) {
bat.consumeEnergy(consumedEnergy);
monitorEnergyConsumation(component, consumedEnergy);
if (bat.isEmpty()) {
monitorEmptyBattery();
if(component instanceof StatefulActuatorComponent) {
((StatefulActuatorComponent) component).turnOff();
}
/*
* Battery is now empty. Go offline.
*/
for (SimNetInterface net : getHost().getNetworkComponent()
.getSimNetworkInterfaces()) {
net.goOffline();
}
}
}
}
@Override
public boolean componentCanBeActivated(EnergyComponent component) {
if(!bat.isEmpty()) {
return true;
}
return false;
}
}
......@@ -2,17 +2,17 @@
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of PeerfactSim.KOM.
*
*
* PeerfactSim.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
......@@ -60,16 +60,16 @@ import de.tudarmstadt.maki.simonstrator.api.component.network.NetID;
* As with the {@link ModularLinkLayer} you should extend this class to add a
* more advanced MAC to ensure basic functionality and consistent behavior. For
* this reason, some methods in this class are marked as final...
*
*
* If a MAC wants to implement a protocol (ie. send messages to other MACs
* without triggering a deliver to higher layers) it can do so by implementing a
* corresponding Message type and/or {@link MacEventInformation}. <b>A Message
* is only delivered to the higher layers if notifyLinkLayer is called</b>.
*
*
* This Layer takes care of energy consumption, as long as the sendUnicast and
* sendBroadcast-methods are used to dispatch all messages (also the
* control-messages, if a protocol is implemented)
*
*
* @author Bjoern Richerzhagen
* @version 1.0, 21.02.2012
*/
......@@ -98,7 +98,7 @@ public abstract class AbstractMacLayer implements MacLayer {
* Our own MacAddress on this PHY
*/
private MacAddress macAddress;
/**
* Our own IP used by the NetLayer on this PHY. Not available during initialization.
*/
......@@ -127,7 +127,7 @@ public abstract class AbstractMacLayer implements MacLayer {
private final boolean enableErrorControl;
/**
*
*
*/
private boolean isOnline;
......@@ -156,7 +156,7 @@ public abstract class AbstractMacLayer implements MacLayer {
* Returns an approximation of the current bandwidth
*/
protected final BandwidthEstimator currentBandwidth;
private final Random random = Randoms.getRandom(AbstractMacLayer.class);
/*
......@@ -179,7 +179,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Create a new MacLayer without bounds on the outgoing message queue (ie.
* endless size, no limit on the waiting time).
*
*
* @param ownMacAddress
* @param phy
* @param maxRetransmissions
......@@ -198,7 +198,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Create a new MacLayer with a bounded outgoing queue (max length) and a
* timeout for messages in said queue.
*
*
* @param ownMacAddress
* @param phy
* @param maxQueueLength
......@@ -291,7 +291,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Use this component to account for energy consumption. This is safe to
* use, as it is always backed by a stub - it is never null.
*
*
* @return
*/
@Override
......@@ -301,7 +301,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Current size of the outgoing Queue
*
*
* @return
*/
protected final int getQueueSize() {
......@@ -310,7 +310,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Maximum length of the outgoing queue, if equal to zero there is no limit
*
*
* @return
*/
protected final int getMaxQueueLength() {
......@@ -319,7 +319,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Gets the maximal retransmissions.
*
*
* @return the maximal retransmissions.
*/
public final int getMaxRetransmissions() {
......@@ -329,7 +329,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Maximum time a message is kept in the outgoing queue. If equal to zero
* there is no limit.
*
*
* @return
*/
protected final long getMaxTimeInQueue() {
......@@ -339,7 +339,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Retrieves and <b>removes</b> the first element in the Queue, after all
* entries that already timed out are deleted.
*
*
* @return
*/
protected final QueueEntry getQueueHead() {
......@@ -351,7 +351,7 @@ public abstract class AbstractMacLayer implements MacLayer {
* Removes all messages that are already waiting longer than maxTimeInQueue,
* notifying messageDropped() for each dropped message. The reason will be
* QUEUE_TIMEOUT in this case.
*
*
*/
private void removeOutdatedQueueEntries() {
if (maxTimeInQueue == 0) {
......@@ -371,11 +371,11 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* This is called whenever a drop occurs within the MAC/PHY. A great
* opportunity to add an Analyzer or some error handling for higher layers.
*
*
* Please note, that this might happen asynchronously - the messages are not
* removed from the queue the second their timeout expires but instead as
* soon as a new send() or a new getQueueHead() is issued.
*
*
* @param reason
* @param msg
*/
......@@ -402,7 +402,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Notification: a message arrived!
*
*
* @param message
* the message itself
* @param info
......@@ -413,7 +413,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* This is to be called by the MAC if a Message should be passed to upper
* layers (ie. it is no MAC_ctrl-Message)
*
*
* @param eventInfo
*/
protected final void notifyLinkLayer(LinkMessageEvent eventInfo) {
......@@ -424,7 +424,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Send a Message to the MAC on the receiver-side (event scheduling).
*
*
* @param receiver
* @param eventInformation
* @param delay
......@@ -454,7 +454,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Use this method to dispatch a broadcast message in your MAC-Layer. It
* will take care of energy consumption and scheduling.
*
*
* @param eventInfo
* an implementation of {@link MacEventInformation} containing
* information about the message to send as well as the message
......@@ -516,7 +516,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Send an unicast message
*
*
* @param toSend
*/
protected final long sendUnicast(MacEventInformation eventInfo) {
......@@ -592,13 +592,13 @@ public abstract class AbstractMacLayer implements MacLayer {
* broadcast, the BW should be constant across all links (we assume the PHY
* selects a fixed, more robust modulation for Broadcasts), as there is no
* handshaking. Therefore, Broadcasts have no retransmits.
*
*
* This method <b>must be called exactly once</b> for every receiver of a
* message (in the unicast case, it will be called only once). The receiver
* is determined by the link-object. Access this method via the sendUnicast
* and sendBroadcast methods to ensure correct behavior of all callbacks and
* events.
*
*
* @param eventInfo
* containing the Message
* @param l
......@@ -758,10 +758,10 @@ public abstract class AbstractMacLayer implements MacLayer {
* sending would be possible at the full RawBandwidth of the PHY). A more
* advanced MAC will add some coding (making the message larger) and access
* control scheme for multiple transmissions.
*
*
* This time is later used to account for energy consumption at sender and
* receiver.
*
*
* @param msg
* @param l
* @return
......@@ -782,7 +782,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* Overwrite this method to implement additional event handling, if needed.
*
*
* @param se
*/
protected void handleEvent(Object data, int type) {
......@@ -873,21 +873,23 @@ public abstract class AbstractMacLayer implements MacLayer {
messageDropped(DropReason.QUEUE_FULL, message);
// FIXME BR DEBUG Print it
// int idx = 0;
// for (QueueEntry qe : queue) {
// Message msg = qe.getMessage();
// while (msg.getPayload() != null) {
// msg = msg.getPayload();
// }
// System.out.println(idx + " "
// + msg.getClass().getSimpleName() + " "
// + msg.toString());
// idx++;
// }
// System.out.println("[AbstractMacLayer] debug output");
// int idx = 0;
// for (QueueEntry qe : queue) {
// Message msg = qe.getMessage();
// while (msg.getPayload() != null) {
// msg = msg.getPayload();
// }
// System.out.println(idx + " "
// + msg.getClass().getSimpleName() + " "
// + msg.toString());
// idx++;
// }
} else {
// still a spot in the queue, add message and notify MAC
queue.add(new QueueEntry(receiver, message));
handleNewQueueEntry();
handleNewQueueEntry();
}
}
}
......@@ -896,7 +898,7 @@ public abstract class AbstractMacLayer implements MacLayer {
public final MacAddress getMacAddress() {
return macAddress;
}
@Override
public NetID getNetId() {
if (netID == null) {
......@@ -926,7 +928,7 @@ public abstract class AbstractMacLayer implements MacLayer {
/**
* An entry in the Message queue of the MAC
*
*
* @author Bjoern Richerzhagen
* @version 1.0, 21.02.2012
*/
......@@ -965,7 +967,7 @@ public abstract class AbstractMacLayer implements MacLayer {
* A Stub for an {@link EnergyCommunicationComponent} to allow simulations
* without an energy model. Otherwise we would have to flood the code with
* if == null statements.
*
*
* @author Bjoern Richerzhagen
* @version 1.0, 27.02.2012
*/
......@@ -1011,8 +1013,9 @@ public abstract class AbstractMacLayer implements MacLayer {
}
@Override
public void turnOff() {
public boolean turnOff() {
on = false;
return true;
}
public boolean turnOn() {
......@@ -1028,14 +1031,14 @@ public abstract class AbstractMacLayer implements MacLayer {
@Override
public void doFakeStateChange() {
// TODO Auto-generated method stub
}
}
/**
* A Live-Analyzer that aggregates Message Drop reasons inside the MAC.
*
*
* @author Bjoern Richerzhagen
* @version 1.0, 26.03.2012
*/
......@@ -1066,7 +1069,7 @@ public abstract class AbstractMacLayer implements MacLayer {
out.append(reason.toString());
out.append(": ");
out.append(_messageDropCounters[reason.ordinal()]);
out.append("\n");
out.append(" | \n");
}
return out.toString();
}
......
......@@ -2,17 +2,17 @@
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of PeerfactSim.KOM.
*
*
* PeerfactSim.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
......@@ -37,7 +37,7 @@ import de.tudarmstadt.maki.simonstrator.api.Time;
* the other (this does not imply that this MAC handles collisions on a
* broadcast medium). It just mimics the behavior of the ModularNetLayer with a
* TrafficControl-Strategy enabled.
*
*
* @author Bjoern Richerzhagen
* @version 1.0, 24.03.2012
*/
......@@ -64,7 +64,7 @@ public class EnqueuingMac extends AbstractMacLayer {
* A MAC that provides an outgoing queue (messages are sent one after the
* other). This may lead to packet drop if the queue is bound or if a
* timeout is configured and the message has been in the queue for too long.
*
*
* @param ownMacAddress
* @param phy
* @param maxQueueLength
......
......@@ -46,7 +46,7 @@ import de.tud.kom.p2psim.impl.linklayer.DefaultLinkMessageEvent;
import de.tud.kom.p2psim.impl.linklayer.mac.AbstractMacLayer;
import de.tud.kom.p2psim.impl.linklayer.mac.wifi.AbstractRateManager.RateManagerTypes;
import de.tud.kom.p2psim.impl.linklayer.mac.wifi.DcfManager.WifiState;
import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tud.kom.p2psim.impl.topology.util.PositionVector;
import de.tud.kom.p2psim.impl.topology.views.wifi.WifiTopologyView;
import de.tud.kom.p2psim.impl.util.LiveMonitoring;
import de.tud.kom.p2psim.impl.util.LiveMonitoring.ProgressValue;
......
......@@ -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 {
......
......@@ -23,7 +23,7 @@ package de.tud.kom.p2psim.impl.network.gnp.topology;
import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tud.kom.p2psim.impl.topology.util.PositionVector;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
/**
......
......@@ -319,12 +319,12 @@ public class GnpPosition implements Location, Comparable<GnpPosition> {
}
@Override
public double getLatitude() {
public double getLatitudeOrY() {
throw new UnsupportedOperationException();
}
@Override
public double getLongitude() {
public double getLongitudeOrX() {
throw new UnsupportedOperationException();
}
......
......@@ -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;
......
......@@ -28,7 +28,7 @@ import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.impl.network.modular.common.GNPToolkit;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB;
import de.tud.kom.p2psim.impl.network.modular.st.PositioningStrategy;
import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tud.kom.p2psim.impl.topology.util.PositionVector;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
/**
......
......@@ -25,7 +25,7 @@ import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.impl.network.modular.common.GeoToolkit;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB;
import de.tud.kom.p2psim.impl.network.modular.st.PositioningStrategy;
import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tud.kom.p2psim.impl.topology.util.PositionVector;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
/**
......
......@@ -26,7 +26,7 @@ import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB;
import de.tud.kom.p2psim.impl.network.modular.st.PositioningStrategy;
import de.tud.kom.p2psim.impl.network.simple.SimpleSubnet;
import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tud.kom.p2psim.impl.topology.util.PositionVector;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
......
......@@ -26,7 +26,7 @@ import java.util.Random;
import de.tud.kom.p2psim.api.common.SimHost;
import de.tud.kom.p2psim.impl.network.modular.db.NetMeasurementDB;
import de.tud.kom.p2psim.impl.network.modular.st.PositioningStrategy;
import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tud.kom.p2psim.impl.topology.util.PositionVector;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
......
......@@ -20,7 +20,9 @@
package de.tud.kom.p2psim.impl.scenario.simcfg2.utils;
import de.tud.kom.p2psim.impl.scenario.simcfg2.configuration.SimCfgConfiguration;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.script.*;
import java.util.Map;
......@@ -30,7 +32,7 @@ import java.util.Map;
* @version 1.0, 12.07.13
*/
public class SimCfgExpressionExecutor {
private static final Logger log = Logger.getLogger(SimCfgExpressionExecutor.class);
private static final Logger log = LogManager.getLogger(SimCfgExpressionExecutor.class);
private ScriptEngine javascriptEngine = null;
public SimCfgExpressionExecutor() {
......
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