Changeset 8807 for branches/DynamicVehicleRouting
- Timestamp:
- 10/15/12 13:35:33 (12 years ago)
- Location:
- branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Optimizers/DynamicPDPOptimization.cs
r8670 r8807 229 229 protected virtual void EndOptimization() { 230 230 SignalWaitHandle(); 231 running = false; 231 232 } 232 233 … … 340 341 RelocateVehicles(simulationTime + GetTimeStep(), finish); 341 342 342 if (finish) 343 running = false; 344 else 343 if (!finish) 345 344 SignalWaitHandle(); 346 345 } -
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/PickupDeliveryOptimization.cs
r8779 r8807 337 337 InitWaitHandle(synchronized); 338 338 339 EventWaitHandle wh = new EventWaitHandle(false, EventResetMode.ManualReset);340 341 cts = new CancellationTokenSource();342 optThread = new Thread(delegate() {343 wh.Set();344 Optimize(cts.Token);345 });346 optThread.IsBackground = true;347 optThread.Start(); 348 349 wh.WaitOne();339 using (EventWaitHandle wh = new EventWaitHandle(false, EventResetMode.ManualReset)) { 340 cts = new CancellationTokenSource(); 341 optThread = new Thread(delegate() { 342 wh.Set(); 343 Optimize(cts.Token); 344 }); 345 optThread.IsBackground = true; 346 optThread.Start(); 347 348 wh.WaitOne(); 349 } 350 350 } 351 351
Note: See TracChangeset
for help on using the changeset viewer.