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
49a7a40a
Commit
49a7a40a
authored
Feb 17, 2021
by
patrick.lambert
Browse files
test if there is no file for impot for initial observation
parent
4cb664c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/species/DiadromousFishGroup.java
View file @
49a7a40a
...
...
@@ -201,9 +201,9 @@ public class DiadromousFishGroup extends AquaNismsGroup<DiadromousFish, RIOBasin
Map
<
String
,
Double
>
anExcretionRate
=
new
Hashtable
<
String
,
Double
>();
anExcretionRate
.
put
(
"N"
,
24.71
E
-
6
*
24
);
// values from Barber et al, Alosa sapidissima in ug/g wet mass/hour :
// convertit en g
// convertit en g
anExcretionRate
.
put
(
"P"
,
2.17
E
-
6
*
24
);
// values from Barber et al, Alosa sapidissima in ug/g wet mass/hour:
// convertit en g
// convertit en g
/*
* A feature pre spawning
...
...
@@ -489,31 +489,32 @@ public class DiadromousFishGroup extends AquaNismsGroup<DiadromousFish, RIOBasin
Scanner
scanner
;
obs1900
=
new
HashMap
<
String
,
Integer
>();
try
{
reader
=
new
FileReader
(
fileNameInputForInitialObservation
);
// Parsing the file
scanner
=
new
Scanner
(
reader
);
scanner
.
useLocale
(
Locale
.
ENGLISH
);
// to have a comma as decimal separator !!!
scanner
.
useDelimiter
(
Pattern
.
compile
(
"[;\r]"
));
scanner
.
nextLine
();
// to skip the file first line of headers
while
(
scanner
.
hasNextLine
())
{
String
[]
fields
=
scanner
.
nextLine
().
split
(
","
);
// System.out.println(Arrays.toString(fields));
if
(
fields
.
length
>
2
)
{
if
(!
fields
[
2
].
isEmpty
())
obs1900
.
put
(
fields
[
1
],
Integer
.
valueOf
(
fields
[
2
]));
if
(
fileNameInputForInitialObservation
.
isEmpty
())
{
try
{
reader
=
new
FileReader
(
fileNameInputForInitialObservation
);
// Parsing the file
scanner
=
new
Scanner
(
reader
);
scanner
.
useLocale
(
Locale
.
ENGLISH
);
// to have a comma as decimal separator !!!
scanner
.
useDelimiter
(
Pattern
.
compile
(
"[;\r]"
));
scanner
.
nextLine
();
// to skip the file first line of headers
while
(
scanner
.
hasNextLine
())
{
String
[]
fields
=
scanner
.
nextLine
().
split
(
","
);
// System.out.println(Arrays.toString(fields));
if
(
fields
.
length
>
2
)
{
if
(!
fields
[
2
].
isEmpty
())
obs1900
.
put
(
fields
[
1
],
Integer
.
valueOf
(
fields
[
2
]));
}
}
}
reader
.
close
();
scanner
.
close
();
reader
.
close
();
scanner
.
close
();
}
catch
(
IOException
ex
)
{
Logger
.
getLogger
(
DiadromousFishGroup
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
catch
(
IOException
ex
)
{
Logger
.
getLogger
(
DiadromousFishGroup
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
}
// defaut values
if
(
targetedAgeForFemaleSpawnerForFirstTime
==
null
)
targetedAgeForFemaleSpawnerForFirstTime
=
5.5
;
...
...
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