module Drasil.PDController.IntroSection where

import Drasil.PDController.Concepts
import Language.Drasil
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.Sentence.Combinators as S

introPara, introPurposeOfDoc, introscopeOfReq :: Sentence
introPara :: Sentence
introPara
  = [Sentence] -> Sentence
foldlSent
      [String -> Sentence
S String
"Automatic process control with a controller (P/PI/PD/PID) is used",
         String -> Sentence
S String
"in a variety of applications such as thermostats, automobile",
         String -> Sentence
S String
"cruise-control, etc. The gains of a controller in an application" Sentence -> Sentence -> Sentence
+:+. 
         String -> Sentence
S String
"must be tuned before the controller is ready for production",
       String -> Sentence
S String
"Therefore a simulation of the", forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
pidC, String -> Sentence
S String
"with a",
         forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
secondOrderSystem,
         String -> Sentence
S String
"is created in this project that can be",
         String -> Sentence
S String
"used to tune the gain constants"]

introscopeOfReq :: Sentence
introscopeOfReq
  = [Sentence] -> Sentence
foldlSent_
      [forall n. NounPhrase n => n -> Sentence
phraseNP (forall c. NamedIdea c => c -> NP
a_ ConceptChunk
pidCL),
       String -> Sentence
S String
"with three subsystems, namely:" Sentence -> Sentence -> Sentence
+:+.
          SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List (forall a b. (a -> b) -> [a] -> [b]
map (forall n. NounPhrase n => n -> Sentence
phraseNPforall b c a. (b -> c) -> (a -> b) -> a -> c
.forall c. NamedIdea c => c -> NP
a_)
           [ConceptChunk
pidC, ConceptChunk
summingPt, ConceptChunk
powerPlant]),
       String -> Sentence
S String
"Only the Proportional and Derivative controllers are used in this software;" Sentence -> Sentence -> Sentence
+:+.
         String -> Sentence
S String
"the Integral controller is beyond the scope of this project",
       String -> Sentence
S String
"Additionally, this software is intended to aid with the manual",
         String -> Sentence
S String
"tuning of the", forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
pidC]

introPurposeOfDoc :: Sentence
introPurposeOfDoc
  = [Sentence] -> Sentence
foldlSent
      [String -> Sentence
S String
"The purpose of this document is to capture all the necessary",
         String -> Sentence
S String
"information including assumptions, data definitions, constraints,",
         String -> Sentence
S String
"models, and requirements to facilitate an unambiguous development"
         Sentence -> Sentence -> Sentence
`S.ofThe` forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
pidC, String -> Sentence
S String
"software and test procedures"]

introUserChar1, introUserChar2 :: [Sentence]
introUserChar1 :: [Sentence]
introUserChar1
  = [String -> Sentence
S String
"control systems (control theory and controllers) at the fourth-year undergraduate level"]
introUserChar2 :: [Sentence]
introUserChar2
  = [String -> Sentence
S String
"engineering mathematics at a second-year undergraduate level"]