module Drasil.PDController.GenSysDesc where import Language.Drasil import Language.Drasil.Chunk.Concept.NamedCombinators import qualified Language.Drasil.Development as D import Data.Drasil.Concepts.Documentation (environment, software, softwareSys, sysCont, system, user) import Drasil.PDController.LabelledContent (gsdSysContextFig) import Drasil.PDController.Concepts gsdSysContextP1, gsdSysContextP2 :: Contents gsdSysContextP1 :: Contents gsdSysContextP1 = [Sentence] -> Contents foldlSP [LabelledContent -> Sentence forall r. (HasUID r, HasRefAddress r, HasShortName r) => r -> Sentence refS LabelledContent gsdSysContextFig, String -> Sentence S String "shows the" Sentence -> Sentence -> Sentence +:+. IdeaDict -> Sentence forall n. NamedIdea n => n -> Sentence phrase IdeaDict sysCont, String -> Sentence S String "The circle represents an external entity outside the", IdeaDict -> Sentence forall n. NamedIdea n => n -> Sentence phrase IdeaDict software Sentence -> Sentence -> Sentence `sC` NPStruct -> Sentence D.toSent (NP -> NPStruct forall n. NounPhrase n => n -> NPStruct phraseNP (IdeaDict -> NP forall t. NamedIdea t => t -> NP the IdeaDict user)) Sentence -> Sentence -> Sentence +:+. String -> Sentence S String "in this case", String -> Sentence S String "The rectangle represents the", IdeaDict -> Sentence forall n. NamedIdea n => n -> Sentence phrase IdeaDict softwareSys, String -> Sentence S String "itself" Sentence -> Sentence -> Sentence `sC` ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk pidC Sentence -> Sentence -> Sentence +:+. String -> Sentence S String "in this case", String -> Sentence S String "Arrows are used to show the data flow between the", NPStruct -> Sentence D.toSent (NP -> NPStruct forall n. NounPhrase n => n -> NPStruct phraseNP (IdeaDict system IdeaDict -> IdeaDict -> NP forall a b. (NamedIdea a, NamedIdea b) => a -> b -> NP `andIts` IdeaDict environment))] gsdSysContextP2 :: Contents gsdSysContextP2 = [Sentence] -> Contents foldlSPCol [ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk pidC, String -> Sentence S String "is self-contained. The only external interaction is" Sentence -> Sentence -> Sentence +:+. String -> Sentence S String "with the user", String -> Sentence S String "The responsibilities of the", NPStruct -> Sentence D.toSent (NP -> NPStruct forall n. NounPhrase n => n -> NPStruct phraseNP (IdeaDict user IdeaDict -> IdeaDict -> NP forall a b. (NamedIdea a, NamedIdea b) => a -> b -> NP `andThe` IdeaDict system)), String -> Sentence S String "are as follows"] gsdTitle :: [Sentence] gsdTitle :: [Sentence] gsdTitle = [IdeaDict -> Sentence forall n. NamedIdea n => n -> Sentence titleize IdeaDict user Sentence -> Sentence -> Sentence +:+ String -> Sentence S String "Responsibilities", ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk pidC Sentence -> Sentence -> Sentence +:+ String -> Sentence S String "Responsibilities"] gsdUsrResp :: [Sentence] gsdUsrResp :: [Sentence] gsdUsrResp = [String -> Sentence S String "Feed inputs to the model", String -> Sentence S String "Review the response of the" Sentence -> Sentence -> Sentence +:+ ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk powerPlant, String -> Sentence S String "Tune the controller gains"] gsdSysResp :: [Sentence] gsdSysResp :: [Sentence] gsdSysResp = [String -> Sentence S String "Check the validity of the inputs", String -> Sentence S String "Calculate the outputs of the" Sentence -> Sentence -> Sentence +:+ NPStruct -> Sentence D.toSent (NP -> NPStruct forall n. NounPhrase n => n -> NPStruct phraseNP (ConceptChunk pidC ConceptChunk -> ConceptChunk -> NP forall a b. (NamedIdea a, NamedIdea b) => a -> b -> NP `and_` ConceptChunk powerPlant))] gsdSysContextList :: Contents gsdSysContextList :: Contents gsdSysContextList = UnlabelledContent -> Contents UlC (UnlabelledContent -> Contents) -> UnlabelledContent -> Contents forall a b. (a -> b) -> a -> b $ RawContent -> UnlabelledContent ulcc (RawContent -> UnlabelledContent) -> RawContent -> UnlabelledContent forall a b. (a -> b) -> a -> b $ ListType -> RawContent Enumeration (ListType -> RawContent) -> ListType -> RawContent forall a b. (a -> b) -> a -> b $ [Sentence] -> [ListType] -> ListType bulletNested [Sentence] gsdTitle ([ListType] -> ListType) -> [ListType] -> ListType forall a b. (a -> b) -> a -> b $ ([Sentence] -> ListType) -> [[Sentence]] -> [ListType] forall a b. (a -> b) -> [a] -> [b] map [Sentence] -> ListType bulletFlat [[Sentence] gsdUsrResp, [Sentence] gsdSysResp] gsduserCharacteristics :: Contents gsduserCharacteristics :: Contents gsduserCharacteristics = [Sentence] -> Contents foldlSP [String -> Sentence S String "The end-user of", ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk pidC, String -> Sentence S String "is expected to have taken a course on Control Systems at an", String -> Sentence S String "undergraduate level"]