public bool IsBetter(GraphEnvironment other) { if (other == null) { return(false); } var fValue = this.AccumulatedProfit; var sValue = other.AccumulatedProfit; return(fValue > sValue); }
public GraphEnvironment Clone() { var result = new GraphEnvironment(); result.AccumulatedProfit = this.AccumulatedProfit; result.MinimumDemand = this.MinimumDemand; result.Graph = this.Graph.Clone(); var auxTrucks = new List <Truck>(); foreach (var truck in this.Trucks) { auxTrucks.Add(truck.Clone()); } result.Trucks = auxTrucks; return(result); }