Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Model_APPLESCABM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
Models
Java
Model_APPLESCABM
Commits
88d703c8
Commit
88d703c8
authored
11 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Setting ASCMAT value only once per day
parent
1742c1c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/bioforsk/vips/model/applescabmodel/AppleScabModel.java
+8
-4
8 additions, 4 deletions
...no/bioforsk/vips/model/applescabmodel/AppleScabModel.java
with
8 additions
and
4 deletions
src/main/java/no/bioforsk/vips/model/applescabmodel/AppleScabModel.java
+
8
−
4
View file @
88d703c8
...
...
@@ -100,7 +100,7 @@ public class AppleScabModel extends I18nImpl implements Model{
{
Result
result
=
new
ResultImpl
();
result
.
setResultValidTime
(
timeStamp
);
result
.
setValue
(
AppleScabCalculations
.
ASCOSPORE_MATURITY
,
String
.
valueOf
(
this
.
calculations
.
getParamDoubleValueForDate
(
timeStamp
,
AppleScabCalculations
.
ASCOSPORE_MATURITY
)));
result
.
setValue
(
AppleScabCalculations
.
ASCOSPORE_MATURITY
,
this
.
calculations
.
getParamDoubleValueForDate
(
timeStamp
,
AppleScabCalculations
.
ASCOSPORE_MATURITY
)
!=
null
?
String
.
valueOf
(
this
.
calculations
.
getParamDoubleValueForDate
(
timeStamp
,
AppleScabCalculations
.
ASCOSPORE_MATURITY
))
:
""
);
result
.
setValue
(
AppleScabCalculations
.
ACCUMULATED_MILLS
,
String
.
valueOf
(
this
.
calculations
.
getParamDoubleValueForDate
(
timeStamp
,
AppleScabCalculations
.
ACCUMULATED_MILLS
)));
result
.
setValue
(
AppleScabCalculations
.
TM
,
String
.
valueOf
(
this
.
calculations
.
getParamDoubleValueForDate
(
timeStamp
,
AppleScabCalculations
.
TM
)));
result
.
setValue
(
AppleScabCalculations
.
BT
,
String
.
valueOf
(
this
.
calculations
.
getParamDoubleValueForDate
(
timeStamp
,
AppleScabCalculations
.
BT
)));
...
...
@@ -134,7 +134,7 @@ public class AppleScabModel extends I18nImpl implements Model{
{
return
Result
.
WARNING_STATUS_NO_WARNING
;
}
else
if
(
this
.
calculations
.
getParamDoubleValueForDate
(
t
imeStamp
,
AppleScabCalculations
.
ASCOSPORE_MATURITY
)
==
100
d
)
else
if
(
this
.
calculations
.
getParamDoubleValueForDate
(
t
his
.
weatherUtil
.
normalizeToExactDate
(
timeStamp
,
this
.
timeZone
)
,
AppleScabCalculations
.
ASCOSPORE_MATURITY
)
==
100
d
)
{
return
Result
.
WARNING_STATUS_NO_WARNING
;
}
...
...
@@ -347,8 +347,12 @@ public class AppleScabModel extends I18nImpl implements Model{
{
currentAppleScabStadium
=
APPLE_SCAB_STADIUM_CONIDIA
;
}
ascosporeMaturity
=
ascosporeMaturityTable
.
getAscosporeMaturity
(
this
.
getAccumulatedTemperature
(
currentTimeStamp
));
this
.
calculations
.
setParamDoubleValueForDate
(
currentTimeStamp
,
AppleScabCalculations
.
ASCOSPORE_MATURITY
,
ascosporeMaturity
);
// We update and store the ascospore maturity only at midnight, when we have an updated accumulated temperature
if
(
currentTimeStamp
.
equals
(
this
.
weatherUtil
.
normalizeToExactDate
(
currentTimeStamp
,
this
.
timeZone
)))
{
ascosporeMaturity
=
ascosporeMaturityTable
.
getAscosporeMaturity
(
this
.
getAccumulatedTemperature
(
currentTimeStamp
));
this
.
calculations
.
setParamDoubleValueForDate
(
currentTimeStamp
,
AppleScabCalculations
.
ASCOSPORE_MATURITY
,
ascosporeMaturity
);
}
// We accumulate Mills only when there are humid conditions
if
(
this
.
getLeafWetness
(
currentTimeStamp
)
<
LEAF_WETNESS_THRESHOLD
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment