Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3c5f0f9
change vector getters to use getters, helpful for mocking in tests
Jannetty Oct 17, 2025
cb4815b
changing GMC differentiation module to not be a proliferation module …
Jannetty Oct 17, 2025
d15c8d3
remove shadowing in tests
Jannetty Oct 17, 2025
564525b
fixing imports
Jannetty Oct 17, 2025
0899a19
formatting
Jannetty Oct 17, 2025
651aef5
formatting again
Jannetty Oct 17, 2025
2fbcf15
removed print statements
Jannetty Oct 17, 2025
3f0f860
formatting
Jannetty Oct 17, 2025
0b12f7d
adding ability to determine offset in the frame of the Apical axis in…
Jannetty Oct 20, 2025
d3bd6f6
moving tests into correct place
Jannetty Oct 20, 2025
75382f3
updated test name to reflect function name
Jannetty Oct 20, 2025
df911dc
updating test titles
Jannetty Oct 20, 2025
ba31c85
updating docstring
Jannetty Oct 20, 2025
9a76cf1
formatting
Jannetty Oct 20, 2025
27b07de
changing names of current potts proliferation modules
Jannetty Oct 20, 2025
99af986
Merge branch 'jannetty/update-flygmc-module' into feature/add-phasele…
Jannetty Oct 20, 2025
f200c6f
adding new proliferation module type and changing nomenclature
Jannetty Oct 20, 2025
0ecb30e
changed test filenames appropriately
Jannetty Oct 20, 2025
e1d70a8
formatting
Jannetty Oct 20, 2025
d754aa4
adding period
Jannetty Oct 20, 2025
c1b645b
added PottsModuleProliferation level of abstraction that specifies ad…
Jannetty Oct 21, 2025
78a2492
Merge branch 'feature/add-phaseless-prolifmode' into feature/add-flys…
Jannetty Oct 21, 2025
6695b29
adding missing javadocs
Jannetty Oct 21, 2025
fecaa3f
Merge branch 'feature/add-phaseless-prolifmode' into feature/add-flys…
Jannetty Oct 21, 2025
232d1ae
wip-adding-flystemcellfiles
Jannetty Oct 21, 2025
306c816
making critical volume settable
Jannetty Oct 21, 2025
e90885a
Merge branch 'feature/make-critvol-settable' into feature/add-flystem…
Jannetty Oct 21, 2025
b6d613f
wip adding fly stem proliferation module, fly stem cells, and tests
Jannetty Oct 21, 2025
1935012
moving volume-based growth regulation functions to VolumeBasedDivisio…
Jannetty Oct 21, 2025
ff209db
formatting
Jannetty Oct 21, 2025
1945972
changed visibility of getUniqueIDs, added method relying on getUnique…
Jannetty Oct 22, 2025
6a340dc
moving all parameters so they are read in constructor
Jannetty Oct 22, 2025
4579d71
adding potts parameters to potts parameters xml
Jannetty Oct 22, 2025
7f9461a
formatting
Jannetty Oct 22, 2025
3d04f5d
adding minimum volume for size-dependent critical volume
Jannetty Oct 24, 2025
0b60fc6
adding getOffsetInApicalFrame to PottsLocation
Jannetty Oct 30, 2025
85e008c
removing unnecessary imports
Jannetty Oct 30, 2025
5759730
adding null case to PottsLocation2D docstring
Jannetty Oct 30, 2025
3ac1371
stylecheck
Jannetty Oct 30, 2025
5926510
Merge branch 'feature/add-getoffsetinapicalframe-to-pottslocation2d' …
Jannetty Oct 30, 2025
bc4b7ae
updating function names after merge
Jannetty Oct 30, 2025
ab7281d
add option for deterministic differentiation
Nov 3, 2025
4448c56
add deterministic differentiation param
Nov 3, 2025
e8cfb28
Remove unecessary import
Nov 3, 2025
0a85b7e
Adding boolean flag in the setup file
Nov 3, 2025
eeb551f
added pdelike neuroblast growth (still need to add PDE like GMC growth)
Jannetty Nov 3, 2025
cada3a4
spotlessApply
Nov 4, 2025
10d7c92
adding GMC pde like flag
Jannetty Nov 4, 2025
a59d11f
add test for GMC PDE like behavior
Jannetty Nov 4, 2025
c07c498
updating action-checkstyle as previous version was depreciated
Jannetty Nov 4, 2025
173ce0f
relax 100 character to warning from error
Jannetty Nov 4, 2025
c9390fe
restoring github actions to previous state:
Jannetty Nov 4, 2025
b012523
adjust tests
Jannetty Nov 4, 2025
e3d7193
removing setup file:
Jannetty Nov 4, 2025
245d413
making daughterStemDeterministic compare normalVector to expected mud…
Jannetty Nov 4, 2025
2517263
Merge branch 'feature/add-flystemcells-daughterstem' into feature/add…
Jannetty Nov 4, 2025
03177ba
trying to update linter
Jannetty Nov 5, 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
2 changes: 2 additions & 0 deletions .github/config/checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@
<property name="id" value="LineLength"/>
<property name="fileExtensions" value="java" />
<property name="max" value="100"/>
<property name="severity" value="warning"/>
</module>
<module name="LineLength">
<property name="id" value="LineLengthTest"/>
<property name="fileExtensions" value=".java" />
<property name="max" value="120"/>
<property name="severity" value="error"/>
</module>

