simulator_lib
Class SimulatorMalicious

java.lang.Object
  extended by simulator_lib.SimulatorMalicious

public class SimulatorMalicious
extends java.lang.Object

The SimulatorMalicious class is used to coordinate malicious user behaviors, especially with regards to coordinated activity and feedback switching.


Nested Class Summary
static class SimulatorMalicious.MAL_STRATEGY
          The MAL_STRATEGY enumeration lists malicious tactics that can be used
 
Field Summary
private  java.util.List<java.lang.Integer> collective
          List containing UserID's of those participating in malicious-collective
private  Network nw
          Network which this SimulatorMalicious object is being applied too.
private  SimulatorMalicious.MAL_STRATEGY strat
          The malicious strategy being applied by this instance.
 
Constructor Summary
SimulatorMalicious(Network nw, SimulatorMalicious.MAL_STRATEGY strat)
          Construct a SimulatorMalicious object.
 
Method Summary
 void computeTrust(int recv, int cycle, TrustAlg ALG)
          Compute trust according to some algorithm, over a set of feedback data.
private  void setVecRelations(Relation.Copy setting, int vec, TrustAlg ALG)
          Set all (user->x) relations in this Network to report a particular feedback type when queried, where 'user' is a fixed User.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

strat

private final SimulatorMalicious.MAL_STRATEGY strat
The malicious strategy being applied by this instance.


nw

private final Network nw
Network which this SimulatorMalicious object is being applied too.


collective

private java.util.List<java.lang.Integer> collective
List containing UserID's of those participating in malicious-collective

Constructor Detail

SimulatorMalicious

public SimulatorMalicious(Network nw,
                          SimulatorMalicious.MAL_STRATEGY strat)
Construct a SimulatorMalicious object.

Parameters:
nw - Network over which this Object should operate
strat - Malicious strategy being applied in this instance
Method Detail

computeTrust

public void computeTrust(int recv,
                         int cycle,
                         TrustAlg ALG)
Compute trust according to some algorithm, over a set of feedback data. Which data is set is used is set according to this object.

Parameters:
recv - Identifier of user performing trust computation
cycle - The current cycle in the simulator framework
ALG - Algorithm being brought to bear on interaction data

setVecRelations

private void setVecRelations(Relation.Copy setting,
                             int vec,
                             TrustAlg ALG)
Set all (user->x) relations in this Network to report a particular feedback type when queried, where 'user' is a fixed User.

Parameters:
setting - Feedback type which we want to be reported
vec - User (numerical) vector whose relations are to be set