tutorials:radiation-model-in-crop_model7
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:radiation-model-in-crop_model7 [2025/05/27 18:20] – barley1965 | tutorials:radiation-model-in-crop_model7 [2025/05/27 18:26] (current) – barley1965 | ||
---|---|---|---|
Line 6: | Line 6: | ||
<code java> | <code java> | ||
module Flower(int age, int max_age) | module Flower(int age, int max_age) | ||
- | RU(180) Cone(0.3, 0.3).(setShader(internodemat)) | + | RU(180) Cone(0.3, 0.3).(setShader(internodemat)) |
- | </ | + | </ |
- | When the Flower is introduced in the run method for the first time it is initiated like this: | + | When the Flower is introduced in the '' |
+ | <code java> | ||
+ | Bud(r, p, o), (r == 10) ==> RV(-0.1) Internode(0.05, | ||
+ | ... | ||
+ | </ | ||
- | The initial age is thus 1, whereas the maximum age that the flower can attain is between 10 and 15 days, as determined by this command, irandom(10, 15), which will draw a number between 10 and 15, with equal probability. | + | The initial age is thus 1, whereas the maximum age that the flower can attain is between 10 and 15 days, as determined by this command, |
As long as age has not attained max_age, it is incremented by one, i.e. the flower ages: | As long as age has not attained max_age, it is incremented by one, i.e. the flower ages: | ||
- | + | <code java> | |
+ | //increment flower age as long as max age is not reached: | ||
+ | Flower(t, m), (t<m) ==> Flower(t+1, m); | ||
+ | </ | ||
When age is equal to max_age the flower is dropped: | When age is equal to max_age the flower is dropped: | ||
+ | <code java> | ||
+ | //shed flower when max age is reached: | ||
+ | Flower(t, | ||
+ | </ | ||
Next, we could let the flower be transformed into a fruit (module already declared), with a certain probability, | Next, we could let the flower be transformed into a fruit (module already declared), with a certain probability, | ||
- | Flower(t, m), (t >= m) ==> ; | + | <code java> |
- | + | //shed flower when max age is reached: | |
- | Flower(t, m), (t >= m) ==> if(probability(0.5)) (Fruit); | + | Flower(t, |
- | + | </ | |
- | + | this: | |
+ | <code java> | ||
+ | //shed flower when max age is reached: | ||
+ | //Flower(t, | ||
+ | Flower(t, | ||
+ | </ | ||
- | Task: Introduce leaf shedding after 20 steps! | + | //Task: Introduce leaf shedding after 20 steps!// |
tutorials/radiation-model-in-crop_model7.1748362852.txt.gz · Last modified: 2025/05/27 18:20 by barley1965