Package org.optaplanner.examples.tsp.domain

Examples of org.optaplanner.examples.tsp.domain.Visit


            public void doChange(ScoreDirector scoreDirector) {
                TravelingSalesmanTour solution = (TravelingSalesmanTour) scoreDirector.getWorkingSolution();
                scoreDirector.beforeProblemFactAdded(newLocation);
                solution.getLocationList().add(newLocation);
                scoreDirector.afterProblemFactAdded(newLocation);
                Visit newVisit = new Visit();
                newVisit.setId(newLocation.getId());
                newVisit.setLocation(newLocation);
                scoreDirector.beforeEntityAdded(newVisit);
                solution.getVisitList().add(newVisit);
                scoreDirector.afterEntityAdded(newVisit);
            }
        });
View Full Code Here


                    Domicile domicile = new Domicile();
                    domicile.setId(location.getId());
                    domicile.setLocation(location);
                    travelingSalesmanTour.setDomicile(domicile);
                } else {
                    Visit visit = new Visit();
                    visit.setId(location.getId());
                    visit.setLocation(location);
                    // Notice that we leave the PlanningVariable properties on null
                    visitList.add(visit);
                }
                count++;
            }
View Full Code Here

TOP

Related Classes of org.optaplanner.examples.tsp.domain.Visit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.