Quellcode durchsuchen

Remove MyTime class and create DoubleTime class

Eric Ramat vor 11 Jahren
Ursprung
Commit
4453a45dba

+ 20 - 18
src/apps/main.cpp

@@ -45,16 +45,16 @@ void run_flat_with_heap()
     std::cout << "run_flat_with_heap [" << size << "] ..." << std::endl;
 
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::pdevs::Coordinator <
-            MyTime,
-            paradevs::common::scheduler::HeapScheduler < MyTime,
-                                                         SchedulerHandle >,
+        paradevs::common::DoubleTime, paradevs::pdevs::Coordinator <
+            paradevs::common::DoubleTime,
+            paradevs::common::scheduler::HeapScheduler <
+                paradevs::common::DoubleTime, SchedulerHandle >,
             SchedulerHandle,
             LinearGraphManager < size, SchedulerHandle > >
         > rc(0, 100, "root", paradevs::common::NoParameters(),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < paradevs::common::DoubleTime >::trace().clear();
     rc.run();
 
     std::cout << "... OK -> " << t.elapsed() << std::endl;
@@ -68,16 +68,17 @@ void run_flat_with_vector()
     std::cout << "run_flat_with_vector [" << size << "] ..." << std::endl;
 
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::pdevs::Coordinator <
-            MyTime,
-            paradevs::common::scheduler::VectorScheduler < MyTime >,
+        paradevs::common::DoubleTime, paradevs::pdevs::Coordinator <
+            paradevs::common::DoubleTime,
+            paradevs::common::scheduler::VectorScheduler <
+                paradevs::common::DoubleTime >,
             paradevs::common::scheduler::NoSchedulerHandle,
             LinearGraphManager <
                 size, paradevs::common::scheduler::NoSchedulerHandle > >
         > rc(0, 100, "root", paradevs::common::NoParameters(),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < paradevs::common::DoubleTime >::trace().clear();
     rc.run();
 
     std::cout << "... OK -> " << t.elapsed() << std::endl;
@@ -86,31 +87,32 @@ void run_flat_with_vector()
 void run_hierarchic_with_heap()
 {
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::pdevs::Coordinator <
-            MyTime,
-            paradevs::common::scheduler::HeapScheduler < MyTime,
-                                                         SchedulerHandle >,
+        paradevs::common::DoubleTime, paradevs::pdevs::Coordinator <
+            paradevs::common::DoubleTime,
+            paradevs::common::scheduler::HeapScheduler <
+                paradevs::common::DoubleTime, SchedulerHandle >,
             SchedulerHandle,
             Root2GraphManager >
         > rc(0, 100, "root", paradevs::common::NoParameters(),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < paradevs::common::DoubleTime >::trace().clear();
     rc.run();
 }
 
 void run_hierarchic_with_vector()
 {
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::pdevs::Coordinator <
-            MyTime,
-            paradevs::common::scheduler::VectorScheduler < MyTime >,
+        paradevs::common::DoubleTime, paradevs::pdevs::Coordinator <
+            paradevs::common::DoubleTime,
+            paradevs::common::scheduler::VectorScheduler <
+                paradevs::common::DoubleTime >,
             paradevs::common::scheduler::NoSchedulerHandle,
             Root3GraphManager >
         > rc(0, 100, "root", paradevs::common::NoParameters(),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < paradevs::common::DoubleTime >::trace().clear();
     rc.run();
 }
 

+ 3 - 2
src/common/CMakeLists.txt

@@ -11,8 +11,9 @@ LINK_DIRECTORIES(
   ${Boost_LIBRARY_DIRS})
 
 SET(COMMON_HPP Bag.hpp ExternalEvent.hpp InternalEvent.hpp Links.hpp Node.hpp
-  Parameters.hpp RootCoordinator.hpp Scheduler.hpp Time.hpp Trace.hpp)
+  Parameters.hpp RootCoordinator.hpp Scheduler.hpp Trace.hpp)
 
 INSTALL(FILES ${COMMON_HPP} DESTINATION ${PARADEVS_INCLUDE_DIRS}/common)
 
-ADD_SUBDIRECTORY(scheduler)
+ADD_SUBDIRECTORY(scheduler)
+ADD_SUBDIRECTORY(time)

+ 16 - 0
src/common/time/CMakeLists.txt

@@ -0,0 +1,16 @@
+INCLUDE_DIRECTORIES(
+  ${PARADEVS_BINARY_DIR}/src
+  ${PARADEVS_SOURCE_DIR}/src
+  ${Boost_INCLUDE_DIRS}
+  ${GLIBMM_INCLUDE_DIRS}
+  ${LIBXML_INCLUDE_DIRS})
+
+LINK_DIRECTORIES(
+  ${GLIBMM_LIBRARY_DIRS}
+  ${LIBXML_LIBRARY_DIR}
+  ${Boost_LIBRARY_DIRS})
+
+SET(COMMON_TIME_HPP Time.hpp)
+
+INSTALL(FILES ${COMMON_TIME_HPP} DESTINATION
+  ${PARADEVS_INCLUDE_DIRS}/common/time)

+ 50 - 0
src/common/time/DoubleTime.hpp

@@ -0,0 +1,50 @@
+/**
+ * @file common/time/DoubleTime.hpp
+ * @author The PARADEVS Development Team
+ * See the AUTHORS or Authors.txt file
+ */
+
+/*
+ * PARADEVS - the multimodeling and simulation environment
+ * This file is a part of the PARADEVS environment
+ *
+ * Copyright (C) 2013 ULCO http://www.univ-litoral.fr
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef COMMON_TIME_DOUBLE_TIME
+#define COMMON_TIME_DOUBLE_TIME 1
+
+#include <common/time/Time.hpp>
+
+#include <limits>
+
+namespace paradevs { namespace common {
+
+template < typename T >
+struct Limits
+{
+    static constexpr T negative_infinity =
+        -std::numeric_limits < T >::infinity();
+    static constexpr T positive_infinity =
+        std::numeric_limits < T >::infinity();
+    static constexpr T null = 0;
+};
+
+typedef Time < double, Limits < double > > DoubleTime;
+
+} } // namespace paradevs common
+
+#endif

+ 3 - 3
src/common/Time.hpp

@@ -1,5 +1,5 @@
 /**
- * @file Time.hpp
+ * @file common/time/Time.hpp
  * @author The PARADEVS Development Team
  * See the AUTHORS or Authors.txt file
  */
@@ -24,8 +24,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef COMMON_TIME
-#define COMMON_TIME 1
+#ifndef COMMON_TIME_TIME
+#define COMMON_TIME_TIME 1
 
 namespace paradevs { namespace common {
 

+ 27 - 16
src/tests/boost_graph/graph_manager.hpp

@@ -42,7 +42,7 @@ namespace paradevs { namespace tests { namespace boost_graph {
 struct SchedulerHandle;
 
 typedef typename paradevs::common::scheduler::HeapScheduler <
-    MyTime, SchedulerHandle >::type SchedulerType;
+    common::DoubleTime, SchedulerHandle >::type SchedulerType;
 
 struct SchedulerHandle
 {
@@ -77,14 +77,16 @@ struct GraphParameters
 
 template < class SchedulerHandle, class Parameters >
 class FlatGraphManager :
-        public paradevs::pdevs::GraphManager < MyTime, SchedulerHandle,
+        public paradevs::pdevs::GraphManager < common::DoubleTime,
+                                               SchedulerHandle,
                                                Parameters >
 {
 public:
-    FlatGraphManager(common::Coordinator < MyTime,
+    FlatGraphManager(common::Coordinator < common::DoubleTime,
                                            SchedulerHandle >* coordinator,
         const Parameters& parameters) :
-        paradevs::pdevs::GraphManager < MyTime, SchedulerHandle, Parameters >(
+        paradevs::pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
+                                        Parameters >(
             coordinator, parameters)
     { }
 
@@ -116,7 +118,8 @@ public:
             case TOP_PIXEL:
                 _top_simulators[g[*vertexIt]._index] =
                     new pdevs::Simulator <
-                        MyTime, TopPixel < SchedulerHandle >, SchedulerHandle,
+                        common::DoubleTime, TopPixel < SchedulerHandle >,
+                        SchedulerHandle,
                         TopPixelParameters >(ss.str(), TopPixelParameters());
                 _top_simulators[g[*vertexIt]._index]->add_out_port("out");
                 FlatGraphManager < SchedulerHandle, Parameters >::add_child(
@@ -140,7 +143,7 @@ public:
 
                 _normal_simulators[g[*vertexIt]._index] =
                     new pdevs::Simulator <
-                        MyTime, NormalPixel < SchedulerHandle >,
+                        common::DoubleTime, NormalPixel < SchedulerHandle >,
                         SchedulerHandle, NormalPixelParameters >(
                             ss.str(), NormalPixelParameters(n));
                 _normal_simulators[g[*vertexIt]._index]->add_in_port("in");
@@ -159,8 +162,10 @@ public:
             boost::tie(neighbourIt, neighbourEnd) =
                 boost::adjacent_vertices(*vertexIt, g);
             for (; neighbourIt != neighbourEnd; ++neighbourIt) {
-                paradevs::common::Model < MyTime, SchedulerHandle >* a = 0;
-                paradevs::common::Model < MyTime, SchedulerHandle >* b = 0;
+                paradevs::common::Model < common::DoubleTime,
+                                          SchedulerHandle >* a = 0;
+                paradevs::common::Model < common::DoubleTime,
+                                          SchedulerHandle >* b = 0;
 
                 if (g[*vertexIt]._type == TOP_PIXEL) {
                     a = _top_simulators[g[*vertexIt]._index];
@@ -181,11 +186,13 @@ public:
 
 protected:
     typedef std::map < int, pdevs::Simulator <
-                                MyTime, TopPixel < SchedulerHandle >,
+                                common::DoubleTime,
+                                TopPixel < SchedulerHandle >,
                                 SchedulerHandle,
                                 TopPixelParameters >* > TopSimulators;
     typedef std::map < int, pdevs::Simulator <
-                                MyTime, NormalPixel < SchedulerHandle >,
+                                common::DoubleTime,
+                                NormalPixel < SchedulerHandle >,
                                 SchedulerHandle,
                                 NormalPixelParameters >* > NormalSimulators;
 
@@ -199,7 +206,8 @@ class BuiltFlatGraphManager :
 {
 public:
     BuiltFlatGraphManager(
-        common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+        common::Coordinator < common::DoubleTime,
+                              SchedulerHandle >* coordinator,
         const GraphParameters& parameters) :
         FlatGraphManager < SchedulerHandle, GraphParameters >(
             coordinator, parameters)
@@ -247,7 +255,8 @@ class InBuildFlatGraphManager :
 {
 public:
     InBuildFlatGraphManager(
-        common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+        common::Coordinator < common::DoubleTime,
+                              SchedulerHandle >* coordinator,
         const paradevs::common::NoParameters& parameters) :
         FlatGraphManager < SchedulerHandle, paradevs::common::NoParameters >(
             coordinator, parameters)
@@ -270,14 +279,16 @@ public:
 
 template < class SchedulerHandle, class GraphBuilder >
 class HierarchicalGraphManager :
-        public paradevs::pdevs::GraphManager < MyTime, SchedulerHandle,
+        public paradevs::pdevs::GraphManager < common::DoubleTime,
+                                               SchedulerHandle,
                                                paradevs::common::NoParameters >
 {
 public:
     HierarchicalGraphManager(
-        common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+        common::Coordinator < common::DoubleTime,
+                              SchedulerHandle >* coordinator,
         const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::GraphManager < MyTime, SchedulerHandle,
+        paradevs::pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                                         paradevs::common::NoParameters >(
                                             coordinator, parameters)
     {
@@ -332,7 +343,7 @@ public:
 
 private:
     typedef paradevs::pdevs::Coordinator <
-        MyTime,
+        common::DoubleTime,
         SchedulerType,
         SchedulerHandle,
         BuiltFlatGraphManager < SchedulerHandle >,

+ 31 - 40
src/tests/boost_graph/models.hpp

@@ -27,45 +27,31 @@
 #ifndef __TESTS_BOOST_GRAPH_MODELS_HPP
 #define __TESTS_BOOST_GRAPH_MODELS_HPP 1
 
-#include <common/Time.hpp>
+#include <common/time/DoubleTime.hpp>
 
 #include <pdevs/Dynamics.hpp>
 
-#include <limits>
-
 namespace paradevs { namespace tests { namespace boost_graph {
 
-template < typename T >
-struct Limits
-{
-    static constexpr T negative_infinity =
-        -std::numeric_limits < T >::infinity();
-    static constexpr T positive_infinity =
-        std::numeric_limits < T >::infinity();
-    static constexpr T null = 0;
-};
-
-typedef paradevs::common::Time < double, Limits < double > > MyTime;
-
 struct TopPixelParameters
 { };
 
 template < class SchedulerHandle>
 class TopPixel :
-    public paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
+    public paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
                                        TopPixelParameters >
 {
 public:
     TopPixel(const std::string& name,
              const TopPixelParameters& parameters) :
-        paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
+        paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
                                     TopPixelParameters >(name, parameters)
     { }
 
     virtual ~TopPixel()
     { }
 
-    virtual void dint(typename MyTime::type t)
+    virtual void dint(typename common::DoubleTime::type t)
     {
 
         std::cout << TopPixel < SchedulerHandle >::get_name() << " at "
@@ -73,23 +59,25 @@ public:
 
     }
 
-    virtual typename MyTime::type start(typename MyTime::type /* t */)
+    virtual typename common::DoubleTime::type start(
+        typename common::DoubleTime::type /* t */)
     { return 0; }
 
-    virtual typename MyTime::type ta(typename MyTime::type /* t */) const
+    virtual typename common::DoubleTime::type ta(
+        typename common::DoubleTime::type /* t */) const
     { return 1; }
 
-    virtual common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    virtual common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
 
         std::cout << TopPixel < SchedulerHandle >::get_name() << " at "
                   << t << ": lambda" << std::endl;
 
-        common::Bag < MyTime, SchedulerHandle > bag;
+        common::Bag < common::DoubleTime, SchedulerHandle > bag;
 
-        bag.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                          "out", 0.));
+        bag.push_back(common::ExternalEvent < common::DoubleTime,
+                                              SchedulerHandle >("out", 0.));
         return bag;
     }
 };
@@ -104,13 +92,13 @@ struct NormalPixelParameters
 
 template < class SchedulerHandle>
 class NormalPixel :
-    public paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
+    public paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
                                        NormalPixelParameters >
 {
 public:
     NormalPixel(const std::string& name,
              const NormalPixelParameters& parameters) :
-        paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
+        paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
                                     NormalPixelParameters >(name, parameters),
         _neighbour_number(parameters._neighbour_number)
     { }
@@ -118,7 +106,7 @@ public:
     virtual ~NormalPixel()
     { }
 
-    virtual void dint(typename MyTime::type t)
+    virtual void dint(typename common::DoubleTime::type t)
     {
 
         std::cout << NormalPixel < SchedulerHandle >::get_name() << " at "
@@ -130,16 +118,17 @@ public:
         }
     }
 
-    virtual void dext(typename MyTime::type t,
-                      typename MyTime::type /* e */,
-                      const common::Bag < MyTime, SchedulerHandle >& bag)
+    virtual void dext(typename common::DoubleTime::type t,
+                      typename common::DoubleTime::type /* e */,
+                      const common::Bag < common::DoubleTime,
+                                          SchedulerHandle >& bag)
     {
 
         std::cout << NormalPixel < SchedulerHandle >::get_name() << " at "
                   << t << ": dext -> "
                   << bag.to_string() << std::endl;
 
-        for (typename common::Bag < MyTime,
+        for (typename common::Bag < common::DoubleTime,
                                     SchedulerHandle >::const_iterator it =
                  bag.begin(); it != bag.end(); ++it) {
             if (it->on_port("in")) {
@@ -157,37 +146,39 @@ public:
 
     }
 
-    virtual typename MyTime::type start(typename MyTime::type /* t */)
+    virtual typename common::DoubleTime::type start(
+        typename common::DoubleTime::type /* t */)
     {
         _phase = WAIT;
         _received = 0;
-        return MyTime::infinity;
+        return common::DoubleTime::infinity;
     }
 
-    virtual typename MyTime::type ta(typename MyTime::type t) const
+    virtual typename common::DoubleTime::type ta(
+        typename common::DoubleTime::type t) const
     {
 
         std::cout << NormalPixel < SchedulerHandle >::get_name() << " at "
                   << t << ": ta" << std::endl;
 
         if (_phase == WAIT) {
-            return MyTime::infinity;
+            return common::DoubleTime::infinity;
         } else {
             return 0;
         }
     }
 
-    virtual common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    virtual common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
 
         std::cout << NormalPixel < SchedulerHandle >::get_name() << " at "
                   << t << ": lambda" << std::endl;
 
-        common::Bag < MyTime, SchedulerHandle > bag;
+        common::Bag < common::DoubleTime, SchedulerHandle > bag;
 
         if (_phase == SEND) {
-            bag.push_back(common::ExternalEvent < MyTime,
+            bag.push_back(common::ExternalEvent < common::DoubleTime,
                                                   SchedulerHandle >("out", 0.));
         }
         return bag;

+ 4 - 4
src/tests/boost_graph/tests.cpp

@@ -37,9 +37,9 @@ using namespace paradevs::tests::boost_graph;
 void flat_test()
 {
     RootCoordinator <
-        MyTime,
+        DoubleTime,
         paradevs::pdevs::Coordinator <
-            MyTime,
+            DoubleTime,
             SchedulerType,
             SchedulerHandle,
             InBuildFlatGraphManager < SchedulerHandle, FlatGraphBuilder >,
@@ -53,9 +53,9 @@ void flat_test()
 void hierarchical_test()
 {
     RootCoordinator <
-        MyTime,
+        DoubleTime,
         paradevs::pdevs::Coordinator <
-            MyTime,
+            DoubleTime,
             SchedulerType,
             SchedulerHandle,
             HierarchicalGraphManager < SchedulerHandle,

+ 18 - 15
src/tests/dtss/graph_manager.hpp

@@ -38,33 +38,35 @@ namespace paradevs { namespace tests { namespace dtss {
 template < class SchedulerHandle >
 struct Policy
 {
-    const common::Bag < MyTime, SchedulerHandle >& bag() const
+    const common::Bag < common::DoubleTime, SchedulerHandle >& bag() const
     { return _bag; }
 
     virtual void operator()(
-        MyTime::type /* t */,
-        const common::ExternalEvent < MyTime, SchedulerHandle >& event,
-        MyTime::type /* tl */,
-        MyTime::type /* tn */)
+        common::DoubleTime::type /* t */,
+        const common::ExternalEvent < common::DoubleTime,
+                                      SchedulerHandle >& event,
+        common::DoubleTime::type /* tl */,
+        common::DoubleTime::type /* tn */)
     {
         _bag.clear();
         _bag.push_back(event);
     }
 
 private:
-    common::Bag < MyTime, SchedulerHandle > _bag;
+    common::Bag < common::DoubleTime, SchedulerHandle > _bag;
 };
 
 template < class SchedulerHandle >
 class OnlyOneGraphManager :
-        public paradevs::dtss::GraphManager < MyTime, SchedulerHandle,
+        public paradevs::dtss::GraphManager < common::DoubleTime,
+                                              SchedulerHandle,
                                               paradevs::common::NoParameters >
 {
 public:
-    OnlyOneGraphManager(common::Coordinator < MyTime,
+    OnlyOneGraphManager(common::Coordinator < common::DoubleTime,
                                               SchedulerHandle >* coordinator,
                         const paradevs::common::NoParameters& parameters) :
-        paradevs::dtss::GraphManager < MyTime, SchedulerHandle,
+        paradevs::dtss::GraphManager < common::DoubleTime, SchedulerHandle,
                                        paradevs::common::NoParameters >(
                                            coordinator, parameters),
         a("a", 1, common::NoParameters())
@@ -76,20 +78,21 @@ public:
     { }
 
 private:
-    paradevs::dtss::Simulator < MyTime, A < SchedulerHandle >,
+    paradevs::dtss::Simulator < common::DoubleTime, A < SchedulerHandle >,
                                 SchedulerHandle > a;
 };
 
 template < class SchedulerHandle >
 class TwoGraphManager :
-        public paradevs::dtss::GraphManager < MyTime, SchedulerHandle,
+        public paradevs::dtss::GraphManager < common::DoubleTime,
+                                              SchedulerHandle,
                                               paradevs::common::NoParameters >
 {
 public:
-    TwoGraphManager(common::Coordinator < MyTime,
+    TwoGraphManager(common::Coordinator < common::DoubleTime,
                                           SchedulerHandle >* coordinator,
                     const paradevs::common::NoParameters& parameters) :
-        paradevs::dtss::GraphManager < MyTime, SchedulerHandle,
+        paradevs::dtss::GraphManager < common::DoubleTime, SchedulerHandle,
                                        paradevs::common::NoParameters >(
                                            coordinator, parameters),
         a("a", 1, common::NoParameters()), b("b", 1, common::NoParameters())
@@ -105,9 +108,9 @@ public:
     { }
 
 private:
-    paradevs::dtss::Simulator < MyTime, A < SchedulerHandle >,
+    paradevs::dtss::Simulator < common::DoubleTime, A < SchedulerHandle >,
                                 SchedulerHandle > a;
-    paradevs::dtss::Simulator < MyTime, B < SchedulerHandle >,
+    paradevs::dtss::Simulator < common::DoubleTime, B < SchedulerHandle >,
                                 SchedulerHandle > b;
 };
 

+ 41 - 49
src/tests/dtss/models.hpp

@@ -28,71 +28,61 @@
 #define TESTS_DTSS_MODELS_HPP 1
 
 #include <dtss/Dynamics.hpp>
-#include <common/Time.hpp>
+#include <common/time/DoubleTime.hpp>
 
 namespace paradevs { namespace tests { namespace dtss {
 
-template < typename T >
-struct Limits
-{
-    static constexpr T negative_infinity =
-        -std::numeric_limits < T >::infinity();
-    static constexpr T positive_infinity =
-        std::numeric_limits < T >::infinity();
-    static constexpr T null = 0;
-};
-
-typedef paradevs::common::Time < double, Limits < double > > MyTime;
-
 template < class SchedulerHandle>
 class A :
-        public paradevs::dtss::Dynamics < MyTime, SchedulerHandle,
+        public paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle,
                                           paradevs::common::NoParameters >
 {
 public:
     A(const std::string& name,
       const paradevs::common::NoParameters& parameters) :
-        paradevs::dtss::Dynamics < MyTime, SchedulerHandle,
+        paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle,
                                    paradevs::common::NoParameters >(name,
                                                                     parameters)
     { }
     virtual ~A()
     { }
 
-    void transition(const common::Bag < MyTime, SchedulerHandle >& /* x */,
-                    MyTime::type t)
+    void transition(const common::Bag < common::DoubleTime,
+                    SchedulerHandle >& /* x */,
+                    common::DoubleTime::type t)
     {
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::DELTA_INT);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
     }
 
-    MyTime::type start(MyTime::type t)
+    common::DoubleTime::type start(common::DoubleTime::type t)
     {
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         return 0;
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        common::DoubleTime::type t) const
     {
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
-        msgs.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                           "out", 0.));
+        msgs.push_back(common::ExternalEvent < common::DoubleTime,
+                                               SchedulerHandle >("out", 0.));
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         return msgs;
     }
@@ -100,55 +90,57 @@ public:
 
 template < class SchedulerHandle>
 class B :
-        public paradevs::dtss::Dynamics < MyTime, SchedulerHandle,
+        public paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle,
                                           paradevs::common::NoParameters >
 {
 public:
     B(const std::string& name,
       const paradevs::common::NoParameters& parameters) :
-        paradevs::dtss::Dynamics < MyTime, SchedulerHandle,
+        paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle,
                                    paradevs::common::NoParameters >(name,
                                                                     parameters)
     { }
     virtual ~B()
     { }
 
-    void transition(const common::Bag < MyTime, SchedulerHandle >& x,
-                    MyTime::type t)
+    void transition(const common::Bag < common::DoubleTime,
+                    SchedulerHandle >& x,
+                    common::DoubleTime::type t)
     {
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::DELTA_INT)
             << "x = " << x.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
     }
 
-    MyTime::type start(MyTime::type t)
+    common::DoubleTime::type start(common::DoubleTime::type t)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         return 0;
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        common::DoubleTime::type t) const
     {
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
-        msgs.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                           "out", 0.));
+        msgs.push_back(common::ExternalEvent < common::DoubleTime,
+                                               SchedulerHandle >("out", 0.));
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         return msgs;
     }

+ 20 - 19
src/tests/dtss/tests.cpp

@@ -35,36 +35,37 @@
 #include <tests/catch.hpp>
 
 using namespace paradevs::tests::dtss;
+using namespace paradevs::common;
 
 TEST_CASE("dtss/only_one", "run")
 {
 
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::dtss::Coordinator <
-            MyTime,
+        DoubleTime, paradevs::dtss::Coordinator <
+            DoubleTime,
             Policy < paradevs::common::scheduler::NoSchedulerHandle >,
             OnlyOneGraphManager <
                 paradevs::common::scheduler::NoSchedulerHandle >,
             paradevs::common::scheduler::NoSchedulerHandle,
-            paradevs::dtss::Parameters < MyTime > >
+            paradevs::dtss::Parameters < DoubleTime > >
         > rc(0, 10, "root",
-             paradevs::dtss::Parameters < MyTime >(1),
+             paradevs::dtss::Parameters < DoubleTime >(1),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < DoubleTime >::trace().clear();
     rc.run();
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a").
             filter_type(paradevs::common::START).size() == 1);
     for (double t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
     }
@@ -73,46 +74,46 @@ TEST_CASE("dtss/only_one", "run")
 TEST_CASE("dtss/two", "run")
 {
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::dtss::Coordinator <
-            MyTime,
+        DoubleTime, paradevs::dtss::Coordinator <
+            DoubleTime,
             Policy < paradevs::common::scheduler::NoSchedulerHandle >,
             TwoGraphManager <
                 paradevs::common::scheduler::NoSchedulerHandle >,
             paradevs::common::scheduler::NoSchedulerHandle,
-            paradevs::dtss::Parameters < MyTime > >
+            paradevs::dtss::Parameters < DoubleTime > >
         > rc(0, 10, "root",
-             paradevs::dtss::Parameters < MyTime >(1),
+             paradevs::dtss::Parameters < DoubleTime >(1),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < DoubleTime >::trace().clear();
     rc.run();
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a").
             filter_type(paradevs::common::START).size() == 1);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
     }
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("b").
             filter_type(paradevs::common::START).size() == 1);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
     }

+ 69 - 52
src/tests/mixed/graph_manager.hpp

@@ -46,7 +46,7 @@ namespace paradevs { namespace tests { namespace mixed {
 struct SchedulerHandle;
 
 typedef typename paradevs::common::scheduler::HeapScheduler <
-    MyTime, SchedulerHandle >::type SchedulerType;
+    common::DoubleTime, SchedulerHandle >::type SchedulerType;
 
 struct SchedulerHandle
 {
@@ -69,49 +69,52 @@ struct SchedulerHandle
 template < class SchedulerHandle >
 struct LastBagPolicy
 {
-    const common::Bag < MyTime, SchedulerHandle >& bag() const
+    const common::Bag < common::DoubleTime, SchedulerHandle >& bag() const
     { return _bag; }
 
     virtual void operator()(
-        typename MyTime::type /* t */,
-        const common::ExternalEvent < MyTime, SchedulerHandle >& event,
-        typename MyTime::type /* tl */,
-        typename MyTime::type /* tn */)
+        typename common::DoubleTime::type /* t */,
+        const common::ExternalEvent < common::DoubleTime,
+                                      SchedulerHandle >& event,
+        typename common::DoubleTime::type /* tl */,
+        typename common::DoubleTime::type /* tn */)
     {
         _bag.clear();
         _bag.push_back(event);
     }
 
 private:
-    common::Bag < MyTime, SchedulerHandle > _bag;
+    common::Bag < common::DoubleTime, SchedulerHandle > _bag;
 };
 
 template < class SchedulerHandle >
 struct IgnorePolicy
 {
-    const common::Bag < MyTime, SchedulerHandle >& bag() const
+    const common::Bag < common::DoubleTime, SchedulerHandle >& bag() const
     { return _bag; }
 
     virtual void operator()(
-        typename MyTime::type /* t */,
-        const common::ExternalEvent < MyTime, SchedulerHandle >& /* event */,
-        typename MyTime::type /* tl */,
-        typename MyTime::type /* tn */)
+        typename common::DoubleTime::type /* t */,
+        const common::ExternalEvent < common::DoubleTime,
+                                      SchedulerHandle >& /* event */,
+        typename common::DoubleTime::type /* tl */,
+        typename common::DoubleTime::type /* tn */)
     { }
 
 private:
-    common::Bag < MyTime, SchedulerHandle > _bag;
+    common::Bag < common::DoubleTime, SchedulerHandle > _bag;
 };
 
 template < class SchedulerHandle >
 class S1GraphManager :
-        public pdevs::GraphManager < MyTime, SchedulerHandle,
+        public pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                                      paradevs::common::NoParameters >
 {
 public:
-    S1GraphManager(common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+    S1GraphManager(common::Coordinator < common::DoubleTime,
+                                         SchedulerHandle >* coordinator,
                    const paradevs::common::NoParameters& parameters) :
-        pdevs::GraphManager < MyTime, SchedulerHandle,
+        pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                               paradevs::common::NoParameters >(
                                   coordinator, parameters),
         a("a1", paradevs::common::NoParameters()),
@@ -135,19 +138,26 @@ public:
     { }
 
 private:
-    pdevs::Simulator < MyTime, A1 < SchedulerHandle >, SchedulerHandle,
+    pdevs::Simulator < common::DoubleTime,
+                       A1 < SchedulerHandle >,
+                       SchedulerHandle,
                        paradevs::common::NoParameters > a;
-    pdevs::Simulator < MyTime, B1 < SchedulerHandle >, SchedulerHandle,
+    pdevs::Simulator < common::DoubleTime,
+                       B1 < SchedulerHandle >,
+                       SchedulerHandle,
                        paradevs::common::NoParameters > b;
 };
 
 template < class SchedulerHandle >
-class S2GraphManager : public dtss::GraphManager < MyTime, SchedulerHandle >
+class S2GraphManager :
+        public dtss::GraphManager < common::DoubleTime, SchedulerHandle >
 {
 public:
-    S2GraphManager(common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+    S2GraphManager(common::Coordinator < common::DoubleTime,
+                                         SchedulerHandle >* coordinator,
                    const paradevs::common::NoParameters& parameters) :
-        dtss::GraphManager < MyTime, SchedulerHandle >(coordinator, parameters),
+        dtss::GraphManager < common::DoubleTime,
+                             SchedulerHandle >(coordinator, parameters),
         a("a2", 20, paradevs::common::NoParameters()),
         b("b2", 20, paradevs::common::NoParameters())
     {
@@ -168,24 +178,28 @@ public:
     { }
 
 private:
-    dtss::Simulator < MyTime, A2 < SchedulerHandle >, SchedulerHandle > a;
-    dtss::Simulator < MyTime, B2 < SchedulerHandle >, SchedulerHandle > b;
+    dtss::Simulator < common::DoubleTime,
+                      A2 < SchedulerHandle >,
+                      SchedulerHandle > a;
+    dtss::Simulator < common::DoubleTime,
+                      B2 < SchedulerHandle >,
+                      SchedulerHandle > b;
 };
 
 class RootGraphManager :
-        public pdevs::GraphManager < MyTime, SchedulerHandle,
+        public pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                                      paradevs::common::NoParameters >
 {
 public:
-    RootGraphManager(common::Coordinator < MyTime,
+    RootGraphManager(common::Coordinator < common::DoubleTime,
                                            SchedulerHandle >* coordinator,
                      const paradevs::common::NoParameters& parameters) :
-        pdevs::GraphManager < MyTime, SchedulerHandle,
+        pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                               paradevs::common::NoParameters >(
                                   coordinator, parameters),
         S1("S1", paradevs::common::NoParameters(),
            paradevs::common::NoParameters()),
-        S2("S2", paradevs::dtss::Parameters < MyTime >(20),
+        S2("S2", paradevs::dtss::Parameters < common::DoubleTime >(20),
            paradevs::common::NoParameters())
     {
         add_child(&S1);
@@ -198,28 +212,28 @@ public:
 
 private:
     paradevs::pdevs::Coordinator <
-        MyTime,
+        common::DoubleTime,
         SchedulerType,
         SchedulerHandle,
         S1GraphManager < SchedulerHandle > > S1;
     paradevs::dtss::Coordinator <
-        MyTime,
+        common::DoubleTime,
         LastBagPolicy < SchedulerHandle >,
         S2GraphManager < SchedulerHandle >,
         SchedulerHandle,
-        paradevs::dtss::Parameters < MyTime > > S2;
+        paradevs::dtss::Parameters < common::DoubleTime > > S2;
 };
 
 template < int size, class SchedulerHandle >
 class LinearGraphManager :
-        public pdevs::GraphManager < MyTime, SchedulerHandle,
+        public pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                                      paradevs::common::NoParameters >
 {
 public:
-    LinearGraphManager(common::Coordinator < MyTime,
+    LinearGraphManager(common::Coordinator < common::DoubleTime,
                                              SchedulerHandle >* coordinator,
                        const paradevs::common::NoParameters& parameters) :
-        pdevs::GraphManager < MyTime, SchedulerHandle,
+        pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                               paradevs::common::NoParameters >(
                                   coordinator, parameters)
     {
@@ -228,7 +242,8 @@ public:
 
             ss << "a" << i;
             _models.push_back(
-                new pdevs::Simulator < MyTime, Beep < SchedulerHandle >,
+                new pdevs::Simulator < common::DoubleTime,
+                                       Beep < SchedulerHandle >,
                                        SchedulerHandle,
                                        paradevs::common::NoParameters >(
                                            ss.str(),
@@ -258,20 +273,22 @@ public:
 
 private:
     std::vector <
-    pdevs::Simulator < MyTime, Beep < SchedulerHandle >, SchedulerHandle,
+    pdevs::Simulator < common::DoubleTime,
+                       Beep < SchedulerHandle >,
+                       SchedulerHandle,
                        paradevs::common::NoParameters >* > _models;
 };
 
 template < class SchedulerHandle >
 class Linear2GraphManager :
-        public pdevs::GraphManager < MyTime, SchedulerHandle,
+        public pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                                      paradevs::common::NoParameters >
 {
 public:
-    Linear2GraphManager(common::Coordinator < MyTime,
+    Linear2GraphManager(common::Coordinator < common::DoubleTime,
                                               SchedulerHandle >* coordinator,
                         const paradevs::common::NoParameters& parameters) :
-        pdevs::GraphManager < MyTime, SchedulerHandle,
+        pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                               paradevs::common::NoParameters >(
                                   coordinator, parameters)
     {
@@ -280,7 +297,7 @@ public:
 
             ss << "a" << i;
             _models.push_back(
-                new pdevs::Simulator < MyTime,
+                new pdevs::Simulator < common::DoubleTime,
                                        Beep < SchedulerHandle >,
                                        SchedulerHandle,
                                        paradevs::common::NoParameters >(
@@ -317,20 +334,20 @@ public:
 
 private:
     std::vector <
-        pdevs::Simulator < MyTime, Beep < SchedulerHandle >,
+        pdevs::Simulator < common::DoubleTime, Beep < SchedulerHandle >,
                            SchedulerHandle,
                            paradevs::common::NoParameters >* > _models;
 };
 
 class Root2GraphManager :
-        public pdevs::GraphManager < MyTime, SchedulerHandle,
+        public pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                                      paradevs::common::NoParameters >
 {
 public:
-    Root2GraphManager(common::Coordinator < MyTime,
+    Root2GraphManager(common::Coordinator < common::DoubleTime,
                                             SchedulerHandle >* coordinator,
                       const paradevs::common::NoParameters& parameters) :
-        pdevs::GraphManager < MyTime, SchedulerHandle,
+        pdevs::GraphManager < common::DoubleTime, SchedulerHandle,
                               paradevs::common::NoParameters >(
                                   coordinator, parameters),
         S1("S1", paradevs::common::NoParameters(),
@@ -348,12 +365,12 @@ public:
 
 private:
     paradevs::pdevs::Coordinator <
-        MyTime,
+        common::DoubleTime,
         SchedulerType,
         SchedulerHandle,
         Linear2GraphManager < SchedulerHandle > > S1;
     paradevs::pdevs::Coordinator <
-        MyTime,
+        common::DoubleTime,
         SchedulerType,
         SchedulerHandle,
         Linear2GraphManager < SchedulerHandle > > S2;
@@ -361,17 +378,17 @@ private:
 
 class Root3GraphManager :
         public pdevs::GraphManager <
-            MyTime,
+            common::DoubleTime,
             paradevs::common::scheduler::NoSchedulerHandle,
             paradevs::common::NoParameters >
 {
 public:
     Root3GraphManager(
         common::Coordinator <
-            MyTime,
+            common::DoubleTime,
             paradevs::common::scheduler::NoSchedulerHandle >* coordinator,
         const paradevs::common::NoParameters& parameters) :
-        pdevs::GraphManager < MyTime,
+        pdevs::GraphManager < common::DoubleTime,
                               paradevs::common::scheduler::NoSchedulerHandle,
                               paradevs::common::NoParameters >(
                                   coordinator, parameters),
@@ -390,14 +407,14 @@ public:
 
 private:
     pdevs::Coordinator <
-        MyTime,
-        paradevs::common::scheduler::VectorScheduler < MyTime >,
+        common::DoubleTime,
+        paradevs::common::scheduler::VectorScheduler < common::DoubleTime >,
         paradevs::common::scheduler::NoSchedulerHandle,
         Linear2GraphManager < paradevs::common::scheduler::NoSchedulerHandle >
     > S1;
     pdevs::Coordinator <
-        MyTime,
-        paradevs::common::scheduler::VectorScheduler < MyTime >,
+        common::DoubleTime,
+        paradevs::common::scheduler::VectorScheduler < common::DoubleTime >,
         paradevs::common::scheduler::NoSchedulerHandle,
         Linear2GraphManager < paradevs::common::scheduler::NoSchedulerHandle >
     > S2;

+ 181 - 177
src/tests/mixed/models.hpp

@@ -27,7 +27,7 @@
 #ifndef TESTS_MIXED_MODELS_HPP
 #define TESTS_MIXED_MODELS_HPP 1
 
-#include <common/Time.hpp>
+#include <common/time/DoubleTime.hpp>
 #include <common/Trace.hpp>
 
 #include <dtss/Dynamics.hpp>
@@ -36,33 +36,22 @@
 
 namespace paradevs { namespace tests { namespace mixed {
 
-template < typename T >
-struct Limits
-{
-    static constexpr T negative_infinity =
-        -std::numeric_limits < T >::infinity();
-    static constexpr T positive_infinity =
-        std::numeric_limits < T >::infinity();
-    static constexpr T null = 0;
-};
-
-typedef paradevs::common::Time < double, Limits < double > > MyTime;
-
 template < class SchedulerHandle>
-class A1 : public paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
-                                              paradevs::common::NoParameters >
+class A1 :
+        public paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
+                                           paradevs::common::NoParameters >
 {
 public:
     A1(const std::string& name,
        const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
+        paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
                                     paradevs::common::NoParameters >(
                                         name, parameters)
     { }
     virtual ~A1()
     { }
 
-    void dint(typename MyTime::type t)
+    void dint(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -70,10 +59,10 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace() <<
-            common::TraceElement < MyTime >(get_name(), t,
+        common::Trace < common::DoubleTime >::trace() <<
+            common::TraceElement < common::DoubleTime >(get_name(), t,
                                             common::DELTA_INT);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         if (_phase == SEND) {
@@ -81,8 +70,9 @@ public:
         }
     }
 
-    void dext(typename MyTime::type t, typename MyTime::type /* e */,
-              const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dext(typename common::DoubleTime::type t,
+              typename common::DoubleTime::type /* e */,
+              const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
 #ifndef WITH_TRACE
@@ -91,18 +81,19 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_EXT)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_EXT)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         _phase = SEND;
     }
 
-    void dconf(typename MyTime::type t, typename MyTime::type /* e */,
-               const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dconf(typename common::DoubleTime::type t,
+               typename common::DoubleTime::type /* e */,
+               const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
 #ifndef WITH_TRACE
@@ -111,15 +102,15 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_CONF)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_CONF)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
     }
 
-    typename MyTime::type start(typename MyTime::type t)
+    typename common::DoubleTime::type start(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -127,26 +118,27 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-   common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::START);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
         _phase = WAIT;
         return 0;
     }
 
-    typename MyTime::type ta(typename MyTime::type t) const
+    typename common::DoubleTime::type ta(
+        typename common::DoubleTime::type t) const
     {
 #ifndef WITH_TRACE
         (void)t;
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::TA);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::TA);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
         if (_phase == WAIT) {
             return 1;
@@ -155,25 +147,25 @@ public:
         }
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
 
 #ifndef WITH_TRACE
         (void)t;
 #endif
 
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
-        msgs.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                           "out", 0.));
+        msgs.push_back(common::ExternalEvent < common::DoubleTime,
+                                               SchedulerHandle >("out", 0.));
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::LAMBDA)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         return msgs;
@@ -186,20 +178,21 @@ private:
 };
 
 template < class SchedulerHandle>
-class B1 : public paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
-                                              paradevs::common::NoParameters >
+class B1 :
+        public paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
+                                           paradevs::common::NoParameters >
 {
 public:
     B1(const std::string& name,
        const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
+        paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
                                     paradevs::common::NoParameters >(
                                         name, parameters)
     { }
     virtual ~B1()
     { }
 
-    void dint(typename MyTime::type t)
+    void dint(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -207,10 +200,10 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_INT);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_INT);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         if (_phase == SEND) {
@@ -218,8 +211,9 @@ public:
         }
     }
 
-    void dext(typename MyTime::type t, typename MyTime::type /* e */,
-              const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dext(typename common::DoubleTime::type t,
+              typename common::DoubleTime::type /* e */,
+              const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
 #ifndef WITH_TRACE
@@ -228,36 +222,37 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_EXT)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_EXT)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         _phase = SEND;
     }
 
-    void dconf(typename MyTime::type t, typename MyTime::type /* e */,
-               const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dconf(typename common::DoubleTime::type t,
+               typename common::DoubleTime::type /* e */,
+               const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
 #ifndef WITH_TRACE
-   (void)t;
-   (void)msgs;
+        (void)t;
+        (void)msgs;
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_CONF)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_CONF)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
     }
 
-    typename MyTime::type start(typename MyTime::type t)
+    typename common::DoubleTime::type start(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -265,17 +260,18 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::START);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         _phase = WAIT;
         return std::numeric_limits < double >::max();
     }
 
-    typename MyTime::type ta(typename MyTime::type t) const
+    typename common::DoubleTime::type ta(
+        typename common::DoubleTime::type t) const
     {
 
 #ifndef WITH_TRACE
@@ -283,10 +279,10 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::TA);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::TA);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         if (_phase == WAIT) {
@@ -296,24 +292,24 @@ public:
         }
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
 
 #ifndef WITH_TRACE
         (void)t;
 #endif
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
-        msgs.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                           "out", t));
+        msgs.push_back(common::ExternalEvent < common::DoubleTime,
+                                               SchedulerHandle >("out", t));
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::LAMBDA)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         return msgs;
@@ -326,21 +322,22 @@ private:
 };
 
 template < class SchedulerHandle >
-class A2 : public paradevs::dtss::Dynamics < MyTime, SchedulerHandle >
+class A2 :
+        public paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle >
 {
 public:
     A2(const std::string& name,
        const paradevs::common::NoParameters& parameters) :
-        paradevs::dtss::Dynamics <
-           MyTime, SchedulerHandle,
-           paradevs::common::NoParameters >(name, parameters)
+        paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle,
+                                   paradevs::common::NoParameters >(
+                                       name, parameters)
     { }
     virtual ~A2()
     { }
 
     void transition(
-        const common::Bag < MyTime, SchedulerHandle >& x,
-            typename MyTime::type t)
+        const common::Bag < common::DoubleTime, SchedulerHandle >& x,
+        typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -349,16 +346,16 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_INT)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_INT)
             << "x = " << x.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
     }
 
-    typename MyTime::type start(typename MyTime::type t)
+    typename common::DoubleTime::type start(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -366,33 +363,34 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::START);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         return 0;
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
 
 #ifndef WITH_TRACE
         (void)t;
 #endif
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
         msgs.push_back(
-            common::ExternalEvent < MyTime, SchedulerHandle >( "out", 0.));
+            common::ExternalEvent < common::DoubleTime,
+                                    SchedulerHandle >( "out", 0.));
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::LAMBDA)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         return msgs;
@@ -400,21 +398,22 @@ public:
 };
 
 template < class SchedulerHandle >
-class B2 : public paradevs::dtss::Dynamics < MyTime, SchedulerHandle >
+class B2 :
+        public paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle >
 {
 public:
     B2(const std::string& name,
        const paradevs::common::NoParameters& parameters) :
-        paradevs::dtss::Dynamics <
-           MyTime, SchedulerHandle,
-           paradevs::common::NoParameters >(name, parameters)
+        paradevs::dtss::Dynamics < common::DoubleTime, SchedulerHandle,
+                                   paradevs::common::NoParameters >(
+                                       name, parameters)
     { }
     virtual ~B2()
     { }
 
     void transition(
-        const common::Bag < MyTime, SchedulerHandle >& x,
-            typename MyTime::type t)
+        const common::Bag < common::DoubleTime, SchedulerHandle >& x,
+        typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -423,16 +422,16 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_INT)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_INT)
             << "x = " << x.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
     }
 
-    typename MyTime::type start(typename MyTime::type t)
+    typename common::DoubleTime::type start(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -440,33 +439,34 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::START);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         return 0;
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
 
 #ifndef WITH_TRACE
         (void)t;
 #endif
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
         msgs.push_back(
-            common::ExternalEvent < MyTime, SchedulerHandle >("out", 0.));
+            common::ExternalEvent < common::DoubleTime,
+                                    SchedulerHandle >("out", 0.));
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::LAMBDA)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         return msgs;
@@ -474,20 +474,21 @@ public:
 };
 
 template < class SchedulerHandle>
-class Beep : public paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
-                                                paradevs::common::NoParameters >
+class Beep :
+        public paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
+                                           paradevs::common::NoParameters >
 {
 public:
     Beep(const std::string& name,
          const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::Dynamics < MyTime, SchedulerHandle,
+        paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle,
                                     paradevs::common::NoParameters >(name,
                                                                      parameters)
     { }
     virtual ~Beep()
     { }
 
-    void dint(typename MyTime::type t)
+    void dint(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -495,10 +496,10 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace() <<
-            common::TraceElement < MyTime >(get_name(), t,
-                                            common::DELTA_INT);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace() <<
+            common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                        common::DELTA_INT);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         if (_phase == SEND) {
@@ -506,8 +507,9 @@ public:
         }
     }
 
-    void dext(typename MyTime::type t, typename MyTime::type /* e */,
-              const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dext(typename common::DoubleTime::type t,
+              typename common::DoubleTime::type /* e */,
+              const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
 #ifndef WITH_TRACE
@@ -516,18 +518,19 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_EXT)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_EXT)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         _phase = SEND;
     }
 
-    void dconf(typename MyTime::type t, typename MyTime::type /* e */,
-               const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dconf(typename common::DoubleTime::type t,
+               typename common::DoubleTime::type /* e */,
+               const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
 #ifndef WITH_TRACE
@@ -536,16 +539,16 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::DELTA_CONF)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::DELTA_CONF)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
     }
 
-    typename MyTime::type start(typename MyTime::type t)
+    typename common::DoubleTime::type start(typename common::DoubleTime::type t)
     {
 
 #ifndef WITH_TRACE
@@ -553,17 +556,18 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::START);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         _phase = WAIT;
         return 0;
     }
 
-    typename MyTime::type ta(typename MyTime::type t) const
+    typename common::DoubleTime::type ta(
+        typename common::DoubleTime::type t) const
     {
 
 #ifndef WITH_TRACE
@@ -571,10 +575,10 @@ public:
 #endif
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::TA);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::TA);
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         if (_phase == WAIT) {
@@ -584,24 +588,24 @@ public:
         }
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
 
 #ifndef WITH_TRACE
         (void)t;
 #endif
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
-        msgs.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                           "out", 0.));
+        msgs.push_back(common::ExternalEvent < common::DoubleTime,
+                                               SchedulerHandle >("out", 0.));
 
 #ifdef WITH_TRACE
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(get_name(), t,
-                                               common::LAMBDA)
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(get_name(), t,
+                                                           common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 #endif
 
         return msgs;

+ 21 - 20
src/tests/mixed/tests.cpp

@@ -33,90 +33,91 @@
 #include <tests/catch.hpp>
 
 using namespace paradevs::tests::mixed;
+using namespace paradevs::common;
 
 TEST_CASE("mixed/hierachical", "run")
 {
     paradevs::common::RootCoordinator <
-        MyTime,
+        DoubleTime,
         paradevs::pdevs::Coordinator <
-            MyTime,
+            DoubleTime,
             paradevs::common::scheduler::HeapScheduler <
-                MyTime, SchedulerHandle >,
+                DoubleTime, SchedulerHandle >,
             SchedulerHandle,
             RootGraphManager >
         > rc(0, 100, "root");
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < DoubleTime >::trace().clear();
     rc.run();
 
-    REQUIRE(paradevs::common::Trace < MyTime >::trace().elements().
+    REQUIRE(paradevs::common::Trace < DoubleTime >::trace().elements().
             filter_model_name("a1").
             filter_type(paradevs::common::START).size() == 1);
-    REQUIRE(paradevs::common::Trace < MyTime >::trace().elements().
+    REQUIRE(paradevs::common::Trace < DoubleTime >::trace().elements().
             filter_model_name("b1").
             filter_type(paradevs::common::START).size() == 1);
-    REQUIRE(paradevs::common::Trace < MyTime >::trace().elements().
+    REQUIRE(paradevs::common::Trace < DoubleTime >::trace().elements().
             filter_model_name("a2").
             filter_type(paradevs::common::START).size() == 1);
-    REQUIRE(paradevs::common::Trace < MyTime >::trace().elements().
+    REQUIRE(paradevs::common::Trace < DoubleTime >::trace().elements().
             filter_model_name("b2").
             filter_type(paradevs::common::START).size() == 1);
 
-    REQUIRE(paradevs::common::Trace < MyTime >::trace().elements().
+    REQUIRE(paradevs::common::Trace < DoubleTime >::trace().elements().
             filter_model_name("a1").
             filter_type(paradevs::common::DELTA_EXT).size() == 0);
     for (double t = 0; t <= 100; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 1);
     }
 
     for (double t = 0; t <= 100; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::DELTA_EXT).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 100; t += 20) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 100; t += 20) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
     }

+ 43 - 31
src/tests/pdevs/graph_manager.hpp

@@ -41,7 +41,7 @@ namespace paradevs { namespace tests { namespace pdevs {
 struct SchedulerHandle;
 
 typedef typename paradevs::common::scheduler::HeapScheduler <
-    MyTime, SchedulerHandle >::type SchedulerType;
+    common::DoubleTime, SchedulerHandle >::type SchedulerType;
 
 struct SchedulerHandle
 {
@@ -63,13 +63,16 @@ struct SchedulerHandle
 
 template < class SchedulerHandle >
 class S1GraphManager :
-        public paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >
+        public paradevs::pdevs::GraphManager < common::DoubleTime,
+                                               SchedulerHandle >
 {
 public:
-    S1GraphManager(common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+    S1GraphManager(common::Coordinator < common::DoubleTime,
+                                         SchedulerHandle >* coordinator,
                    const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >(coordinator,
-                                                                  parameters),
+        paradevs::pdevs::GraphManager < common::DoubleTime,
+                                        SchedulerHandle >(coordinator,
+                                                          parameters),
         a("a1", common::NoParameters()), b("b1", common::NoParameters())
     {
         S1GraphManager < SchedulerHandle >::add_child(&a);
@@ -89,21 +92,24 @@ public:
     { }
 
 private:
-    paradevs::pdevs::Simulator < MyTime, A < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, A < SchedulerHandle >,
                                  SchedulerHandle > a;
-    paradevs::pdevs::Simulator < MyTime, B < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, B < SchedulerHandle >,
                                  SchedulerHandle > b;
 };
 
 template < class SchedulerHandle >
 class S2GraphManager :
-        public paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >
+        public paradevs::pdevs::GraphManager < common::DoubleTime,
+                                               SchedulerHandle >
 {
 public:
-    S2GraphManager(common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+    S2GraphManager(common::Coordinator < common::DoubleTime,
+                                         SchedulerHandle >* coordinator,
                    const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >(coordinator,
-                                                                  parameters),
+        paradevs::pdevs::GraphManager < common::DoubleTime,
+                                        SchedulerHandle >(coordinator,
+                                                          parameters),
         a("a2", common::NoParameters()), b("b2", common::NoParameters())
     {
         S2GraphManager < SchedulerHandle >::add_child(&a);
@@ -123,20 +129,22 @@ public:
     { }
 
 private:
-    paradevs::pdevs::Simulator < MyTime, A < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, A < SchedulerHandle >,
                                  SchedulerHandle > a;
-    paradevs::pdevs::Simulator < MyTime, B < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, B < SchedulerHandle >,
                                  SchedulerHandle > b;
 };
 
 class RootGraphManager :
-        public paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >
+        public paradevs::pdevs::GraphManager < common::DoubleTime,
+                                               SchedulerHandle >
 {
 public:
     RootGraphManager(
-        common::Coordinator < MyTime, SchedulerHandle >* coordinator,
+        common::Coordinator < common::DoubleTime,
+                              SchedulerHandle >* coordinator,
         const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >(
+        paradevs::pdevs::GraphManager < common::DoubleTime, SchedulerHandle >(
                                             coordinator, parameters),
         S1("S1", paradevs::common::NoParameters(),
            paradevs::common::NoParameters()),
@@ -154,12 +162,12 @@ public:
 
 private:
     paradevs::pdevs::Coordinator <
-        MyTime,
+        common::DoubleTime,
         SchedulerType,
         SchedulerHandle,
         S1GraphManager < SchedulerHandle > > S1;
     paradevs::pdevs::Coordinator <
-        MyTime,
+        common::DoubleTime,
         SchedulerType,
         SchedulerHandle,
         S2GraphManager < SchedulerHandle > > S2;
@@ -167,14 +175,16 @@ private:
 
 template < class SchedulerHandle >
 class OnlyOneGraphManager :
-        public paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >
+        public paradevs::pdevs::GraphManager < common::DoubleTime,
+                                               SchedulerHandle >
 {
 public:
-    OnlyOneGraphManager(common::Coordinator < MyTime,
+    OnlyOneGraphManager(common::Coordinator < common::DoubleTime,
                                               SchedulerHandle >* coordinator,
                         const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >(coordinator,
-                                                                  parameters),
+        paradevs::pdevs::GraphManager < common::DoubleTime,
+                                        SchedulerHandle >(coordinator,
+                                                          parameters),
         a("a", common::NoParameters())
     {
         OnlyOneGraphManager < SchedulerHandle >::add_child(&a);
@@ -184,20 +194,22 @@ public:
     { }
 
 private:
-    paradevs::pdevs::Simulator < MyTime, A < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, A < SchedulerHandle >,
                                  SchedulerHandle > a;
 };
 
 template < class SchedulerHandle >
 class FlatGraphManager :
-        public paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >
+        public paradevs::pdevs::GraphManager < common::DoubleTime,
+                                               SchedulerHandle >
 {
 public:
-    FlatGraphManager(common::Coordinator < MyTime,
+    FlatGraphManager(common::Coordinator < common::DoubleTime,
                                            SchedulerHandle >* coordinator,
                      const paradevs::common::NoParameters& parameters) :
-        paradevs::pdevs::GraphManager < MyTime, SchedulerHandle >(coordinator,
-                                                                  parameters),
+        paradevs::pdevs::GraphManager < common::DoubleTime,
+                                        SchedulerHandle >(coordinator,
+                                                          parameters),
         a1("a1", common::NoParameters()), b1("b1", common::NoParameters()),
         a2("a2", common::NoParameters()), b2("b2", common::NoParameters())
     {
@@ -222,13 +234,13 @@ public:
     { }
 
 private:
-    paradevs::pdevs::Simulator < MyTime, A < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, A < SchedulerHandle >,
                                  SchedulerHandle > a1;
-    paradevs::pdevs::Simulator < MyTime, B < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, B < SchedulerHandle >,
                                  SchedulerHandle > b1;
-    paradevs::pdevs::Simulator < MyTime, A < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, A < SchedulerHandle >,
                                  SchedulerHandle > a2;
-    paradevs::pdevs::Simulator < MyTime, B < SchedulerHandle >,
+    paradevs::pdevs::Simulator < common::DoubleTime, B < SchedulerHandle >,
                                  SchedulerHandle > b2;
 };
 

+ 76 - 79
src/tests/pdevs/models.hpp

@@ -27,97 +27,88 @@
 #ifndef TESTS_PDEVS_MODELS_HPP
 #define TESTS_PDEVS_MODELS_HPP 1
 
-#include <common/Time.hpp>
+#include <common/time/DoubleTime.hpp>
 #include <common/Trace.hpp>
 
 #include <pdevs/Dynamics.hpp>
 
-#include <limits>
-
 namespace paradevs { namespace tests { namespace pdevs {
 
-template < typename T >
-struct Limits
-{
-    static constexpr T negative_infinity =
-        -std::numeric_limits < T >::infinity();
-    static constexpr T positive_infinity =
-        std::numeric_limits < T >::infinity();
-    static constexpr T null = 0;
-};
-
-typedef paradevs::common::Time < double, Limits < double > > MyTime;
-
 template < class SchedulerHandle>
-class A : public paradevs::pdevs::Dynamics < MyTime, SchedulerHandle >
+class A :
+        public paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle >
 {
 public:
     A(const std::string& name, const common::NoParameters& parameters) :
-        paradevs::pdevs::Dynamics < MyTime, SchedulerHandle >(name, parameters)
+        paradevs::pdevs::Dynamics < common::DoubleTime,
+                                    SchedulerHandle >(name, parameters)
     { }
     virtual ~A()
     { }
 
-    void dint(typename MyTime::type t)
+    void dint(typename common::DoubleTime::type t)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::DELTA_INT);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         if (_phase == SEND) {
             _phase = WAIT;
         }
     }
 
-    void dext(typename MyTime::type t, typename MyTime::type /* e */,
-              const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dext(typename common::DoubleTime::type t,
+              typename common::DoubleTime::type /* e */,
+              const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::DELTA_EXT)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         _phase = SEND;
     }
 
-    void dconf(typename MyTime::type t, typename MyTime::type /* e */,
-               const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dconf(typename common::DoubleTime::type t,
+               typename common::DoubleTime::type /* e */,
+               const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::DELTA_CONF)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
     }
 
-    typename MyTime::type start(typename MyTime::type t)
+    typename common::DoubleTime::type start(typename common::DoubleTime::type t)
     {
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         _phase = WAIT;
         return 0;
     }
 
-    typename MyTime::type ta(typename MyTime::type t) const
+    typename common::DoubleTime::type ta(
+        typename common::DoubleTime::type t) const
     {
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::TA);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         if (_phase == WAIT) {
             return 1;
@@ -126,20 +117,21 @@ public:
         }
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
-        msgs.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                           "out", 0.));
+        msgs.push_back(
+            common::ExternalEvent < common::DoubleTime, SchedulerHandle >(
+                "out", 0.));
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 A < SchedulerHandle >::get_name(), t,
                 common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         return msgs;
     }
@@ -154,76 +146,81 @@ private:
 };
 
 template < class SchedulerHandle >
-class B : public paradevs::pdevs::Dynamics < MyTime, SchedulerHandle >
+class B :
+        public paradevs::pdevs::Dynamics < common::DoubleTime, SchedulerHandle >
 {
 public:
     B(const std::string& name, const common::NoParameters& parameters) :
-        paradevs::pdevs::Dynamics < MyTime, SchedulerHandle >(name, parameters)
+        paradevs::pdevs::Dynamics < common::DoubleTime,
+                                    SchedulerHandle >(name, parameters)
     { }
     virtual ~B()
     { }
 
-    void dint(typename MyTime::type t)
+    void dint(typename common::DoubleTime::type t)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::DELTA_INT);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         if (_phase == SEND) {
             _phase = WAIT;
         }
     }
 
-    void dext(typename MyTime::type t, typename MyTime::type /* e */,
-              const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dext(typename common::DoubleTime::type t,
+              typename common::DoubleTime::type /* e */,
+              const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::DELTA_EXT)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         _phase = SEND;
     }
 
-    void dconf(typename MyTime::type t, typename MyTime::type /* e */,
-               const common::Bag < MyTime, SchedulerHandle >& msgs)
+    void dconf(typename common::DoubleTime::type t,
+               typename common::DoubleTime::type /* e */,
+               const common::Bag < common::DoubleTime, SchedulerHandle >& msgs)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::DELTA_CONF)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
     }
 
-    typename MyTime::type start(typename MyTime::type t)
+    typename common::DoubleTime::type start(typename common::DoubleTime::type t)
     {
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::START);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         _phase = WAIT;
         return std::numeric_limits < double >::max();
     }
 
-    typename MyTime::type ta(typename MyTime::type t) const
+    typename common::DoubleTime::type ta(
+        typename common::DoubleTime::type t) const
     {
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::TA);
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         if (_phase == WAIT) {
             return std::numeric_limits < double >::max();
@@ -232,20 +229,20 @@ public:
         }
     }
 
-    common::Bag < MyTime, SchedulerHandle > lambda(
-        typename MyTime::type t) const
+    common::Bag < common::DoubleTime, SchedulerHandle > lambda(
+        typename common::DoubleTime::type t) const
     {
-        common::Bag < MyTime, SchedulerHandle > msgs;
+        common::Bag < common::DoubleTime, SchedulerHandle > msgs;
 
-        msgs.push_back(common::ExternalEvent < MyTime, SchedulerHandle >(
-                           "out", 0.));
+        msgs.push_back(common::ExternalEvent < common::DoubleTime,
+                                               SchedulerHandle >("out", 0.));
 
-        common::Trace < MyTime >::trace()
-            << common::TraceElement < MyTime >(
+        common::Trace < common::DoubleTime >::trace()
+            << common::TraceElement < common::DoubleTime >(
                 B < SchedulerHandle >::get_name(), t,
                 common::LAMBDA)
             << "messages = " << msgs.to_string();
-        common::Trace < MyTime >::trace().flush();
+        common::Trace < common::DoubleTime >::trace().flush();
 
         return msgs;
     }

+ 61 - 60
src/tests/pdevs/tests.cpp

@@ -33,45 +33,46 @@
 #include <tests/catch.hpp>
 
 using namespace paradevs::tests::pdevs;
+using namespace paradevs::common;
 
 TEST_CASE("pdevs/only_one", "run")
 {
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::pdevs::Coordinator <
-            MyTime,
+        DoubleTime, paradevs::pdevs::Coordinator <
+            DoubleTime,
             paradevs::common::scheduler::HeapScheduler <
-                MyTime, SchedulerHandle >,
+                DoubleTime, SchedulerHandle >,
             SchedulerHandle,
             OnlyOneGraphManager < SchedulerHandle > >
         > rc(0, 10, "root", paradevs::common::NoParameters(),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < DoubleTime >::trace().clear();
     rc.run();
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a").
             filter_type(paradevs::common::START).size() == 1);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a").
             filter_type(paradevs::common::DELTA_EXT).size() == 0);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a").
             filter_type(paradevs::common::DELTA_CONF).size() == 0);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
     }
@@ -80,111 +81,111 @@ TEST_CASE("pdevs/only_one", "run")
 TEST_CASE("pdevs/flat", "run")
 {
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::pdevs::Coordinator <
-            MyTime,
+        DoubleTime, paradevs::pdevs::Coordinator <
+            DoubleTime,
             paradevs::common::scheduler::HeapScheduler <
-                MyTime, SchedulerHandle >,
+                DoubleTime, SchedulerHandle >,
             SchedulerHandle,
             FlatGraphManager < SchedulerHandle> >
         > rc(0, 10, "root", paradevs::common::NoParameters(),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < DoubleTime >::trace().clear();
     rc.run();
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a1").
             filter_type(paradevs::common::START).size() == 1);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("b1").
             filter_type(paradevs::common::START).size() == 1);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a2").
             filter_type(paradevs::common::START).size() == 1);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("b2").
             filter_type(paradevs::common::START).size() == 1);
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a1").
             filter_type(paradevs::common::DELTA_EXT).size() == 0);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::DELTA_EXT).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 3);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::DELTA_EXT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::DELTA_CONF).size() == 0);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 4);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::DELTA_EXT).size() == 2);
     }
@@ -193,111 +194,111 @@ TEST_CASE("pdevs/flat", "run")
 TEST_CASE("pdevs/hierachical", "run")
 {
     paradevs::common::RootCoordinator <
-        MyTime, paradevs::pdevs::Coordinator <
-            MyTime,
+        DoubleTime, paradevs::pdevs::Coordinator <
+            DoubleTime,
             paradevs::common::scheduler::HeapScheduler <
-                MyTime, SchedulerHandle >,
+                DoubleTime, SchedulerHandle >,
             SchedulerHandle,
             RootGraphManager >
         > rc(0, 10, "root", paradevs::common::NoParameters(),
              paradevs::common::NoParameters());
 
-    paradevs::common::Trace < MyTime >::trace().clear();
+    paradevs::common::Trace < DoubleTime >::trace().clear();
     rc.run();
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a1").
             filter_type(paradevs::common::START).size() == 1);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("b1").
             filter_type(paradevs::common::START).size() == 1);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a2").
             filter_type(paradevs::common::START).size() == 1);
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("b2").
             filter_type(paradevs::common::START).size() == 1);
 
     REQUIRE(paradevs::common::Trace <
-                MyTime >::trace().elements().
+                DoubleTime >::trace().elements().
             filter_model_name("a1").
             filter_type(paradevs::common::DELTA_EXT).size() == 0);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a1").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b1").filter_time(t).
                 filter_type(paradevs::common::DELTA_EXT).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 3);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::DELTA_EXT).size() == 1);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("a2").filter_time(t).
                 filter_type(paradevs::common::DELTA_CONF).size() == 0);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::LAMBDA).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::DELTA_INT).size() == 2);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::TA).size() == 4);
         REQUIRE(paradevs::common::Trace <
-                    MyTime >::trace().elements().
+                    DoubleTime >::trace().elements().
                 filter_model_name("b2").filter_time(t).
                 filter_type(paradevs::common::DELTA_EXT).size() == 2);
     }