From 267b5471e32aca96e5442b7696e5464b0b646b87 Mon Sep 17 00:00:00 2001 From: Stardew Date: Tue, 3 Sep 2024 12:46:42 -0400 Subject: [PATCH] added new fields into example SI --- .../dblpend/lib/Drasil/DblPend/Body.hs | 15 ++++++++++++--- .../glassbr/lib/Drasil/GlassBR/Body.hs | 9 +++++++-- .../lib/Drasil/PDController/Body.hs | 17 +++++++++++++---- .../lib/Drasil/PDController/IntroSection.hs | 6 ++++++ .../projectile/lib/Drasil/Projectile/Body.hs | 15 ++++++++++----- .../drasil-example/swhs/lib/Drasil/SWHS/Body.hs | 8 ++++++-- .../swhsnopcm/lib/Drasil/SWHSNoPCM/Body.hs | 12 ++++++------ 7 files changed, 60 insertions(+), 22 deletions(-) diff --git a/code/drasil-example/dblpend/lib/Drasil/DblPend/Body.hs b/code/drasil-example/dblpend/lib/Drasil/DblPend/Body.hs index 31de1f8ef4..f1a31f28ac 100644 --- a/code/drasil-example/dblpend/lib/Drasil/DblPend/Body.hs +++ b/code/drasil-example/dblpend/lib/Drasil/DblPend/Body.hs @@ -110,9 +110,9 @@ si = SI { _kind = Doc.srs, _authors = [dong], _purpose = [purp], - _background = [], - _motivation = [], - _scope = [], + _background = [background], + _motivation = [motivation], + _scope = [scope], _quants = symbolsAll, _concepts = [] :: [DefinedQuantityDict], _instModels = iMods, @@ -131,6 +131,15 @@ si = SI { purp :: Sentence purp = foldlSent_ [S "predict the", phrase motion `S.ofA` S "double", phrase pendulum] +motivation :: Sentence +motivation = foldlSent_ [S "To simulate", phraseNP (motion `the_ofThe` pendulum), + S "and exhibit its chaotic characteristics"] + +background :: Sentence +background = foldlSent_ [phraseNP (a_ pendulum), S "consists" `S.of_` phrase mass, + S "attached to the end" `S.ofA` phrase rod `S.andIts` S "moving curve" `S.is` + (S "highly sensitive to initial conditions")] + symbolsAll :: [QuantityDict] symbolsAll = symbols ++ scipyODESymbols ++ osloSymbols ++ apacheODESymbols ++ odeintSymbols ++ map qw [listToArray $ quantvar pendDisAngle, arrayVecDepVar dblPenODEInfo] diff --git a/code/drasil-example/glassbr/lib/Drasil/GlassBR/Body.hs b/code/drasil-example/glassbr/lib/Drasil/GlassBR/Body.hs index 9d9a55f0b6..ae43890539 100644 --- a/code/drasil-example/glassbr/lib/Drasil/GlassBR/Body.hs +++ b/code/drasil-example/glassbr/lib/Drasil/GlassBR/Body.hs @@ -63,9 +63,9 @@ si = SI { _kind = Doc.srs, _authors = [nikitha, spencerSmith], _purpose = [purp], - _background = [], + _background = [background], _motivation = [], - _scope = [], + _scope = [scope], _quants = symbolsForTable, _concepts = [] :: [DefinedQuantityDict], _instModels = iMods, @@ -129,6 +129,11 @@ purp :: Sentence purp = foldlSent_ [S "predict whether a", phrase glaSlab, S "can withstand a", phrase blast, S "under given", plural condition] +background :: Sentence +background = foldlSent_ [phrase explosion, S "in downtown areas are dangerous from the", + phrase blast +:+ S "itself" `S.and_` S "also potentially from the secondary" + +:+ S "effect of falling glass"] + symbMap :: ChunkDB symbMap = cdb thisSymbols (map nw acronyms ++ map nw thisSymbols ++ map nw con ++ map nw con' ++ map nw terms ++ map nw doccon ++ map nw doccon' ++ map nw educon diff --git a/code/drasil-example/pdcontroller/lib/Drasil/PDController/Body.hs b/code/drasil-example/pdcontroller/lib/Drasil/PDController/Body.hs index 13d62cf545..cadb338bea 100644 --- a/code/drasil-example/pdcontroller/lib/Drasil/PDController/Body.hs +++ b/code/drasil-example/pdcontroller/lib/Drasil/PDController/Body.hs @@ -33,7 +33,7 @@ import Drasil.PDController.GenSysDesc gsduserCharacteristics) import Drasil.PDController.IModel (instanceModels, imPD) import Drasil.PDController.IntroSection (introPara, introPurposeOfDoc, externalLinkRef, - introUserChar1, introUserChar2, introscopeOfReq) + introUserChar1, introUserChar2, introscopeOfReq, scope) import Drasil.PDController.References (citations) import Drasil.PDController.Requirements (funcReqs, nonfuncReqs) import Drasil.PDController.SpSysDesc (goals, sysFigure, sysGoalInput, sysParts) @@ -102,9 +102,9 @@ si = SI { _kind = Doc.srs, _authors = [naveen], _purpose = [purp], - _background = [], - _motivation = [], - _scope = [], + _background = [background], + _motivation = [motivation], + _scope = [scope], _quants = symbolsAll, _concepts = [] :: [DefinedQuantityDict], _datadefs = dataDefinitions, @@ -124,6 +124,15 @@ purp = foldlSent_ [S "provide a model of a", phrase pidC, S "that can be used for the tuning of the gain constants before", S "the deployment of the controller"] +motivation :: Sentence +motivation = foldlSent_ [S "The gains of a controller in an application" +:+ + S "must be tuned before the controller is ready for production"] + +background :: Sentence +background = foldlSent_ [S "Automatic process control with a controller (P/PI/PD/PID) is used", + S "in a variety of applications such as thermostats, automobile", + S "cruise-control, etc"] + symbolsAll :: [QuantityDict] symbolsAll = symbols ++ map qw pidDqdConstants ++ map qw pidConstants ++ scipyODESymbols ++ osloSymbols ++ apacheODESymbols ++ odeintSymbols diff --git a/code/drasil-example/pdcontroller/lib/Drasil/PDController/IntroSection.hs b/code/drasil-example/pdcontroller/lib/Drasil/PDController/IntroSection.hs index 88c70e3543..6d4e03aa2a 100644 --- a/code/drasil-example/pdcontroller/lib/Drasil/PDController/IntroSection.hs +++ b/code/drasil-example/pdcontroller/lib/Drasil/PDController/IntroSection.hs @@ -34,6 +34,12 @@ introscopeOfReq S "Additionally, this software is intended to aid with the manual", S "tuning of the", phrase pidC] +scope :: Sentence +scope = foldlSent_ [phraseNP (a_ pidCL), + S "with three subsystems, namely:" +:+ + foldlList Comma List (map (phraseNP.a_) + [pidC, summingPt, powerPlant])] + introPurposeOfDoc = foldlSent [S "The purpose of this document is to capture all the necessary", diff --git a/code/drasil-example/projectile/lib/Drasil/Projectile/Body.hs b/code/drasil-example/projectile/lib/Drasil/Projectile/Body.hs index f4f136914f..ef3cbdea20 100644 --- a/code/drasil-example/projectile/lib/Drasil/Projectile/Body.hs +++ b/code/drasil-example/projectile/lib/Drasil/Projectile/Body.hs @@ -103,10 +103,6 @@ mkSRS = [TableOfContents, Bibliography ] -motivation :: Sentence -motivation = foldlSent_ [phrase projectile, phrase motion, S "is a common" +:+ - phraseNP (problem `in_` physics)] - justification, scope :: Sentence justification = foldlSent [atStart projectile, phrase motion, S "is a common" +:+. phraseNP (problem `in_` physics), S "Therefore, it is useful to have a", @@ -140,7 +136,7 @@ si = SI { _kind = Doc.srs, _authors = [samCrawford, brooks, spencerSmith], _purpose = [purp], - _background = [], + _background = [background], _motivation = [motivation], _scope = [scope], _quants = symbols, @@ -161,6 +157,15 @@ si = SI { purp :: Sentence purp = foldlSent_ [S "predict whether a launched", phrase projectile, S "hits its", phrase target] +motivation :: Sentence +motivation = foldlSent_ [phrase projectile, phrase motion, S "is a common" +:+ + phraseNP (problem `in_` physics)] + +background :: Sentence +background = foldlSent_ [S "Common examples of", phrase projectile, phrase motion, S "include", + S "ballistics", plural problem, S "(missiles and bullets)" `S.andThe` S "flight of the balls", + S "in various sports (baseball, golf, football, etc.)"] + tMods :: [TheoryModel] tMods = [accelerationTM, velocityTM] diff --git a/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs b/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs index 8890bac309..e729f94d4c 100755 --- a/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs +++ b/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs @@ -81,8 +81,8 @@ si = SI { _authors = [thulasi, brooks, spencerSmith], _purpose = [purp], _background = [], - _motivation = [], - _scope = [], + _motivation = [motivation], + _scope = [scope], _quants = symbols, _concepts = [] :: [DefinedQuantityDict], _instModels = insModel, @@ -102,6 +102,10 @@ purp :: Sentence purp = foldlSent_ [S "investigate the effect" `S.of_` S "employing", short phsChgMtrl, S "within a", phrase sWHT] +motivation :: Sentence +motivation = foldlSent_ [S "the demand is high for renewable", pluralNP (enerSrc `and_PS` + energy), S "storage technology"] + symbMap :: ChunkDB symbMap = cdb (qw (heatEInPCM ^. output) : symbolsAll) -- heatEInPCM ? (nw heatEInPCM : map nw symbols ++ map nw acronymsFull diff --git a/code/drasil-example/swhsnopcm/lib/Drasil/SWHSNoPCM/Body.hs b/code/drasil-example/swhsnopcm/lib/Drasil/SWHSNoPCM/Body.hs index 97ac4532cf..056793050f 100644 --- a/code/drasil-example/swhsnopcm/lib/Drasil/SWHSNoPCM/Body.hs +++ b/code/drasil-example/swhsnopcm/lib/Drasil/SWHSNoPCM/Body.hs @@ -41,9 +41,9 @@ import Data.Drasil.SI_Units (metre, kilogram, second, centigrade, joule, watt, -- Since NoPCM is a simplified version of SWHS, the file is to be built off -- of the SWHS libraries. If the source for something cannot be found in -- NoPCM, check SWHS. -import Drasil.SWHS.Body (charsOfReader, dataContMid, introStart, externalLinkRef, - physSyst1, physSyst2, sysCntxtDesc, systContRespBullets, - sysCntxtRespIntro, userChars) +import Drasil.SWHS.Body (charsOfReader, dataContMid, motivation, + introStart, externalLinkRef, physSyst1, physSyst2, sysCntxtDesc, + systContRespBullets, sysCntxtRespIntro, userChars) import Drasil.SWHS.Changes (likeChgTCVOD, likeChgTCVOL, likeChgTLH) import Drasil.SWHS.Concepts (acronyms, coil, sWHT, tank, transient, water, con, phsChgMtrl) import Drasil.SWHS.Requirements (nfRequirements) @@ -176,9 +176,9 @@ si = SI { _kind = Doc.srs, _authors = [thulasi], _purpose = [purp], - _background = [], - _motivation = [], - _scope = [], + _background = [introStartNoPCM], + _motivation = [motivation], + _scope = [scope], -- FIXME: Everything after (and including) \\ should be removed when -- #1658 is resolved. Basically, _quants is used here, but -- tau does not appear in the document and thus should not be displayed.