flowsim.slatr
Class SLATUserVoice

java.lang.Object
  |
  +--flowsim.slatr.UserImpl
        |
        +--flowsim.slatr.SLATUser
              |
              +--flowsim.slatr.SLATUserVoice

public class SLATUserVoice
extends SLATUser
implements FlowMonitor


Field Summary
protected  Distribution arrival
           
protected  int calls_per_second
           
protected  Distribution duration
           
protected  int flow_id
           
protected  java.util.Random r
           
protected  Topology t
           
protected  NodeChooser to_chooser
           
protected  float wtp_per_volume
           
 
Fields inherited from class flowsim.slatr.SLATUser
server
 
Fields inherited from class flowsim.slatr.UserImpl
budget, budget_incr, max_utility, node, port, s, utility
 
Constructor Summary
SLATUserVoice(Simulator s, Topology t, Node node, int port, long budget, long budget_incr, int server_port, int calls_per_second, int mean_duration, java.util.Random r, NodeChooser to_chooser, int flow_id, float wtp_per_volume)
           
 
Method Summary
protected  void ask(SLA ideal)
           
 float bid_utility(SLA ideal, SLA bid)
          definition: bid_utility(ideal,ideal)=1, bid_utility(ideal,nothing)=0
 void confirm_received(SLA sla)
           
 void flow_blocked(Flow f)
           
 void flow_changed_available_bw(Flow f, int was_bw)
           
 void flow_changed_bw(Flow f, int was_bw)
           
 void flow_changed_desired_bw(Flow f, int was_bw)
           
 void flow_started(Flow f)
           
 void flow_stopped(Flow f)
           
 int utility_wtp(SLA sla)
          willingness to pay for maximal utility
 
Methods inherited from class flowsim.slatr.SLATUser
bid_received, buy_best_bid, buy, get_profile, print_stats, receive_bid, receive_confirm, receive_reject, remove_bid, remove_sla, send_ask, toString
 
Methods inherited from class flowsim.slatr.UserImpl
add_to_budget, get_budget_incr, get_budget, get_max_utility, get_node, get_port, get_utility, remove_from_budget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

t

protected final Topology t

r

protected final java.util.Random r

arrival

protected final Distribution arrival

duration

protected final Distribution duration

to_chooser

protected final NodeChooser to_chooser

calls_per_second

protected final int calls_per_second

flow_id

protected final int flow_id

wtp_per_volume

protected final float wtp_per_volume
Constructor Detail

SLATUserVoice

public SLATUserVoice(Simulator s,
                     Topology t,
                     Node node,
                     int port,
                     long budget,
                     long budget_incr,
                     int server_port,
                     int calls_per_second,
                     int mean_duration,
                     java.util.Random r,
                     NodeChooser to_chooser,
                     int flow_id,
                     float wtp_per_volume)
Parameters:
node - node where the user resides
port - port where the user resides
budget_incr - budget increase pro second
server_port - port of (unique) SLASeller for this user
calls_per_second - number of calls per second which should be generated (randomly)
mean_duration - average duration of calls in microseconds
r - Random object used to make random call distribution
Method Detail

utility_wtp

public int utility_wtp(SLA sla)
willingness to pay for maximal utility
Overrides:
utility_wtp in class SLATUser

flow_started

public void flow_started(Flow f)
Specified by:
flow_started in interface FlowMonitor

flow_stopped

public void flow_stopped(Flow f)
Specified by:
flow_stopped in interface FlowMonitor

flow_blocked

public void flow_blocked(Flow f)
Specified by:
flow_blocked in interface FlowMonitor

flow_changed_bw

public void flow_changed_bw(Flow f,
                            int was_bw)
Specified by:
flow_changed_bw in interface FlowMonitor

flow_changed_desired_bw

public void flow_changed_desired_bw(Flow f,
                                    int was_bw)
Specified by:
flow_changed_desired_bw in interface FlowMonitor

flow_changed_available_bw

public void flow_changed_available_bw(Flow f,
                                      int was_bw)
Specified by:
flow_changed_available_bw in interface FlowMonitor

confirm_received

public void confirm_received(SLA sla)
Overrides:
confirm_received in class SLATUser

ask

protected void ask(SLA ideal)
Overrides:
ask in class SLATUser

bid_utility

public float bid_utility(SLA ideal,
                         SLA bid)
definition: bid_utility(ideal,ideal)=1, bid_utility(ideal,nothing)=0
Overrides:
bid_utility in class SLATUser