Sink, WIP
This commit is contained in:
Binary file not shown.
@@ -10,6 +10,7 @@ test/CMakeFiles/test_simple.dir/test_simple.cpp.o
|
||||
/home/lj50/Univ/M2/Modelisation_problemes/simulation/src/ProductionOrder.hpp
|
||||
/home/lj50/Univ/M2/Modelisation_problemes/simulation/src/ProductionOrderGenerator.hpp
|
||||
/home/lj50/Univ/M2/Modelisation_problemes/simulation/src/Router.hpp
|
||||
/home/lj50/Univ/M2/Modelisation_problemes/simulation/src/Sink.hpp
|
||||
/usr/include/alloca.h
|
||||
/usr/include/asm-generic/errno-base.h
|
||||
/usr/include/asm-generic/errno.h
|
||||
|
||||
@@ -9,6 +9,7 @@ test/CMakeFiles/test_simple.dir/test_simple.cpp.o: test/test_simple.cpp \
|
||||
src/ProductionOrder.hpp \
|
||||
src/ProductionOrderGenerator.hpp \
|
||||
src/Router.hpp \
|
||||
src/Sink.hpp \
|
||||
/usr/include/alloca.h \
|
||||
/usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/asm-generic/errno.h \
|
||||
@@ -1742,12 +1743,6 @@ test/CMakeFiles/test_simple.dir/test_simple.cpp.o: test/test_simple.cpp \
|
||||
|
||||
/usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/inc.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/array/size.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp:
|
||||
|
||||
/usr/include/boost/optional/detail/optional_swap.hpp:
|
||||
@@ -1902,6 +1897,10 @@ test/CMakeFiles/test_simple.dir/test_simple.cpp.o: test/test_simple.cpp \
|
||||
|
||||
/usr/include/boost/mpl/aux_/config/ctps.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/config/bind.hpp:
|
||||
|
||||
/usr/include/boost/type_traits/remove_bounds.hpp:
|
||||
|
||||
/usr/include/boost/intrusive/detail/algo_type.hpp:
|
||||
|
||||
src/Processor.hpp:
|
||||
@@ -2134,6 +2133,12 @@ test/test_simple.cpp:
|
||||
|
||||
/usr/include/boost/core/demangle.hpp:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/boost/aligned_storage.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/repetition/for.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/floatn.h:
|
||||
@@ -2172,6 +2177,10 @@ test/test_simple.cpp:
|
||||
|
||||
/usr/include/stdio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/strings_fortified.h:
|
||||
|
||||
/usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp:
|
||||
|
||||
/usr/include/c++/13/bits/std_abs.h:
|
||||
|
||||
/usr/include/linux/errno.h:
|
||||
@@ -2232,16 +2241,22 @@ src/Base.hpp:
|
||||
|
||||
/usr/include/boost/intrusive/detail/default_header_holder.hpp:
|
||||
|
||||
src/Sink.hpp:
|
||||
|
||||
/usr/include/boost/mpl/integral_c.hpp:
|
||||
|
||||
/usr/include/boost/parameter/required.hpp:
|
||||
|
||||
/usr/include/boost/core/pointer_traits.hpp:
|
||||
|
||||
/usr/include/boost/parameter/aux_/pack/tag_deduced.hpp:
|
||||
|
||||
/usr/include/boost/config/no_tr1/memory.hpp:
|
||||
|
||||
/usr/include/boost/config/platform/linux.hpp:
|
||||
|
||||
/usr/include/boost/smart_ptr/detail/sp_convertible.hpp:
|
||||
|
||||
/usr/include/boost/mpl/integral_c.hpp:
|
||||
|
||||
/usr/include/boost/parameter/required.hpp:
|
||||
|
||||
/usr/include/boost/concept/detail/general.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/detail/check.hpp:
|
||||
@@ -2264,12 +2279,6 @@ src/Base.hpp:
|
||||
|
||||
/usr/include/boost/core/cmath.hpp:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/boost/aligned_storage.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/repetition/for.hpp:
|
||||
|
||||
/usr/include/boost/core/allocator_access.hpp:
|
||||
|
||||
/usr/include/asm-generic/errno-base.h:
|
||||
@@ -2304,12 +2313,6 @@ src/Base.hpp:
|
||||
|
||||
/usr/include/boost/range/config.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/traits_lambda_spec.hpp:
|
||||
|
||||
/usr/include/boost/format/detail/unset_macros.hpp:
|
||||
|
||||
/usr/include/c++/13/bits/vector.tcc:
|
||||
|
||||
/usr/include/boost/mpl/aux_/config/eti.hpp:
|
||||
|
||||
/usr/include/boost/config/compiler/gcc.hpp:
|
||||
@@ -2332,10 +2335,6 @@ src/Base.hpp:
|
||||
|
||||
/usr/include/boost/container/container_fwd.hpp:
|
||||
|
||||
/usr/include/boost/core/pointer_traits.hpp:
|
||||
|
||||
/usr/include/boost/parameter/aux_/pack/tag_deduced.hpp:
|
||||
|
||||
/usr/include/c++/13/bits/ios_base.h:
|
||||
|
||||
/usr/include/boost/move/detail/pointer_element.hpp:
|
||||
@@ -2374,6 +2373,12 @@ src/Base.hpp:
|
||||
|
||||
/usr/include/boost/intrusive/detail/function_detector.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/traits_lambda_spec.hpp:
|
||||
|
||||
/usr/include/boost/format/detail/unset_macros.hpp:
|
||||
|
||||
/usr/include/c++/13/bits/vector.tcc:
|
||||
|
||||
/usr/include/boost/parameter/template_keyword.hpp:
|
||||
|
||||
/usr/include/boost/intrusive/detail/ebo_functor_holder.hpp:
|
||||
@@ -2680,9 +2685,11 @@ src/Base.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/config/bcc.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/config/bind.hpp:
|
||||
/usr/include/boost/preprocessor/array/size.hpp:
|
||||
|
||||
/usr/include/boost/type_traits/remove_bounds.hpp:
|
||||
/usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/inc.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/config/use_preprocessed.hpp:
|
||||
|
||||
@@ -2694,10 +2701,6 @@ src/Base.hpp:
|
||||
|
||||
/usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/strings_fortified.h:
|
||||
|
||||
/usr/include/boost/preprocessor/list/reverse.hpp:
|
||||
|
||||
/usr/include/boost/mpl/aux_/config/gcc.hpp:
|
||||
|
||||
Binary file not shown.
@@ -1123,4 +1123,5 @@ test/CMakeFiles/test_simple.dir/test_simple.cpp.o: \
|
||||
/usr/include/c++/13/bits/random.tcc /usr/include/c++/13/numeric \
|
||||
/usr/include/c++/13/bits/stl_numeric.h \
|
||||
/usr/include/c++/13/pstl/glue_numeric_defs.h \
|
||||
/home/lj50/Univ/M2/Modelisation_problemes/simulation/src/Router.hpp
|
||||
/home/lj50/Univ/M2/Modelisation_problemes/simulation/src/Router.hpp \
|
||||
/home/lj50/Univ/M2/Modelisation_problemes/simulation/src/Sink.hpp
|
||||
|
||||
57603
test/PoolRouter.csv
57603
test/PoolRouter.csv
File diff suppressed because it is too large
Load Diff
BIN
test/test_json
BIN
test/test_json
Binary file not shown.
BIN
test/test_simple
BIN
test/test_simple
Binary file not shown.
@@ -14,6 +14,7 @@
|
||||
#include "PoolRouter.hpp"
|
||||
#include "ProductionOrderGenerator.hpp"
|
||||
#include "Router.hpp"
|
||||
#include "Sink.hpp"
|
||||
|
||||
using namespace std::chrono;
|
||||
|
||||
@@ -21,7 +22,7 @@ class OnlyOnePoolGraphManager
|
||||
: public artis::pdevs::GraphManager<artis::common::DoubleTime, artis::common::NoParameters, artis::common::NoParameters> {
|
||||
public:
|
||||
enum sub_models {
|
||||
PROCESSOR_1, PROCESSOR_2, PROCESSOR_3, POOL_ROUTER, ROUTER, GENERATOR
|
||||
PROCESSOR_1, PROCESSOR_2, PROCESSOR_3, POOL_ROUTER, ROUTER, GENERATOR, SINK
|
||||
};
|
||||
|
||||
OnlyOnePoolGraphManager(artis::common::Coordinator<artis::common::DoubleTime> *coordinator,
|
||||
@@ -32,17 +33,19 @@ public:
|
||||
_generator("G",
|
||||
{
|
||||
{
|
||||
{0, {artis::factory::PoolMachineSequence(0, {0, 1, 2})}},
|
||||
{1, {artis::factory::PoolMachineSequence(0, {1, 2, 0})}},
|
||||
{2, {artis::factory::PoolMachineSequence(0, {2, 0, 1})}}
|
||||
{0, {artis::factory::PoolMachineSequence(0, {0, 1, 2, 3})}},
|
||||
{1, {artis::factory::PoolMachineSequence(0, {1, 2, 0, 3})}},
|
||||
{2, {artis::factory::PoolMachineSequence(0, {2, 0, 1, 3})}}
|
||||
},
|
||||
62642, 15, 30
|
||||
}),
|
||||
_router("R", {1}),
|
||||
_pool_router("P_R", {0, 3}),
|
||||
_pool_router("P_R", {0, 4}),
|
||||
_processor_1("M1", {{0, 0, 0}, 1, 10, 1}),
|
||||
_processor_2("M2", {{1, 0, 0}, 1, 8, 1}),
|
||||
_processor_3("M3", {{2, 0, 0}, 1, 15, 1}) {
|
||||
_processor_3("M3", {{2, 0, 0}, 1, 15, 1}),
|
||||
_sink("S", {3, 0}) {
|
||||
this->add_child(SINK, &_sink);
|
||||
this->add_child(PROCESSOR_1, &_processor_1);
|
||||
this->add_child(PROCESSOR_2, &_processor_2);
|
||||
this->add_child(PROCESSOR_3, &_processor_3);
|
||||
@@ -76,6 +79,9 @@ public:
|
||||
|
||||
out({&_processor_3, artis::factory::Processor::outputs::OUT})
|
||||
>> in({&_pool_router, artis::factory::PoolRouter::inputs::IN_M + 2});
|
||||
|
||||
out({&_router, artis::factory::Router::outputs::OUT/*_M+3*/}) // Sink
|
||||
>> in({&_sink, artis::factory::Sink::inputs::IN});
|
||||
}
|
||||
|
||||
~OnlyOnePoolGraphManager() override = default;
|
||||
@@ -87,6 +93,7 @@ private:
|
||||
artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Processor, artis::factory::ProcessorParameters> _processor_1;
|
||||
artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Processor, artis::factory::ProcessorParameters> _processor_2;
|
||||
artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Processor, artis::factory::ProcessorParameters> _processor_3;
|
||||
artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Sink, artis::factory::SinkParameters> _sink;
|
||||
};
|
||||
|
||||
class PoolRouterView : public artis::factory::View {
|
||||
@@ -111,8 +118,10 @@ BOOST_AUTO_TEST_CASE(TestCase_OnePool)
|
||||
rc.switch_to_timed_observer(1);
|
||||
|
||||
steady_clock::time_point t1 = steady_clock::now();
|
||||
|
||||
|
||||
std::cout << "OK" << std::endl;
|
||||
rc.run(context);
|
||||
std::cout << "OK" << std::endl;
|
||||
|
||||
steady_clock::time_point t2 = steady_clock::now();
|
||||
|
||||
@@ -128,4 +137,4 @@ BOOST_AUTO_TEST_CASE(TestCase_OnePool)
|
||||
<< std::endl;
|
||||
|
||||
BOOST_CHECK(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user