LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
workflow.h File Reference

An activity workflow reduced to one phase-type law. More...

#include <algorithm>
#include <map>
#include <string>
#include <vector>
#include "line/lang/dist_fitters.h"
#include "line/lang/dist_scale_rate.h"
#include "line/lang/distribution.h"
#include "line/lang/lang_types.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for workflow.h:

Go to the source code of this file.

Classes

struct  line::workflow::Precedence< T >
 One precedence of the activity graph. More...
struct  line::workflow::PhLaw< T >
 A phase-type law as the composition rules pass it around. More...
class  line::workflow::WorkflowActivity< T >
 A computational activity. More...
struct  line::workflow::SPNode< T >
struct  line::workflow::SPTree< T >
 The flat series-parallel tree. More...
class  line::workflow::Workflow< T >
struct  line::workflow::Distrib< T >
struct  line::workflow::GlobalConstants
 The MATLAB GlobalConstants, as reported by lineStart at its defaults. More...

Namespaces

namespace  line
namespace  line::workflow

Enumerations

enum class  line::workflow::SPNodeType {
  line::workflow::LEAF , line::workflow::SERIAL , line::workflow::PAR , line::workflow::OR ,
  line::workflow::LOOP
}
 A node of the series-parallel tree. More...
enum class  line::workflow::PrecedenceType
 Activity precedence kinds, with the values of MATLAB ActivityPrecedenceType. More...
enum class  line::workflow::ProcessType
 Distribution kinds, with the values of MATLAB ProcessType. More...

Detailed Description

An activity workflow reduced to one phase-type law.

Port of matlab/src/lang/workflow/Workflow.m and WorkflowActivity.m, and of their twins jline.lang.workflow.Workflow (JAR) and line_solver.lang.workflow.Workflow (Python). A workflow is a precedence graph over activities, each carrying a host demand; to_ph composes those laws into a single phase-type distribution.

WHAT THIS IS NOT. include/line/api/wf/ holds the workflow pattern DETECTORS of jline.api.wf, which read a link matrix and report sequences, branches, parallel blocks and loops. This header is the algebra those patterns feed: the composition that turns a precedence graph into an (alpha, T) pair. An LQN fork-join is also a different object – its branches contend for a host, so it yields a response time under contention rather than the order statistic of independent activity times returned here.

A precedence graph that is SERIES-PARALLEL is reduced exactly, by recursive composition of the series-parallel tree, which handles arbitrary nesting (a fork inside a loop, a branch that is itself a fork-join). Any other graph falls back to the block composition, which is a heuristic and is documented as one.

A LOOP repeats its body a GEOMETRIC number of times of mean COUNT, the POST_LOOP semantics of an activity graph (getStruct.m:528-567): a count of at least one runs the body once and takes the back edge with probability 1-1/COUNT, and a fractional count runs the body at most once, with probability COUNT. The COUNT-fold convolution is a different law with the same mean; it stays available as compose_repeat for a caller that wants exactly that.

An EXTERNAL CALL has no separate representation: an activity whose host demand is the law of the call response time composes exactly like a local computation, and an asynchronous call blocks the caller for no time and is simply left out of the workflow.

A QUORUM (partial) AND-join is REFUSED by name rather than served as a full join, because the first k of n branches to finish is not their maximum.

Definition in file workflow.h.