public class CpsEdge
extends java.lang.Object
Constructor and Description |
---|
CpsEdge(AbstractCpsObject a,
AbstractCpsObject b)
Constructor without max. capacity (by default as 100)
|
CpsEdge(AbstractCpsObject a,
AbstractCpsObject b,
float maxCap)
Constructor with a user-defined max. capacity
|
Modifier and Type | Method and Description |
---|---|
void |
addTag(int tag)
Add a new tag to the ArrayList.
|
void |
calculateState(boolean simMode)
Calculates the state of the edge (see description of isWorking).
|
AbstractCpsObject |
getA()
Getter for the Source.
|
AbstractCpsObject |
getB()
Getter for the destination.
|
float |
getCapacity()
Getter for the max. capacity
|
float |
getFlow()
Getter fot the current flow.
|
boolean |
getState()
Getter for the status.
|
java.util.ArrayList<java.lang.Integer> |
getTags()
Getter for the ArrayList of tags.
|
void |
setA(AbstractCpsObject a)
Set the Source to a new one.
|
void |
setB(AbstractCpsObject b)
Set the Destination to a new one.
|
void |
setCapacity(float cap)
Setter for the max. capacity
|
void |
setFlow(float flow)
Set the flow into a new one.
|
void |
setState(boolean state)
Set the state manually to a new one.
|
void |
setTags(java.util.ArrayList<java.lang.Integer> tags)
set the tags into a new set of tags.
|
public CpsEdge(AbstractCpsObject a, AbstractCpsObject b)
a
- Sourceb
- Destinationpublic CpsEdge(AbstractCpsObject a, AbstractCpsObject b, float maxCap)
a
- Sourceb
- DestinationmaxCap
- Maximum Capacitypublic float getCapacity()
public void setCapacity(float cap)
cap
- the Capacity to setpublic float getFlow()
public void setFlow(float flow)
flow
- the flow to setpublic void calculateState(boolean simMode)
simMode
- Simulation Modepublic AbstractCpsObject getA()
public void setA(AbstractCpsObject a)
a
- the a to setpublic AbstractCpsObject getB()
public void setB(AbstractCpsObject b)
b
- the b to setpublic void setState(boolean state)
state
- the statepublic boolean getState()
public void setTags(java.util.ArrayList<java.lang.Integer> tags)
tags
- tags for this edgepublic java.util.ArrayList<java.lang.Integer> getTags()
public void addTag(int tag)
tag
- tag for the ArrayList