Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/07/17 10:43:13 (7 years ago)
Author:
jkarder
Message:

#2205: worked on optimization networks

  • added lrp network 3
  • fixed bug in distance calculation
  • renamed FLP.mod to FLP_1.mod
  • activated cma analyzer per default
File:
1 edited

Legend:

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

    r14628 r14649  
    9797        var vrp = (VehicleRoutingProblem)VrpParameter.Value.Clone();
    9898        var vrpInstance = (CVRPProblemInstance)vrp.ProblemInstance;
    99         var coordinates = LrpUtils.GetVrpCoordinates(depotCoordinates, customerCoordinates, depotIdx, customers);
     99        var coordinates = LrpUtils.GetVrpCoordinates(depotCoordinates, customerCoordinates, new[] { depotIdx }, customers);
    100100        var distances = LrpUtils.GetVrpDistances(coordinates, distanceType);
    101101        vrpInstance.Coordinates = new DoubleMatrix(coordinates);
     
    111111
    112112        var vrpResults = (ResultCollection)vrpMsg["Results"];
    113         var bestVrpSolution = (VRPSolution)vrpResults["Best valid VRP Solution"].Value.Clone();
     113        IResult bestVrpSolutionResult;
     114        if (!vrpResults.TryGetValue("Best valid VRP Solution", out bestVrpSolutionResult)
     115         && !vrpResults.TryGetValue("Best VRP Solution", out bestVrpSolutionResult)) {
     116          // no best solution found ... throw?
     117        }
     118        var bestVrpSolution = (VRPSolution)bestVrpSolutionResult.Value.Clone();
    114119        vrpSolutions.Add(new Result("Depot " + depot.Key, bestVrpSolution));
    115120      }
Note: See TracChangeset for help on using the changeset viewer.