Exemple #1
0
  /// Print a label
  void AddLabel(const wxString& texte)
  {
    // We are in a new page, then we must add a page
    if ((m_xCount == 0) && (m_yCount == 0))
    {
      AddPage();
    }

    double posX = m_marginLeft+(m_xCount*(m_width+m_xSpace));
    double posY = m_marginTop+(m_yCount*(m_height+m_ySpace));
    SetXY(posX+3, posY+3);
    MultiCell(m_width, m_lineHeight, texte);

    m_yCount++;

    if (m_yCount == m_yNumber)
    {
      // End of column reached, we start a new one
      m_xCount++;
      m_yCount = 0;
    }

    if (m_xCount == m_xNumber)
    {
      // Page full, we start a new one
      m_xCount = 0;
      m_yCount = 0;
    }
  }
Exemple #2
0
int
main (int argc, char *argv[])
{

  if (argc > 1)
    {

	  /* Help */
	  if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "-H") || !strcmp(argv[1],
			  "--help") || !strcmp(argv[1], "--Help"))
	    {
		  Help ();
		  return 0;
	    }

	  /* run tests */
	  if(strcmp(argv[1], "test")==0)
	    {
		  /* To enable a test, please modify the file LTE-Sim/src/TESTS/test.h */
		  Test ();
	    }

      /* Run simple scenario */
	  if (strcmp(argv[1], "Simple")==0)
	    {
		  Simple ();
	    }


