public static Ns3.LaneRate make_lane_rate_distance(string src, string dest, float costperkm) { var lr = new Ns3.LaneRate { Id = ("lr:" + src + "->" + dest), Source = src, Destination = dest, unitDimensionCosts = { make_udc("distance", 1.0f, costperkm) } }; return(lr); }
public static Ns3.LaneRate make_lane_rate_distance_weight(string src, string dest, float costperkm, string weightdim, float costperunit) { var lr = new Ns3.LaneRate { Id = ("lr:" + src + "->" + dest), Source = src, Destination = dest, unitDimensionCosts = { make_udc(weightdim, 1.0f, costperunit) } }; if (costperkm != 0.0f) { lr.unitDimensionCosts.Add(make_udc("distance", 1.0f, costperkm)); } return(lr); }