Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14605


Ignore:
Timestamp:
01/25/17 15:25:29 (7 years ago)
Author:
jkarder
Message:

#2205: worked on optimization networks

  • fixed vrp variegation in LrpOrchestratorNode1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.LocationRouting/3.3/LrpOrchestratorNode1.cs

    r14604 r14605  
    305305        var vrp = (VehicleRoutingProblem)VrpParameter.Value.Clone();
    306306        var vrpInstance = (CVRPProblemInstance)vrp.ProblemInstance;
    307         var coordinates = LrpUtils.GetVrpCoordinates(depotCoordinates, customerCoordinates, depot.Key, depot.ToArray());
     307        var coordinates = LrpUtils.GetVrpCoordinates(depotCoordinates, customerCoordinates, depot.Key, customers);
    308308        var distances = LrpUtils.GetVrpDistances(coordinates, distanceType);
    309309        vrpInstance.Coordinates = new DoubleMatrix(coordinates);
    310310        vrpInstance.DistanceMatrix = new DoubleMatrix(distances);
    311         vrpInstance.Demand = new DoubleArray(depot.Select(x => customerDemands[x]).ToArray());
     311        vrpInstance.Demand = new DoubleArray(new[] { 0.0 }.Concat(customers.Select(x => customerDemands[x])).ToArray());
    312312        vrpInstance.Vehicles.Value = customers.Length;
    313313
     
    315315        vrpMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(OrchestrationMessage.Prepare | OrchestrationMessage.Start);
    316316        vrpMsg["Problem"] = vrp;
    317         try {
    318           VrpSolverOrchestrationPort.SendMessage(vrpMsg);
    319         } catch { }
     317        VrpSolverOrchestrationPort.SendMessage(vrpMsg);
    320318        cts.Token.ThrowIfCancellationRequested();
    321319
Note: See TracChangeset for help on using the changeset viewer.