/*Mouan*/
	  /*
	if (strcmp(argv[1], "mouan")==0)
	    {
		  int nbCells = atoi(argv[2]);
		  double radius = atof(argv[3]);
	      int nbUE = atoi(argv[4]);
	      int nbVoIP = atoi(argv[5]);
	      int nbVideo = atoi(argv[6]);
	      int nbBE = atoi(argv[7]);
	      int nbCBR = atoi(argv[8]);
	      int sched_type = atoi(argv[9]);
	      int frame_struct = atoi(argv[10]);
	      int speed = atoi(argv[11]);
	      double maxDelay = atof(argv[12]);
		  int video_bit_rate = atoi(argv[13]);
	      int seed;
	      if (argc==14) seed = atoi(argv[13]);
	      else seed = -1;
	      MouanCell (nbCells, radius, nbUE, nbVoIP, nbVideo, nbBE, nbCBR, sched_type, frame_struct, speed, maxDelay, video_bit_rate, seed);
	    }*/





      /* Run more complex scenarios */
	  if (strcmp(argv[1], "SingleCell")==0)
	    {
	      double radius = atof(argv[2]);
	      int nbUE = atoi(argv[3]);
	      int nbVoIP = atoi(argv[4]);
	      int nbVideo = atoi(argv[5]);
	      int nbBE = atoi(argv[6]);
	      int nbCBR = atoi(argv[7]);
	      int sched_type = atoi(argv[8]);
	      int frame_struct = atoi(argv[9]);
	      int speed = atoi(argv[10]);
	      double maxDelay = atof(argv[11]);
		  int video_bit_rate = atoi(argv[12]);
	      int seed;
	      if (argc==14) seed = atoi(argv[13]);
	      else seed = -1;
	      SingleCellWithoutInterference (radius, nbUE, nbVoIP, nbVideo, nbBE, nbCBR, sched_type, frame_struct, speed, maxDelay, video_bit_rate, seed);
	    }
	  if (strcmp(argv[1], "SingleCellWithI")==0)
	    {
		  int nbCells = atoi(argv[2]);
		  double radius = atof(argv[3]);
	      int nbUE = atoi(argv[4]);
	      int nbVoIP = atoi(argv[5]);
	      int nbVideo = atoi(argv[6]);
	      int nbBE = atoi(argv[7]);
	      int nbCBR = atoi(argv[8]);
	      int sched_type = atoi(argv[9]);
	      int frame_struct = atoi(argv[10]);
	      int speed = atoi(argv[11]);
	      double maxDelay = atof(argv[12]);
		  int video_bit_rate = atoi(argv[13]);
	      int seed;
	      if (argc==14) seed = atoi(argv[13]);
	      else seed = -1;
	      SingleCellWithInterference (nbCells, radius, nbUE, nbVoIP, nbVideo, nbBE, nbCBR, sched_type, frame_struct, speed, maxDelay, video_bit_rate, seed);
	    }
	  if (strcmp(argv[1], "MultiCell")==0)
	    {
		  int nbCells = atoi(argv[2]);
		  double radius = atof(argv[3]);
	      int nbUE = atoi(argv[4]);
	      int nbVoIP = atoi(argv[5]);
	      int nbVideo = atoi(argv[6]);
	      int nbBE = atoi(argv[7]);
	      int nbCBR = atoi(argv[8]);
	      int sched_type = atoi(argv[9]);
	      int frame_struct = atoi(argv[10]);
	      int speed = atoi(argv[11]);
	      double maxDelay = atof(argv[12]);
		  int video_bit_rate = atoi(argv[13]);
	      int seed;
	      if (argc==14) seed = atoi(argv[13]);
	      else seed = -1;
	      MultiCell (nbCells, radius, nbUE, nbVoIP, nbVideo, nbBE, nbCBR, sched_type, frame_struct, speed, maxDelay, video_bit_rate, seed);
	    }

	  if (strcmp(argv[1], "SingleCellWithFemto")==0)
		{
		  int nbBuilding = atoi(argv[2]);
		  int buildingType = atoi(argv[3]);
		  double activityRatio = atof(argv[4]);
		  double radius = atof(argv[5]);
		  int nbUE = atoi(argv[6]);
		  int nbFemtoUE = atoi(argv[7]);
		  int nbVoIP = atoi(argv[8]);
		  int nbVideo = atoi(argv[9]);
		  int nbBE = atoi(argv[10]);
		  int nbCBR = atoi(argv[11]);
		  int sched_type = atoi(argv[12]);
		  int frame_struct = atoi(argv[13]);
		  int speed = atoi(argv[14]);
		  int accessPolicy = atoi(argv[15]);
		  double maxDelay = atof(argv[16]);
		  int video_bit_rate = atoi(argv[17]);
		  int seed;
		  if (argc==14) seed = atoi(argv[13]);
		  else seed = -1;
		  SingleCellWithFemto ( nbBuilding, buildingType, activityRatio, radius, nbUE, nbFemtoUE, nbVoIP, nbVideo, nbBE, nbCBR, sched_type, frame_struct, speed, accessPolicy, maxDelay, video_bit_rate, seed);
		}
	  if (strcmp(argv[1], "SingleCellWithStreets")==0)
		{
		  int nbStreets = atoi(argv[2]);
		  double radius = atof(argv[3]);
		  int nbUE = atoi(argv[4]);
		  int nbFemtoUE = atoi(argv[5]);
		  int nbVoIP = atoi(argv[6]);
		  int nbVideo = atoi(argv[7]);
		  int nbBE = atoi(argv[8]);
		  int nbCBR = atoi(argv[9]);
		  int sched_type = atoi(argv[10]);
		  int frame_struct = atoi(argv[11]);
		  int speed = atoi(argv[12]);
		  double maxDelay = atof(argv[13]);
		  int video_bit_rate = atoi(argv[14]);
	      int seed;
	      if (argc==14) seed = atoi(argv[13]);
	      else seed = -1;
		  SingleCellWithStreets ( radius, nbStreets, nbUE, nbFemtoUE, nbVoIP, nbVideo, nbBE, nbCBR, sched_type, frame_struct, speed, maxDelay, video_bit_rate, seed);
		}










	  /* other dedicated simulations */
	  if (strcmp(argv[1], "test-amc-mapping")==0)
		{
		  int cells = atoi(argv[2]);
		  double radius = atof(argv[3]);
		  int speed = atoi(argv[4]);
		  int bandwidth = atoi(argv[5]);
		  int cluster = atoi(argv[6]);

		  TestAmcMapping (cells, radius, speed, bandwidth, cluster);
		}
	  if (strcmp(argv[1], "test-mobility-model")==0)
		{
		  double radius = atof(argv[2]);
		  int nbUE = atoi(argv[3]);
		  int model = atoi(argv[4]);
		  int speed = atoi(argv[5]);
		  double duration = atoi(argv[6]);
		  TestMobilityModels(radius, nbUE, model, speed, duration);
		}
	  if (strcmp(argv[1], "scalability-test-macro-with-femto")==0)
		{
		  double radius = atof(argv[2]);
		  int nbBuildings = atoi(argv[3]);
		  int nbUE = atoi(argv[4]);
		  ScalabilityTestMacroWithFemto (radius, nbBuildings, nbUE);
		}

	  if (strcmp(argv[1], "test-sinr-urban")==0)
		{
		  int streets = atoi(argv[2]);
		  int henb = atoi(argv[3]);
		  int reuse = atoi(argv[4]);
		  TestSinrUrban (streets, henb, reuse);
		}
	  if (strcmp(argv[1], "test-throughput-urban")==0)
		{
		  int streets = atoi(argv[2]);
		  int henb = atoi(argv[3]);
		  int reuse = atoi(argv[4]);
		  int nbUEs = atoi(argv[5]);
		  double activityFactor = atoi(argv[6]);
		  TestThroughputUrban (streets, henb, reuse, nbUEs, activityFactor);
		}
	  if (strcmp(argv[1], "test-throughput-macro-with-femto")==0)
		{
		  double radius = atof(argv[2]);
		  int nbBuildings = atoi(argv[3]);
		  int nbUE_macro = atoi(argv[4]);
		  TestThroughputMacroWithFemto (radius, nbBuildings, nbUE_macro);
		}
	  if (strcmp(argv[1], "test-sinr-femto")==0)
		{
		  double riuso = atof(argv[2]);
		  double activityFactor = atof(argv[3]);
		  TestSinrFemto (riuso, activityFactor);
		}

	  if (strcmp(argv[1], "test-throughput-building")==0)
		{
		  double riuso = atof(argv[2]);
		  double activityFactor = atof(argv[3]);
		  int nbUE_femto = atof(argv[4]);
		  TestThroughputBuilding (riuso, activityFactor, nbUE_femto);
		}
	  if (strcmp(argv[1], "MultiCellSinrPlot")==0)
	    {
		  int nbCells = atoi(argv[2]);
		  double radius = atof(argv[3]);
		  int nbUE = atoi(argv[4]);
		  int sched_type = atoi(argv[5]);
		  int frame_struct = atoi(argv[6]);
		  int speed = atoi(argv[7]);
		  int model = atoi(argv[8]);
		  int seed;
		  if (argc==14) seed = atoi(argv[13]);
		  else seed = -1;
		  MultiCellSinrPlot (nbCells, radius, nbUE, sched_type, frame_struct, speed, model, seed);
	    }
	  if (strcmp(argv[1], "testfme")==0)
	    {
		  TestUplinkFME ();
	    }

    }
}