Changeset 4315 for branches/VRP/HeuristicLab.Problems.VehicleRouting
- Timestamp:
- 08/25/10 13:50:51 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj
r4301 r4315 179 179 <Compile Include="Encodings\Zhu\ZhuEncoding.cs" /> 180 180 <Compile Include="Interfaces\IVRPMoveMaker.cs" /> 181 <Compile Include="ORLIBParser.cs" /> 181 182 <Compile Include="TSPLIBParser.cs" /> 182 183 <Compile Include="VRPUtilities.cs" /> -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs
r4301 r4315 483 483 } 484 484 485 public void ImportFromORLib(string orFileName) { 486 ORLIBParser parser = new ORLIBParser(orFileName); 487 parser.Parse(); 488 489 this.Name = parser.Name; 490 int problemSize = parser.Demands.Length; 491 492 Coordinates = new DoubleMatrix(parser.Vertices); 493 Vehicles.Value = problemSize - 1; 494 Capacity.Value = parser.Capacity; 495 Demand = new DoubleArray(parser.Demands); 496 ReadyTime = new DoubleArray(problemSize); 497 DueTime = new DoubleArray(problemSize); 498 ServiceTime = new DoubleArray(problemSize); 499 500 ReadyTime[0] = 0; 501 DueTime[0] = parser.MaxRouteTime; 502 ServiceTime[0] = 0; 503 504 for (int i = 1; i < problemSize; i++) { 505 ReadyTime[i] = 0; 506 DueTime[i] = int.MaxValue; 507 ServiceTime[i] = parser.ServiceTime; 508 } 509 510 OnReset(); 511 } 512 485 513 private void InitializeRandomVRPInstance() { 486 514 System.Random rand = new System.Random();
Note: See TracChangeset
for help on using the changeset viewer.