Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sogMBT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PMC-SOG
sogMBT
Commits
0db230e9
Commit
0db230e9
authored
3 months ago
by
Jaime Arias
Browse files
Options
Downloads
Patches
Plain Diff
wip: compute weight of an aggregate
parent
fcd3ee89
No related branches found
No related tags found
No related merge requests found
Pipeline
#9315
passed
3 months ago
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/petri_net_sog.cpp
+17
-0
17 additions, 0 deletions
src/petri_net_sog.cpp
src/petri_net_sog.hpp
+9
-0
9 additions, 0 deletions
src/petri_net_sog.hpp
with
26 additions
and
0 deletions
src/petri_net_sog.cpp
+
17
−
0
View file @
0db230e9
...
...
@@ -509,6 +509,23 @@ Path PetriNetSOG::AbstractPath(Path path, const SOG &sog) const {
return
abstract_paths
;
}
int
PetriNetSOG
::
ComputeWeightOfAggregate
(
const
Aggregate
*
aggr
,
const
int
t_source
,
const
int
t_target
)
const
{
const
bdd
source
=
relation
[
t_source
][
aggr
->
state
];
// backtracking from t_target until t_source
int
counter
=
0
;
bdd
current_state
=
SearchExitPoints
(
aggr
->
state
,
t_target
);
while
((
source
&
current_state
)
==
bdd_false
())
{
pair
<
int
,
bdd
>
step
=
StepBackward
(
current_state
,
aggr
);
current_state
=
step
.
second
&
aggr
->
state
;
// keep in the aggregate
counter
++
;
}
return
counter
;
}
Path
PetriNetSOG
::
SubPathAggregate
(
bdd
*
source
,
const
bdd
&
target
,
const
Aggregate
*
aggr
)
const
{
Path
path
;
...
...
This diff is collapsed.
Click to expand it.
src/petri_net_sog.hpp
+
9
−
0
View file @
0db230e9
...
...
@@ -170,6 +170,15 @@ class PetriNetSOG {
* @return abstract path
*/
Path
AbstractPath
(
Path
path
,
const
SOG
&
sog
)
const
;
/**
* Compute the weights of the shortest paths inside the aggregate
* @param aggr aggregate
* @param t_source source transition
* @param t_target target transition
*/
int
ComputeWeightOfAggregate
(
const
Aggregate
*
aggr
,
int
t_source
,
int
t_target
)
const
;
};
#endif // PETRI_NET_SOG_H_
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment