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" Sentence -> Sentence -> Sentence
`S.ofA` String -> Sentence
S String
"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" Sentence -> Sentence -> Sentence
`S.ofThe` ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
pidC, String -> Sentence
S String
"with a",
         ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
secondOrderSystem,
         String -> Sentence
S String
"is created in this project based" Sentence -> Sentence -> Sentence
`S.onThe` String -> Sentence
S String
"original, manually created version of" Sentence -> Sentence -> Sentence
+:+
         Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef Reference
externalLinkRef (String -> Sentence
S String
"PD Controller"),
         String -> Sentence
S String
"that can be used to tune the gain constants"]

externalLinkRef :: Reference
externalLinkRef :: Reference
externalLinkRef = String -> String -> ShortName -> Reference
makeURI String
"PD_Controller_SRSLink" 
  String
"https://github.com/muralidn/CAS741-Fall20/tree/master" 
  (Sentence -> ShortName
shortname' (Sentence -> ShortName) -> Sentence -> ShortName
forall a b. (a -> b) -> a -> b
$ String -> Sentence
S String
"PD_Controller_SRSLink")

introscopeOfReq :: Sentence
introscopeOfReq
  = [Sentence] -> Sentence
foldlSent_
      [NP -> Sentence
forall n. NounPhrase n => n -> Sentence
phraseNP (ConceptChunk -> NP
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 ((ConceptChunk -> Sentence) -> [ConceptChunk] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map (NP -> Sentence
forall n. NounPhrase n => n -> Sentence
phraseNP(NP -> Sentence)
-> (ConceptChunk -> NP) -> ConceptChunk -> Sentence
forall b c a. (b -> c) -> (a -> b) -> a -> c
.ConceptChunk -> NP
forall c. NamedIdea c => c -> NP
a_)
           [ConceptChunk
pidC, ConceptChunk
summingPt, ConceptChunk
powerPlant]),
       String -> Sentence
S String
"Only the Proportional and Derivative controllers" Sentence -> Sentence -> Sentence
`S.are` String -> Sentence
S String
"used in this software;" Sentence -> Sentence -> Sentence
+:+.
       (String -> Sentence
S String
"the Integral controller" Sentence -> Sentence -> Sentence
`S.is` String -> Sentence
S String
"beyond the scope of this project"),
       String -> Sentence
S String
"Additionally, this software" Sentence -> Sentence -> Sentence
`S.is` String -> Sentence
S String
"intended to aid with the manual",
       String -> Sentence
S String
"tuning" Sentence -> Sentence -> Sentence
`S.ofThe` ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
pidC]

scope :: Sentence
scope :: Sentence
scope = [Sentence] -> Sentence
foldlSent_ [NP -> Sentence
forall n. NounPhrase n => n -> Sentence
phraseNP (ConceptChunk -> NP
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 ((ConceptChunk -> Sentence) -> [ConceptChunk] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map (NP -> Sentence
forall n. NounPhrase n => n -> Sentence
phraseNP(NP -> Sentence)
-> (ConceptChunk -> NP) -> ConceptChunk -> Sentence
forall b c a. (b -> c) -> (a -> b) -> a -> c
.ConceptChunk -> NP
forall c. NamedIdea c => c -> NP
a_)
  [ConceptChunk
pidC, ConceptChunk
summingPt, ConceptChunk
powerPlant])]

introPurposeOfDoc :: Sentence
introPurposeOfDoc
  = [Sentence] -> Sentence
foldlSent
      [String -> Sentence
S String
"The purpose of this document" Sentence -> Sentence -> Sentence
`S.is` String -> Sentence
S String
"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` ConceptChunk -> Sentence
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"]