Skip to content

Commit

Permalink
Revised report for case study
Browse files Browse the repository at this point in the history
  • Loading branch information
mwetter committed Oct 27, 2017
2 parents 754a93c + ae5e34b commit 82b01a0
Show file tree
Hide file tree
Showing 10 changed files with 743 additions and 222 deletions.
4 changes: 2 additions & 2 deletions examples/case_study_1/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_cases():
cases_load_diversity = copy.deepcopy(cases)
for ele in cases_load_diversity:
ele['name'] = "{}_diverse_loads".format(ele["name"])
ele['parameters'] = {'flo.kIntNor': 0.75}
ele['parameters'] = {'flo.kIntNor': 0.5}

cases = cases + cases_load_diversity

Expand Down Expand Up @@ -80,4 +80,4 @@ def get_result_file_name(name):
case = get_case(name)
model_name = (os.path.splitext(case['model'])[1])[1:]
mat_name = "{}.mat".format( model_name )
return os.path.join(name, mat_name)
return os.path.join("simulations", name, mat_name)
634 changes: 511 additions & 123 deletions examples/case_study_1/post_process.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/case_study_1/run_simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _simulate(spec):

wor_dir = create_working_directory()

out_dir = os.path.join(wor_dir, spec["name"])
out_dir = os.path.join(wor_dir, "simulations", spec["name"])

# Update MODELICAPATH to get the right library version
os.environ["MODELICAPATH"] = ":".join([spec['lib_dir'], out_dir])
Expand Down Expand Up @@ -84,7 +84,7 @@ def _simulate(spec):
s.simulate()

# Copy results back
res_des = os.path.join(CWD, spec["name"])
res_des = os.path.join(CWD, "simulations", spec["name"])
if os.path.isdir(res_des):
shutil.rmtree(res_des)
print("Copying results to {}".format(res_des))
Expand Down
5 changes: 2 additions & 3 deletions specification/fixLatex.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from io import open
print(sys.version)

oldFil=os.path.join("build", "latex", "cdl_specification.tex")
newFil=os.path.join("build", "latex", "cdl_specification.tex-new")
oldFil=os.path.join("build", "latex", "cdl_report.tex")
newFil=os.path.join("build", "latex", "cdl_report.tex-new")

def freplace(old, new):
with open(oldFil, mode="rt", encoding="utf-8") as fin, open(newFil, mode="wt", encoding="utf-8") as fout:
Expand Down Expand Up @@ -34,4 +34,3 @@ def freplace(old, new):

freplace('\\begin{Verbatim}[',
'\\begin{Verbatim}[fontsize=\\footnotesize, ')

2 changes: 1 addition & 1 deletion specification/source/_static/bootstrap_custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ h2 {
}

h3 {
margin: 1em 0 -0.3em 0;
margin: 1em 0 0.5em 0;
font-size: 1em;
}

Expand Down
2 changes: 1 addition & 1 deletion specification/source/_static/sphinxdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ h2 {
}

h3 {
margin: 1em 0 -0.3em 0;
margin: 1em 0 0.5em 0 !important;
font-size: 1em;
}

Expand Down
21 changes: 18 additions & 3 deletions specification/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index',
'cdl_specification.tex',
'cdl_report.tex',
u'Control Description Language',
'', 'manual'),
]
Expand All @@ -284,10 +284,13 @@
#'classoptions': ',openany' : remove blank pages in PDF.
#'babel': '\\usepackage[english]{babel}' : suppress error message caused by undefined language.
#'maketitle': '\\pagenumbering{gobble}\\maketitle' : switch off the page numbering in the tile and the index.
release = ''
latex_elements = {'classoptions': ', openany', # remove blank pages in PDF.
'releasename': 'Version',
'releasename': '',
'babel': '\\usepackage[english]{babel}'}



# 'fontpkg': '\\usepackage[scaled]{helvet}'

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -440,7 +443,19 @@
\belowcaptionskip=5pt
\pagestyle{fancy}
\pagestyle{normal}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\leftmark}
\fancyhead[LO]{\rightmark}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt} % and the line
}
%%\fancyhf{}
%%\rhead[LE,RO]{\thechapter .}
%\lhead{Guides and tutorials}
Expand Down
Loading

0 comments on commit 82b01a0

Please sign in to comment.