Nodes
- class pyJMT.Source(model, name)
Defines a Source node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
- setArrival(jobclass, arrival_dist)
Sets the arrival distribution for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
arrival_dist (Distribution) – The arrival distribution.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- class pyJMT.Sink(model, name)
Defines a Sink node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
- class pyJMT.Queue(model, name, strategy, capacity=-1, dropRule=DropStrategy.DROP)
Defines a Queue node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
strategy (SchedStrategy) – The scheduling strategy used by the queue.
capacity (int, optional) – The maximum capacity of the queue, defaults to -1 for infinite capacity.
dropRule (DropStrategy, optional) – The rule for dropping jobs when the queue is full, defaults to DropStrategy.DROP.
- setCapacity(capacity)
Sets the capacity for the queue.
- Parameters:
capacity (int) – The capacity.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setDropRule(dropRule)
Sets the drop rule for the queue.
- Parameters:
dropRule (DropStrategy) – The drop rule.
- setNumberOfServers(x)
Sets the number of servers.
- Parameters:
x (int) – The number of servers.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- setService(jobclass, service_dist, weight=1.0)
Sets the service strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
service_dist (Distribution) – The service distribution.
weight (float, optional) – The weight, defaults to 1.0.
- setStrategy(strategy)
Sets the scheduling strategy for the queue.
- Parameters:
strategy (SchedStrategy) – The scheduling strategy.
- class pyJMT.Delay(model, name)
Defines a Delay node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setNumberOfServers(x)
Sets the number of servers.
- Parameters:
x (int) – The number of servers.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- setService(jobclass, service_dist, weight=1.0)
Sets the service strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
service_dist (Distribution) – The service distribution.
weight (float, optional) – The weight, defaults to 1.0.
- class pyJMT.Router(model, name)
Defines a Router node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- class pyJMT.ClassSwitch(model, name)
Defines a ClassSwitch node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
- setClassSwitchProb(class1, class2, p)
Sets the class switch probability from one class to another.
- Parameters:
class1 (JobClass) – The source job class.
class2 (JobClass) – The target job class.
p (float) – The class switch probability.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- class pyJMT.Fork(model, name)
Defines a Fork node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
- setCapacity(capacity)
Sets the capacity for the queue.
- Parameters:
capacity (int) – The capacity.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setDropRule(dropRule)
Sets the drop rule for the queue.
- Parameters:
dropRule (DropStrategy) – The drop rule.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- setStrategy(strategy)
Sets the scheduling strategy for the queue.
- Parameters:
strategy (SchedStrategy) – The scheduling strategy.
- setTasksPerLink(num_tasks)
Sets the number of tasks per link.
- Parameters:
num_tasks (int) – The number of tasks to be split into for each link.
- class pyJMT.Join(model, name)
Defines a Join node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- class pyJMT.FiniteCapacityRegion(model, name, node, maxCapacity=-1, maxMemory=-1)
Defines a FiniteCapacityRegion node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
node (Node) – The node associated with this finite capacity region.
maxCapacity (int, optional) – The maximum capacity of the region, defaults to -1 for infinite capacity.
maxMemory (int, optional) – The maximum memory of the region, defaults to -1 for infinite memory.
- setClassMaxCapacity(jobclass, maxCapacity)
Sets the maximum capacity for a given job class.
- Parameters:
jobclass (JobClass) – Instance of the job class.
maxCapacity (int) – Maximum capacity for the job class.
- setClassMaxMemory(jobclass, maxMemory)
Sets the maximum memory for a given job class.
- Parameters:
jobclass (JobClass) – Instance of the job class.
maxMemory (int) – Maximum memory for the job class.
- setClassSize(jobclass, size)
Sets the size for a given job class.
- Parameters:
jobclass (JobClass) – Instance of the job class.
size (int) – Size for the job class.
- setClassWeight(jobclass, weight)
Sets the weight for a given job class.
- Parameters:
jobclass (JobClass) – Instance of the job class.
weight (float or int) – Weight for the job class.
- setDropRule(jobclass, drop)
Sets the drop rule for a given job class.
- Parameters:
jobclass (JobClass) – Instance of the job class.
drop (JobClass) – Drop rule for the job class.
- setMaxCapacity(maxCapacity)
Sets the maximum capacity of the region.
- Parameters:
maxCapacity (int) – The maximum capacity.
- setMaxMemory(maxMemory)
Sets the maximum memory of the region.
- Parameters:
maxMemory (int) – The maximum memory.
- class pyJMT.Logger(model, name, logfileName='global.csv', logfilePath='/github/workspace/docs')
Defines a Logger node in the model.
- Parameters:
model (Network) – The model in which this node belongs.
name (str) – The name of the node.
logfileName (str, optional) – The name of the log file, defaults to ‘global.csv’.
logfilePath (str, optional) – The path to the log file, defaults to the directory of JMT.jar.
- setClassSwitchRouting(sourcejobclass, targetjobclass, target, routeprob, classchangeprob)
Sets the class switch routing for a source job class to a target job class.
- Parameters:
sourcejobclass (JobClass) – The source job class.
targetjobclass (JobClass) – The target job class.
target (Node) – The target node.
routeprob (float) – The routing probability.
classchangeprob (float) – The class change probability.
- setDelimiter(delimiter)
Sets the delimiter for the log file.
- Parameters:
delimiter (str) – The delimiter.
- setJobClass(bool)
Toggles logging of the job class.
- Parameters:
bool (bool) – If true, the job class will be logged.
- setJobID(bool)
Toggles logging of the job ID.
- Parameters:
bool (bool) – If true, the job ID will be logged.
- setLogLoggerName(bool)
Toggles logging of the logger name.
- Parameters:
bool (bool) – If true, the logger name will be logged.
- setProbRouting(jobclass, target, val)
Sets the probability routing for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
target (Node) – The target node.
val (float) – The routing probability.
- setRouting(jobclass, routing_strat)
Sets the routing strategy for a given job class.
- Parameters:
jobclass (JobClass) – The job class.
routing_strat (pyJMT.RoutingStrategy) – The routing strategy.
- setStartTime(bool)
Toggles logging of the start time.
- Parameters:
bool (bool) – If true, the start time will be logged.
- setTimeAnyClass(bool)
Toggles logging of the time in any job class.
- Parameters:
bool (bool) – If true, the time in any job class will be logged.
- setTimeSameClass(bool)
Toggles logging of the time in the same job class.
- Parameters:
bool (bool) – If true, the time in the same job class will be logged.
- setTimestamp(bool)
Toggles logging of the timestamp.
- Parameters:
bool (bool) – If true, the timestamp will be logged.