Fix FactoryGraphManager
This commit is contained in:
@@ -108,6 +108,7 @@
|
|||||||
<Option type="1"/>
|
<Option type="1"/>
|
||||||
<Option compiler="gcc"/>
|
<Option compiler="gcc"/>
|
||||||
<Compiler>
|
<Compiler>
|
||||||
|
<Add option="-DWITH_TRACE"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
||||||
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
||||||
@@ -134,6 +135,7 @@
|
|||||||
<Option type="1"/>
|
<Option type="1"/>
|
||||||
<Option compiler="gcc"/>
|
<Option compiler="gcc"/>
|
||||||
<Compiler>
|
<Compiler>
|
||||||
|
<Add option="-DWITH_TRACE"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
||||||
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
||||||
@@ -160,6 +162,7 @@
|
|||||||
<Option type="1"/>
|
<Option type="1"/>
|
||||||
<Option compiler="gcc"/>
|
<Option compiler="gcc"/>
|
||||||
<Compiler>
|
<Compiler>
|
||||||
|
<Add option="-DWITH_TRACE"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
||||||
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
||||||
@@ -186,6 +189,7 @@
|
|||||||
<Option type="1"/>
|
<Option type="1"/>
|
||||||
<Option compiler="gcc"/>
|
<Option compiler="gcc"/>
|
||||||
<Compiler>
|
<Compiler>
|
||||||
|
<Add option="-DWITH_TRACE"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB"/>
|
||||||
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
<Add option="-DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK"/>
|
||||||
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
<Add directory="/home/lj50/Univ/M2/Modelisation_problemes/simulation/src"/>
|
||||||
|
|||||||
@@ -2,44 +2,9 @@
|
|||||||
<CodeBlocks_layout_file>
|
<CodeBlocks_layout_file>
|
||||||
<FileVersion major="1" minor="0" />
|
<FileVersion major="1" minor="0" />
|
||||||
<ActiveTarget name="test_simple" />
|
<ActiveTarget name="test_simple" />
|
||||||
<File name="src/Router.cpp" open="1" top="1" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="src/Sink.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="0" topLine="0" />
|
<Cursor1 position="1556" topLine="24" />
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="src/Processor.hpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="1" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1175" topLine="21" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="src/ProductionOrder.hpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="0" topLine="60" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="src/Machine.hpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="0" topLine="6" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="src/Sink.hpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1138" topLine="12" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="src/ItemStock.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="0" topLine="24" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="src/PoolRouter.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="0" topLine="116" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="src/Sink.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="853" topLine="12" />
|
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="src/Processor.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="src/Processor.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
@@ -47,4 +12,39 @@
|
|||||||
<Cursor1 position="1887" topLine="24" />
|
<Cursor1 position="1887" topLine="24" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
|
<File name="src/Router.cpp" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="0" topLine="0" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="src/ProductionOrder.hpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="0" topLine="60" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="src/Processor.hpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="1" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="1175" topLine="87" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="src/Machine.hpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="0" topLine="6" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="src/ItemStock.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="0" topLine="24" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="src/Sink.hpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="1138" topLine="12" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="src/PoolRouter.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="0" topLine="116" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
</CodeBlocks_layout_file>
|
</CodeBlocks_layout_file>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -17,3 +17,4 @@ SET(FACTORY_CORE_CPP Base.cpp Combiner.hpp Conveyor.hpp ItemStock.cpp Machine.cp
|
|||||||
ADD_LIBRARY(factory_core ${FACTORY_CORE_HPP} ${FACTORY_CORE_CPP})
|
ADD_LIBRARY(factory_core ${FACTORY_CORE_HPP} ${FACTORY_CORE_CPP})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(factory_core ${Boost_LIBRARIES} ${ARTIS_LIBRARIES})
|
TARGET_LINK_LIBRARIES(factory_core ${Boost_LIBRARIES} ${ARTIS_LIBRARIES})
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "JsonReader.hpp"
|
#include "JsonReader.hpp"
|
||||||
#include "PoolRouter.hpp"
|
#include "PoolRouter.hpp"
|
||||||
#include "Router.hpp"
|
#include "Router.hpp"
|
||||||
|
#include "Sink.hpp"
|
||||||
|
|
||||||
#include <artis-star/kernel/pdevs/GraphManager.hpp>
|
#include <artis-star/kernel/pdevs/GraphManager.hpp>
|
||||||
|
|
||||||
@@ -105,7 +106,6 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SINK: {
|
case SINK: {
|
||||||
// Gérer le Sink
|
|
||||||
auto new_sink = new SinkSimulator(
|
auto new_sink = new SinkSimulator(
|
||||||
"M_" + std::to_string(m->pool_id) + "_" + std::to_string(m->machine_id),
|
"M_" + std::to_string(m->pool_id) + "_" + std::to_string(m->machine_id),
|
||||||
SinkParameters{}
|
SinkParameters{}
|
||||||
@@ -116,7 +116,7 @@ public:
|
|||||||
|
|
||||||
// PoolRouter -> Sink
|
// PoolRouter -> Sink
|
||||||
out({_pool_routers.back(), artis::factory::PoolRouter::outputs::OUT_M + m->machine_id})
|
out({_pool_routers.back(), artis::factory::PoolRouter::outputs::OUT_M + m->machine_id})
|
||||||
>> in({new_sink, artis::factory::Sink::inputs::IN});
|
>> in({_sinks.back(), artis::factory::Sink::inputs::IN});
|
||||||
|
|
||||||
++machine_index;
|
++machine_index;
|
||||||
break;
|
break;
|
||||||
@@ -146,11 +146,13 @@ private:
|
|||||||
typedef artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Router, artis::factory::RouterParameters> RouterSimulator;
|
typedef artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Router, artis::factory::RouterParameters> RouterSimulator;
|
||||||
typedef artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::PoolRouter, artis::factory::PoolRouterParameters> PoolRouterSimulator;
|
typedef artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::PoolRouter, artis::factory::PoolRouterParameters> PoolRouterSimulator;
|
||||||
typedef artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Processor, artis::factory::ProcessorParameters> ProcessorSimulator;
|
typedef artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Processor, artis::factory::ProcessorParameters> ProcessorSimulator;
|
||||||
|
typedef artis::pdevs::Simulator<artis::common::DoubleTime, artis::factory::Sink, artis::factory::SinkParameters> SinkSimulator;
|
||||||
|
|
||||||
GeneratorSimulator *_generator;
|
GeneratorSimulator *_generator;
|
||||||
RouterSimulator *_router;
|
RouterSimulator *_router;
|
||||||
std::vector<PoolRouterSimulator *> _pool_routers;
|
std::vector<PoolRouterSimulator *> _pool_routers;
|
||||||
std::vector<ProcessorSimulator *> _processors;
|
std::vector<ProcessorSimulator *> _processors;
|
||||||
|
std::vector<SinkSimulator *> _sinks;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
1290
test/CMakeFiles/test_json.dir/compiler_depend.internal
Normal file
1290
test/CMakeFiles/test_json.dir/compiler_depend.internal
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.28
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.28
|
||||||
|
|
||||||
# compile CXX with /usr/bin/c++
|
# compile CXX with /usr/bin/c++
|
||||||
CXX_DEFINES = -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB
|
CXX_DEFINES = -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB -DWITH_TRACE
|
||||||
|
|
||||||
CXX_INCLUDES = -I/home/lj50/Univ/M2/Modelisation_problemes/simulation/src -I/usr/local/include/artis-star-1.0
|
CXX_INCLUDES = -I/home/lj50/Univ/M2/Modelisation_problemes/simulation/src -I/usr/local/include/artis-star-1.0
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
|||||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.28
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.28
|
||||||
|
|
||||||
# compile CXX with /usr/bin/c++
|
# compile CXX with /usr/bin/c++
|
||||||
CXX_DEFINES = -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB
|
CXX_DEFINES = -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB -DWITH_TRACE
|
||||||
|
|
||||||
CXX_INCLUDES = -I/home/lj50/Univ/M2/Modelisation_problemes/simulation/src -I/usr/local/include/artis-star-1.0
|
CXX_INCLUDES = -I/home/lj50/Univ/M2/Modelisation_problemes/simulation/src -I/usr/local/include/artis-star-1.0
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +1,5 @@
|
|||||||
|
add_definitions(-DWITH_TRACE)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${CMAKE_SOURCE_DIR}/src
|
${CMAKE_SOURCE_DIR}/src
|
||||||
${ARTIS_INCLUDE_DIRS}
|
${ARTIS_INCLUDE_DIRS}
|
||||||
@@ -12,3 +14,5 @@ TARGET_LINK_LIBRARIES(test_simple ${Boost_LIBRARIES} ${ARTIS_LIBRARIES} factory_
|
|||||||
ADD_EXECUTABLE(test_json test_json.cpp)
|
ADD_EXECUTABLE(test_json test_json.cpp)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(test_json ${Boost_LIBRARIES} ${ARTIS_LIBRARIES} factory_core)
|
TARGET_LINK_LIBRARIES(test_json ${Boost_LIBRARIES} ${ARTIS_LIBRARIES} factory_core)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
test/test_json
BIN
test/test_json
Binary file not shown.
BIN
test/test_simple
BIN
test/test_simple
Binary file not shown.
Reference in New Issue
Block a user