コード例 #1
0
ReproductionDemand::ReproductionDemand(UniSim::Identifier name, QObject *parent)
	: Model(name, parent)
{
    setRecursionPolicy(Update,ChildrenNot);
    new Parameter<double>("sexRatio", &sexRatio, 0.5, this, "Fixed sex ratio");
    new Parameter<double>("eggWeight", &eggWeight, 0.01, this, "Weight of one egg");
    new Variable<double>("value", &value, this, "Demand for reproduction during this time step (g)");
}
コード例 #2
0
ファイル: phenology.cpp プロジェクト: HawkLane/UniSim
Phenology::Phenology(UniSim::Identifier name, QObject *parent)
	: Model(name, parent)
{
    setRecursionPolicy(Component::Update, Component::ChildrenNot);
    new PullVariable<double>("alive", &alive, this,
                             "Proportion of plant population still alive [0;1], "
                             "i.e. the proportion that has not yet developed past the last stage "
                             "defined as child of @F {Phenology}.");
}
コード例 #3
0
PlantGrowthStage::PlantGrowthStage(UniSim::Identifier name, QObject *parent)
    : Model(name, parent)
{
    setRecursionPolicy(Component::Reset,  Component::ChildrenLast);
    setRecursionPolicy(Component::Update, Component::ChildrenNot);

    new Parameter<double>("inflowAsDensity", &inflowAsDensity, 0., this,
                     "Number of plants to enter this growth stage in the next update "
                     "(i.e. time step) (plants per m @Sup 2 per day)");
    new Parameter<double>("inflowAsDensityEqs", &inflowAsDensityEqs, 0., this,
                     "Number of density equivalents to enter this growth stage in the next update "
                     "(i.e. time step) (density equivalents per m @Sup 2 per day)");
    new Parameter<double>("instantMortality", &instantMortality, 0., this,
                     "Instant mortality (0-100%) to apply to this growth stage in the next update ");
    new Variable<double>("outflowAsDensity", &outflowAsDensity, this,
                     "Number of plants that emerged from this growth stage during the last update "
                     "(i.e. time step) (plants per m @Sup 2 per day)");
    new Variable<double>("outflowAsDensityEqs", &outflowAsDensityEqs, this,
                     "Number of density equivalents that emerged from this growth stage during the last update "
                     "(i.e. time step) (density equivalents per m @Sup 2 per day)");
}
コード例 #4
0
ファイル: life_cycle.cpp プロジェクト: getachewf/UniSim
LifeCycle::LifeCycle(UniSim::Identifier name, QObject *parent)
	: Model(name,parent) 
{
    setRecursionPolicy(Component::Update, Component::ChildrenNot);
    new Variable<double>("contents", &sum, this, "description");
}
コード例 #5
0
ファイル: insect2.cpp プロジェクト: ZhaoweiDing/UniSim
Insect2::Insect2(UniSim::Identifier name, QObject *parent)
    : Model(name, parent)
{
    setRecursionPolicy(Component::Update, Component::ChildrenNot);
}
コード例 #6
0
ファイル: trickle_sequence.cpp プロジェクト: HawkLane/UniSim
TrickleSequence::TrickleSequence(QString name, QObject *parent)
	: Model(name,parent) 
{
    setRecursionPolicy(Update, ChildrenNot);
}
コード例 #7
0
ファイル: insect8.cpp プロジェクト: HawkLane/UniSim
Insect8::Insect8(UniSim::Identifier name, QObject *parent)
    : Model(name, parent)
{
    new Parameter<double>("initEggs", &initEggs, 30., this, "Initial number of insect eggs");
    setRecursionPolicy(Component::Update, Component::ChildrenNot);
}