LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
wfn_arc.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012-2026, QORE Lab, Imperial College London
3
* All rights reserved.
4
*/
5
#ifndef LINE_API_WFN_WFN_ARC_H
6
#define LINE_API_WFN_WFN_ARC_H
7
8
/**
9
* @file
10
* @ingroup api_wfn
11
* An arc of a WorkflowNet, from a place to a transition or from a transition to a place.
12
*
13
* MATLAB twin: matlab/src/api/wfn/WFNArc.m
14
*/
15
16
#include <string>
17
18
#include "
line/api/wfn/wfn_place.h
"
19
#include "
line/api/wfn/wfn_transition.h
"
20
21
namespace
line
{
22
namespace
wfn
{
23
24
class
WFNArc {
25
public
:
26
/** True for place -> transition, false for transition -> place. */
27
bool
from_place
()
const
{
return
from_place_; }
28
const
WFNPlace
&
place
()
const
{
return
*place_; }
29
const
WFNTransition
&
transition
()
const
{
return
*transition_; }
30
/** A positive integer, the tokens moved per firing. */
31
double
weight
()
const
{
return
weight_; }
32
33
const
std::string&
source_name
()
const
{
return
from_place_ ? place_->name() : transition_->name(); }
34
const
std::string&
target_name
()
const
{
return
from_place_ ? transition_->name() : place_->name(); }
35
36
private
:
37
friend
class
WorkflowNet
;
38
WFNArc(
bool
from_place
,
const
WFNPlace
*
place
,
const
WFNTransition
*
transition
,
double
weight
)
39
: from_place_(
from_place
), place_(
place
), transition_(
transition
), weight_(
weight
) {}
40
41
bool
from_place_;
42
const
WFNPlace
* place_;
43
const
WFNTransition
* transition_;
44
double
weight_;
45
};
46
47
}
// namespace wfn
48
}
// namespace line
49
50
#endif
// LINE_API_WFN_WFN_ARC_H
line::wfn::WFNArc::transition
const WFNTransition & transition() const
Definition
wfn_arc.h:29
line::wfn::WFNArc::weight
double weight() const
A positive integer, the tokens moved per firing.
Definition
wfn_arc.h:31
line::wfn::WFNArc::source_name
const std::string & source_name() const
Definition
wfn_arc.h:33
line::wfn::WFNArc::target_name
const std::string & target_name() const
Definition
wfn_arc.h:34
line::wfn::WFNArc::WorkflowNet
friend class WorkflowNet
Definition
wfn_arc.h:37
line::wfn::WFNArc::from_place
bool from_place() const
True for place -> transition, false for transition -> place.
Definition
wfn_arc.h:27
line::wfn::WFNArc::place
const WFNPlace & place() const
Definition
wfn_arc.h:28
line::wfn::WFNPlace
Definition
wfn_place.h:29
line::wfn::WFNTransition
Definition
wfn_transition.h:32
line::wfn
Definition
soundness_report.h:24
line
Conservation laws of a layered queueing network, enumerated from its structure.
Definition
aoi_dist2ph.h:52
wfn_place.h
A place of a WorkflowNet.
wfn_transition.h
A transition (task) of a WorkflowNet.
include
line
api
wfn
wfn_arc.h
Generated by
1.18.0