public static ZenoTravelProblem loadFromSAS(Problem zenoTravelProblemInSAS) { ZenoTravelProblem res = new ZenoTravelProblem(); res.load(zenoTravelProblemInSAS); res.preprocess(); return(res); }
public override int solve(ZenoTravelProblem problem) { this.genomeLength = problem.nonBordedPersonsIDs.Count; this.geneMinVal = problem.planesByIDs.Keys.Min(); this.geneMaxVal = problem.planesByIDs.Keys.Max(); this.problem = problem; var result = new int[0]; if (problem.nonBordedPersonsIDs.Count > 0) { result = doLocalSearch(); } var value = eval(result, returnPlan: true); //var value1 = eval(new int[] { 2, 2, 2 } , returnPlan: true); this.PDDL_plan = value.Item2; return(value.Item1); }
/// <summary> /// Returns length of a plan that solves the given problem. /// </summary> /// <param name=""></param> /// <returns></returns> public abstract int solve(ZenoTravelProblem problem);
public void showTravelGraph(ZenoTravelProblem problem, List <Person> onlyThesePersons = null) { singleSolver.showDeliveryGraph((onlyThesePersons == null ? problem.personsByIDs.Values.ToList() : onlyThesePersons), problem.planesByIDs.Values.First()); }
public void setProblem(ZenoTravelProblem problem) { this.problem = problem; }
protected override void init() { this.p = ZenoTravelProblem.loadFromSAS(this.sasProblem); }