In file code/C/network_model1.H:
class GDistNetModel : public GModel
Distributed network model with independently processing nodes
Inheritance:
public members:
-
GDistNetModel(int model, int max_iters = DEFAULT_MAX_ITERATIONS)
- Takes a model to use for evaluation and optionally
the maximum iterations
~GDistNetModel()
-
int Evaluate( GOperator *head)
- Evaluate an operator (called by GProgram)
virtual GType *Evaluate( oper_enum operation, GArray < GType > ¶ms, int node)
- Evaluate an operator
virtual int GetNext( oper_enum operation, int i, GType *retval)
- Return the next child to evaluate, or 0 when done
virtual GFitness GetFitness()
- Returns the fitness for the last program run on this model
virtual int Running()
- Decision function for length of runtime for a certain program
private members:
-
int out
- The final result of the program
int iteration
- The current iteration
int max_iterations
- How many iterations to perform
int best_flow
- Cache for the best flow possible in the network
GNetwork *old_net
- We can read from old_net
GNetwork *new_net
- and write to new_net to allow changes to be atomic
Inherited from GModel:
public members:
-
virtual int Evaluate( GOperator *head)
GOperator *head
- The head of the operator tree to be evaluated
virtual GType *Evaluate( oper_enum operation, GArray < GType > ¶ms, int node)
oper_enum operation
- The operation to evaluate
GArray < GType > ¶ms
- The arguments to the operator (these must be fully evaluated)
virtual int GetNext( oper_enum operation, int last, GType *retval)
oper_enum operation
- The operation being evaluated
int last
- The last child that was evaluated or -1 if the first pass
GType *retval
- The returned value of the last child or NULL if the first pass
virtual GFitness GetFitness()
virtual int Running()
public members:
-
friend ostream& operator<<(ostream& s, GObject &)
Documentation
This model simulates a network of independent nodes attempting
to coordinate their efforts to maximize the flow from the source to
the sink. Each node executes the same evolved program and the
fitness is based upon the throughput of the network.
this class has no child classes.
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling