Closed sebacea closed 2 years ago
For the CVAR case is the same
Land Allocations: [93.54, 83.44, 323.02]
Expected Profit: $53781.29
Hi @sebacea, thanks for posting an issue. This behavior is actually expected since the random infinite parameters in the farmer problem use random samples; hence, each time the problem is solved different samples will be used which will lead to a different answer. Moreover, since only 10 samples are used the results can vary by quite a bit. In practice, many more samples should be used (e.g., 1,000) and the Random.seed!
function can be used to seed the random number generator such that the same samples are used each time the script is run.
I will refine the example to make this more clear.
Ouch. You are right. I forgot that some parameterd were random. Sorry.
Le jeu. 9 juin 2022 à 13:26, Joshua Pulsipher @.***> a écrit :
Hi @sebacea https://github.com/sebacea, thanks for posting an issue. This behavior is actually expected since the random infinite parameters in the farmer problem use random samples; hence, each time the problem is solved different samples will be used which will lead to a different answer. Moreover, since only 10 samples are used the results can vary by quite a bit. In practice, many more samples should be used (e.g., 1,000) and the Random.seed! function can be used to seed the random number generator such that the same samples are used each time the script is run.
I will refine the example to make this more clear.
— Reply to this email directly, view it on GitHub https://github.com/pulsipher/InfiniteOpt.jl/issues/269#issuecomment-1151401442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4RMZBQRRVYJVUOOKWQLNTVOISKNANCNFSM5YKU6JKA . You are receiving this because you were mentioned.Message ID: @.***>
No need to apologize, these type of questions help us to improve the documentation.
Does this update clear things up? https://pulsipher.github.io/InfiniteOpt.jl/previews/PR270/examples/Stochastic%20Optimization/farmer/
Absolutely, many thanks!
Describe the bug I tried to reproduced the example of the farmer in the documentation
To Reproduce I ran the same code you give in the example
Expected behavior The expected output that is given in the example is:
What I obtained is
Desktop (please complete the following information):