Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
Forceable Class Reference
Inheritance diagram for Forceable:
Detailed DescriptionBase class for all objects we can be forced (by some teacher; see class Teacher) to produce a given target output.
Forcing an object To be able to teach/force an object in a proper way we decided to split the two steps (calculate next state and output the result) which are usually done within the advance() method into two explicit pieces: the class Forceable introduces the two methods nextstate() and output() which represent this two steps. In addition the method force() allows a potential teacher (see class Teacher) to intervene and to force the object to give a certain output.
Implementing foreable objects Each object derived from Forceable must implement the three methods nextstate(), force() and output(). One must not implement advance()! This is hardcoded as a call to nextstate(); directly followd by output(). nextstate() shoud perform the usual numeric calculations/integration. It should store the result for further usage by output(). The call to output() should then propagate the results to the outgoing objects.
Active teacher If teacher forcing is active a teacher will call force() between the calls to nextstate() and output() and is thus able to force acertain output (and also to overwrite any results computed by advance()). However for efficiency reasons it is left to the teacher if a call to nextstate() is necessary at all (since the result may be overwritten) and it may well be the case the during simulations with an active teacher nextstate() does not get called.
Public Member Functions
|(C) 2003, Thomas Natschläger||last modified 07/10/2006|