@Override public List<AjtColumnInfo<Pair<Demand,Link>>> getNonBasicUserDefinedColumnsVisibleOrNot() { final NetPlan np = callback.getDesign(); final NetworkLayer layer = this.getTableNetworkLayer(); final List<AjtColumnInfo<Pair<Demand,Link>>> res = new LinkedList<> (); res.add(new AjtColumnInfo<Pair<Demand,Link>>(this , Node.class, null , "Node", "The node where the forwading rule is placed: the origin node of the forwarding rule link", null , d->d.getSecond().getOriginNode() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Pair<Demand,Link>>(this , Demand.class, null , "Demand", "The demand associated to the forwarding rule", null , d->d.getFirst() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Pair<Demand,Link>>(this , Link.class, null , "Link", "The link associated to the forwarding rule", null , d->d.getSecond() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Pair<Demand,Link>>(this , Double.class, null , "Splitting ratio" , "The fraction of the traffic of the demand that reaches the link origin node, that is forwarded to the forwarding rule link", null , d->np.getForwardingRuleSplittingFactor(d.getFirst(), d.getSecond()) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Pair<Demand,Link>>(this , Double.class, null , "Carried traffic (" + layer.getDemandTrafficUnits() + ")" , "Traffic affected by this forwarding rule", null , d->np.getForwardingRuleCarriedTraffic(d.getFirst(), d.getSecond()) , AGTYPE.SUMDOUBLE , null)); return res; }
@Override public List<AjtColumnInfo<MulticastTree>> getNonBasicUserDefinedColumnsVisibleOrNot() { final List<AjtColumnInfo<MulticastTree>> res = new LinkedList<> (); res.add(new AjtColumnInfo<MulticastTree>(this , Node.class, null , "A", "Ingress node", null , d->d.getIngressNode() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , String.class, null , "Bs", "Egress nodes", null , d->d.getMulticastDemand().getEgressNodes().stream().map(n->n.getName().equals("")? "Node " + n.getIndex() : n.getName()).collect(Collectors.joining(",")) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , String.class, null , "Bs (reached)", "Reached egress nodes", null , d->d.getEgressNodesReached().stream().map(n->n.getName().equals("")? "Node " + n.getIndex() : n.getName()).collect(Collectors.joining(",")) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , Integer.class, null , "# Bs not reached", "Number of non-reached egress nodes", null , d->d.getMulticastDemand().getEgressNodes().size() - d.getEgressNodesReached().size() , AGTYPE.SUMINT , d-> d.getMulticastDemand().getEgressNodes().size() - d.getEgressNodesReached().size() > 0? Color.RED : null)); res.add(new AjtColumnInfo<MulticastTree>(this , MulticastDemand.class, null , "Demand", "Associated multicast demand", null , d->d.getMulticastDemand() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , Double.class, null , "Carried traffic (" + getTableNetworkLayer().getDemandTrafficUnits() + ")", "Carried traffic by the multicast tree", null , d->d.getCarriedTraffic() , AGTYPE.SUMDOUBLE , null)); res.add(new AjtColumnInfo<MulticastTree>(this , Double.class, null , "Occupied capacity (" + getTableNetworkLayer().getLinkCapacityUnits() + ")", "Occupied capacity in the traversed links", null, d->d.getOccupiedLinkCapacity() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , Collection.class, null , "Traversed links", "Traversed links in the non-failure state", null, d->d.getLinkSet() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , Double.class, null , "Total tree length (km)", "Sum of the lengths of all the tree links (accumulating any lower layer propagation lengths if any)", null, d->d.getTreeTotalLengthInKm() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , Double.class, null , "Worst e2e lat (ms)", "Current worst case end-to-end propagation time in miliseconds (accumulating any lower layer propagation times if any), from the origin node, to destination nodes reached", null, d->d.getTreeMaximumPropagationDelayInMs() , AGTYPE.NOAGGREGATION , d->{ final double m = d.getMulticastDemand().getMaximumAcceptableE2EWorstCaseLatencyInMs(); if (m >= 0) return null; return d.getTreeMaximumPropagationDelayInMs () > m? Color.RED : null; })); res.add(new AjtColumnInfo<MulticastTree>(this , Double.class, null , "Worst e2e length (km)", "Current worst case end-to-end propagation length in km (accumulating any lower layer propagation lengths if any)", null, d->d.getTreeMaximumPathLengthInKm() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<MulticastTree>(this , Double.class, null , "Worst e2e length (hops)", "Current worst case end-to-end propagation length in number of traversed links", null, d->d.getTreeMaximumPathLengthInHops() , AGTYPE.NOAGGREGATION , null)); return res; }
res.add(new AjtColumnInfo<Link>(this , Double.class, null , "Capacity (" + getTableNetworkLayer().getLinkCapacityUnits() + ")", "Link capacity", (d,val)->{ if (!d.isCoupled()) d.setCapacity((Double) val); }, d->d.getCapacity() , AGTYPE.SUMDOUBLE , e->e.getCapacity() == 0? Color.YELLOW : null)); res.add(new AjtColumnInfo<Link>(this , Double.class, null , "Occupied capacity (" + getTableNetworkLayer().getLinkCapacityUnits() + ")", "Link occupied capacity", null , d->d.getOccupiedCapacity() , AGTYPE.SUMDOUBLE , null)); res.add(new AjtColumnInfo<Link>(this , Double.class, null , "Carried traffic (" + getTableNetworkLayer().getDemandTrafficUnits() + ")", "Link carried traffic", null , d->d.getCarriedTraffic() , AGTYPE.SUMDOUBLE , null)); res.add(new AjtColumnInfo<Link>(this , Double.class, null , "Utilization", "Link utilization (occupied capacity vs. capacity)", null , d->d.getUtilization() , AGTYPE.NOAGGREGATION, e->{ final double v = e.getUtilization(); return v == 1? Color.YELLOW : (v > 1? Color.RED : null ); })); res.add(new AjtColumnInfo<Link>(this , Double.class, null , "Length (km)", "Link length in km, considering the worst case lower layer propagation", null , d->d.getLengthInKm() , AGTYPE.SUMDOUBLE, null));
@Override public List<AjtColumnInfo<NetworkLayer>> getNonBasicUserDefinedColumnsVisibleOrNot() { final List<AjtColumnInfo<NetworkLayer>> res = new LinkedList<> (); res.add(new AjtColumnInfo<NetworkLayer>(this , String.class, null , "Name", "Layer name", (d,val)->d.setName((String)val) , d->d.getName() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , String.class, null , "Description", "Layer description", (d,val)->d.setDescription((String)val) , d->d.getDescription() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , String.class, null , "Link capacity units", "Name of the capacity units of the links", (d,val)->d.getNetPlan().setLinkCapacityUnitsName((String)val, d) , d->d.getLinkCapacityUnits() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , String.class, null , "Demand traffic units", "Name of the traffic units of the demands", (d,val)->d.getNetPlan().setDemandTrafficUnitsName((String)val, d) , d->d.getDemandTrafficUnits() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , Integer.class, null , "# links", "Number of links", null , d->d.getNetPlan().getNumberOfLinks(d) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , Integer.class, null , "# demands", "Number of demands", null , d->d.getNetPlan().getNumberOfDemands(d) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , Integer.class, null , "# multicast demands", "Number of multicast demands", null , d->d.getNetPlan().getNumberOfMulticastDemands(d) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , Integer.class, null , "# routes", "Number of routes", null , d->d.getNetPlan().getNumberOfRoutes(d) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , Integer.class, null , "# forw. rules", "Number of forwarding rules", null , d->d.getNetPlan().getNumberOfForwardingRules(d) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<NetworkLayer>(this , Integer.class, null , "# multicast trees", "Number of multicast trees", null , d->d.getNetPlan().getNumberOfMulticastTrees(d) , AGTYPE.NOAGGREGATION , null)); return res; }
res.add(new AjtColumnInfo<Node>(this , Collection.class, null , "In links", "The incoming links of the node", null , d->d.getIncomingLinks(layer) , AGTYPE.SUMCOLLECTIONCOUNT , null)); res.add(new AjtColumnInfo<Node>(this , Double.class, null , "Out capacity (" + layer.getLinkCapacityUnits() + ")", "The sum of the capacity of the outgoing links", null , d->d.getOutgoingLinksCapacity(layer) , AGTYPE.SUMDOUBLE , null)); res.add(new AjtColumnInfo<Node>(this , Double.class, null , "Out traffic (" + layer.getDemandTrafficUnits() + ")", "The sum of the traffic carried in the outgoing links", null , d->d.getOutgoingLinksTraffic(layer) , AGTYPE.SUMDOUBLE , null)); res.add(new AjtColumnInfo<Node>(this , Double.class, null , "In capacity (" + layer.getLinkCapacityUnits() + ")", "The sum of the capacity of the incoming links", null , d->d.getIncomingLinksCapacity(layer) , AGTYPE.SUMDOUBLE, null)); res.add(new AjtColumnInfo<Node>(this , Double.class, null , "In traffic (" + layer.getDemandTrafficUnits() + ")", "The sum of the traffic carried in the incoming links", null , d->d.getIncomingLinksTraffic(layer) , AGTYPE.SUMDOUBLE , null)); return res;
@Override public List<AjtColumnInfo<Route>> getNonBasicUserDefinedColumnsVisibleOrNot() { final NetPlan np = callback.getDesign(); final NetworkLayer layer = this.getTableNetworkLayer(); final List<AjtColumnInfo<Route>> res = new LinkedList<> (); res.add(new AjtColumnInfo<Route>(this , Demand.class, null , "Demand", "Associated demand", null , d->d.getDemand() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Node.class, null , "A", "Ingress node", null , d->d.getIngressNode() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Node.class, null , "B", "Egress node", null , d->d.getEgressNode() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Boolean.class, null , "Is up?", "The route is considered up if it is not traversing failed links or nodes", null , d->!d.isDown() , AGTYPE.COUNTTRUE, r->r.getCarriedTrafficInNoFailureState() > 0 && r.isDown()? Color.RED : null)); res.add(new AjtColumnInfo<Route>(this , Boolean.class, null , "Trav. 0-cap links?", "Indicates if the route is traversing links with zero capacity", null , d->!d.isTraversingZeroCapLinks() , AGTYPE.COUNTTRUE, r->r.getCarriedTrafficInNoFailureState() > 0 && r.isTraversingZeroCapLinks()? Color.RED : null)); res.add(new AjtColumnInfo<Route>(this , Demand.class, null , "Bidirectional pair", "If the route is bidirectional, provides its bidirectional pair", null , d->d.getBidirectionalPair() , AGTYPE.NOAGGREGATION, null)); res.add(new AjtColumnInfo<Route>(this , Collection.class, null , "Main routes", "If this is a backup route, shows the routes I am backing up", null , d->d.getRoutesIAmBackup(), AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Collection.class, null , "Backup routes", "If this is a main route, shows the its back up routes", null , d->d.getBackupRoutes(), AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Double.class, null , "Carried traffic (" + layer.getDemandTrafficUnits() + ")", "Carried traffic by the route", (d,val)->d.setCarriedTraffic((Double) val , null), d->d.getCarriedTraffic() , AGTYPE.SUMDOUBLE , null)); res.add(new AjtColumnInfo<Route>(this , Double.class, null , "Occupied capacity (" + layer.getLinkCapacityUnits() + ")", "Occupied capacity in the traversed links. If the occupied capacity is different in different links, no information is shown", null , d->d.isOccupyingDifferentCapacitiesInDifferentLinksInNoFailureState()? "--" : d.getSeqOccupiedCapacitiesIfNotFailing().get(0) , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Collection.class, null , "# links", "Number of traversed links", null , d->d.getSeqLinks() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Collection.class, null , "# resources", "Number of traversed resources", null , d->d.getSeqResourcesTraversed() , AGTYPE.NOAGGREGATION , null)); res.add(new AjtColumnInfo<Route>(this , Double.class, null , "Length (km)", "Length of the route, considering also the length of the lower layer links traversed if any", null , d->d.getLengthInKm() , AGTYPE.MAXDOUBLE , null)); res.add(new AjtColumnInfo<Route>(this , Double.class, null , "E2e latency (ms)", "End-to-end latency considering links and resources traversed, and propagation time in lower layer links if any", null , d->d.getPropagationDelayInMiliseconds() , AGTYPE.MAXDOUBLE , d->{ final double m = d.getDemand().getMaximumAcceptableE2EWorstCaseLatencyInMs(); if (m >= 0) return null; return d.getPropagationDelayInMiliseconds () > m? Color.RED : null; })); return res; }
InputForDialog.inputTfInt("Number of samples", "Introduce the number of monitoring samples to create", 10, 7*24), InputForDialog.inputCheckBox(isLinkTable? "Use current carried traffic as initial traffic?" : "Use current offered traffic as initial traffic?", "If selected, the current traffic value is used as initial traffic", true , null), InputForDialog.inputTfDouble("Starting traffic", "Introduce the initial traffic (in demand traffic units: '" + table.getTableNetworkLayer().getDemandTrafficUnits() + "')", 10, 1.0), InputForDialog.inputTfCombo("Growth type", "The growth traffic type. Exponential means that traffic at year T+1 is GF times the traffic at year T, where GF is the growth factor. If linear, traffic at year T+1 is the traffic at T plus GF", 20 , TrafficSeries.FITTINGTYPE.LINEAR , Arrays.asList(TrafficSeries.FITTINGTYPE.values()) , Arrays.asList(TrafficSeries.FITTINGTYPE.values()).stream().map(ee->ee.getName ()).collect (Collectors.toList()) , null), InputForDialog.inputTfDouble("Growth factor (per year)", "If exponential growth, this is the compound annual growth rate (CAGR) (adimensional value), if linear growth, this is the traffic growth per year in traffic units" + table.getTableNetworkLayer().getDemandTrafficUnits() + "')", 10, 1.0), InputForDialog.inputTfDouble("Noise coefficient of variation", "A normal traffic noise centered in 0 and typical deviation given by this value multiplied by the current traffic, is added to the estimation. Note that negative traffics are later truncated to zero", 10, 1.0), InputForDialog.inputCheckBox("Remove previous monitoring values?", "If selected, the current monitored values are removed", true , null)
Arrays.asList( InputForDialog.inputTfString("Introducce the GMT date (format yyyy-MM-dd HH:mm:ss)", "Introduce the GMT date in the indicated format", 10, dateFormatGmt.format(new Date ())), InputForDialog.inputTfDouble("Traffic (" + table.getTableNetworkLayer().getDemandTrafficUnits() + ")", "Introduce the traffic in the indicated units", 10, 0.0), InputForDialog.inputCheckBox("Use element current traffic?", "If selected, the current element traffic value is used, instead of the traffic amount indicated by the user", true , null) ),
"", this, Arrays.asList(InputForDialog.inputTfDouble("Offered traffic (" + getTableNetworkLayer().getDemandTrafficUnits() + ")", "Introduce the offered traffic", 10, 0.0)), (list)->
"", this, Arrays.asList(InputForDialog.inputTfDouble("Offered traffic (" + getTableNetworkLayer().getDemandTrafficUnits() + ")", "Introduce the offered traffic", 10, 0.0)), (list)->