- The due date is
**Friday 14 October 2005**, before 23:55. - Submissions must be done via WebCT.
Beware that WebCT's clock may differ slightly from yours.
As described on the Assignments page,
*all*results must be uploaded to WebCT and accessible from links in the index.html file. There is no need to upload AToM3. - The assignment must be made in groups of maximum 2 people.
It is understood that all partners will understand the complete
assignment (and will be able to answer questions about it).
Clearly identify who did what.
- Grading will be done based on correctness and completeness
of the solution. Do not forget to document your requirements,
assumptions, design, implementation
*and*modelling and simulation results in detail ! - Extensions, if given, will involve extending not only the
alotted time, but also the assignment !

- [11%] Implement the algorithms for Causal Block Diagrams (CBD)
in AToM
^{3}:- [8%] Implement the missing functions of the simulator
(CausalBlockDiagram/ST_CBD/ST_Simulator.py) to accomplish the
following requirements:
- [2%] The construction of the dependency graph;
- [2%] Given an algebraic loop, detection of whether it is linear;
- [2%] Given a linear algebraic loop, construct input for a
linear solver; the format of the input should be:
///////////////////////////////////////////////////////// // Input for the solver is of the form: [M1, M2], where // M1 = // B1 B2 B3 // B1 | a b c | // B2 | d e f | // B3 | g h i | // // M2 = // B1 B2 B3 // | X Y Z | // represents the following linear equation system: // { // a*B1 + b*B2 + c*B3 = X // d*B1 + e*B2 + f*B3 = Y // g*B1 + h*B2 + i*B3 = Z // } // where B1, B2, and B3 are blocks inside a strong component.

- [2%] For each of the blocks, write the computation they need to perform.

- [3%] Implement an algorithm to print out the LaTeX form of a
model:
Both the "naieve" and the "sophisticated" format are possible.
In the "naieve" format, for each block in the model,
the relationship between all connected signals is given.
Note that this will only give a meaningful result if all signals
have a non-empty-string name. (Since the CBD formalism
you are using for this assignment doesn't allow no-name block and
will assign a unique name for any newly added block,
you should name a block with an underscore as prefix to make it act
as a no-name block.) In the
"sophisticated" format (as a human modeller would write it),
some signals may have an empty name (actually, a name starting with an underscore, as explained early)
as they will not be written
explicitly. In this format, all constant equations are written
separately and there is one equation for each Integrator, Derivative,
or Delay block.

Your start point is here: >>GenLaTeX.py<< (download and put it in CausalBlockDiagram/ST_CBD/)

>>testLatex.py<< shows how to generate LaTeX file from a model using methods in GenLaTeX.py.

>>ballistic.tex<< is an example of generated LaTeX file for model >>thrown_ball_old_MDL.py<< which looks like this after rendering:

- [8%] Implement the missing functions of the simulator
(CausalBlockDiagram/ST_CBD/ST_Simulator.py) to accomplish the
following requirements:
- [4%] Create Causal Block Diagrams (CBD) models in AToM3:
- [2%] Create two flat models (without Child blocks referring to
other models) which can verify all functionalities
described in part 1:
- [1%] A model WITH linear algebraic loop;
- [1%] A model WITHOUT linear algebraic loop.

- [2%] Hierarchical modelling for simulations only:
- [1%] An Integrator model (a model consists of blocks which functions as an integrator and can be referred to as a Child block in other models);
- [1%] A Circle Test Model using hierarchical modelling.

- [2%] Create two flat models (without Child blocks referring to
other models) which can verify all functionalities
described in part 1:

Note: a tutorial is available here.