Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • P PikeLake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

En prévision de l'arrivée de la forge institutionnelle INRAE, nous vous invitons à créer vos nouveaux projets sur la forge MIA.

  • SimAquaLifeSimAquaLife
  • PikeLake
  • Merge requests
  • !1
An error occurred while fetching the assigned milestone of the selected merge_request.

Add Svn history

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Dumoulin Nicolas requested to merge svn-history into master 6 years ago
  • Overview 0
  • Commits 44
  • Pipelines 0
  • Changes 3
Viewing commit c6be28d8
Prev Next
Show latest version
3 files
+ 21
− 16

    Preferences

    File browser
    Compare changes
  • c6be28d8
    Dumoulin Nicolas
    runtime fixes · c6be28d8
    Dumoulin Nicolas authored 9 years ago
data/input/grid.xml
+ 3
− 7
  • View file @ c6be28d8

  • Edit in single-file editor

  • Open in Web IDE


@@ -2,11 +2,7 @@
@@ -2,11 +2,7 @@
<!DOCTYPE xml>
<!DOCTYPE xml>
<pikelake.Grid>
<pikelake.Grid>
<torusType>BOTH</torusType>
<torusType>BOTH</torusType>
<neighborsType>NEIGHBORHOOD_VON_NEUMANN</neighborsType>
<neighborsType>NEIGHBORHOOD_VON_NEUMANN</neighborsType>
<preyCarryingCapacity>50</preyCarryingCapacity>
<gridWidth>10</gridWidth>
<gridWidth>10</gridWidth>
<gridHeight>10</gridHeight>
<gridHeight>10</gridHeight>
<habitatValue0>0.25</habitatValue0>
<habitatValue1>0.5</habitatValue1>
<habitatValue2>1</habitatValue2>
</pikelake.Grid>
</pikelake.Grid>
 
\ No newline at end of file
src/main/java/pikelake/pikes/PikeMovement.java
+ 8
− 8
  • View file @ c6be28d8

  • Edit in single-file editor

  • Open in Web IDE


@@ -13,22 +13,22 @@ import fr.cemagref.simaqualife.pilot.Pilot;
@@ -13,22 +13,22 @@ import fr.cemagref.simaqualife.pilot.Pilot;
public class PikeMovement extends LoopAquaNismsGroupProcess<Pike, PikesGroup> {
public class PikeMovement extends LoopAquaNismsGroupProcess<Pike, PikesGroup> {
 
private int distance;
transient private UniformGen uniformGen;
transient private UniformGen uniformGen;
public PikeMovement(Pilot pilot) {
public PikeMovement(Pilot pilot) {
uniformGen = new UniformGen(pilot.getRandomStream(), new UniformDist());
uniformGen = new UniformGen(pilot.getRandomStream(), new UniformDist());
}
}
@InitTransientParameters
public void initTransientParameters(Pilot pilot) {
@InitTransientParameters
uniformGen = new UniformGen(pilot.getRandomStream(), new UniformDist(0,1));
public void initTransientParameters(Pilot pilot) {
}
uniformGen = new UniformGen(pilot.getRandomStream(), new UniformDist(0, 1));
}
@Override
@Override
protected void doProcess(Pike pike, PikesGroup group) {
protected void doProcess(Pike pike, PikesGroup group) {
final List<Cell> surrounding = group.getEnvironment().
final List<Cell> surrounding = group.getEnvironment().getNeighbours(pike.getPosition(), distance);
getNeighbours(pike.getPosition());
// the first possiblity is the cell where the prey is
// the first possiblity is the cell where the prey is
List<Cell> possibilities = new ArrayList<Cell>();
List<Cell> possibilities = new ArrayList<Cell>();
src/main/java/pikelake/Grid.java
+ 10
− 1
  • View file @ c6be28d8

  • Edit in single-file editor

  • Open in Web IDE


@@ -5,6 +5,8 @@ import fr.cemagref.simaqualife.extensions.spatial2D.Grid2D.NeighborsType;
@@ -5,6 +5,8 @@ import fr.cemagref.simaqualife.extensions.spatial2D.Grid2D.NeighborsType;
import fr.cemagref.simaqualife.kernel.AquaNismsGroup;
import fr.cemagref.simaqualife.kernel.AquaNismsGroup;
import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientParameters;
import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientParameters;
import fr.cemagref.simaqualife.pilot.Pilot;
import fr.cemagref.simaqualife.pilot.Pilot;
 
import java.util.ArrayList;
 
import java.util.List;
import pikelake.pikes.Pike;
import pikelake.pikes.Pike;
public class Grid extends Grid2D<Cell, Individual> {
public class Grid extends Grid2D<Cell, Individual> {
@@ -16,8 +18,9 @@ public class Grid extends Grid2D<Cell, Individual> {
@@ -16,8 +18,9 @@ public class Grid extends Grid2D<Cell, Individual> {
@InitTransientParameters
@InitTransientParameters
public void initTransientParameters(Pilot pilot) {
public void initTransientParameters(Pilot pilot) {
// TODO
// TODO
 
// TODO empty grid
 
this.grid = new Cell[]{new Cell(0, 0.0), new Cell(1, 0.0)};
}
}
@Override
@Override
@@ -39,4 +42,10 @@ public class Grid extends Grid2D<Cell, Individual> {
@@ -39,4 +42,10 @@ public class Grid extends Grid2D<Cell, Individual> {
ind.getPosition().removePike((Pike) ind);
ind.getPosition().removePike((Pike) ind);
}
}
 
public List<Cell> getNeighbours(Cell position, int distance) {
 
// TODO
 
return new ArrayList<Cell>();
 
}
 
 
}
}
Assignee
Dumoulin Nicolas's avatar
Dumoulin Nicolas
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 Participants
Reference:
Source branch: svn-history

Menu

Explore Projects Groups Topics Snippets