'''
Created on Jan 21, 2011
Modified on Apr 22, 2011
@author: Dilum Bandara
@version: 0.2
@copyright: Copyright(c) 2011, Dilum Bandara
@license: GPL
'''

'''
Basic configuration options that are not expected to change for each simulation 
'''

T_RESP_TIME = 0.15 #500ms change
T_SWAP_IN = 1
T_SWAP_OUT = 1
T_SWAP_USED = 5.0 #5% change
T_DISK_IN = 1
T_DISK_OUT = 1
T_DISK_SVC = 1.0 
T_DISK_UTIL = 2.0 #1% change
T_DISK_USED = 2.0 #2% change
T_DISK_FREE = 5.0
T_UPTIME = 21600.0 #6 hours 
T_1_MIN_LOAD = 2.0
T_5_MIN_LOAD = 2.0 
T_15_MIN_LOAD = 2.0 
T_TIMER_MAX = 100.0 #100ms change
T_TIMER_AVE = 100.0 #100ms change
T_MEM_FREE = 10.0
T_MEM_ACTIVE = 10.0
T_CPU_FREE = 10.0 #10% change
T_TX_RATE = 1000
T_RX_RATE = 1000
T_DRIFT = 1.0 #100ms change

MAX_LATITUDE = 90.0
MIN_LATITUDE = -90.0
MAX_LONGITUDE = 180.0
MIN_LONGITUDE = -180.0
MAX_LOCATION = 5
MIN_LOCATION = 1
MAX_RESP_TIME = 100.0 #500ms
MIN_RESP_TIME = 0.0 #0ms
MAX_SWAP_IN = 2500
MIN_SWAP_IN = 0
MAX_SWAP_OUT = 2500
MIN_SWAP_OUT = 0
MAX_SWAP_USED = 100.0 #100%
MIN_SWAP_USED = 0.0 #0%
MAX_DISK_IN = 50000
MIN_DISK_IN = 0
MAX_DISK_OUT = 50000
MIN_DISK_OUT = 0
MAX_DISK_SVC = 10000.0 
MIN_DISK_SVC = 0.0 
MAX_DISK_UTIL = 100.0 #1% change
MIN_DISK_UTIL = 0.0 #1% change
MAX_DISK_USED = 100.0 #2% change
MIN_DISK_USED = 0.0 #2% change
MAX_DISK_FREE = 10000.0
MIN_DISK_FREE = 0.0
MAX_DISK_SIZE = 10000.0
MIN_DISK_SIZE = 0.0
MAX_UPTIME = 63072000.0 #2 years in sec
MIN_UPTIME = 0.0 #0 seconds
MAX_1_MIN_LOAD = 1000.0
MIN_1_MIN_LOAD = 0.0
MAX_5_MIN_LOAD = 1000.0 
MIN_5_MIN_LOAD = 0.0 
MAX_15_MIN_LOAD = 1000.0 
MIN_15_MIN_LOAD = 0.0 
MAX_TIMER_MAX = 25000.0 #ms change
MIN_TIMER_MAX = 0.0 #ms change
MAX_TIMER_AVE = 25000.0 #ms change
MIN_TIMER_AVE = 0.0 #ms change
MAX_MEM_FREE = 100.0
MIN_MEM_FREE = 0.0
MAX_MEM_ACTIVE = 100.0
MIN_MEM_ACTIVE = 0.0
MAX_MEM_SIZE = 32.0
MIN_MEM_SIZE = 0.0 
MAX_CPU_FREE = 100.0 #%
MIN_CPU_FREE = 0.0 #%
MAX_CPU_SPEED = 6.0
MIN_CPU_SPEED = 0.0
MAX_NUM_CORES = 32
MIN_NUM_CORES = 0
MAX_CORES_PER_CPU = 8
MIN_CORES_PER_CPU = 0
MAX_TX_RATE = 100000
MIN_TX_RATE = 0
MAX_RX_RATE = 100000
MIN_RX_RATE = 0
MAX_DRIFT = 21600.0 #+6 hours change
MIN_DRIFT = -21600.0 #-6 hours change
MAX_BW_LIMIT = 1000000 #
MIN_BW_LIMIT = 0 #
MAX_KERN_VER = 4
MIN_KERN_VER = 0
MAX_FC_NAMEX = 4
MIN_FC_NAMEX = 0
MAX_BOOT = 6
MIN_BOOT = 0
MAX_NODE_TYPE = 2
MIN_NODE_TYPE = 0

RESOURCE_FILE = '../../../resources.txt'
QUERY_FILE = '../../../queries.txt'
RESULT_FILE = '../../../results.txt'
DISTANCE_FILE = '../../../distances.txt'
KEY_FILE = '../../../keys.txt'

DUMP_RESULTS_SIZE = 1000
PEERS = {} #Set of peers
MANAGERS = {} #Set of central nodes
OVERLAY = None
KEY_LENGTH = 160
ATT_KEY_LENGTH = 4 #Key length assigned to attribute name (160-8) is the attrib value