<!-- Checks for whitespace -->
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
fetch-depth: 0

- name: Lint code base
uses: dbelyaev/action-checkstyle@v0.9.5
uses: dbelyaev/action-checkstyle@v3.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
checkstyle_config: .github/config/checks.xml
fail_on_error: true
fail_level: error

update-lint-badges:
if: ${{ always() && github.ref == 'refs/heads/main' }}
Expand Down
6 changes: 3 additions & 3 deletions src/arcade/core/util/Vector.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public Vector(Double3D vector) {
* @return the x component
*/
public double getX() {
return vector.x;
return vector.getX();
}

/**
Expand All @@ -42,7 +42,7 @@ public double getX() {
* @return the y component
*/
public double getY() {
return vector.y;
return vector.getY();
}

/**
Expand All @@ -51,7 +51,7 @@ public double getY() {
* @return the z component
*/
public double getZ() {
return vector.z;
return vector.getZ();
}

/**
Expand Down
11 changes: 10 additions & 1 deletion src/arcade/potts/agent/cell/PottsCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public abstract class PottsCell implements Cell {
private final EnumMap<Region, Double> targetRegionSurfaces;

/** Critical volume for cell [voxels]. */
final double criticalVolume;
double criticalVolume;

/** Critical volumes for cell by region [voxels]. */
final EnumMap<Region, Double> criticalRegionVolumes;
Expand Down Expand Up @@ -295,6 +295,15 @@ public double getCriticalVolume() {
return criticalVolume;
}

/**
* Sets the critical volume of the cell.
*
* @param newCriticalVolume the new critical volume
*/
public void setCriticalVolume(double newCriticalVolume) {
criticalVolume = newCriticalVolume;
}

/**
* Gets the critical volume for a region.
*
Expand Down
4 changes: 4 additions & 0 deletions src/arcade/potts/agent/cell/PottsCellContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ public Cell convert(
return new PottsCellFlyNeuron(this, location, parameters, links);
case "fly-gmc":
return new PottsCellFlyGMC(this, location, parameters, links);
case "fly-stem-wt":
return new PottsCellFlyStem(this, location, parameters, links);
case "fly-stem-mudmut":
return new PottsCellFlyStem(this, location, parameters, links);
default:
case "stem":
return new PottsCellStem(this, location, parameters, links);
Expand Down
10 changes: 8 additions & 2 deletions src/arcade/potts/agent/cell/PottsCellFactory.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package arcade.potts.agent.cell;

import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
Expand Down Expand Up @@ -213,8 +214,13 @@
if (linkKeys.size() > 0) {
links = new GrabBag();
for (String linkKey : linkKeys) {
int popLink = series.populations.get(linkKey).getInt("CODE");
links.add(popLink, linksBox.getDouble(linkKey));
try {
int popLink = series.populations.get(linkKey).getInt("CODE");
links.add(popLink, linksBox.getDouble(linkKey));
} catch (Exception e) {
throw new InvalidParameterException(
"A population link is set that references a population that does not exist.");

Check warning on line 222 in src/arcade/potts/agent/cell/PottsCellFactory.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFactory.java#L222 <LineLength>

Line is longer than 100 characters (found 110).
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFactory.java:222:0: warning: Line is longer than 100 characters (found 110). (LineLength)
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/arcade/potts/agent/cell/PottsCellFlyGMC.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* Implementation of {@link PottsCell} for fly GMC agents. These cells divide into two {@link
* PottsCellFlyNeuron} cells. The links must be set in the setup file so that 100% of the daughter
* cells are Neurons. The differentiation of the parent cell is handled by the {@link
* PottsModuleFlyGMCDifferentiation} module. The basal apoptosis rate of this cell should be set to
* 0 in the setup file.
* PottsModuleProliferationVolumeBasedDivision} module. The basal apoptosis rate of this cell should
* be set to 0 in the setup file.
*/
public class PottsCellFlyGMC extends PottsCell {

Expand Down
163 changes: 163 additions & 0 deletions src/arcade/potts/agent/cell/PottsCellFlyStem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
package arcade.potts.agent.cell;

import ec.util.MersenneTwisterFast;
import arcade.core.agent.cell.CellState;
import arcade.core.env.location.Location;
import arcade.core.util.GrabBag;
import arcade.core.util.Parameters;
import arcade.core.util.Vector;
import arcade.potts.agent.module.PottsModule;
import arcade.potts.agent.module.PottsModuleFlyStemProliferation;
import arcade.potts.util.PottsEnums.Phase;
import static arcade.potts.util.PottsEnums.State;

public class PottsCellFlyStem extends PottsCell {

Check failure on line 14 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L14 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:14:1: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck)
/** Enum outlining parameters for each cell type. */
public enum StemType {
/** Wild type stem cell. */
WT(50, 75, 0, 0.25),

/** mud Mutant stem cell. */
MUDMUT(50, 50, -90, 0.5);

/** Percentage x offset from cell edge where division will occur. */
public final int splitOffsetPercentX;

/** Percentage y offset from cell edge where division will occur. */
public final int splitOffsetPercentY;

/** Default direction of division is rotated this much off the apical vector. */
public final double splitDirectionRotation;

/**
* The proportion of the stem cell's critical volume that will be the daughter cell's
* critical volume.
*/
public final double daughterCellCriticalVolumeProportion;

/**
* Constructor for StemType.
*
* @param splitOffsetPercentX percentage x offset from cell edge where division will occur
* @param splitOffsetPercentY percentage y offset from cell edge where division will occur
* @param splitDirectionRotation the plane of division's rotation off the apical vector
* @param daughterCellCriticalVolumeProportion proportion of the stem cell's critical volume
* that will be the daughter cell's critical volume
*/
StemType(
int splitOffsetPercentX,
int splitOffsetPercentY,
double splitDirectionRotation,
double daughterCellCriticalVolumeProportion) {
this.splitOffsetPercentX = splitOffsetPercentX;
this.splitOffsetPercentY = splitOffsetPercentY;
this.splitDirectionRotation = splitDirectionRotation;
this.daughterCellCriticalVolumeProportion = daughterCellCriticalVolumeProportion;
}
}

/** The type of stem cell. */
public final StemType stemType;

private Vector apicalAxis;

Check failure on line 62 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L62 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:62:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck)

/**
* Constructor for PottsCellFlyStem.
*
* @param container the container for the cell
* @param location the location of the cell
* @param parameters the parameters for the cell
* @param links the links for the cell
* @throws IllegalArgumentException if the stem type is not recognized
*/
public PottsCellFlyStem(
PottsCellContainer container, Location location, Parameters parameters, GrabBag links) {
super(container, location, parameters, links);

if (module != null) {
((PottsModule) module).setPhase(Phase.UNDEFINED);
}

String stemTypeString = parameters.getString("CLASS");
switch (stemTypeString) {
case "fly-stem-wt":
stemType = StemType.WT;
break;
case "fly-stem-mudmut":
stemType = StemType.MUDMUT;
break;
default:
throw new IllegalArgumentException("Unknown StemType: " + stemTypeString);
}
}

public void setApicalAxis(Vector apicalAxis) {

Check failure on line 94 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L94 <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck>

Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'setApicalAxis' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'setApicalAxis' static/final/abstract/empty, or adding allowed annotation for the method.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:94:5: error: Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'setApicalAxis' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'setApicalAxis' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)

Check failure on line 94 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L94 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:94:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
this.apicalAxis = apicalAxis;
}

/**
* Gets the apical axis of the cell. If no apical axis is set, it returns a vector along the y
* axis as a default vector
*
* @return the apical axis of the cell
*/
public Vector getApicalAxis() {
if (apicalAxis != null) {
return apicalAxis;
} else {
return new Vector(0, 1, 0);
}
}

@Override
public PottsCellContainer make(int newID, CellState newState, MersenneTwisterFast random) {
throw new UnsupportedOperationException(
"make(int, CellState, MersenneTwisterFast) not supported. Please use make(int, CellState, MersenneTwisterFast, int, double) instead.");

Check warning on line 115 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L115 <LineLength>

Line is longer than 100 characters (found 151).
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:115:0: warning: Line is longer than 100 characters (found 151). (LineLength)

Check failure on line 115 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L115 <LineLengthTest>

Line is longer than 120 characters (found 151).
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:115:0: error: Line is longer than 120 characters (found 151). (LineLengthTest)
}

public PottsCellContainer make(

Check failure on line 118 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L118 <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck>

Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'make' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'make' static/final/abstract/empty, or adding allowed annotation for the method.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:118:5: error: Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'make' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'make' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)

Check failure on line 118 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L118 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:118:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
int newID,
CellState newState,
MersenneTwisterFast random,
int newPop,
double daughterCellCriticalVolume) {

divisions++;

return new PottsCellContainer(
newID,
id,
newPop,
age,
divisions,
newState,
Phase.UNDEFINED,
0,
null,
daughterCellCriticalVolume,
criticalHeight,
criticalRegionVolumes,
criticalRegionHeights);
}

