/*
 *  $Id: CDNAgent.java,v 1.2 2008/05/09 06:13:51 nemo Exp $
 * 
 * Copyright (c) 2008, Nemo Semret.
 * 
 * Your agent must implement this interface. All the constants of the
 * game are set here as well. Do not hardcode the constants in your
 * agent. You should refer to them as these static variables. Some of
 * these values may change in the final run so you must design your
 * algorithm for the general case.
 */

package edu.columbia.ee.e6773;

/* number of  networks */
public static final int K = 10;
/* bandwidth in Mbps */
public static final long[] C = {10000, 5000, 2000, 1000, 500, 200, 100, 50, 20, 10};
/* value of 1 user */
public static final float V = 1.0;
/* fraction of users who prefer cache */
public static final float q = 0.8;
/* price per Gbyte of backbone bandwidth */
public static final float Pb = 0.01;
/* price per Gbyte of cache storage */
public static final float Pc = 10.0;
/* cost of setting up each cache copy */
public static final float Sc = 10000;

/**
 * Interface for player agent representing Information Provider in Content Delivery Game.
 * http://www.ee.columbia.edu/~nemo/teaching/Content_Delivery_Game.html
 * @author Nemo Semret
 */
public interface CDAgent {
    /**
     * At the beginning of each day, the system generates today's
     * value of X and gives it to each of the players. X is random iid
     * with distribution F(x) = 1 - P (X >x) = 1- (x_min/x)^2, for x
     * >= xmin, and 0 otherwise, with x__min = 0.5 Gbytes = 536870912 bytes.
     *
     * @param the value of X in bytes
     * @return a boolean action vector representing his decisions to
     * cache (k-th element is true iff this provider decided to cache
     * in network k)
     */
    public boolean[] startDay(long X);

    public void endDay(long[] b, long[] c);
}


