Skip to content
Closed
Show file tree
Hide file tree
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: 16 additions & 0 deletions src/arcade/patch/env/component/PatchComponentSitesGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,22 @@ public double getCircum() {
public double getFlow() {
return flow;
}

public String getFraction() {
StringBuilder sb = new StringBuilder();
for (String key : fraction.keySet()) {
sb.append(key + ":" + fraction.get(key) + ",");
}
return sb.toString();
}

public String getTransport() {
StringBuilder sb = new StringBuilder();
for (String key : transport.keySet()) {
sb.append(key + ":" + transport.get(key) + ",");
}
return sb.toString();
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/arcade/patch/sim/output/PatchOutputSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,15 @@ public JsonElement serialize(
* "from": (from),
* "to": (to),
* "type": (type),
* "sign": (sign),
* "radius": (radius),
* "length": (length),
* "wall": (wall),
* "shear": (shear),
* "stress": (stress),
* "flow": (flow),
* "fraction": (fraction),
* "transport": (transport),
* }
* </pre>
*/
Expand All @@ -238,6 +241,7 @@ public JsonElement serialize(
json.add("from", context.serialize(src.getFrom()));
json.add("to", context.serialize(src.getTo()));
json.addProperty("type", src.getType());
json.addProperty("sign", src.getSign());
json.addProperty("radius", src.getRadius());
json.addProperty("length", src.getLength());
json.addProperty("wall", src.getWall());
Expand Down