|
@@ -16,6 +16,7 @@ import javax.swing.JButton;
|
|
|
import javax.swing.border.EmptyBorder;
|
|
|
|
|
|
import classes.CpsEdge;
|
|
|
+import classes.SubNet;
|
|
|
import ui.controller.Control;
|
|
|
|
|
|
import java.awt.event.ActionListener;
|
|
@@ -192,9 +193,18 @@ public class EditEdgesPopUp extends JDialog {
|
|
|
* the Capacity
|
|
|
*/
|
|
|
public void changeForExisting(float cap) {
|
|
|
- for (CpsEdge edge : controller.getModel().getEdgesOnCanvas()) {
|
|
|
+ for(SubNet sn: controller.getSimManager().getSubNets()){
|
|
|
+ for(CpsEdge edge: sn.getEdges()){
|
|
|
+ edge.setCapacity(cap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(CpsEdge edge: controller.getSimManager().getBrokenEdges()){
|
|
|
edge.setCapacity(cap);
|
|
|
}
|
|
|
+ /*
|
|
|
+ for (CpsEdge edge : controller.getModel().getEdgesOnCanvas()) {
|
|
|
+ edge.setCapacity(cap);
|
|
|
+ }*/
|
|
|
controller.calculateStateForCurrentTimeStep();
|
|
|
canvas.repaint();
|
|
|
}
|