Skip to content
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

reverse priorities #206

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/main/java/org/gecko/io/AutomatonFileSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -117,7 +116,6 @@ private String serializeStateContracts(State state, Automaton automaton) {
//Building the conditions for the priorities
List<List<Edge>> groupedEdges =
new ArrayList<>(edges.stream().collect(Collectors.groupingBy(Edge::getPriority)).values());
Collections.reverse(groupedEdges); //This just makes this easier to think about
List<Condition> preConditionsByPrio = new ArrayList<>();
for (List<Edge> edgeGroup : groupedEdges) {
//OrElseThrow because validity needs to be ensured by model
Expand Down