@Override
void setStateModule(CellState newState) {
switch ((State) newState) {
case PROLIFERATIVE:
module = new PottsModuleFlyStemProliferation(this);
break;
default:
module = null;
break;
}
}

/**
* Gets the stem type of the cell.
*
* @return the stem type of the cell
*/
public final StemType getStemType() {
return stemType;
}
}
4 changes: 2 additions & 2 deletions src/arcade/potts/agent/cell/PottsCellStem.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import arcade.potts.agent.module.PottsModuleApoptosisSimple;
import arcade.potts.agent.module.PottsModuleAutosis;
import arcade.potts.agent.module.PottsModuleNecrosis;
import arcade.potts.agent.module.PottsModuleProliferationSimple;
import arcade.potts.agent.module.PottsModuleProliferationWithCellCycleCheckSimple;
import arcade.potts.agent.module.PottsModuleQuiescence;
import static arcade.potts.util.PottsEnums.Region;
import static arcade.potts.util.PottsEnums.State;
Expand Down Expand Up @@ -73,7 +73,7 @@ void setStateModule(CellState newState) {
module = new PottsModuleQuiescence(this);
break;
case PROLIFERATIVE:
module = new PottsModuleProliferationSimple(this);
module = new PottsModuleProliferationWithCellCycleCheckSimple(this);
break;
case APOPTOTIC:
module = new PottsModuleApoptosisSimple(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
import arcade.potts.util.PottsEnums.State;

/**
* Implementation of {@link PottsModuleProliferationSimple} for fly GMC agents. These cells divide
* into two {@link PottsCellFlyNeuron} cells. The links must be set in the setup file so that 100%
* of the daughter cells are Neurons.
* Implementation of {@link PottsModuleProliferationVolumeBasedDivision} for fly GMC agents. These
* cells divide into two {@link PottsCellFlyNeuron} cells. The links must be set in the setup file
* so that 100% of the daughter cells are Neurons.
*/
public class PottsModuleFlyGMCDifferentiation extends PottsModuleProliferationSimple {
public class PottsModuleFlyGMCDifferentiation extends PottsModuleProliferationVolumeBasedDivision {

Boolean pdeLike;

Check failure on line 23 in src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java#L23 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java:23:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck)

/**
* Creates a fly GMC proliferation module.
Expand All @@ -27,8 +29,18 @@
*/
public PottsModuleFlyGMCDifferentiation(PottsCellFlyGMC cell) {
super(cell);
pdeLike = (cell.getParameters().getInt("proliferation/PDELIKE") != 0);
}

/**
* Adds a cell to the simulation.
*
* <p>The cell location is split. The new neuron cell is created, initialized, and added to the
* schedule. This cell's location is also assigned to a new Neuron cell.
*
* @param random the random number generator
* @param sim the simulation instance
*/
@Override
void addCell(MersenneTwisterFast random, Simulation sim) {
Potts potts = ((PottsSimulation) sim).getPotts();
Expand Down Expand Up @@ -82,4 +94,42 @@
differentiatedGMC.reset(potts.ids, potts.regions);
differentiatedGMC.schedule(sim.getSchedule());
}

public void updateGrowthRate(Simulation sim) {

Check failure on line 98 in src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java#L98 <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck>

Class 'PottsModuleFlyGMCDifferentiation' looks like designed for extension (can be subclassed), but the method 'updateGrowthRate' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsModuleFlyGMCDifferentiation' final or making the method 'updateGrowthRate' static/final/abstract/empty, or adding allowed annotation for the method.
Raw output
/github/workspace/./src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java:98:5: error: Class 'PottsModuleFlyGMCDifferentiation' looks like designed for extension (can be subclassed), but the method 'updateGrowthRate' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsModuleFlyGMCDifferentiation' final or making the method 'updateGrowthRate' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)

Check failure on line 98 in src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java#L98 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java:98:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
if (!dynamicGrowthRateVolume) {
cellGrowthRate = cellGrowthRateBase;
} else {
if (!pdeLike) {
updateCellVolumeBasedGrowthRate(
cell.getLocation().getVolume(), cell.getCriticalVolume());
} else {
// PDE-like: use population-wide averages for GMCs (same pop as this cell)
sim.util.Bag objs = sim.getGrid().getAllObjects();

double volSum = 0.0;
double critSum = 0.0;
int count = 0;

for (int i = 0; i < objs.numObjs; i++) {
Object o = objs.objs[i];
if (!(o instanceof arcade.potts.agent.cell.PottsCell)) continue;

Check failure on line 115 in src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java#L115 <com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck>

'if' construct must use '{}'s.
Raw output
/github/workspace/./src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java:115:21: error: 'if' construct must use '{}'s. (com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck)

arcade.potts.agent.cell.PottsCell c = (arcade.potts.agent.cell.PottsCell) o;
if (c.getPop() != cell.getPop()) continue; // keep to same population

Check failure on line 118 in src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java#L118 <com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck>

'if' construct must use '{}'s.
Raw output
/github/workspace/./src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java:118:21: error: 'if' construct must use '{}'s. (com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck)

if (o instanceof arcade.potts.agent.cell.PottsCellFlyGMC) {
arcade.potts.agent.cell.PottsCellFlyGMC gmc =
(arcade.potts.agent.cell.PottsCellFlyGMC) o;
volSum += gmc.getLocation().getVolume();
critSum += gmc.getCriticalVolume();
count++;
}
}
double avgVolume = volSum / count;
double avgCritVol = critSum / count;
updateCellVolumeBasedGrowthRate(avgVolume, avgCritVol);
System.out.println("GMC " + cell.getID() + "growth rate = " + cellGrowthRate);
}
}
}
}
Loading
Loading