Changeset 8791
- Timestamp:
- 10/11/12 13:40:54 (12 years ago)
- Location:
- branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/OrderGenerators/PickupDeliveryPredefinedOrderGenerator.cs
r8670 r8791 130 130 for (int i = 0; i < orderMatrix.Rows; i++) { 131 131 double revealedTime = orderMatrix[i, 0]; 132 if ( revealedTime >= timeStart && revealedTime < timeEnd) {132 if ((timeStart == timeEnd && revealedTime == timeStart) || (revealedTime >= timeStart && revealedTime < timeEnd)) { 133 133 Order order = new Order(); 134 134 order.OrderState = OrderState.Waiting; -
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/PickupDeliverySimulation.cs
r8779 r8791 426 426 simulationObject = new SimulationObject(); 427 427 lastResultCollection = 0; 428 newSimulationTime = TimeStep;428 newSimulationTime = 0; 429 429 430 430 //create vehicles … … 473 473 Thread.Sleep(InitialDelayParameter.Value.Value); 474 474 } 475 476 Step(); 475 477 } 476 478 } … … 562 564 } 563 565 566 private void Step() { 567 //next step 568 SimulationTime = newSimulationTime; 569 newSimulationTime = SimulationTime + TimeStep; 570 } 571 564 572 protected override void Run(CancellationToken cancellationToken) { 565 573 InitSimulation(); 566 574 567 while (!AllOrdersDelivered() || Scenario.MoreOrders( newSimulationTime) || (Scenario.RelocateBackToDepot && !AllVehiclesAtDepot())) {575 while (!AllOrdersDelivered() || Scenario.MoreOrders(SimulationTime) || (Scenario.RelocateBackToDepot && !AllVehiclesAtDepot())) { 568 576 //perform actions 569 577 UpdateSimulationState(); 570 571 //next step572 SimulationTime = newSimulationTime;573 newSimulationTime = SimulationTime + TimeStep;574 575 578 UpdateOrders(); 576 579 UpdateResults(false); 580 581 Step(); 577 582 578 583 if (OptimizationRequired()) {
Note: See TracChangeset
for help on using the changeset viewer.