source: cpp/frams/_demos/paramtree_paramlist_test.cpp @ 732

Last change on this file since 732 was 732, checked in by Maciej Komosinski, 6 years ago

Added support for "checkpoints" (intermediate phases of development of the Model when converting between genetic encodings). See Model.checkpoint() and conv_f1.cpp for an example.

File size: 1.6 KB
Line 
1#include <frams/util/sstringutils.h>
2#include <common/virtfile/stdiofile.h>
3#include <frams/genetics/preconfigured.h>
4#include <frams/param/paramtree.h>
5#include <frams/param/mutparamlist.h>
6#include <frams/vm/classes/genoobj.h>
7#include <frams/vm/classes/collectionobj.h>
8#include <frams/vm/classes/3dobject.h>
9#include <frams/neuro/neuroimpl.h>
10#include <frams/neuro/neurofactory.h>
11#include <frams/model/geometry/modelgeoclass.h>
12#include <frams/model/modelobj.h>
13#include "genotypeloader.h"
14#include "paramtree_print.h"
15
16// This program tests parameter tree construction for all paramtab's that are available in SDK.
17// See paramtree_stdin_test.cpp and app_group_names.txt for a more complete set (from Framsticks GUI) of paramtab objects.
18// See mutableparam_test.cpp for a demonstration on how to detect (and possibly respond to) changing parameter definitions.
19int main()
20{
21        StdioFILE::setStdio(); //setup VirtFILE::Vstdin/out/err
22        PreconfiguredGenetics genetics;
23
24        Param genotypemini_param(genotypemini_paramtab);
25        NeuroFactory neurofac;
26        neurofac.setStandardImplementation();
27        NeuroNetConfig nn_config(&neurofac);
28        ModelGeometry modelgeo;
29
30        MutableParamList combined;
31        combined += &genetics.genman.par;
32        combined += &GenoObj::getStaticParam();
33        combined += &ModelObj::getStaticParam();
34        combined += &VectorObject::getStaticParam();
35        combined += &DictionaryObject::getStaticParam();
36        combined += &Pt3D_Ext::getStaticParam();
37        combined += &Orient_Ext::getStaticParam();
38        combined += &genotypemini_param;
39        combined += &nn_config.par;
40        combined += &modelgeo.par;
41
42        ParamTree tree(combined);
43
44        printTree(&tree.root);
45}
Note: See TracBrowser for help on using the repository browser.