|
@@ -30,7 +30,7 @@
|
|
#include <tests/qss/models.hpp>
|
|
#include <tests/qss/models.hpp>
|
|
|
|
|
|
#include <artis-star/kernel/pdevs/Coordinator.hpp>
|
|
#include <artis-star/kernel/pdevs/Coordinator.hpp>
|
|
-#include <artis-star/kernel/pdevs/qss/GraphManager.hpp>
|
|
|
|
|
|
+#include <artis-addons/qss/GraphManager.hpp>
|
|
#include <artis-star/kernel/dtss/Coordinator.hpp>
|
|
#include <artis-star/kernel/dtss/Coordinator.hpp>
|
|
#include <artis-star/kernel/dtss/GraphManager.hpp>
|
|
#include <artis-star/kernel/dtss/GraphManager.hpp>
|
|
#include <artis-star/kernel/dtss/Policy.hpp>
|
|
#include <artis-star/kernel/dtss/Policy.hpp>
|
|
@@ -40,30 +40,30 @@ namespace artis {
|
|
namespace qss {
|
|
namespace qss {
|
|
|
|
|
|
class ConstantGraphManager :
|
|
class ConstantGraphManager :
|
|
- public artis::pdevs::qss::GraphManager<common::DoubleTime, Constant> {
|
|
|
|
|
|
+ public artis::qss::GraphManager<common::DoubleTime, Constant> {
|
|
public:
|
|
public:
|
|
ConstantGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
ConstantGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
- const artis::pdevs::qss::QSSParameters<artis::common::NoParameters>& parameters,
|
|
|
|
|
|
+ const artis::qss::QSSParameters<artis::common::NoParameters>& parameters,
|
|
const artis::common::NoParameters& graph_parameters)
|
|
const artis::common::NoParameters& graph_parameters)
|
|
:
|
|
:
|
|
- artis::pdevs::qss::GraphManager<common::DoubleTime, Constant>(coordinator,
|
|
|
|
|
|
+ artis::qss::GraphManager<common::DoubleTime, Constant>(coordinator,
|
|
parameters, graph_parameters) { }
|
|
parameters, graph_parameters) { }
|
|
|
|
|
|
~ConstantGraphManager() override = default;
|
|
~ConstantGraphManager() override = default;
|
|
};
|
|
};
|
|
|
|
|
|
class OnlyOneGraphManager :
|
|
class OnlyOneGraphManager :
|
|
- public artis::pdevs::qss::GraphManager<common::DoubleTime, Constant> {
|
|
|
|
|
|
+ public artis::qss::GraphManager<common::DoubleTime, Constant> {
|
|
public:
|
|
public:
|
|
enum submodels {
|
|
enum submodels {
|
|
A
|
|
A
|
|
};
|
|
};
|
|
|
|
|
|
OnlyOneGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
OnlyOneGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
- const artis::pdevs::qss::QSSParameters<artis::common::NoParameters>& parameters,
|
|
|
|
|
|
+ const artis::qss::QSSParameters<artis::common::NoParameters>& parameters,
|
|
const artis::common::NoParameters& graph_parameters)
|
|
const artis::common::NoParameters& graph_parameters)
|
|
:
|
|
:
|
|
- artis::pdevs::qss::GraphManager<common::DoubleTime, Constant>(coordinator,
|
|
|
|
|
|
+ artis::qss::GraphManager<common::DoubleTime, Constant>(coordinator,
|
|
parameters, graph_parameters),
|
|
parameters, graph_parameters),
|
|
S("a", parameters, graph_parameters)
|
|
S("a", parameters, graph_parameters)
|
|
{
|
|
{
|
|
@@ -73,34 +73,34 @@ namespace artis {
|
|
~OnlyOneGraphManager() override = default;
|
|
~OnlyOneGraphManager() override = default;
|
|
|
|
|
|
private:
|
|
private:
|
|
- artis::pdevs::Coordinator<common::DoubleTime, ConstantGraphManager, artis::pdevs::qss::QSSParameters<artis::common::NoParameters>> S;
|
|
|
|
|
|
+ artis::pdevs::Coordinator<common::DoubleTime, ConstantGraphManager, artis::qss::QSSParameters<artis::common::NoParameters>> S;
|
|
};
|
|
};
|
|
|
|
|
|
class ParabolaGraphManager :
|
|
class ParabolaGraphManager :
|
|
- public artis::pdevs::qss::GraphManager<common::DoubleTime, Parabola, ParabolaParameters> {
|
|
|
|
|
|
+ public artis::qss::GraphManager<common::DoubleTime, Parabola, ParabolaParameters> {
|
|
public:
|
|
public:
|
|
ParabolaGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
ParabolaGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
- const artis::pdevs::qss::QSSParameters<ParabolaParameters>& parameters,
|
|
|
|
|
|
+ const artis::qss::QSSParameters<ParabolaParameters>& parameters,
|
|
const artis::common::NoParameters& graph_parameters)
|
|
const artis::common::NoParameters& graph_parameters)
|
|
:
|
|
:
|
|
- artis::pdevs::qss::GraphManager<common::DoubleTime, Parabola, ParabolaParameters>(
|
|
|
|
|
|
+ artis::qss::GraphManager<common::DoubleTime, Parabola, ParabolaParameters>(
|
|
coordinator, parameters, graph_parameters) { }
|
|
coordinator, parameters, graph_parameters) { }
|
|
|
|
|
|
~ParabolaGraphManager() override = default;
|
|
~ParabolaGraphManager() override = default;
|
|
};
|
|
};
|
|
|
|
|
|
class OnlyOneParabolaGraphManager :
|
|
class OnlyOneParabolaGraphManager :
|
|
- public artis::pdevs::GraphManager<common::DoubleTime, artis::pdevs::qss::QSSParameters<ParabolaParameters>> {
|
|
|
|
|
|
+ public artis::pdevs::GraphManager<common::DoubleTime, artis::qss::QSSParameters<ParabolaParameters>> {
|
|
public:
|
|
public:
|
|
enum submodels {
|
|
enum submodels {
|
|
A
|
|
A
|
|
};
|
|
};
|
|
|
|
|
|
OnlyOneParabolaGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
OnlyOneParabolaGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
- const artis::pdevs::qss::QSSParameters<ParabolaParameters>& parameters,
|
|
|
|
|
|
+ const artis::qss::QSSParameters<ParabolaParameters>& parameters,
|
|
const artis::common::NoParameters& graph_parameters)
|
|
const artis::common::NoParameters& graph_parameters)
|
|
:
|
|
:
|
|
- artis::pdevs::GraphManager<common::DoubleTime, artis::pdevs::qss::QSSParameters<ParabolaParameters>>(
|
|
|
|
|
|
+ artis::pdevs::GraphManager<common::DoubleTime, artis::qss::QSSParameters<ParabolaParameters>>(
|
|
coordinator, parameters, graph_parameters),
|
|
coordinator, parameters, graph_parameters),
|
|
S("a", parameters, graph_parameters)
|
|
S("a", parameters, graph_parameters)
|
|
{
|
|
{
|
|
@@ -110,23 +110,23 @@ namespace artis {
|
|
~OnlyOneParabolaGraphManager() override = default;
|
|
~OnlyOneParabolaGraphManager() override = default;
|
|
|
|
|
|
private:
|
|
private:
|
|
- artis::pdevs::Coordinator<common::DoubleTime, ParabolaGraphManager, artis::pdevs::qss::QSSParameters<ParabolaParameters>> S;
|
|
|
|
|
|
+ artis::pdevs::Coordinator<common::DoubleTime, ParabolaGraphManager, artis::qss::QSSParameters<ParabolaParameters>> S;
|
|
};
|
|
};
|
|
|
|
|
|
class PredatorGraphManager :
|
|
class PredatorGraphManager :
|
|
- public artis::pdevs::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters> {
|
|
|
|
|
|
+ public artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters> {
|
|
public:
|
|
public:
|
|
enum inputs {
|
|
enum inputs {
|
|
IN_X =
|
|
IN_X =
|
|
- artis::pdevs::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>::RESET
|
|
|
|
|
|
+ artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>::RESET
|
|
+ 1
|
|
+ 1
|
|
};
|
|
};
|
|
|
|
|
|
PredatorGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
PredatorGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
- const artis::pdevs::qss::QSSParameters<PreyPredatorParameters>& parameters,
|
|
|
|
|
|
+ const artis::qss::QSSParameters<PreyPredatorParameters>& parameters,
|
|
const artis::common::NoParameters& graph_parameters)
|
|
const artis::common::NoParameters& graph_parameters)
|
|
:
|
|
:
|
|
- artis::pdevs::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>(
|
|
|
|
|
|
+ artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>(
|
|
coordinator, parameters, graph_parameters)
|
|
coordinator, parameters, graph_parameters)
|
|
{
|
|
{
|
|
coordinator->input_port({IN_X, "in_x"});
|
|
coordinator->input_port({IN_X, "in_x"});
|
|
@@ -137,19 +137,19 @@ namespace artis {
|
|
};
|
|
};
|
|
|
|
|
|
class PreyGraphManager :
|
|
class PreyGraphManager :
|
|
- public artis::pdevs::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters> {
|
|
|
|
|
|
+ public artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters> {
|
|
public:
|
|
public:
|
|
enum inputs {
|
|
enum inputs {
|
|
IN_Y =
|
|
IN_Y =
|
|
- artis::pdevs::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>::RESET
|
|
|
|
|
|
+ artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>::RESET
|
|
+ 1
|
|
+ 1
|
|
};
|
|
};
|
|
|
|
|
|
PreyGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
PreyGraphManager(common::Coordinator<common::DoubleTime>* coordinator,
|
|
- const artis::pdevs::qss::QSSParameters<PreyPredatorParameters>& parameters,
|
|
|
|
|
|
+ const artis::qss::QSSParameters<PreyPredatorParameters>& parameters,
|
|
const artis::common::NoParameters& graph_parameters)
|
|
const artis::common::NoParameters& graph_parameters)
|
|
:
|
|
:
|
|
- artis::pdevs::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>(
|
|
|
|
|
|
+ artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>(
|
|
coordinator, parameters, graph_parameters)
|
|
coordinator, parameters, graph_parameters)
|
|
{
|
|
{
|
|
coordinator->input_port({IN_Y, "in_y"});
|
|
coordinator->input_port({IN_Y, "in_y"});
|
|
@@ -160,8 +160,8 @@ namespace artis {
|
|
};
|
|
};
|
|
|
|
|
|
struct PreyPredatorGraphManagerParameters {
|
|
struct PreyPredatorGraphManagerParameters {
|
|
- artis::pdevs::qss::QSSParameters<PreyPredatorParameters> _predator;
|
|
|
|
- artis::pdevs::qss::QSSParameters<PreyPredatorParameters> _prey;
|
|
|
|
|
|
+ artis::qss::QSSParameters<PreyPredatorParameters> _predator;
|
|
|
|
+ artis::qss::QSSParameters<PreyPredatorParameters> _prey;
|
|
};
|
|
};
|
|
|
|
|
|
class PreyPredatorGraphManager :
|
|
class PreyPredatorGraphManager :
|
|
@@ -214,8 +214,8 @@ namespace artis {
|
|
~PreyPredatorGraphManager() override = default;
|
|
~PreyPredatorGraphManager() override = default;
|
|
|
|
|
|
private:
|
|
private:
|
|
- artis::pdevs::Coordinator<common::DoubleTime, PredatorGraphManager, artis::pdevs::qss::QSSParameters<PreyPredatorParameters>> _predator;
|
|
|
|
- artis::pdevs::Coordinator<common::DoubleTime, PreyGraphManager, artis::pdevs::qss::QSSParameters<PreyPredatorParameters>> _prey;
|
|
|
|
|
|
+ artis::pdevs::Coordinator<common::DoubleTime, PredatorGraphManager, artis::qss::QSSParameters<PreyPredatorParameters>> _predator;
|
|
|
|
+ artis::pdevs::Coordinator<common::DoubleTime, PreyGraphManager, artis::qss::QSSParameters<PreyPredatorParameters>> _prey;
|
|
};
|
|
};
|
|
|
|
|
|
struct PreyPredatorSmartGardenerGraphManagerParameters {
|
|
struct PreyPredatorSmartGardenerGraphManagerParameters {
|
|
@@ -304,7 +304,7 @@ namespace artis {
|
|
|
|
|
|
struct MixedPreyPredatorGraphManagerParameters {
|
|
struct MixedPreyPredatorGraphManagerParameters {
|
|
DiscretePreyPredatorParameters _predator;
|
|
DiscretePreyPredatorParameters _predator;
|
|
- artis::pdevs::qss::QSSParameters<PreyPredatorParameters> _prey;
|
|
|
|
|
|
+ artis::qss::QSSParameters<PreyPredatorParameters> _prey;
|
|
};
|
|
};
|
|
|
|
|
|
class MixedPreyPredatorGraphManager :
|
|
class MixedPreyPredatorGraphManager :
|
|
@@ -356,7 +356,7 @@ namespace artis {
|
|
|
|
|
|
private:
|
|
private:
|
|
artis::dtss::Coordinator<artis::common::DoubleTime, artis::dtss::LastBagPolicy, DiscretePredatorGraphManager, DiscretePreyPredatorParameters> _predator;
|
|
artis::dtss::Coordinator<artis::common::DoubleTime, artis::dtss::LastBagPolicy, DiscretePredatorGraphManager, DiscretePreyPredatorParameters> _predator;
|
|
- artis::pdevs::Coordinator<artis::common::DoubleTime, PreyGraphManager, artis::pdevs::qss::QSSParameters<PreyPredatorParameters>> _prey;
|
|
|
|
|
|
+ artis::pdevs::Coordinator<artis::common::DoubleTime, PreyGraphManager, artis::qss::QSSParameters<PreyPredatorParameters>> _prey;
|
|
};
|
|
};
|
|
|
|
|
|
}
|
|
}
|