|
@@ -4,6 +4,7 @@ public class CpsEdge {
|
|
|
|
|
|
float maxCapacity;
|
|
|
float flow;
|
|
|
+ boolean isWorking;
|
|
|
|
|
|
CpsObject A;
|
|
|
CpsObject B;
|
|
@@ -14,6 +15,8 @@ public class CpsEdge {
|
|
|
this.A.AddConnection(this);
|
|
|
this.B.AddConnection(this);
|
|
|
this.maxCapacity = 100;
|
|
|
+ flow = 0;
|
|
|
+ isWorking = true;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -43,6 +46,9 @@ public class CpsEdge {
|
|
|
*/
|
|
|
public void setFlow(float flow) {
|
|
|
this.flow = flow;
|
|
|
+ if(flow > maxCapacity){
|
|
|
+ isWorking = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|