From 230fa4a61863d7045b2a4a23ce8e24d0ebf852b6 Mon Sep 17 00:00:00 2001 From: guillaumelobet Date: Fri, 3 Feb 2017 09:36:20 +0100 Subject: [PATCH] update guillaume 2017023 --- ModelParameter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ModelParameter.cpp b/ModelParameter.cpp index 7bd39d4..4af2657 100644 --- a/ModelParameter.cpp +++ b/ModelParameter.cpp @@ -124,11 +124,13 @@ void RootTypeParameter::read(std::istream & cin) { char ch[256]; // dummy cin.getline(ch,256); std::string s; // dummy - cin >> s >> type >> s >> name >> s >> lb >> lbs >> s >> la >> las >> s >> ln >> lns >> s >> nob >> nobs; + double k; + double ks; + cin >> s >> type >> s >> name >> s >> lb >> lbs >> s >> la >> las >> s >> ln >> lns >> s >> k >> ks; cin >> s >> r >> rs >> s >> a >> as >> s >> colorR >> colorG >> colorB >> s >> tropismT >> tropismN >> tropismS >> s >> dx >> s; if(ln > 0) { - nob=(nob-la-lb)/ln+1; //conversion, because the input file delivers the lmax value and not the nob value - nobs = sqrt(pow((nobs/nob),2.0) + pow((lns/ln),2.0 ))*nob/ln + sqrt(pow((las/la),2.0) + pow((lns/ln),2.0) )*la/ln + sqrt(pow((lbs/lb),2.0) + pow((lns/ln),2.0) )*lb/ln; // Fehlerfortpflanzung --richtig? + nob=(k-la-lb)/ln+1; //conversion, because the input file delivers the lmax value and not the nob value + nobs = 0;//sqrt(pow((ks/k),2.0) + pow((lns/ln),2.0 ))*k/ln + sqrt(pow((las/la),2.0) + pow((lns/ln),2.0) )*la/ln + sqrt(pow((lbs/lb),2.0) + pow((lns/ln),2.0) )*lb/ln; // Fehlerfortpflanzung --richtig? }else{ nob=0; nobs = 0;