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); } }
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); } }