#region License Information
/* HeuristicLab
* Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
*
* This file is part of HeuristicLab.
*
* HeuristicLab 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 3 of the License, or
* (at your option) any later version.
*
* HeuristicLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HeuristicLab. If not, see .
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace HeuristicLab.PDPSimulation {
abstract class DynPDPParser {
public struct Vehicle {
public double xCoord;
public double yCoord;
public double capacity;
public double readyTime;
public double dueTime;
}
public struct Order {
public double revealedTime;
public double pickupXCoord;
public double pickupYCoord;
public double deliveryXCoord;
public double deliveryYCoord;
public double demand;
public double pickupServiceTime;
public double pickupReadyTime;
public double pickupDueTime;
public double deliveryServiceTime;
public double deliveryReadyTime;
public double deliveryDueTime;
}
public struct DistanceMatrixInformation {
public bool useDistanceMatrix;
public int[,] coordinates;
public double[,] matrix;
}
protected string file;
protected string problemName;
protected List vehicles;
protected List orders;
protected DistanceMatrixInformation distanceMatrix;
public string ProblemName {
get {
return new string(problemName.ToCharArray());
}
}
public Vehicle[] Vehicles {
get {
return vehicles.ToArray();
}
}
public Order[] Orders {
get {
return orders.ToArray();
}
}
public DistanceMatrixInformation DistanceMatrix {
get {
return distanceMatrix;
}
}
public DynPDPParser(string file) {
this.file = file;
vehicles = new List();
orders = new List();
distanceMatrix = new DistanceMatrixInformation();
distanceMatrix.useDistanceMatrix = false;
distanceMatrix.coordinates = null;
distanceMatrix.matrix = null;
}
public abstract void Parse();
}
}