Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
3fe31a80
Commit
3fe31a80
authored
Dec 06, 2013
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start organizing into sections and subsections
parent
16f0718f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
29 deletions
+65
-29
doc/codes-best-practices.tex
doc/codes-best-practices.tex
+65
-29
No files found.
doc/codes-best-practices.tex
View file @
3fe31a80
...
...
@@ -150,47 +150,83 @@
\maketitle
\begin{abstract}
TODO: describe purpose of document. Help new users ramp up more quickly,
encourage development of models in relatively consistent style to encourage
re-use of components, etc.
This document outlines best practices for developing models in the
CODES/ROSS framework. The reader should already be familiar with ROSS
and discrete event simulation; those topics are covered in the primary
ROSS documentation.
%
The main purpose of this document is to help the reader produce
CODES models in a consistent, modular style so that componets can be more
easily shared and reused. It also includes a few tips to help avoid common
simulation bugs.
\end{abstract}
\section
{
TODO
}
\section
{
CODES: modularizing models
}
General things to do for this document:
\begin{itemize}
\item
reference to ROSS user's guide, airport model, etc.
\item
figure out consistent way to format code snippets in document (just
reuse whatever we did in the Aesop paper)
\item
pull in Misbah's codes-mapping documentation
\item
put a pdf or latex2html version of this document on the codes web page
when ready
\end{itemize}
\subsection
{
Units of time
}
Topics to cover. These are listed in no particular order, but they need to
be organized into themes/sections to walk through in some logical order:
use nanoseconds as units for time
\
begin{itemize
}
\item
use nanoseconds as units for time
\item
split up distinct functionality (components of model) into different
\
subsection
{
Organizing models by LP types
}
split up distinct functionality (components of model) into different
LP types, give examples
\item
don't expose event message or state structs across LP types. Both
\subsection
{
Protecting data structures
}
don't expose event message or state structs across LP types. Both
should be private types within the .c file that implements an LP.
\item
indicate completion across LP types by either delivering an opaque message
\subsection
{
Techniques for notifying completion across LP types
}
indicate completion across LP types by either delivering an opaque message
back to the calling LP, or by providing an API function for 2nd LP type to
use to call back (show examples of both)
\item
use codes
\_
mapping to organize and find components
\item
use modelnet for communication
\item
put magic numbers at the top of each event msg
\item
use codes
\_
local
\_
latency for timing of local event transitions
\item
use lp
\_
io for reporting modest-sized statistics a the end of the
simulation
\item
using unions to clarify what fields in the event struct are used by each
\section
{
CODES: common utilities
}
\subsection
{
codes
\_
mapping
}
pull in Misbah's codes-mapping documentation
\subsection
{
modelnet
}
\subsection
{
lp-io
}
\section
{
CODES: reproducability and model safety
}
\subsection
{
Event magic numbers
}
\subsection
{
Small timestamps for LP transitions
}
use codes
\_
local
\_
latency for timing of local event transitions
\section
{
ROSS: general tips
}
\subsection
{
Organizing event structures
}
using unions to clarify what fields in the event struct are used by each
event type in an LP
\item
how to validate correctness/determinism (running in different modes)
\item
best practices for reverse computation (keeping functions small, building
\subsection
{
Validating across simulation modes
}
Check serial, conservative, and optimistic modes (all should work and give
consistent results)
\subsection
{
Reverse computation
}
When to add it, some tips like keeping functions small, building
internal APIs with reverse functions, take advantage of ordering enforced by
ROSS, how to handle queues, etc.)
\section
{
TODO
}
\begin{itemize}
\item
reference to ROSS user's guide, airport model, etc.
\item
figure out consistent way to format code snippets in document (just
reuse whatever we did in the Aesop paper)
\item
put a pdf or latex2html version of this document on the codes web page
when ready
\end{itemize}
\end{document}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment