Esempio n. 1
0
 public DeliveryByCar(IEndpointVertex from, IEndpointVertex to, double weight)
 {
     this.Id     = Guid.NewGuid().ToString("D");
     this.Label  = "cardelivers";
     this.InV    = to;
     this.OutV   = from;
     this.weight = weight;
     if (!from.OutE.Contains(this))
     {
         from.OutE.Add(this);
     }
     if (!to.InE.Contains(this))
     {
         to.InE.Add(this);
     }
 }
Esempio n. 2
0
 public DeliveryByTrain(IEndpointVertex from, IEndpointVertex to, double weight, string trainId)
 {
     this.Id      = Guid.NewGuid().ToString("D");
     this.Label   = "traindelivers";
     this.InV     = to;
     this.OutV    = from;
     this.weight  = weight;
     this.trainId = trainId;
     if (!from.OutE.Contains(this))
     {
         from.OutE.Add(this);
     }
     if (!to.InE.Contains(this))
     {
         to.InE.Add(this);
     }
 }