Skip to content
Snippets Groups Projects
Commit a7c3c774 authored by Kottelenberg, David's avatar Kottelenberg, David
Browse files

Changed Plant structure to be a composition of parts, with seperate parts for...

Changed Plant structure to be a composition of parts, with seperate parts for organ info, growth variables, and photosynthesis variables. Changed getproperty function to allow to step into those parts.
parent f4c89400
Branches
No related tags found
No related merge requests found
sink-source_notes.txt
open_julia.bat
\ No newline at end of file
open_julia.bat
julia_test.txt
\ No newline at end of file
using VPL;
using NamedArrays;
using TryCatch;
include("Plant.jl");
include("Field.jl");
......@@ -15,6 +14,9 @@ const Seed = Plant.Seed
const PlantBase = Plant.PlantBase;
const BranchBase = Plant.BranchBase;
const FieldBase = Field.FieldBase;
const OrganInfo = Plant.OrganInfo
const GrowthVars = Plant.GrowthVars
const PhotosynthesisVars = Plant.PhotosynthesisVars
include("Rules.jl");
include("Updates.jl");
......@@ -31,15 +33,16 @@ function createPlant(Location, Species, PlantNumber, Strip, Row, Position)
BB = BranchBase(Species = Species,
PlantNumber = PlantNumber,
Order = 0)
OI = OrganInfo(BB = BB,
Species = Species,
PlantNumber = PlantNumber,
Order = 0)
Axiom = T(Location) + Seed(Species = Species,
PlantNumber = PlantNumber,
Endosperm = Endosperm[Species]) +
RH(rand(0.0:360.0)) +
Meristem(BB = BB,
Species = Species,
PlantNumber = PlantNumber,
Meristem(OI = OI,
Phyllotaxis = Phyllotaxis[Species],
Order = 0,
Rank = 1,
Dormant = false);
PB = PlantBase(Species = Species,
......@@ -70,7 +73,7 @@ F = [FB, Plants];
function simulateField(F::Array, N::Int64, Time::Int64)
NewF = deepcopy(F);
for i in 1:N
Threads.@threads for j in eachindex(F[2])
#=Threads.@threads =#for j in eachindex(F[2])
NewF[2][j] = simulatePlant(NewF[2][j], 1, Time);
end
Time += 1;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment