problem.h

来自「随机需求VRP(VRPSD)」· C头文件 代码 · 共 40 行

H
40
字号
#ifndef PROBLEM_H
#define PROBLEM_H

#include "Control.h"
#include <vector>
#include <fstream>


class PossibleDemand {
public:
  int     demand_;
  double  probability_;
};

///The Problem class. 
class Problem {
public:
  ///Includes the depot.
  int numberOfCustomers;

  ///Vehicle capacity.
  int capacity;          

  ///DistanceMatrix[i][j] is the euclidean distance between customer i and custumer j.
  vector<vector<double> > distanceMatrix; 

  ///Table with customer demands and demand probabilities.
  ///Line i of the table is associated to customer whose name is "i".  
  vector<vector<PossibleDemand> >  customerDemand;

  ///Constructor of Problem. The argument is used for accessing input instance file
  ///and for overriding the input file capacity if a capacity value is given from
  ///the command line. 
  Problem( Control& );
};



#endif

⌨️ 快捷键说明

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