コード例 #1
0
ファイル: Warehouse.cs プロジェクト: nlhurst/ShippingManager
 public bool addRoute(Route r)
 {
     if (routes.Contains(r))
         return false;
     routes.Add(r);
     return true;
 }
コード例 #2
0
        public Moveable(int volumeCapacity, int weightCapacity, Route route)
        {
            packages = new List<Package>();

            VolumeCapacity = volumeCapacity;
            WeightCapacity = weightCapacity;
            CurrentRoute = route;
        }
コード例 #3
0
ファイル: Moveable.cs プロジェクト: nlhurst/ShippingManager
 public void removeRoute(Route rou)
 {
     if (route.Equals(rou))
         route = null;
 }
コード例 #4
0
ファイル: Moveable.cs プロジェクト: nlhurst/ShippingManager
 public bool assignRoute(Route rou)
 {
     if (Routeless)
     {
         route = rou;
         return true;
     }
     return false;
 }
コード例 #5
0
 public DeliveryVehicle(int volumeCapacity, int weightCapacity, Route route)
     : base(volumeCapacity,weightCapacity,route)
 {
 }
コード例 #6
0
ファイル: Warehouse.cs プロジェクト: nlhurst/ShippingManager
 public void removeRoute(Route r)
 {
     routes.Remove(r);
 }
コード例 #7
0
        private float[,] weightedAdjacency(Location[] locations, Route[] routes)
        {
            float[,] temp = new float[locations.Length, locations.Length];

            for (int i = 0; i < locations.Length; ++i)
                for (int j = 0; j < locations.Length; ++j)
                    temp[i, j] = float.PositiveInfinity;

            for (int i = 0; i < locations.Length - 1; ++i)
                for (int j = i + 1; j < locations.Length; ++j)
                    for (int m = 0; m < routes.Length; ++m)
                        if ((routes[m].Locations[0].Equals(locations[i]) && routes[m].Locations[1].Equals(locations[j])) || (routes[m].Locations[1].Equals(locations[i]) && routes[m].Locations[0].Equals(locations[j])))
                            temp[j, i] = temp[i, j] = routes[m].DurationInDays;
            return temp;
        }
コード例 #8
0
 public bool addRoute(String id, float duration, Location one, Location two, Moveable move)
 {
     Route r = new Route(id, duration, one, two, move);
     if (routes.Contains(r))
         return false;
     move.assignRoute(r);
     routes.Add(r);
     move.changeLocation();
     foreach (Location rLocation in r.Locations)
     {
         if (rLocation is StoreFront)
             (rLocation as StoreFront).addRoute(r);
         else if (rLocation is Warehouse)
             (rLocation as Warehouse).addRoute(r);
     }
     return true;
 }
コード例 #9
0
 public bool addDeliveryEmployee(string firstName, string middleName, string lastName, string id, string plainTextPassword, Route r)
 {
     DeliveryEmployee a = new DeliveryEmployee(firstName, middleName, lastName, id, plainTextPassword);
     a.CurrentRoute = r;
     return addEmployee(a);
 }
コード例 #10
0
ファイル: Transport.cs プロジェクト: nlhurst/ShippingManager
 public Transport(string id, TRANSPORT_TYPES transportType, int volumeCapacity, int weightCapacity, bool tempControlled, Route route)
     : base(id, volumeCapacity,weightCapacity,route)
 {
     TransportType = transportType;
     TempControlled = tempControlled;
 }
コード例 #11
0
 public Transport(int transportType, int weightCapacity, int volumeCapacity, bool tempControlled, Route route)
     : base(volumeCapacity,weightCapacity,route)
 {
     TransportType = transportType;
     TempControlled = tempControlled;
 }
コード例 #12
0
        private void routeEditButton_Click(object sender, EventArgs e)
        {
            addRoute = false;
            routeAddButton.Text = SAVE;
            currentRoute = routesListBox.SelectedItem as Route;

            routeIdTextBox.Text = currentRoute.Id;
            routeDurationTextBox.Text = currentRoute.DurationInDays + "";

            routeUsingListBox.Items.Clear();
            routeUsingListBox.Items.AddRange(shippingSystem.RoutelessMoveable);
            routeUsingListBox.Items.Insert(0, currentRoute.CurrentMoveable);
            routeUsingListBox.SelectedIndex = 0;
            routeLocationOneListBox.SelectedIndex = shippingSystem.indexOf(currentRoute.Locations[0]);
            routeLocationTwoListBox.SelectedIndex = shippingSystem.indexOf(currentRoute.Locations[1]);
        }
コード例 #13
0
ファイル: Package.cs プロジェクト: scrounge74/ShippingManager
 private void addSnapshot(Snapshot snapshot, Route currentRoute)
 {
     //TODO
 }
コード例 #14
0
 public Snapshot(Route route)
 {
 }