Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add module 5: Penalty in case of exceeding legal limit #1

Merged
merged 6 commits into from
May 17, 2024

Conversation

SvenVw
Copy link
Member

@SvenVw SvenVw commented May 3, 2024

Added

  • Add module 5: Penalty in case of exceeding legal limit

Fixed

  • Fix the module numbering to be conistent

@SvenVw SvenVw requested a review from gerardhros May 3, 2024 11:30
@SvenVw SvenVw self-assigned this May 3, 2024
@SvenVw SvenVw changed the title Add legal limits Add module 5: Penalty in case of exceeding legal limit May 3, 2024
@@ -45,11 +46,14 @@ createApusDataset <- function(farms = NULL, cultivations, fertilizers, fields_ma
self$farms_count <- 100
}

fines <- dcast(fines, . ~ norm, value.var = 'fine')[, 2:4]
self$fines <- torch::torch_tensor(as.matrix(fines), device = device)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not better to use mget(colnames) ?

fields.fertilizers.dose.n_workable <- doses * fertilizers.p_n_workable
fields.dose.n_workable <- torch::torch_sum(fields.fertilizers.dose.n_workable, dim = 3)
farms.dose.n_workable <- torch::torch_sum( fields.dose.n_workable , dim = 2)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workable is a bad translation of "werkzaam". For now ok, but for transparency replace by nitrogen fertilizer replacement value (nfrv) or effective nitrogen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and for later update, distinguish between the norms given by government and by the agronomic ones.

@@ -2,5 +2,5 @@

## Added
* Adds `apus` object with the functions `addField`, `trainModel` and `optimizeFertilizerChoice`
* Adds for the cost function module 1 and 2
* Adds for the cost function module 1,5 and 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add in brackets behind the number the main topic/issue of the module

Copy link
Contributor

@gerardhros gerardhros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LQTM. tensors are difficult to evaluate visually. ;-) A few questions are added, relevant for next steps

@SvenVw SvenVw merged commit 7e43cb0 into main May 17, 2024
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants