home *** CD-ROM | disk | FTP | other *** search
- /* REPLANT.RSS - Indiana corn replanting advisor */
-
- WINDOW:
- ROW: 18
- COLUMN: 15
- DEPTH: 7
- WIDTH: 50
- FOGC: Red
-
- INITIAL:
- if not indemo then
- load library gdemo
- indemo = true
- load anykey
- endif
- load rpforms /* Load in the forms for replant */
- clear
- olddeci = e.deci
- e.deci = 0
- e.auto = true
- e.lstr = 70
- e.tryp = "e" /* Try premises "eagerly" */
- e.rigr = "m" /* Accept minimal certainties */
- compact = unknown
- rain = unknown
- viable = unknown
- stand = unknown
- uniform = unknown
- pneed = unknown
- tneed = unknown
- need = unknown
- action = unknown
- date = unknown
- problem = unknown
- crusting = unknown
- hardsoil = unknown
- helpsoil = unknown
- putform header
-
- GOAL: action
-
- DO:
- putform clearit
- oldlnum = e.lnum
- e.lnum = 3
- test tneed
- case "till": t="The field needs tillage";break
- case "no till": t="The field does not need tillage";break
- endtest
- test pneed
- case "replant": r="The field needs replanting";break
- case "partial replant": r="The field needs partial replanting";break
- case "not replant": r="The field does not need replanting";break
- endtest
- test action
- case "replant": a="Replant the field";break
- case "partial replant": a="Replant the damaged areas only";break
- case "not replant": a="Not replant the field";break
- case "till and replant": a="Till the field and replant the damaged areas";break
- case "till and not replant": a="Till the field but do not replant";break
- endtest
-
- at 8,10 ?"Given the factors:"
- at 10,19 ?"1) The date is ",date
- if known("tneed") then
- at 11,19 ?"2) ",t," (certainty ",hicf(tneed),")"
- endif
- if known("pneed") then
- at 12,19 ?"3) ",r," (certainty ",hicf(pneed),")"
- endif
- at 14,10 ?"The best course of action is to:"
- at 16,19 ?a,", (certainty ",hicf(action),")"
- at 22,1
- e.lnum = oldlnum
- e.deci = olddeci
-
- RULE: R1
- PRIORITY: 20
- COST: 20
- IF: compact = true or crusting = true
- THEN: hardsoil = true
- REASON: If the soil is compacted or crusted, then the
- soil is hard.
- COMMENT: Determine if the soil is hard.
-
-
- RULE: R2
- PRIORITY: 20
- COST: 20
- IF: compact = false and crusting = false
- THEN: hardsoil = false
- REASON: If the soil is not compacted and not crusted,
- then the soil is not hard.
- COMMENT: Determine if the soil is not hard.
-
-
- RULE: R3
- PRIORITY: 20
- COST: 20
- IF: hardsoil = true and rain = false
- THEN: helpsoil = true
- REASON: If the soil is hard and there is little rain in
- the forecast, then the soil will need to be
- softened.
- COMMENT: Determine if the soil needs help to soften it.
-
-
- RULE: R4
- PRIORITY: 20
- COST: 20
- IF: hardsoil = false or rain = true
- THEN: helpsoil = false
- REASON: If the soil is not hard, or there is more than a
- little rain in the forecast, then the soil does
- not need to be softened.
- COMMENT: Determine if the soil does not need help being
- softened.
-
-
- RULE: R5
- PRIORITY: 20
- COST: 20
- IF: helpsoil = true and stand <= 12000 and problem = false
- THEN: tneed = "till"
- NEEDS: helpsoil
- stand
- problem
- REASON: If the soil needs to be softened, and the stand
- is less than 12000 plants per acre, then the
- field needs tilled with a rotary hoe.
- COMMENT: Determine if tillage is needed.
-
- RULE: R6
- PRIORITY: 20
- COST: 20
- IF: helpsoil = false or stand > 12000 or problem = true
- THEN: tneed = "no till"
- NEEDS: helpsoil
- stand
- problem
- REASON: If the soil does not need to be softened, or the
- stand is better than 12000 plants per acre, then
- tillage with a rotary hoe is not needed.
- COMMENT: Determine if no tillage is needed.
-
-
- RULE: R7
- PRIORITY: 20
- COST: 20
- IF: viable = true or stand > 16000 or problem = true
- THEN: pneed = "not replant"
- NEEDS: viable
- stand
- problem
- REASON: If there are viable seeds in the field, or the
- stand is better than 16000 plants per acre, then
- the field does not need replanting.
- COMMENT: Determine what kind of plantin
-
- RULE: R8
- PRIORITY: 20
- COST: 20
- IF: viable = false and (uniform = true or stand < 12000) and problem = false
- THEN: pneed = "replant"
- NEEDS: viable
- uniform
- stand
- problem
- REASON: If there are no viable seeds remaining in the
- field, and there is either uniform thinning or a
- stand worse than 12000 plants per acre, then the
- field needs to be replanted.
- COMMENT: Determine if the field needs replanting.
-
- RULE: R9
- PRIORITY: 20
- COST: 20
- IF: viable = false and uniform = false and problem = false
- THEN: pneed = "partial replant"
- REASON: If there are no viable seeds in the field, and
- there is not a uniform thinning of the plants,
- then the field needs to be partially replanted.
- COMMENT: Determine if the field needs to be partially
- replanted.
-
-
-
- RULE: R10
- PRIORITY: 20
- COST: 20
- IF: date > "06/10"
- THEN: action = "not replant"
- REASON: If it is past June 10th, then no tilling or
- replanting should be done.
- COMMENT: If it is late in the season, then there is
- nothing to do
-
-
- RULE: R11
- PRIORITY: 20
- COST: 20
- IF: date > "05/25" and tneed = "no till"
- THEN: action = "not replant"
- NEEDS: date
- tneed
- REASON: If it is after May 25th and no tillage is needed,
- then nothing should be done.
- COMMENT: If after May 25th, we might be able to till
-
-
- RULE: R12
- PRIORITY: 20
- COST: 20
- IF: pneed = "not replant" and tneed = "no till"
- THEN: action = "not replant"
- NEEDS: pneed
- tneed
- REASON: If the field does not need replanting, and
- tillage is not needed, then do nothing.
- COMMENT: Determine if nothing needs to be done at all.
-
-
- RULE: R13
- PRIORITY: 20
- COST: 20
- IF: date <= "06/10" and tneed = "till" and pneed = "not replant"
- THEN: action = "till and not replant"
- NEEDS: date
- tneed
- pneed
- REASON: If it is before June 11th and the field needs
- tillage but not replanting, then till but do not
- replant.
- COMMENT: Determine if tillage is needed without
- replanting.
-
-
- RULE: R14
- PRIORITY: 20
- COST: 20
- IF: date > "05/25" and date <= "06/10" and tneed = "till"
- THEN: action = "till and not replant"
- NEEDS: date
- tneed
- REASON: If it after May 25th and before June 11th, and
- the ground needs tillage, then till but do not
- replant.
-
-
- RULE: R15
- PRIORITY: 20
- COST: 20
- IF: date <= "05/25" and tneed = "till" and (pneed = "replant" or pneed = "partial replant")
- THEN: action = "till and replant"
- NEEDS: date
- tneed
- pneed
- REASON: If it is May 25th or earlier, and the field needs
- tillage and replanting, then till and replant.
-
-
-
- RULE: R16
- PRIORITY: 20
- COST: 20
- IF: date <= "05/25" and tneed = "no till" and pneed = "partial replant"
- THEN: action = "partial replant"
- NEEDS: date
- tneed
- pneed
- REASON: If it is May 25th or earlier, and the field does
- not need tillage but needs partial replanting,
- then partially replant.
-
-
- RULE: R17
- PRIORITY: 20
- COST: 20
- IF: date > "05/15" and tneed = "no till" and pneed = "replant"
- THEN: action = "not replant"
- NEEDS: date
- tneed
- pneed
- REASON: If it is after May 15th and the field does not
- need tillage but it needs replanting, then do
- not replant.
-
-
- RULE: R18
- PRIORITY: 20
- COST: 20
- IF: date <= "05/15" and tneed = "no till" and pneed = "replant"
- THEN: action = "replant"
- NEEDS: date tneed pneed
- REASON: If it is May 15th or earlier and the field needs
- replanting but not tillage, then replant.
-
- VARIABLE: COMPACT
- LABEL: The field shows compaction
- FIND: putform fcomp
- perform asktf
- compact = ans cf anscf
-
-
- VARIABLE: CRUSTING
- LABEL: The field shows crusting
- FIND: putform fcrus
- perform asktf
- crusting = ans cf anscf
-
-
- VARIABLE: HARDSOIL
- LABEL: The soil is hard
-
-
- VARIABLE: RAIN
- LABEL: There is significant rain in the forecast
- FIND: putform frain
- perform asktf
- rain = ans cf anscf
-
-
- VARIABLE: HELPSOIL
- LABEL: The soil needs to be softened
-
-
- VARIABLE: TNEED
- LABEL: Tillage needed
-
-
- VARIABLE: PNEED
- LABEL: Planting needed
-
-
- VARIABLE: VIABLE
- LABEL: Viable seeds remain
- FIND: putform fviab
- perform asktf
- viable = ans cf anscf
-
-
- VARIABLE: UNIFORM
- LABEL: There is uniform thinning of plants
- FIND: putform funif
- perform asktf
- uniform = ans cf anscf
-
-
- VARIABLE: STAND
- LABEL: Plants per acre in the stand
- FIND: ans = 0
- putform fstan
- getform fstan
- stand = ans
- putform clearit
-
-
- VARIABLE: DATE
- LABEL: Today's date
- FIND: ans = " "
- putform fdate
- getform fdate
- date = ans
- putform clearit
-
-
- VARIABLE: PROBLEM
- LABEL: Chemical or pest problems
- FIND: putform fprob
- perform asktf
- problem = ans cf anscf
-
- VARIABLE: ACTION
- LABEL: The action recommended
-
- END:
-