Skip to content

Commit

Permalink
Update subproject commit in extern/semitone and improve code readabil…
Browse files Browse the repository at this point in the history
…ity in solver_api.cpp
  • Loading branch information
riccardodebenedictis committed Nov 11, 2024
1 parent d5245ec commit 267c935
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extern/semitone
4 changes: 3 additions & 1 deletion src/solver_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ namespace ratio
std::set<utils::inf_rational> pulses;
for (const auto &pred : rhs.get_predicates())
for (const auto &atm : pred.get().get_atoms())
if (rhs.get_sat().value(static_cast<atom &>(*atm).get_sigma()) == utils::True) // we get only the active atoms..
if (rhs.get_sat().value(static_cast<atom &>(*atm).get_sigma()) == utils::True)
{ // we get only the active atoms..
if (is_impulse(static_cast<atom &>(*atm)))
{ // we have an impulse atom..
utils::inf_rational start = rhs.arithmetic_value(static_cast<riddle::arith_item &>(*atm->get(AT_NAME)));
Expand All @@ -101,6 +102,7 @@ namespace ratio
starting_atoms[start].insert(static_cast<atom *>(&*atm));
pulses.insert(start);
}
}
if (!starting_atoms.empty())
{ // we have some root atoms in the solver timeline..
json::json slv_tl{{"id", static_cast<uint64_t>(get_id(rhs))}, {"type", "Solver"}, {"name", rhs.get_name()}};
Expand Down

0 comments on commit 267c935

Please sign in to comment.