📄 constants.h
字号:
//////////////////////////////////////////////////////////////////////
// Title: Geographic Load Balancing for Cellular Networks
// by emulating the behavior of air bubbles
//
// Description: This project is for dynamically balancing the traffic load
// over a cellular network with fully adaptive antennas by
// emulating the behaviours of a bubble array. Since
// we assume fully adaptive base station antenna in this
// version, antenna agent and simulator are not needed.
//
// Copyright: Copyright (c) 2003
// Company: Elec. Eng. Dept., Queen Mary, University of London
// @author Lin Du (lin.du@elec.qmul.ac.uk)
// @version 1.0
//
//////////////////////////////////////////////////////////////////////
#if !defined(Constants_H_INCLUDED)
#define Constants_H_INCLUDED
#if _MSC_VER > 1000
#include <crtdbg.h> // for _ASSERT
#include <sys/timeb.h> // for _ftime
#define ftime _ftime
#pragma once
#endif // _MSC_VER > 1000
#if GNUCPP
#define _ASSERT(a){;} // leave _ASSERT as empty
#endif
// flag for binary or plain text traffic scenario files
//#define _BINARY_INPUT_
typedef unsigned __int8 U_INT8;
typedef unsigned __int16 U_INT16;
typedef unsigned long U_INT32;
/***********************************************************************
* constants about scenarios:
*
* The cellular network size in aixs X.
* The cellular network size in aixs Y.
* Total number of cells.
* Total number of base stations, same as cells.
* Total number of mobile stations.
* The radius of each cell, used in converting ID to location.
* The radius of forbidden zone where no any traffic units.
* The minimum distance to base station for any traffic units.
* The standard distance for shared TUs
* The maximum distance of a possible tu that can be served.
*
***********************************************************************/
const static int CELLULAR_SIZE_X = 10;
const static int CELLULAR_SIZE_Y = 10;
const static int CELL_NUMBER = CELLULAR_SIZE_X * CELLULAR_SIZE_Y;
const static int BS_NUMBER = CELL_NUMBER;
const static long TU_NUMBER = BS_NUMBER * 500;
const static double CELL_RADIUS = 1.0;
const static double FORBID_DISTANCE = 0.05 * CELL_RADIUS;
const static double MIN_DISTANCE = 0.2 * CELL_RADIUS;
const static double SHARE_DISTANCE = 1.1 * CELL_RADIUS;
const static double MAX_DISTANCE = 1.5 * CELL_RADIUS;
/***********************************************************************
* constants about time:
*
* The time interval (in second) used in simulator
* The time interval units between two snapshots.
*
***********************************************************************/
const static double TIME_INTERVAL = 1.0;
const static int SNAPSHOT_INTERVAL = 60;
/***********************************************************************
* constants about demand and capacity:
*
* The minimum demand of TU.
* The maximum demand of TU.
* The average demand of TU.
* The average capacity of BS. ( or read from BS scenrio file, check TestBed.cpp)
* The maximum power of BS, ie. the sum of the TU distance square (relative value)
* The maximum number of shared BS ( 3,softer handover, is the max for mobile cellular network)
*
***********************************************************************/
const static double MIN_DEMAND = 1.0;
const static double MAX_DEMAND = 1.0;
const static double AVG_DEMAND = (MIN_DEMAND + MAX_DEMAND) / 2.0;
const static double AVG_CAPACITY = AVG_DEMAND * 110;
const static double MAX_BS_POWER = 2.0;
const static int MAX_SHARE_NUM = 3;
/***********************************************************************
* constants about agent (negotiation):
*
* The target for server utilisation ratio, used for starting optimisation
* The maximum oscillation number
* Note: use MAX_OSC_NUM currently, maybe other conditions later, such as amplitude/improvement
*
***********************************************************************/
const static double UR_TARGET = 1.0; //0.98;
const static int MAX_OSC_NUM = 200;
/***********************************************************************
* Other constants:
*
* INFINITY: infinity, used in evaluator
*
***********************************************************************/
const static double INFINITY = 1e20;
#endif //!defined(Constants_H_INCLUDED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -