// Path: heuristicsearch/src/main/java/xyz/thepathfinder/routing/domain/RoutingSolution.java
// @PlanningSolution
// public class RoutingSolution implements Solution<HardSoftLongScore> {
// 
//     HardSoftLongScore score;
//     List<Transport> transportList;
//     List<CommodityAction> commodityActionList;
// 
//     @Override
//     public HardSoftLongScore getScore() {
//         return score;
//     }
// 
//     @Override
//     public void setScore(HardSoftLongScore score) {
//         this.score = score;
//     }
// 
//     @Override
//     public Collection<? extends RouteAction> getProblemFacts() {
//         List<RouteAction> routeActions = new ArrayList<>();
//         routeActions.addAll(transportList);
//         routeActions.addAll(commodityActionList);
//         return routeActions;
//     }
// 
//     @PlanningEntityCollectionProperty
//     @ValueRangeProvider(id = "transportRange")
//     public List<Transport> getTransportList() {
//         return transportList;
//     }
// 
//     public void setTransportList(List<Transport> transports) {
//         transportList = transports;
//     }
// 
//     @PlanningEntityCollectionProperty
//     @ValueRangeProvider(id = "commodityActionRange")
//     public List<CommodityAction> getCommodityActionList() {
//         return commodityActionList;
//     }
// 
//     public void setCommodityActionList(List<CommodityAction> commodityActions) {
//         commodityActionList = commodityActions;
//     }
// }
// 
// Path: simulatedannealing/src/main/java/xyz/thepathfinder/routing/domain/Transport.java
// public class Transport implements CommodityStart {
//     final String name;
// 
//     public Transport(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
//     @Override
//     public String toString() {
//         return getName();
//     }
// }


import java.util.List;
import xyz.thepathfinder.routing.domain.RoutingSolution;
import xyz.thepathfinder.routing.domain.Transport;
import static java.util.stream.Collectors.toList;
package xyz.thepathfinder.routing.service;




public class ProblemSolution {
    private List<List<Integer>> routes;

    public ProblemSolution() { }

    public static ProblemSolution create(RoutingSolution solution) {
        return new ProblemSolution(solution.getTransportList().stream()
// Path: heuristicsearch/src/main/java/xyz/thepathfinder/routing/domain/RoutingSolution.java
// @PlanningSolution
// public class RoutingSolution implements Solution<HardSoftLongScore> {
// 
//     HardSoftLongScore score;
//     List<Transport> transportList;
//     List<CommodityAction> commodityActionList;
// 
//     @Override
//     public HardSoftLongScore getScore() {
//         return score;
//     }
// 
//     @Override
//     public void setScore(HardSoftLongScore score) {
//         this.score = score;
//     }
// 
//     @Override
//     public Collection<? extends RouteAction> getProblemFacts() {
//         List<RouteAction> routeActions = new ArrayList<>();
//         routeActions.addAll(transportList);
//         routeActions.addAll(commodityActionList);
//         return routeActions;
//     }
// 
//     @PlanningEntityCollectionProperty
//     @ValueRangeProvider(id = "transportRange")
//     public List<Transport> getTransportList() {
//         return transportList;
//     }
// 
//     public void setTransportList(List<Transport> transports) {
//         transportList = transports;
//     }
// 
//     @PlanningEntityCollectionProperty
//     @ValueRangeProvider(id = "commodityActionRange")
//     public List<CommodityAction> getCommodityActionList() {
//         return commodityActionList;
//     }
// 
//     public void setCommodityActionList(List<CommodityAction> commodityActions) {
//         commodityActionList = commodityActions;
//     }
// }
// 
// Path: simulatedannealing/src/main/java/xyz/thepathfinder/routing/domain/Transport.java
// public class Transport implements CommodityStart {
//     final String name;
// 
//     public Transport(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
//     @Override
//     public String toString() {
//         return getName();
//     }
// }


// Path: heuristicsearch/src/main/java/xyz/thepathfinder/routing/service/ProblemSolution.java
import java.util.List;
import xyz.thepathfinder.routing.domain.RoutingSolution;
import xyz.thepathfinder.routing.domain.Transport;
import static java.util.stream.Collectors.toList;

package xyz.thepathfinder.routing.service;




public class ProblemSolution {
    private List<List<Integer>> routes;

    public ProblemSolution() { }

    public static ProblemSolution create(RoutingSolution solution) {
        return new ProblemSolution(solution.getTransportList().stream()
                .map(Transport::getPathfinderRoute).collect(toList()));