LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
wfn_place.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_PLACE_H
6
#define LINE_API_WFN_WFN_PLACE_H
7
8
/**
9
* @file
10
* @ingroup api_wfn
11
* A place of a WorkflowNet.
12
*
13
* The initial marking is informational: every analysis of the net starts from
14
* k tokens in the source place, as WF-net soundness does.
15
*
16
* MATLAB twin: matlab/src/api/wfn/WFNPlace.m
17
*/
18
19
#include <cstddef>
20
#include <string>
21
22
#include "
line/util/error.h
"
23
24
namespace
line
{
25
namespace
wfn
{
26
27
class
WorkflowNet
;
28
29
class
WFNPlace {
30
public
:
31
const
std::string&
name
()
const
{
return
name_; }
32
/** 0-based position in `WorkflowNet::places()`. */
33
std::size_t
index
()
const
{
return
index_; }
34
double
initial_marking
()
const
{
return
initial_marking_; }
35
36
/** `setInitialMarking(m)`. */
37
void
set_initial_marking
(
double
marking) {
38
if
(marking < 0)
39
throw
InputError
(
ErrorKind
(
"Argument"
),
"Initial marking cannot be negative."
);
40
initial_marking_ = marking;
41
}
42
43
private
:
44
friend
class
WorkflowNet
;
45
WFNPlace(
const
std::string&
name
, std::size_t
index
,
double
initial_marking
)
46
: name_(
name
), index_(
index
), initial_marking_(
initial_marking
) {}
47
48
std::string name_;
49
std::size_t index_;
50
double
initial_marking_;
51
};
52
53
}
// namespace wfn
54
}
// namespace line
55
56
#endif
// LINE_API_WFN_WFN_PLACE_H
line::InputError::InputError
InputError(const std::string &what)
Definition
error.h:105
line::wfn::WFNPlace::index
std::size_t index() const
0-based position in WorkflowNet::places().
Definition
wfn_place.h:33
line::wfn::WFNPlace::name
const std::string & name() const
Definition
wfn_place.h:31
line::wfn::WFNPlace::set_initial_marking
void set_initial_marking(double marking)
setInitialMarking(m).
Definition
wfn_place.h:37
line::wfn::WFNPlace::WorkflowNet
friend class WorkflowNet
Definition
wfn_place.h:44
line::wfn::WFNPlace::initial_marking
double initial_marking() const
Definition
wfn_place.h:34
line::wfn::WorkflowNet
Definition
workflow_net.h:323
error.h
The exception types the port throws.
line::wfn
Definition
soundness_report.h:24
line
Conservation laws of a layered queueing network, enumerated from its structure.
Definition
aoi_dist2ph.h:52
line::ErrorKind::ErrorKind
ErrorKind(std::string n)
Definition
error.h:39
include
line
api
wfn
wfn_place.h
Generated by
1.18.0