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 7
Viewing commit cd5beab8
Prev Next
Show latest version
7 files
+ 32
− 12

    Preferences

    File browser
    Compare changes
  • cd5beab8
    guillaume.garbay
    No commit message · cd5beab8
    guillaume.garbay authored 9 years ago
    No commit message
data/input/fishLight.xml
+ 0
− 2
  • View file @ cd5beab8

  • Edit in single-file editor

  • Open in Web IDE


@@ -25,7 +25,6 @@
</processesAtBegin>
<processesEachStep>
<pikelake.environment.Time>
</pikelake.environment.Time>
@@ -33,7 +32,6 @@
</pikelake.Marnage>
<!--pikelake.Grid>
</pikelake.Grid-->
<pikelake.pikes.PikeMovement>
data/input/observersCharts.xml
+ 6
− 0
  • View file @ cd5beab8

  • Edit in single-file editor

  • Open in Web IDE


@@ -32,6 +32,12 @@
<blue>255</blue>
<alpha>255</alpha>
</hsiColor>
<textColor>
<red>10</red>
<green>10</green>
<blue>10</blue>
<alpha>255</alpha>
</textColor>
<margin>0</margin>
</pikelake.environment.Movement2DWithinShapeObserver>
src/main/java/pikelake/environment/Movement2DWithinShapeObserver.java
+ 19
− 2
  • View file @ cd5beab8

  • Edit in single-file editor

  • Open in Web IDE


@@ -21,6 +21,7 @@ import java.awt.geom.GeneralPath;
import java.awt.geom.Path2D;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -36,6 +37,7 @@ import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.MultiPolygon;
import pikelake.Grid;
import pikelake.Marnage;
import pikelake.pikes.Pike;
import pikelake.pikes.PikesGroup;
@@ -62,7 +64,9 @@ public class Movement2DWithinShapeObserver extends ObserverListener implements C
private Color shapeColor;
@Description (name="HSI color",tooltip="HSI color")
private Color hsiColor;
@Description (name="Text color",tooltip="Text color")
private Color textColor;
private int margin;
// private int sizeOfDisplayedIndividuals;
// use for determine if generalPath must be rescaled
@@ -276,7 +280,20 @@ public class Movement2DWithinShapeObserver extends ObserverListener implements C
g2d.drawRect((int) xPike2, (int) yPike2, 1, 1);
}
}
// Annotations
DecimalFormat df = new DecimalFormat("00");
g.setColor(textColor);
// Date
String line = Time.getSeason() + " " + df.format(Time.jourMois) + "/" + df.format(Time.mois) + " " + Time.getPhaseJour() + " " + df.format(Time.heure);
g2d.drawString(line, 5, 10);
// Nombre de pas
line = "NbPas : " + Time.nbrIter;
g2d.drawString(line, 5, 25);
// Marnage ou Cote
line = "Cote : " + Marnage.marnageNew;
g2d.drawString(line, 5, 40);
}
}
src/main/java/pikelake/environment/Time.java
+ 2
− 1
  • View file @ cd5beab8

  • Edit in single-file editor

  • Open in Web IDE


@@ -12,11 +12,12 @@ public class Time extends AquaNismsGroupProcess<Pike,PikesGroup> {
public static enum Mois {MoisZero, JANVIER, FEVRIER, MARS, AVRIL, MAI, JUIN, JUILLET, AOUT, SEPTEMBRE, OCTOBRE, NOVEMBRE, DECEMBRE};
public static int mois = 1, jour = 0, jourMois = 1, saison = 0, annee = 2012, phaseJour = 0, heure = 0;
public static String PhaseJour;
public static long nbrIter = 0;
@Override
public void doProcess (PikesGroup group) {
long nbrIter = group.getPilot().getCurrentTime();
nbrIter = group.getPilot().getCurrentTime();
// Pas de temps Horaire
heure = (int) nbrIter % 24;
src/main/java/pikelake/pikes/Pike.java
+ 2
− 3
  • View file @ cd5beab8

  • Edit in single-file editor

  • Open in Web IDE


@@ -42,13 +42,12 @@ public class Pike extends Individual {
public double getSuitabilityForPike(Cell cell){
if (cell.getPikes().size()>1)
return 0.; // at least an other pike in the cell
return -1.; // at least an other pike in the cell
else
{
//System.out.println(cell.getIndex());
//System.out.println(cell.getHabitatQuality());
return cell.getHabitatQuality(); /////////////////////////////////////////////////////////
return cell.getHabitatQuality();
}
//return((double) cell.getPreys().size()) * cell.getHabitatQuality(); // number of preys accessible
}
src/main/java/pikelake/pikes/PikeMovement.java
+ 3
− 3
  • View file @ cd5beab8

  • Edit in single-file editor

  • Open in Web IDE


@@ -29,12 +29,14 @@ public class PikeMovement extends LoopAquaNismsGroupProcess<Pike, PikesGroup> {
@Override
protected void doProcess(Pike pike, PikesGroup group) {
// Recupration HSI de la cellule occupee
double cellSuitability = pike.getSuitabilityForPike(pike.getPosition());
// Calcul de la liste des cellules accessibles (distance donnee par fichier entree: DistHorCartBro)
final List<Cell> surrounding = group.getEnvironment().getNeighbours(pike.getPosition());
// the first possiblity is the cell where the prey is
List<Cell> possibilities = new ArrayList<Cell>();
possibilities.add(pike.getPosition());
@@ -44,9 +46,7 @@ public class PikeMovement extends LoopAquaNismsGroupProcess<Pike, PikesGroup> {
for (Cell cell : surrounding) {
double currentCellSuitability = pike.getSuitabilityForPike(cell);
//System.out.println(currentCellSuitability);
if (currentCellSuitability >= 0) {
if (currentCellSuitability > cellSuitability) {
cellSuitability = currentCellSuitability;
src/main/java/pikelake/pikes/PikeTrackLocation.java
+ 0
− 1
  • View file @ cd5beab8

  • Edit in single-file editor

  • Open in Web IDE


@@ -18,7 +18,6 @@ public class PikeTrackLocation extends AquaNismsGroupProcess<Pike, PikesGroup> {
for (Pike pike : group.getAquaNismsList())
trackLocation[pike.idIndividu][cpt] = pike.getPosition().getIndex();
cpt++;
System.out.println(trackLocation.length + " " + trackLocation[1].length + " " + trackLocation.length);
}
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