Ejemplo n.º 1
0
 public GenerateBestTrip(ObservableCollection <Require> requiers, Truck trck)
 {
     FromCentersTrips = new ObservableCollection <ToCenterSlotsCountingInfo>();
     Slots            = new ObservableCollection <TruckSlot>();
     controller       = new RepositoryController();
     Requiers         = requiers;
     truck            = trck;
     //Execute
     GenerateSlots();
     GenerateTripInfo(trck);
     result = GetTheBetterTrip();
 }
Ejemplo n.º 2
0
        public ToCenterSlotsCountingInfo GetTheBetterTrip()
        {
            ToCenterSlotsCountingInfo thebest = FromCentersTrips[0];

            foreach (ToCenterSlotsCountingInfo info in FromCentersTrips)
            {
                if (thebest.cost < info.cost)
                {
                    thebest = info;
                }
            }
            return(thebest);
        }