|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
es.ants.felixgm.trmsim_wsn.Simulation
public class Simulation
This class is used to run simulations of a trust and reputation model
| Constructor Summary | |
|---|---|
Simulation(java.util.Collection<java.util.Observer> observers,
Service requiredService,
boolean dynamic,
boolean oscillating,
boolean collusion,
int numExecutions,
Network network)
Creates a new Simulation |
|
Simulation(java.util.Collection<java.util.Observer> observers,
Service requiredService,
int minNumSensors,
int maxNumSensors,
double probClients,
double probRelay,
double probMalicious,
double radioRange,
boolean dynamic,
boolean oscillating,
boolean collusion,
int numNetworks,
int numExecutions)
Creates a new Simulation |
|
| Method Summary | |
|---|---|
java.util.Collection<Outcome> |
get_globalOutcomes()
This method returns the global outcomes achieved by this simulations |
void |
run()
Starts the simulations |
void |
stop()
Stops the simulations |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Simulation(java.util.Collection<java.util.Observer> observers,
Service requiredService,
int minNumSensors,
int maxNumSensors,
double probClients,
double probRelay,
double probMalicious,
double radioRange,
boolean dynamic,
boolean oscillating,
boolean collusion,
int numNetworks,
int numExecutions)
observers - Used to communicate changes to the GUIrequiredService - Service requested by every client of each WSNminNumSensors - Minimum number of sensors composing every WSNmaxNumSensors - Maximum number of sensors composing every WSNprobClients - The probability of a node to act as a clientprobRelay - The probability of a server to act just as a relay node (not offering the required service)probMalicious - The probability of a server offering the required service to act as a
malicious server (not providing the offered service, or providing a worse or different one)radioRange - Maximum wireless range of every sensor. It determines the neighborhood of every sensordynamic - It determines if the WSN will be dynamic (nodes sometimes switch off in order to save battery, breaking all their links)oscillating - It determines if the goodness of the servers belonging to the created WSN will change along the timecollusion - It determines if the malicious servers belonging to the created WSN will form a collusion among themnumNetworks - Number of wireless sensor networks to testnumExecutions - Number of service requests of every client composing each WSN
public Simulation(java.util.Collection<java.util.Observer> observers,
Service requiredService,
boolean dynamic,
boolean oscillating,
boolean collusion,
int numExecutions,
Network network)
observers - Used to communicate changes to the GUIrequiredService - Service requested by every client of the specified WSNdynamic - It determines if the WSN will be dynamic (nodes sometimes switch off in order to save battery, breaking all their links)oscillating - It determines if the goodness of the servers belonging to the created WSN will change along the timecollusion - It determines if the malicious servers belonging to the created WSN will form a collusion among themnumExecutions - Number of service requests of every client composing the specified WSNnetwork - Wireless sensor network to test| Method Detail |
|---|
public void stop()
public void run()
run in interface java.lang.Runnablepublic java.util.Collection<Outcome> get_globalOutcomes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||