flowsim.slatr
Class SLATRouterProfitable

java.lang.Object
  |
  +--flowsim.slatr.SLATRouter
        |
        +--flowsim.slatr.SLATRouterImpl
              |
              +--flowsim.slatr.SLATRouterProfitable

public class SLATRouterProfitable
extends SLATRouterImpl


Fields inherited from class flowsim.slatr.SLATRouter
buyer_profile, ds_numbers, GIVENSLA_EXPIRATION_MARGIN, ifaces, links_rbw, next_peer_nr, node, peer_iface, peer_number, peer_service, peers, port, routed_flows, s, sla_map
 
Constructor Summary
SLATRouterProfitable(Simulator s, Node node, int port, int local_peers, long budget, long fixed_costs, java.util.Random random)
           
 
Method Summary
protected  SLA best_bid(Node dest, int max_bw, int max_dl, long max_cost)
          find bid with best price/volume
 void bid_received(SLA bid)
           
protected  void buy_connectivity(Node dest)
           
protected  void buy_dest_if_needed(Node dest)
           
protected  void buy_slas()
           
protected  void buy_usage(Node dest, int max_bw)
           
protected  boolean is_profitable(SLA bid)
          Is this bid a profitable one? The algorithm is as follows: take the average price of the given_slas which resulted from buying the last taken_sla.
 void reject_received(SLA sla)
           
 java.lang.String toString()
           
 
Methods inherited from class flowsim.slatr.SLATRouterImpl
accept_bid, add_neighbour_bid, add_neighbour_bids, confirm_received, confirm_sent, get_bw_taken_sla_same_class, get_bw_taken_sla, get_rbwbw_taken_sla_same_class, get_rbwbw_taken_sla, has_link_space, iface_changed, make_bids, price_volume, price, receive_ask, reject_sent, run, send_best_bid, send_confirm_for_accept, start
 
Methods inherited from class flowsim.slatr.SLATRouter
add_buyer, add_to_budget, debug_table, debug_table, expire_taken, flow_blocked, flow_changed_available_bw, flow_changed_bw, flow_changed_desired_bw, flow_started, flow_stopped, get_node, get_peer, get_peer, get_port, get_profile, receive_accept, receive_bid, receive_confirm, receive_reject, release_link_for_sla, remove_from_budget, remove_given_bid, remove_given_sla, remove_taken_bid, remove_taken_sla, reserve_link_for_sla, route, send_accept, send_ask, send_bid, send_confirm, send_reject, taken_bw_changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SLATRouterProfitable

public SLATRouterProfitable(Simulator s,
                            Node node,
                            int port,
                            int local_peers,
                            long budget,
                            long fixed_costs,
                            java.util.Random random)
Method Detail

bid_received

public void bid_received(SLA bid)
Overrides:
bid_received in class SLATRouterImpl

reject_received

public void reject_received(SLA sla)
Overrides:
reject_received in class SLATRouterImpl

buy_slas

protected void buy_slas()
Overrides:
buy_slas in class SLATRouterImpl

best_bid

protected SLA best_bid(Node dest,
                       int max_bw,
                       int max_dl,
                       long max_cost)
find bid with best price/volume

buy_connectivity

protected void buy_connectivity(Node dest)

is_profitable

protected boolean is_profitable(SLA bid)
Is this bid a profitable one? The algorithm is as follows: take the average price of the given_slas which resulted from buying the last taken_sla. If this bid was bought and the expected amount (TAKENSLAS_EXPECTED_RBWBW) was sold at that price, would we make profit?

buy_usage

protected void buy_usage(Node dest,
                         int max_bw)

buy_dest_if_needed

protected void buy_dest_if_needed(Node dest)

toString

public java.lang.String toString()
Overrides:
toString in class SLATRouterImpl