Skip to content
Snippets Groups Projects
Commit 5bf97235 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Minor sketching changes

parent c8285d57
No related branches found
No related tags found
No related merge requests found
...@@ -28,19 +28,19 @@ ...@@ -28,19 +28,19 @@
* @param C Control cost (purchase & application of pesticide: [monetary unit / area unit] (e.g. NOK/daa) * @param C Control cost (purchase & application of pesticide: [monetary unit / area unit] (e.g. NOK/daa)
* @param V market value of crop ([monetary unit / weight unit], e.g. NOK/tonn) * @param V market value of crop ([monetary unit / weight unit], e.g. NOK/tonn)
* @param Yp yield potential, maximum yield per production unit [weight unit / area unit], e.g. tonn/daa * @param Yp yield potential, maximum yield per production unit [weight unit / area unit], e.g. tonn/daa
* @param K pesticide efficacy, the proportion of pest population killed. Range 0-1 (1=100% killed) * @param K pesticide efficacy, the percentage of pest population killed. Range 0-1 (1=100% killed)
* @param D damage per pest, expressed as a percentage of crop yield loss per pest inidividual(?) * @param D damage per pest, expressed as a percentage of crop yield loss per pest inidividual(?)
*/ */
function calculateEIL(C,V,Yp,K,D) function calculateEIL(C,V,Yp,K,D)
{ {
// From Pedigo et al (1986) // From Pedigo et al (1986)
return C / (V * Yp * K * D); return C / (V * Yp * (K/100) * D);
} }
function renderResult(formId) function renderResult(formId)
{ {
var theForm = document.getElementById(formId); var theForm = document.getElementById(formId);
var resultParameters = " = " + theForm["C"].value + " / (" + theForm["V"].value + " * " + theForm["Yp"].value + " * " + theForm["K"].value + " * " + theForm["D"].value + ")"; var resultParameters = " = " + theForm["C"].value + " / (" + theForm["V"].value + " * " + theForm["Yp"].value + " * (" + theForm["K"].value + "/100) * " + theForm["D"].value + ")";
var resultValue = calculateEIL( var resultValue = calculateEIL(
theForm["C"].value, theForm["C"].value,
theForm["V"].value, theForm["V"].value,
......
...@@ -30,17 +30,20 @@ ...@@ -30,17 +30,20 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="C">{% trans "Control cost" %}</label> <label for="C">{% trans "Control cost" %} (C) [NOK/daa]</label> <br/>
(the cost of purchasing and applying the control action (insecticide), expressed as dollar amount per acre ($/acre).)
<input type="number" name="C" class="form-control" min="0" onblur="validateField(this);"/> <input type="number" name="C" class="form-control" min="0" onblur="validateField(this);"/>
<span class="help-block" id="{{ form_id }}_C_validation"></span> <span class="help-block" id="{{ form_id }}_C_validation"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="V">{% trans "Market value" %}</label> <label for="V">{% trans "Market value" %} (V) [NOK/kg]</label><br/>
the market value of peas or the contracted price per hundred-weight, expressed as the dollar amount per hundred-weight ($/cwt).
<input type="number" name="V" class="form-control" min="0" onblur="validateField(this);"/> <input type="number" name="V" class="form-control" min="0" onblur="validateField(this);"/>
<span class="help-block" id="{{ form_id }}_V_validation"></span> <span class="help-block" id="{{ form_id }}_V_validation"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="Yp">{% trans "Yield potential" %}</label> <label for="Yp">{% trans "Yield potential" %} (Yp) [kg/daa]</label><br/>
the maximum yield per production unit, expressed as hundred-weight per acre (cwt/acre), historical values are typically used for this expression.
<input type="number" name="Yp" class="form-control" min="0" onblur="validateField(this);"/> <input type="number" name="Yp" class="form-control" min="0" onblur="validateField(this);"/>
<span class="help-block" id="{{ form_id }}_Yp_validation"></span> <span class="help-block" id="{{ form_id }}_Yp_validation"></span>
</div> </div>
...@@ -51,12 +54,14 @@ ...@@ -51,12 +54,14 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="K">{% trans "Insecticide efficacy" %}</label> <label for="K">{% trans "Insecticide efficacy" %} (K) [%]</label><br/>
the efficacy of any insecticide is the proportion of the pest population killed, it can range from 0 to 1 (typically it is expressed as 1, meaning 100% of the pest population is killed).
<input type="number" name="K" class="form-control" min="0" max="1" onblur="validateField(this);"/> <input type="number" name="K" class="form-control" min="0" max="1" onblur="validateField(this);"/>
<span class="help-block" id="{{ form_id }}_K_validation"></span> <span class="help-block" id="{{ form_id }}_K_validation"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="D">{% trans "Damage per pest individual" %} (?)</label> <label for="D">{% trans "Damage per pest individual" %} (?) (D) [kg/skadegjørermåleenhet]</label> <br/>
Damage per aphid, expressed as a percentage of crop yield loss per aphid during the start of flowering.
<input type="number" name="D" class="form-control" min="0" onblur="validateField(this);"/> <input type="number" name="D" class="form-control" min="0" onblur="validateField(this);"/>
<span class="help-block" id="{{ form_id }}_D_validation"></span> <span class="help-block" id="{{ form_id }}_D_validation"></span>
</div> </div>
...@@ -66,7 +71,7 @@ ...@@ -66,7 +71,7 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div id="result" style="font-weight: bold;"> <div id="result" style="font-weight: bold;">
{% trans "Calculated EIL" %} = C / (V * Yp * D * K)<span id="resultParameters"></span>: <span id="resultValue"></span> {% trans "Calculated EIL" %} = C / (V * Yp * D * (K/100))<span id="resultParameters"></span>: <span id="resultValue"></span>
</div> </div>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment