⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ant.h

📁 蚁群算法用于求解课程表安排问题。在linux下面实现的
💻 H
字号:
/****************************************************************************                          Ant.h - description                             -------------begin                    : Thursday March 14 14:12:00 CET 2002copyright                : (C) 2002 by Max Manfrinemail                    : mmanfrin@ulb.ac.be****************************************************************************//**************************************************************************** *                                                                          * *   This program is free software; you can redistribute it and/or modify   * *   it under the terms of the GNU General Public License as published by   * *   the Free Software Foundation; either version 2 of the License, or      * *   (at your option) any later version.                                    * *                                                                          * ***************************************************************************/#ifndef ANT_H#define ANT_H#include "Solution.h"#include "Random.h"#include <limits.h>#include <math.h>#include <vector>extern Problem* problem;extern vector<int> ordered_events;extern Random* rnd;extern double Q0;extern double** pheromoneMatrix;extern double GAMMA;extern double BETA;class Ant{ public:    int current_event;  Solution* currentSolution;  vector<int> candidate_list; /* List of candidate timeslots, will exclude the ones with too many events inside */  double* tauij;  double* etaij;  double* piij;  double* roulette; /* Vector of elements pij */  int fitness;  int** student_eventsMatrix;  int** student_dayMatrix;  Ant();  ~Ant();  void solutionStep(const int step);  int chooseTimeslot(const int event);};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -