Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Model_ROUGHAGENU
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_ROUGHAGENU
Commits
316b8bec
Commit
316b8bec
authored
2 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Remove April 1st as limiting start date
parent
8ab0fad9
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/roughagenutritionmodel/RoughageNutritionModel.java
+4
-10
4 additions, 10 deletions
.../model/roughagenutritionmodel/RoughageNutritionModel.java
with
4 additions
and
10 deletions
src/main/java/no/bioforsk/vips/model/roughagenutritionmodel/RoughageNutritionModel.java
+
4
−
10
View file @
316b8bec
...
@@ -99,18 +99,12 @@ public class RoughageNutritionModel implements Model {
...
@@ -99,18 +99,12 @@ public class RoughageNutritionModel implements Model {
);
);
List
<
Result
>
results
=
new
ArrayList
<>();
List
<
Result
>
results
=
new
ArrayList
<>();
// Get april first of the current year
Calendar
cal
=
Calendar
.
getInstance
(
this
.
timeZone
);
cal
.
setTime
(
firstHarvest
);
cal
.
set
(
Calendar
.
MONTH
,
Calendar
.
APRIL
);
cal
.
set
(
Calendar
.
DATE
,
1
);
Date
aprilFirst
=
new
WeatherUtil
().
normalizeToExactDate
(
cal
.
getTime
(),
timeZone
);
// Get all labels
// Get all labels
//Set labels = resultMatrix.getValueLabelsForDate(aprilFirst);
//Set labels = resultMatrix.getValueLabelsForDate(aprilFirst);
Date
resultDate
=
aprilFirst
;
Date
resultDate
=
firstPossibleGrowthStartDate
;
// Iterate all dates in matrix, starting April 1st
// Iterate all dates in matrix, starting on the firstPossibleGrowthStartDate
Calendar
cal
=
Calendar
.
getInstance
(
this
.
timeZone
);
while
(
resultMatrix
.
getValueLabelsForDate
(
resultDate
)
!=
null
)
while
(
resultMatrix
.
getValueLabelsForDate
(
resultDate
)
!=
null
)
{
{
Result
result
=
new
ResultImpl
();
Result
result
=
new
ResultImpl
();
...
...
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