Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
5476c24
adding new cell states to enum + add tests for enum interface
allison-li-1016 Oct 23, 2023
7ddfb2c
move step() down to TissueCell
allison-li-1016 Oct 23, 2023
925ab28
move state fractions down from PatchCell to TissueCell
allison-li-1016 Oct 23, 2023
fac3611
IN PROGRESS adding CART cell class
allison-li-1016 Oct 24, 2023
bbe57e0
making patchCARTCell an abstract class
allison-li-1016 Oct 25, 2023
773175b
implementing CART class, CARTCD4 class, added antigen binding to enum…
allison-li-1016 Oct 26, 2023
b588f78
implemented bindTarget function
allison-li-1016 Oct 27, 2023
6d1dd0a
adding PatchCellCARTCD8 subclass
allison-li-1016 Oct 27, 2023
ba7c3bf
adding comments
allison-li-1016 Oct 30, 2023
bf6e61a
added some comments
allison-li-1016 Nov 2, 2023
b37a7d8
Merge branch 'develop' into allison/carcade-refactor
allison-li-1016 Nov 2, 2023
6724768
adding new tests
allison-li-1016 Nov 3, 2023
6e7c491
temp add of inflammation module, in help of casting issues
allison-li-1016 Nov 3, 2023
6576ea8
added kill process
allison-li-1016 Jan 18, 2024
dc5b8e7
Merge remote-tracking branch 'origin/develop' into allison/carcade-re…
Apr 1, 2024
ec2cdae
initial CART agent refactoring file push
Jun 27, 2024
06ffa1f
initial Inflammation module refactorization file push
Jun 27, 2024
0552a45
including CART agent tags for default CART agent and module parameter…
Jun 27, 2024
3b7a882
adding IL2 layers into env
Jun 27, 2024
450f66b
adding in treat action from CARCADE helper options
Jun 27, 2024
566a23a
adding treat module
Oct 23, 2024
4aba068
adding CART cell killing and reseting rule edits
Oct 23, 2024
12cd23c
changing kill scheduling functionality
Oct 23, 2024
eda1b22
changing reset action scheduling functionalities
Oct 23, 2024
85ee85b
editing CART metabolism stepping rules
Oct 23, 2024
5db7439
changing inflammation rules
Oct 23, 2024
fd177cc
adding antigen and target parameters in patch cells
Oct 24, 2024
b6b76cb
adding CAR-T specific parameters to parameter file
Oct 24, 2024
1200b20
post merge with develop branch
Oct 25, 2024
691a540
debugging CART metabolism
Nov 13, 2024
7c7124f
adding kill action
Nov 14, 2024
2c68668
changing files after pulling in container changes from develop
Nov 15, 2024
5c94743
Merge remote-tracking branch 'origin/develop' into allison/carcade-re…
allison-li-1016 Nov 15, 2024
3410c64
adding metabolism initial glucose concentration parameter for cart me…
allison-li-1016 Nov 15, 2024
3a42203
removing lysed cells since they are no longer part of the output
allison-li-1016 Nov 15, 2024
94ee843
adding spacing
allison-li-1016 Nov 15, 2024
f99dd6f
adding linting
allison-li-1016 Nov 15, 2024
8956e48
reverting some files to main
allison-li-1016 Nov 15, 2024
bfb52a9
removing unnecessary imports
allison-li-1016 Nov 17, 2024
9c4d767
adding CD4 cell tests
allison-li-1016 Nov 19, 2024
5cfd631
changing energy threshold in test
allison-li-1016 Nov 19, 2024
1a9e7ed
adding CART cell tests
allison-li-1016 Dec 20, 2024
6a3f6be
adding cell
allison-li-1016 Dec 20, 2024
98e081f
Merge branch 'allison/carcade-refactor' of https://github.com/bagheri…
allison-li-1016 Dec 20, 2024
a86a860
applying linting
allison-li-1016 Dec 20, 2024
2fea3ea
testing git access
allison-li-1016 Dec 20, 2024
47bb54a
testing git again
allison-li-1016 Dec 20, 2024
82c4e37
I am once again, testing git
allison-li-1016 Dec 20, 2024
485cdb3
editing test for edge case
allison-li-1016 Dec 20, 2024
dcac9d0
writing java documentation for T cell agents
allison-li-1016 Dec 20, 2024
b76be6a
fixing documentation for these classes
allison-li-1016 Dec 26, 2024
b0b31d3
adding testing specific methods to access field values
allison-li-1016 Dec 26, 2024
edd42cb
adding metabolism tests for CART cells
allison-li-1016 Dec 26, 2024
36a9c65
adding cd8 inflammation module tests
allison-li-1016 Dec 27, 2024
6d27509
update array size in inflammation cd8 tests
allison-li-1016 Dec 27, 2024
f599061
adding update process tests to CART metabolism
allison-li-1016 Dec 27, 2024
b240171
adding additional accessor method for testing purposes
allison-li-1016 Dec 28, 2024
7bf29da
adding cd4 inflammation tests
allison-li-1016 Dec 28, 2024
e64eeff
adding tests for inflammation, treat, kill
allison-li-1016 Dec 31, 2024
4cb5faa
updating inflammation documentation, adding unit tests for inflammati…
allison-li-1016 Dec 31, 2024
8d6428f
updating documentation for reset action, adding unit tests for reset …
allison-li-1016 Dec 31, 2024
08527d8
updating documentation for kill action, adding unit tests for kill ac…
allison-li-1016 Dec 31, 2024
68e1e91
updating documentation, swapping out comparisons for object safe equa…
allison-li-1016 Dec 31, 2024
7b1d638
merge new changes from main
allison-li-1016 Dec 31, 2024
4b090e3
adding in cell age death to T cells
allison-li-1016 Dec 31, 2024
93d3303
adding new parameters: cell death age and max confluency
allison-li-1016 Dec 31, 2024
0413b6c
changing T cell tests to accomodate for cell death due to age
allison-li-1016 Dec 31, 2024
7a0f2df
updating treat documentation, adding unit tests for treat class
allison-li-1016 Dec 31, 2024
3fde90e
had to change the subclass because of step() refactoring from PatchCell
allison-li-1016 Dec 31, 2024
e741e78
edit confluency limit
allison-li-1016 Jan 1, 2025
c1bbf59
changing test structure after editing confluency limitation in treat …
allison-li-1016 Jan 1, 2025
1466d8b
making patch cell fields protected instead of public
allison-li-1016 Jan 8, 2025
8910e08
changing visibility of variables
allison-li-1016 Jan 8, 2025
73d95fb
revise kill action to not step apoptosis module immediately
allison-li-1016 Jan 9, 2025
d4b0738
editing javadoc for antigen flag enum
allison-li-1016 Jan 9, 2025
7605b78
changing order of parameters to match main branch
allison-li-1016 Jan 9, 2025
6860f05
adding in default parameters relevant to T cell agent, inflammation m…
allison-li-1016 Jan 9, 2025
3ca62f4
reverting state of project to previous commit
allison-li-1016 Jan 9, 2025
7f8a8e2
pushing step() specific tests down to PatchCellTissue test class
allison-li-1016 Jan 14, 2025
6cd6530
deleting methods with no usages
allison-li-1016 Jan 14, 2025
f615a9b
refactoring PatchCellCART classes
allison-li-1016 Jan 14, 2025
0feb2e1
adding CART abstract clas tests
allison-li-1016 Jan 14, 2025
3eed6d6
refactoring inflammation abstract tests
allison-li-1016 Jan 14, 2025
7283e71
refactoring metabolism cart tests
allison-li-1016 Jan 14, 2025
7253b7b
merging changes from main
allison-li-1016 Jan 16, 2025
38a0eac
fixing linting of patch cell class
allison-li-1016 Jan 16, 2025
8c5b9ba
adding periods and changing variable casing of patch cell cart class
allison-li-1016 Jan 16, 2025
b7481b9
adding spotlessApply to patch cell cart class
allison-li-1016 Jan 16, 2025
c1768d7
adding periods to descriptions in tissue class
allison-li-1016 Jan 16, 2025
d4eba48
adding periods and changing field casings related to the PatchInflamm…
allison-li-1016 Jan 16, 2025
f123414
lining metabolism cart class
allison-li-1016 Jan 16, 2025
42bec69
changing variable casing of inflammation class variables
allison-li-1016 Jan 16, 2025
9ae3078
spotlessApply linting
allison-li-1016 Jan 16, 2025
2b18d59
fixing metabolism variable name swap
allison-li-1016 Jan 16, 2025
b514177
adding variable swap names in cd4 and cd8 tests
allison-li-1016 Jan 16, 2025
7c31016
changing variable names in metabolism class
allison-li-1016 Jan 16, 2025
b275260
missing javadoc for inflammation method
allison-li-1016 Jan 16, 2025
259d4b4
adding new lines to variable defs in metabolism class
allison-li-1016 Jan 16, 2025
2eaef38
changing variable casing in metabolism tests
allison-li-1016 Jan 16, 2025
ad870e7
adding newlines and variable casing to inflammation tests
allison-li-1016 Jan 16, 2025
5bb1c86
adding new lines to cart cell test variable declaration
allison-li-1016 Jan 16, 2025
9a13aad
Merge branch 'main' of https://github.com/bagherilab/ARCADE into alli…
allison-li-1016 Jan 17, 2025
3e14469
null parameters should not be silently failing
allison-li-1016 Jan 21, 2025
289c7c3
changing tests to handle null parameters for processes and such
allison-li-1016 Jan 21, 2025
0e153c1
changing cd4 tests to accomadate for null parameters
allison-li-1016 Jan 21, 2025
38af247
changing cd8 tests to accomadate for null parameters
allison-li-1016 Jan 21, 2025
b4a50ce
changing reset tests to accomadate for null parameters:
allison-li-1016 Jan 21, 2025
5db3cd8
linting
allison-li-1016 Jan 21, 2025
629ffe6
removing todo comment in metabolism CART as it is addressed
allison-li-1016 Jan 21, 2025
9705d93
renaming redundant dydt variable in inflammation
allison-li-1016 Jan 21, 2025
c43de0b
adding only tissue cells to possible neighbors in bindTarget method
allison-li-1016 Jan 21, 2025
5a43a2f
linting
allison-li-1016 Jan 21, 2025
6a605ca
fixing bindTarget method to only consider tissue cells
allison-li-1016 Jan 23, 2025
1379910
removing instance checking in proliferation module
allison-li-1016 Jan 23, 2025
59ce2fd
moving binding flag to up to patch cell class
allison-li-1016 Jan 23, 2025
e9597d1
refactoring antigen tests
allison-li-1016 Jan 23, 2025
5e69721
refactoring bindTarget method into helper methods
allison-li-1016 Jan 23, 2025
ec75cf6
accidentally swapped alpha and beta in bindTarget
allison-li-1016 Jan 23, 2025
f53a9b3
making proliferation a cell level param
allison-li-1016 Jan 23, 2025
1ce8a7c
removing inflammation kinetic parameters as a user input
allison-li-1016 Jan 24, 2025
e5dc3f8
making car antigens a population definition
allison-li-1016 Jan 24, 2025
e0c5015
fixing up cart tests
allison-li-1016 Jan 24, 2025
c93c057
writing getters for antigens
allison-li-1016 Jan 24, 2025
9cf5205
making antigen fields final
allison-li-1016 Jan 24, 2025
4b58606
renaming il2 rate variables names to be more readable
allison-li-1016 Jan 29, 2025
7d93d3c
refactoring and renaming CART tests
allison-li-1016 Jan 29, 2025
0c6590e
changing inflammation test to not test default value
allison-li-1016 Jan 29, 2025
8ddf35f
better code writing for PatchEnums test
allison-li-1016 Jan 29, 2025
05874c5
updating docstring for patch cell class
allison-li-1016 Jan 29, 2025
9f6a609
update docstrings and variable names
allison-li-1016 Jan 29, 2025
1ec27e7
removing empty statement and unused imports
allison-li-1016 Jan 29, 2025
f79778e
updating metabolism cart tests to test obj behavior
allison-li-1016 Jan 30, 2025
cf5213b
changing antigen getter/setter method names, changing flag variable name
allison-li-1016 Feb 10, 2025
68496b2
removing javadoc for param that does not exist
allison-li-1016 Feb 10, 2025
4823de8
renaming self and car antigen vars to be more intuitive
allison-li-1016 Feb 10, 2025
9d4249c
refactoring bindTarget method
allison-li-1016 Feb 10, 2025
d002a80
updating process updating in proliferation module
allison-li-1016 Feb 10, 2025
de65541
moving setState down to subclass, adding T cell specific states
allison-li-1016 Feb 10, 2025
f066a51
making car setState override the tissue one
allison-li-1016 Feb 10, 2025
6fe1a97
uncommeting WIP comments
allison-li-1016 Feb 10, 2025
d2c924f
renaming tests, editing test to accomodate state change
allison-li-1016 Feb 10, 2025
abb533a
renaming inflammmation variable names to appease linter
allison-li-1016 Feb 10, 2025
d7f191d
renaming private methods to not be confused with public
allison-li-1016 Feb 10, 2025
e2b794a
adding test for fetching activation status
allison-li-1016 Feb 10, 2025
f386ae2
editing test naming conventions
allison-li-1016 Feb 10, 2025
5f06fbb
renaming single letter variables
allison-li-1016 Feb 11, 2025
89a3672
renaming mock var name in metabolism test
allison-li-1016 Feb 11, 2025
ff3a165
renaming binding method
allison-li-1016 Feb 11, 2025
b4cb868
adding break statement back into the setState function
allison-li-1016 Feb 11, 2025
572e9b3
changing location of setState method
allison-li-1016 Feb 11, 2025
bf4e434
polishing unit tests for metabolism cart class
allison-li-1016 Feb 12, 2025
6b65118
removing superfluous comment
allison-li-1016 Feb 12, 2025
9409ae2
removing superflous comments in inflammation class
allison-li-1016 Feb 12, 2025
2d9d1d0
removing superflous comments in metabolism class
allison-li-1016 Feb 12, 2025
d6f22d3
Merge branch 'main' of https://github.com/bagherilab/ARCADE into alli…
allison-li-1016 Feb 17, 2025
6aee6ac
editing test names, deleting trivial tests, making test cases more clear
allison-li-1016 Feb 17, 2025
7a6eb31
changing bindingflag tests to return 0
allison-li-1016 Feb 17, 2025
cbe0dc5
adding CART binding target field, editing reset
allison-li-1016 Feb 17, 2025
30cb7d0
removing redundant max density parameter
allison-li-1016 Feb 19, 2025
1e978ad
adding final keyword to appease linter
allison-li-1016 Feb 20, 2025
5da7d0b
refactoring actions as modules
allison-li-1016 Feb 20, 2025
1a68317
linting: javadoc and curly braces
allison-li-1016 Feb 25, 2025
34fda97
they wanted periods
allison-li-1016 Feb 25, 2025
7bf87d5
fixing inflammmation linting issues
allison-li-1016 Feb 25, 2025
92eb773
reverting accidental replace
allison-li-1016 Feb 25, 2025
774e830
removing superflous comments
allison-li-1016 Feb 25, 2025
443b379
adding javadoc and fixing variable name
allison-li-1016 Feb 25, 2025
a14ef3e
adding tests for accessory methods in PatchCellCART
allison-li-1016 Feb 25, 2025
542f181
refactoring cartcd8 tests
allison-li-1016 Feb 26, 2025
4f18a8c
lintig the tests
allison-li-1016 Feb 26, 2025
3406bd1
linting
allison-li-1016 Feb 26, 2025
8ff037d
adding cytotoxic tests
allison-li-1016 Feb 26, 2025
7fa6c44
adding final keyword
allison-li-1016 Feb 26, 2025
fad8575
better variable names
allison-li-1016 Mar 10, 2025
6842f19
better variable names all around!
allison-li-1016 Mar 10, 2025
f251b98
just importing state and domain instead of entire patch enums
allison-li-1016 Mar 10, 2025
e33fbc2
getting random double, not int for bound range
allison-li-1016 Mar 10, 2025
46da4e0
Merge branch 'main' into allison/carcade-refactor
allison-li-1016 Mar 12, 2025
7c1f3d2
I forgot to import the classes
allison-li-1016 Mar 12, 2025
b41493d
editing tests
allison-li-1016 Mar 12, 2025
c5afd5e
changing bound time to uniform distribution over mean and range
allison-li-1016 Mar 12, 2025
731eb0a
making boundTime final
allison-li-1016 Mar 12, 2025
6bd992d
adding linting
allison-li-1016 Mar 12, 2025
b5fe520
Merge branch 'main' into allison/carcade-refactor
allison-li-1016 Mar 24, 2025
8ae58ae
patching up patch cell rules such that quiescent is properly handeled
allison-li-1016 Mar 24, 2025
95b7c2e
fixing setState such that CART cells cannot be quiescent
allison-li-1016 Mar 24, 2025
6819e73
updating divisions to increment after #161 merge
allison-li-1016 Mar 24, 2025
552d916
adding minutes in a day constant
allison-li-1016 Mar 24, 2025
589e5e7
renaming constant bc its minutes in a day not the other way around
allison-li-1016 Mar 24, 2025
34adb92
removing frivolous else statement
allison-li-1016 Mar 26, 2025
4622588
adding description for granzyme synthesis delay
allison-li-1016 Mar 26, 2025
09c64c2
making bound time a constant bc the range default was 0
allison-li-1016 Mar 26, 2025
ca75c40
deleting cell state exception
allison-li-1016 Mar 26, 2025
7de2494
setting state to senescent when division potential is met
allison-li-1016 Mar 26, 2025
32fb3ab
changing setup such that divisions count up
allison-li-1016 Mar 26, 2025
20b9dce
adding test for BOTH senescence and apoptosis when division potential…
allison-li-1016 Mar 27, 2025
1f6a2e6
renaming tests to match convention
allison-li-1016 Mar 27, 2025
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
100 changes: 100 additions & 0 deletions src/arcade/patch/agent/action/PatchActionKill.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package arcade.patch.agent.action;

import sim.engine.Schedule;
import sim.engine.SimState;
import ec.util.MersenneTwisterFast;
import arcade.core.agent.action.Action;
import arcade.core.sim.Series;
import arcade.core.sim.Simulation;
import arcade.core.util.Parameters;
import arcade.patch.agent.cell.PatchCellCART;
import arcade.patch.agent.cell.PatchCellTissue;
import arcade.patch.agent.process.PatchProcessInflammation;
import arcade.patch.util.PatchEnums.AntigenFlag;
import arcade.patch.util.PatchEnums.Domain;
import arcade.patch.util.PatchEnums.Ordering;
import arcade.patch.util.PatchEnums.State;

/**
* Implementation of {@link Action} for killing tissue agents.
*
* <p>{@code PatchActionKill} is stepped once after a CD8 CAR T-cell binds to a target tissue cell.
* The {@code PatchActionKill} determines if cell has enough granzyme to kill. If so, it kills cell
* and calls the reset to neutral helper to return to neutral state. If not, it waits until it has
* enough granzyme to kill cell.
*/
public class PatchActionKill implements Action {

/** Target cell cytotoxic CAR T-cell is bound to */

Check failure on line 28 in src/arcade/patch/agent/action/PatchActionKill.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionKill.java#L28 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck>

First sentence should end with a period.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionKill.java:28:0: error: First sentence should end with a period. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck)
PatchCellTissue target;

/** CAR T-cell inflammation module */

Check failure on line 31 in src/arcade/patch/agent/action/PatchActionKill.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionKill.java#L31 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck>

First sentence should end with a period.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionKill.java:31:0: error: First sentence should end with a period. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck)
PatchProcessInflammation inflammation;

/** Amount of granzyme inside CAR T-cell */

Check failure on line 34 in src/arcade/patch/agent/action/PatchActionKill.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionKill.java#L34 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck>

First sentence should end with a period.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionKill.java:34:0: error: First sentence should end with a period. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck)
double granzyme;

/** CAR T-cell that the module is linked to */

Check failure on line 37 in src/arcade/patch/agent/action/PatchActionKill.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionKill.java#L37 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck>

First sentence should end with a period.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionKill.java:37:0: error: First sentence should end with a period. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck)
PatchCellCART c;

/** Time delay before calling the action [min]. */
private final int timeDelay;

/**
* Creates a {@code PatchActionKill} for the given {@link PatchCellCART}.
*
* @param c the {@link PatchCellCART} the helper is associated with
* @param target the {@link PatchCellTissue} the CAR T-cell is bound to
*/
public PatchActionKill(
PatchCellCART c,
PatchCellTissue target,
MersenneTwisterFast random,

Check failure on line 52 in src/arcade/patch/agent/action/PatchActionKill.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionKill.java#L52 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck>

Expected @param tag for 'random'.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionKill.java:52:33: error: Expected @param tag for 'random'. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck)
Series series,

Check failure on line 53 in src/arcade/patch/agent/action/PatchActionKill.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionKill.java#L53 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck>

Expected @param tag for 'series'.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionKill.java:53:20: error: Expected @param tag for 'series'. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck)
Parameters parameters) {

Check failure on line 54 in src/arcade/patch/agent/action/PatchActionKill.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionKill.java#L54 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck>

Expected @param tag for 'parameters'.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionKill.java:54:24: error: Expected @param tag for 'parameters'. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck)
this.c = c;
this.target = target;
this.inflammation = (PatchProcessInflammation) c.getProcess(Domain.INFLAMMATION);
this.granzyme = inflammation.getInternal("granzyme");
timeDelay = 0;
}

@Override
public void schedule(Schedule schedule) {
schedule.scheduleOnce(schedule.getTime() + timeDelay, Ordering.ACTIONS.ordinal(), this);
}

@Override
public void register(Simulation sim, String population) {}

@Override
public void step(SimState state) {
Simulation sim = (Simulation) state;

// If current CAR T-cell is stopped, stop helper.
if (c.isStopped()) {
return;
}

// If bound target cell is stopped, stop helper.
if (target.isStopped()) {
if (c.getBindingFlag() == AntigenFlag.BOUND_ANTIGEN) {
c.setBindingFlag(AntigenFlag.UNBOUND);
} else {
c.setBindingFlag(AntigenFlag.BOUND_CELL_RECEPTOR);
}
return;
}

if (granzyme >= 1) {

// Kill bound target cell.
PatchCellTissue tissueCell = (PatchCellTissue) target;
tissueCell.setState(State.APOPTOTIC);

// Use up some granzyme in the process.
granzyme--;
inflammation.setInternal("granzyme", granzyme);
}
}
}
67 changes: 67 additions & 0 deletions src/arcade/patch/agent/action/PatchActionReset.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package arcade.patch.agent.action;

import sim.engine.Schedule;
import sim.engine.SimState;
import ec.util.MersenneTwisterFast;
import arcade.core.agent.action.Action;
import arcade.core.sim.Series;
import arcade.core.sim.Simulation;
import arcade.core.util.Parameters;
import arcade.patch.agent.cell.PatchCellCART;
import arcade.patch.agent.process.PatchProcessInflammation;
import arcade.patch.util.PatchEnums.AntigenFlag;
import arcade.patch.util.PatchEnums.Ordering;
import arcade.patch.util.PatchEnums.State;

/**
* Implementation of {@link Action} for resetting T cell agents.
*
* <p>{@code PatchActionReset} is stepped once after a CD8 CAR T-cell binds to a target tissue cell,
* or after a CD4 CAR T-cell gets stimulated. The {@code PatchReset} unbinds to any target cell that
* the T cell is bound to, and sets the cell state back to undefined.
*/
public class PatchActionReset implements Action {

/** CAR T-cell inflammation module */

Check failure on line 25 in src/arcade/patch/agent/action/PatchActionReset.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionReset.java#L25 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck>

First sentence should end with a period.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionReset.java:25:0: error: First sentence should end with a period. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck)
PatchProcessInflammation inflammation;

/** CAR T-cell that the module is linked to */

Check failure on line 28 in src/arcade/patch/agent/action/PatchActionReset.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionReset.java#L28 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck>

First sentence should end with a period.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionReset.java:28:0: error: First sentence should end with a period. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck)
PatchCellCART c;

/** Time delay before calling the action [min]. */
private final int timeDelay;

/**
* Creates a {@code PatchActionReset} for the given {@link PatchCellCART}.
*
* @param c the {@link PatchCellCART} the helper is associated with
*/
public PatchActionReset(
PatchCellCART c, MersenneTwisterFast random, Series series, Parameters parameters) {

Check failure on line 40 in src/arcade/patch/agent/action/PatchActionReset.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionReset.java#L40 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck>

Expected @param tag for 'random'.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionReset.java:40:50: error: Expected @param tag for 'random'. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck)

Check failure on line 40 in src/arcade/patch/agent/action/PatchActionReset.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionReset.java#L40 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck>

Expected @param tag for 'series'.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionReset.java:40:65: error: Expected @param tag for 'series'. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck)

Check failure on line 40 in src/arcade/patch/agent/action/PatchActionReset.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/action/PatchActionReset.java#L40 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck>

Expected @param tag for 'parameters'.
Raw output
/github/workspace/./src/arcade/patch/agent/action/PatchActionReset.java:40:84: error: Expected @param tag for 'parameters'. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck)
this.c = c;
double boundTime = parameters.getInt("BOUND_TIME");
double boundRange = parameters.getInt("BOUND_RANGE");
timeDelay = (int) (boundTime + Math.round((boundRange * (2 * random.nextInt() - 1))));
}

@Override
public void schedule(Schedule schedule) {
schedule.scheduleOnce(schedule.getTime() + timeDelay, Ordering.ACTIONS.ordinal(), this);
}

@Override
public void register(Simulation sim, String population) {}

@Override
public void step(SimState state) {
// If current CAR T-cell is stopped, stop helper.
if (c.isStopped()) {
return;
}

if (c.getState() == State.CYTOTOXIC || c.getState() == State.STIMULATORY) {
c.setBindingFlag(AntigenFlag.UNBOUND);
c.setState(State.UNDEFINED);
}
}
}
Loading
Loading