|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.util.Node
public class Node
The Node class allows nodes to be created. It is a data structure for model elements and is designed to be extensible.
Field Summary | |
---|---|
java.lang.String |
alpha
Scale parameter (e.g., mean) |
static int |
ANDJOIN
|
static java.awt.Color |
BACK_COLOR
Color scheme for JSIM (easy to change) May also need to adjust colors for entities (see SimObject) |
java.lang.String |
beta
Shape parameter (e.g., variance) |
java.awt.Color |
color
Color of node |
java.lang.String |
costAlpha
Scale parameter for cost |
java.lang.String |
costBeta
Shape parameter (e.g., variance) for cost |
java.lang.String |
costDistribution
Probability distribution for cost |
java.lang.String |
costStream
Random number stream for cost |
java.lang.String |
distribution
Probability distribution |
static int |
FACILITY
|
static java.awt.Color |
FACILITY_COLOR
|
static java.awt.Color |
FORE_COLOR
|
static int |
HEIGHT_SPLIT
|
QCurve[] |
inEdge
Array of incoming edges |
static java.awt.Color |
JOIN_COLOR
|
static java.awt.Color |
LABEL_COLOR
|
java.awt.Point |
location
Position of node (coordinates of top left) |
static int |
N_FACILITY
|
static int |
N_SERVER
|
static int |
N_SIGNAL
|
static int |
N_SINK
|
static int |
N_SOURCE
|
java.lang.String |
nodeName
Name of node |
int |
nodeType
Type of node (SERVER .. |
static int |
NUM_SERVICE_ORIENTED
|
int |
numInEdges
Number of incoming edges |
int |
numOutEdges
Number of outgoing edges |
java.lang.String |
numTokens
Initial number of tokens (service units) |
static int |
OUT_DIAMETER
|
java.lang.String[] |
outCondition
Probability of taking each outgoing edge |
QCurve[] |
outEdge
Array of outgoing edges |
java.awt.geom.Ellipse2D.Double |
oval
Split or Join node object |
java.awt.Polygon |
polyg
Complete coordinates of node |
static java.awt.Point |
Q_FACILITY
|
static java.awt.Color |
QUEUE_COLOR
|
java.lang.String |
queueType
Type of queue (one of FIFO, LIFO, Priority, Temporal) FIX: also used to indicate Server controlled by Signal |
static int |
SERVER
Node and edge numbers |
static java.awt.Color |
SERVER_COLOR
|
static int |
SIGNAL
|
static java.awt.Color |
SIGNAL_COLOR
|
static int |
SINK
|
static java.awt.Color |
SINK_COLOR
|
static int |
SOURCE
|
static java.awt.Color |
SOURCE_COLOR
|
static int |
SPLIT
|
static java.awt.Color |
SPLIT_COLOR
|
java.lang.String |
stream
Random number stream |
static java.awt.Point |
T_FACILITY
|
static java.awt.Point |
T_SERVER
|
static int |
TOK_DIAMETER
|
static int |
TOK_RADIUS
|
static java.awt.Color |
TOKEN_COLOR
|
static int |
TRANSPORT
|
static java.awt.Color |
TRANSPORT_COLOR
|
protected static java.util.logging.Logger |
trc
Tracing Messages |
static java.lang.String[] |
TYPE_NAME
|
static java.lang.String[] |
TYPE_NAME_CAP
|
static int |
WIDTH_SPLIT
Split |
static int[] |
X_FACILITY
Facility |
static int[] |
X_SERVER
Server |
static int[] |
X_SIGNAL
Signal |
static int[] |
X_SINK
Sink |
static int[] |
X_SOURCE
Source |
static int[] |
Y_FACILITY
|
static int[] |
Y_SERVER
|
static int[] |
Y_SIGNAL
|
static int[] |
Y_SINK
|
static int[] |
Y_SOURCE
|
Constructor Summary | |
---|---|
Node()
Construct an empty node (e.g., before loading). |
|
Node(int nodeType,
java.awt.Point location)
Construct and initialize a node using defaults. |
|
Node(Prop props)
Construct a node based on properties. |
Method Summary | |
---|---|
static int |
getFacilityCount()
|
static int |
getServerCount()
Get methods for the counters (e.g., getServerCount for servers). |
static int |
getSignalCount()
|
static int |
getSinkCount()
|
static int |
getSourceCount()
|
void |
loadNode(java.io.ObjectInputStream in)
Load this node's state. |
static void |
reset()
Reset the counters. |
void |
saveNode(java.io.ObjectOutputStream out)
Save this node's state. |
static void |
setFacilityCount(int c)
|
static void |
setServerCount(int c)
Set methods for the counters (e.g., setServerCount for servers). |
static void |
setSignalCount(int c)
|
static void |
setSinkCount(int c)
|
static void |
setSourceCount(int c)
|
void |
unpack()
Unpack the node: polyg and color are derivable from nodeType and location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Color BACK_COLOR
public static final java.awt.Color FORE_COLOR
public static final java.awt.Color SERVER_COLOR
public static final java.awt.Color FACILITY_COLOR
public static final java.awt.Color SIGNAL_COLOR
public static final java.awt.Color SOURCE_COLOR
public static final java.awt.Color SINK_COLOR
public static final java.awt.Color TRANSPORT_COLOR
public static final java.awt.Color TOKEN_COLOR
public static final java.awt.Color QUEUE_COLOR
public static final java.awt.Color LABEL_COLOR
public static final java.awt.Color SPLIT_COLOR
public static final java.awt.Color JOIN_COLOR
public static final int TOK_RADIUS
public static final int TOK_DIAMETER
public static final int OUT_DIAMETER
public static final int SERVER
public static final int FACILITY
public static final int SIGNAL
public static final int SOURCE
public static final int SINK
public static final int TRANSPORT
public static final int SPLIT
public static final int ANDJOIN
public static final int NUM_SERVICE_ORIENTED
public static final java.lang.String[] TYPE_NAME
public static final java.lang.String[] TYPE_NAME_CAP
public static final int[] X_SERVER
public static final int[] Y_SERVER
public static final int N_SERVER
public static final java.awt.Point T_SERVER
public static final int[] X_FACILITY
public static final int[] Y_FACILITY
public static final int N_FACILITY
public static final java.awt.Point T_FACILITY
public static final java.awt.Point Q_FACILITY
public static final int[] X_SIGNAL
public static final int[] Y_SIGNAL
public static final int N_SIGNAL
public static final int[] X_SOURCE
public static final int[] Y_SOURCE
public static final int N_SOURCE
public static final int[] X_SINK
public static final int[] Y_SINK
public static final int N_SINK
public static final int WIDTH_SPLIT
public static final int HEIGHT_SPLIT
protected static java.util.logging.Logger trc
public int nodeType
public java.awt.Point location
public java.awt.Color color
public java.lang.String nodeName
public java.lang.String numTokens
public java.lang.String distribution
public java.lang.String alpha
public java.lang.String beta
public java.lang.String stream
public java.lang.String costDistribution
public java.lang.String costAlpha
public java.lang.String costBeta
public java.lang.String costStream
public java.lang.String queueType
public int numOutEdges
public QCurve[] outEdge
public java.lang.String[] outCondition
public int numInEdges
public QCurve[] inEdge
public java.awt.Polygon polyg
public java.awt.geom.Ellipse2D.Double oval
Constructor Detail |
---|
public Node()
props
- common node propertiespublic Node(Prop props)
public Node(int nodeType, java.awt.Point location)
nodeType
- type of nodelocation
- location (top left) of nodeMethod Detail |
---|
public void unpack()
public static void reset()
public static void setServerCount(int c)
public static void setFacilityCount(int c)
public static void setSignalCount(int c)
public static void setSourceCount(int c)
public static void setSinkCount(int c)
public static int getServerCount()
public static int getFacilityCount()
public static int getSignalCount()
public static int getSourceCount()
public static int getSinkCount()
public void saveNode(java.io.ObjectOutputStream out) throws java.io.IOException
out
- output stream
java.io.IOException
- can't write outputpublic void loadNode(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- input stream
java.io.IOException
- can't read input
java.io.IOException
- can't find class
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |