Merge lp:~verifypn-cpn/verifypn/color-fixpoint into lp:~tapaal-ltl/verifypn/random-fix

Proposed by Peter Gjøl Jensen
Status: Merged
Merged at revision: 242
Proposed branch: lp:~verifypn-cpn/verifypn/color-fixpoint
Merge into: lp:~tapaal-ltl/verifypn/random-fix
Diff against target: 28 lines (+8/-1)
1 file modified
include/PetriEngine/Colored/Intervals.h (+8/-1)
To merge this branch: bzr merge lp:~verifypn-cpn/verifypn/color-fixpoint
Reviewer Review Type Date Requested Status
Peter Gjøl Jensen Approve
Review via email: mp+401090@code.launchpad.net

Commit message

Fixing the forward approximation (and unfolding)

To post a comment you must log in.
267. By Thomas Pedersen <email address hidden>

Merge with random-fix branch

Revision history for this message
Peter Gjøl Jensen (peter-gjoel) wrote :

passes tests.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/PetriEngine/Colored/Intervals.h'
2--- include/PetriEngine/Colored/Intervals.h 2021-03-24 10:39:01 +0000
3+++ include/PetriEngine/Colored/Intervals.h 2021-04-14 11:52:25 +0000
4@@ -545,8 +545,8 @@
5 }
6
7 _intervals.erase(_intervals.begin() + closestInterval.intervalId2);
8-
9 }
10+ simplify();
11 }
12
13 closestIntervals getClosestIntervals(){
14@@ -560,7 +560,14 @@
15 for(uint32_t k = 0; k < interval->size(); k++) {
16 int32_t val1 = otherInterval->operator[](k)._lower - interval->operator[](k)._upper;
17 int32_t val2 = interval->operator[](k)._lower - otherInterval->operator[](k)._upper;
18+ // int32_t lowerDist = interval->operator[](k)._lower > otherInterval->operator[](k)._lower?
19+ // interval->operator[](k)._lower - otherInterval->operator[](k)._lower :
20+ // otherInterval->operator[](k)._lower - interval->operator[](k)._lower;
21+ // int32_t upperDist = interval->operator[](k)._upper > otherInterval->operator[](k)._upper?
22+ // interval->operator[](k)._upper - otherInterval->operator[](k)._upper :
23+ // otherInterval->operator[](k)._upper - interval->operator[](k)._upper;
24 dist += std::max(0, std::max(val1, val2));
25+ //dist += std::max(upperDist + lowerDist, upperDist + lowerDist + std::max(val1, val2));
26 if(dist >= currentBest.distance){
27 break;
28 }

Subscribers

People subscribed via source and target branches

to all changes: