-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Linear Programming to initialize potencies #143
Conversation
This reverts commit 1240a3a.
include/PetriEngine/PQL/Contexts.h
Outdated
@@ -235,6 +236,9 @@ namespace PetriEngine { | |||
|
|||
glp_prob* makeBaseLP() const; | |||
|
|||
mutable std::vector<uint32_t> xs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xs
seems like a funky naming scheme? Also please use the _
prefix for fields.
src/VerifyPN.cpp
Outdated
// queries[i] = pushNegation(simp_cond.formula, stats, context, false, false, true); | ||
wasAGCPNApprox |= dynamic_cast<NotCondition*> (queries[i].get()) != nullptr; | ||
|
||
potencies = simplificationContext.xs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when we have multiple queries?
src/VerifyPN.cpp
Outdated
@@ -671,3 +671,138 @@ void simplify_queries( const MarkVal* marking, | |||
return a; | |||
}) && std::chrono::duration_cast<std::chrono::seconds>(end - begin).count() < options.queryReductionTimeout && to_handle > 0); | |||
} | |||
|
|||
void simplify_queries_potency(const MarkVal* marking, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this code duplicated from somewhere ? It looks like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is the function simplify_queries with less code, and with the potencies = [...] line added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could add 2 optional parameters to the simplify_queries function (bool isLp and initPotencies), and then do the correct things according to the bool isLP
This latest version uses a function named initialize_potency to initialize the potencies before a RandomWalk or a RPFS. This function is called after the query rsimplification and the net reduction iff --use-lp-potencies option is enabled. The best version run on the 2023 Benchmark (10 lp solves, potency = 60 * solution + 1) compared to the current main branch gives the following results:
|
Are these new options related to lp-initizalization of potencies? Also, make Finally, please, adjust the competition script accordingly, test it again (rerun the consistency and performance tests) and upload the new script tapaal.sh into 2024 competition scripts. |
The new changes are:
The consistency and performance tests ran on the last version give the following results (compared to the current main branch):
|
No description provided.