Skip to content
Open
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
16 changes: 9 additions & 7 deletions src/paramwrapper/ParamModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,17 @@ public Collection<String> getUpdatesProbabilities() {

public String makeString(String stateVariable) {
String command = "[] "+stateVariable+"="+initialState+" -> ";
boolean needsPlus = false;
for (int i = 0; i < updatesProbabilities.size(); i++) {
if (needsPlus) {
command += " + ";
} else {
needsPlus = true;
}
command += "("+updatesProbabilities.get(i)+") : ("+stateVariable+"'="+updatesActions.get(i)+")";
command = BuildCommand(command,stateVariable,i);
}
return command+";";
}

private String BuildCommand(String command, String stateVariable, int i){
if (i > 0) {
command += " + ";
}
command += "("+updatesProbabilities.get(i)+") : ("+stateVariable+"'="+updatesActions.get(i)+")";
return command;
}
}