Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SimAquaLife
GR3D
Commits
eaff93ef
Commit
eaff93ef
authored
Apr 20, 2020
by
Lambert Patrick
Browse files
rename with continent
parent
f872fe92
Changes
6
Hide whitespace changes
Inline
Side-by-side
data/input/atlanticarea/BNaaBasins.xml
View file @
eaff93ef
<environment.BasinNetwork
NEA
>
<environment.BasinNetwork
SWithContinent
>
<nbBasin>
0
</nbBasin>
<memorySize>
10
</memorySize>
<memorySizeLongQueue>
30
</memorySizeLongQueue>
...
...
@@ -15,4 +15,4 @@
<distanceGridFileName>
data/input/atlanticarea/distanceGridAA.csv
</distanceGridFileName>
<temperatureCatchmentFile>
data/input/atlanticarea/aa_sst_depuis1800.csv
</temperatureCatchmentFile>
<useRealPDam>
false
</useRealPDam>
</environment.BasinNetworkNEA>
\ No newline at end of file
</environment.BasinNetworkSWithContinent>
\ No newline at end of file
data/input/atlanticarea/obsRealAA.xml
View file @
eaff93ef
...
...
@@ -3,10 +3,10 @@
<java-class>
fr.cemagref.simaqualife.kernel.AquaticWorld
</java-class>
<fr.cemagref.observation.kernel.ObservablesHandler>
<observers>
<environment.BasinNetworkObserver
NEA
>
<environment.BasinNetworkObserver
WithContinent
>
<title>
Atlantic Area
</title>
<threshold>
10000
</threshold>
</environment.BasinNetworkObserver
NEA
>
</environment.BasinNetworkObserver
WithContinent
>
</observers>
</fr.cemagref.observation.kernel.ObservablesHandler>
...
...
data/input/northeastamerica/BNneaBasins.xml
View file @
eaff93ef
<environment.BasinNetwork
NEA
>
<environment.BasinNetwork
SWithContinent
>
<nbBasin>
0
</nbBasin>
<memorySize>
10
</memorySize>
<memorySizeLongQueue>
30
</memorySizeLongQueue>
...
...
@@ -15,4 +15,4 @@
<distanceGridFileName>
data/input/northeastamerica/distanceGridNEA.csv
</distanceGridFileName>
<temperatureCatchmentFile>
data/input/northeastamerica/basins_temperatures_from_1800.csv
</temperatureCatchmentFile>
<useRealPDam>
false
</useRealPDam>
</environment.BasinNetworkNEA>
\ No newline at end of file
</environment.BasinNetworkSWithContinent>
\ No newline at end of file
data/input/northeastamerica/obsRealNEA.xml
View file @
eaff93ef
...
...
@@ -3,10 +3,10 @@
<java-class>
fr.cemagref.simaqualife.kernel.AquaticWorld
</java-class>
<fr.cemagref.observation.kernel.ObservablesHandler>
<observers>
<environment.BasinNetworkObserver
NEA
>
<environment.BasinNetworkObserver
WithContinent
>
<title>
North East America
</title>
<threshold>
1000000
</threshold>
</environment.BasinNetworkObserver
NEA
>
</environment.BasinNetworkObserver
WithContinent
>
</observers>
</fr.cemagref.observation.kernel.ObservablesHandler>
...
...
src/main/java/environment/BasinNetworkObserver
NEA
.java
→
src/main/java/environment/BasinNetworkObserver
WithContinent
.java
View file @
eaff93ef
...
...
@@ -34,7 +34,7 @@ import fr.cemagref.simaqualife.pilot.Pilot;
import
species.DiadromousFishGroup
;
@SuppressWarnings
(
"serial"
)
public
class
BasinNetworkObserver
NEA
extends
ObserverListener
implements
Configurable
,
Drawable
,
MouseMotionListener
{
public
class
BasinNetworkObserver
WithContinent
extends
ObserverListener
implements
Configurable
,
Drawable
,
MouseMotionListener
{
private
String
title
;
private
double
threshold
=
13000000
.;
...
...
@@ -43,7 +43,7 @@ public class BasinNetworkObserverNEA extends ObserverListener implements Configu
public
ColorScaleEnum
colorScaleEnum
=
ColorScaleEnum
.
BluesScale
;
// a basin network
private
transient
BasinNetwork
NEA
bn
;
private
transient
BasinNetwork
SWithContinent
bn
;
// the time
private
transient
Time
time
;
...
...
@@ -108,7 +108,7 @@ public class BasinNetworkObserverNEA extends ObserverListener implements Configu
shapeBasinMap
=
new
HashMap
<
Shape
,
Basin
>();
// load basin to a have access to the shape
bn
=
(
BasinNetwork
NEA
)
pilot
.
getAquaticWorld
().
getEnvironment
();
bn
=
(
BasinNetwork
SWithContinent
)
pilot
.
getAquaticWorld
().
getEnvironment
();
// time in bn is not yet created
time
=
new
Time
();
...
...
@@ -192,7 +192,7 @@ public class BasinNetworkObserverNEA extends ObserverListener implements Configu
maxX
=
maxY
=
Double
.
NEGATIVE_INFINITY
;
minX
=
minY
=
Double
.
POSITIVE_INFINITY
;
mapContinent
=
((
BasinNetwork
NEA
)
pilot
.
getAquaticWorld
().
getEnvironment
()).
getMapContinent
();
mapContinent
=
((
BasinNetwork
SWithContinent
)
pilot
.
getAquaticWorld
().
getEnvironment
()).
getMapContinent
();
for
(
Path2D
.
Double
path
:
mapContinent
.
values
())
{
minX
=
Math
.
min
(
minX
,
path
.
getBounds2D
().
getMinX
());
maxX
=
Math
.
max
(
maxX
,
path
.
getBounds2D
().
getMaxX
());
...
...
@@ -229,7 +229,7 @@ public class BasinNetworkObserverNEA extends ObserverListener implements Configu
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
((
new
XStream
(
new
DomDriver
())).
toXML
(
new
BasinNetworkObserver
NEA
()));
System
.
out
.
println
((
new
XStream
(
new
DomDriver
())).
toXML
(
new
BasinNetworkObserver
WithContinent
()));
}
private
class
DisplayComponent
extends
JComponent
{
...
...
src/main/java/environment/BasinNetwork
NEA
.java
→
src/main/java/environment/BasinNetwork
SWithContinent
.java
View file @
eaff93ef
...
...
@@ -27,7 +27,7 @@ import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientPara
import
fr.cemagref.simaqualife.pilot.Pilot
;
import
miscellaneous.QueueMemoryMap
;
public
class
BasinNetwork
NEA
extends
BasinNetwork
{
public
class
BasinNetwork
SWithContinent
extends
BasinNetwork
{
private
String
basinFile
=
"data/input/northeastamerica/nea_basins.csv"
;
...
...
@@ -122,7 +122,7 @@ public class BasinNetworkNEA extends BasinNetwork {
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
((
new
XStream
(
new
DomDriver
())).
toXML
(
new
BasinNetwork
NEA
()));
System
.
out
.
println
((
new
XStream
(
new
DomDriver
())).
toXML
(
new
BasinNetwork
SWithContinent
()));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment