net.eduvax.grant.simul
Class TestRandomNode

java.lang.Object
  extended by net.eduvax.grant.core.Node
      extended by net.eduvax.grant.core.LocalNode
          extended by net.eduvax.grant.simul.TestNode
              extended by net.eduvax.grant.simul.TestRandomNode

 class TestRandomNode
extends TestNode

This node selects strictly randomly other nodes when routing. Full random selection is provided by normal ant engine but feedback is always 0 so selection probability has always same value for all nodes. That is : P(x)=1/NbNodes


Field Summary
 
Fields inherited from class net.eduvax.grant.simul.TestNode
client
 
Fields inherited from class net.eduvax.grant.core.LocalNode
ANT_DEF_DELAY, candidate, STATE_FULL, STATE_HALTED, STATE_RUNNING, STATE_SHUTDOWN, STATE_STARTING, STATES_NAME
 
Constructor Summary
TestRandomNode(java.lang.String n, int p)
          Create new TestRandomNode.
 
Method Summary
protected  float getFeedback(ExecReport er)
          do not report any feedback.
protected  float getFeedback(ExecRequest er)
          do not report any feedback.
 
Methods inherited from class net.eduvax.grant.simul.TestNode
checkLoad, execReportToClient, getLoadValue, load, loadNodes, setClient, setLoadCost, setPerf
 
Methods inherited from class net.eduvax.grant.core.LocalNode
addNode, dissipate, execReport, feedback, fitness, getKnownNodes, getTaskCount, handleEvent, removeNode, sendEvent, setMaxLoad, setSelector, shutdown, status, submitRequest
 
Methods inherited from class net.eduvax.grant.core.Node
createNode, getFitness, getName, getRCDir, registerNodeFactory, setFitness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestRandomNode

public TestRandomNode(java.lang.String n,
                      int p)
Create new TestRandomNode. See TestNode for p and max param details.

Parameters:
n - new node's name
b - broker to use to send request to other nodes
p - power indice.
Method Detail

getFeedback

protected float getFeedback(ExecReport er)
do not report any feedback. Since feedback is always 0, selector choose fully randomly

Overrides:
getFeedback in class LocalNode
Parameters:
er - execute report
l - node index in routing path
Returns:
0.0f

getFeedback

protected float getFeedback(ExecRequest er)
do not report any feedback. Since feedback is always 0, selector choose fully randomly

Overrides:
getFeedback in class TestNode
Parameters:
er - execute report
l - node index in routing path
Returns:
0.0f