CARCADE Refactor 3: Treat Action (+params and tests)#175
CARCADE Refactor 3: Treat Action (+params and tests)#175allison-li-1016 wants to merge 38 commits intomainfrom
Conversation
|
cainja
left a comment
There was a problem hiding this comment.
I will revisit tests when we address some of the comments. I imagine they will lead to fairly large changes to the tests.
| ArrayList<LocationContainer> locs, | ||
| ArrayList<Location> siteLocs, | ||
| PatchSimulation sim) { | ||
| if (type.equals("graph")) { |
There was a problem hiding this comment.
Would it be better to use switch cases here?
cainja
left a comment
There was a problem hiding this comment.
please add an example input file/user interface for the treat action in the PR description
| ArrayList<LocationContainer> locs, | ||
| ArrayList<Location> siteLocs, | ||
| PatchSimulation sim) { | ||
| if (type.equals("graph")) { |
| for (Object edgeObj : allEdges) { | ||
| SiteEdge edge = (SiteEdge) edgeObj; | ||
| Bag allEdgeLocs = new Bag(); | ||
| if (Objects.equals(coord, "Hex")) { |
There was a problem hiding this comment.
why not just graphSites.getSpan() rather than casting and specifying the type of the graphsites?
| } | ||
| pruneSite(locs, sim, damage, sitesLat, siteLocs); | ||
| } else { | ||
| throw new IllegalArgumentException( |
There was a problem hiding this comment.
using an enum means that you don't need this.
| */ | ||
| public void step(SimState simstate) { | ||
| PatchSimulation sim = (PatchSimulation) simstate; | ||
| String type = "null"; |
There was a problem hiding this comment.
I would strongly prefer if you didn't do this.
| latPositions = (int) (-3.5 * sampleLoc.getSubcoordinates().size() + 30); | ||
|
|
||
| // Determine type of sites component implemented. | ||
| if (comp instanceof PatchComponentSitesSource) { |
There was a problem hiding this comment.
this should all happen at the abstraction level of PatchComponentSites
Review Time: Medium
Summary: Adding
TreatAction class, and associated parameters and tests. TheTreatAction will add CAR T-cell agents of specified dose and ratio next to source points or vasculature