Commit b0d98564 authored by K-H-Ismail's avatar K-H-Ismail Committed by Gauthier Quesnel
Browse files

gui: update node-editor flow model

parent 2b95dda0
......@@ -1455,6 +1455,8 @@ get_input_port_names()
return str_in_2_nb_2;
else if constexpr (std::is_same_v<Dynamics, time_func>)
return str_empty;
else if constexpr (std::is_same_v<Dynamics, flow>)
return str_empty;
}
template<typename Dynamics>
......@@ -1509,6 +1511,8 @@ get_output_port_names()
return str_empty;
else if constexpr (std::is_same_v<Dynamics, time_func>)
return str_out_1;
else if constexpr (std::is_same_v<Dynamics, flow>)
return str_out_1;
}
template<typename Dynamics>
......@@ -1719,6 +1723,12 @@ static void
show_dynamics_inputs(none& /*dyn*/)
{}
static void
show_dynamics_values(const flow& dyn)
{
ImGui::Text("value %.3f", dyn.value);
}
static void
show_dynamics_inputs(qss1_integrator& dyn)
{
......@@ -1863,6 +1873,12 @@ static void
show_dynamics_inputs(accumulator_2& /*dyn*/)
{}
static void
show_dynamics_inputs(flow& dyn)
{
ImGui::InputDouble("value", &dyn.default_value);
}
static void
show_dynamics_inputs(time_func& dyn)
{
......@@ -2030,7 +2046,7 @@ static const char* dynamics_type_names[] = {
"qss2_wsum_3", "qss2_wsum_4", "integrator", "quantifier",
"adder_2", "adder_3", "adder_4", "mult_2",
"mult_3", "mult_4", "counter", "generator",
"constant", "cross", "time_func", "accumulator_2"
"constant", "cross", "time_func", "accumulator_2", "flow"
};
status
......
......@@ -12,7 +12,7 @@
#include <chrono>
#include <hayai/hayai.hpp>
#include <hayai.hpp>
static void
dot_graph_save(const irt::simulation& sim, std::FILE* os)
......@@ -397,7 +397,7 @@ void network(long unsigned int N, double simulation_duration, double quantum)
//long unsigned int N = 10;
expect(irt::is_success(sim.init(100000000lu, 10000000lu)));
expect(irt::is_success(sim.init(1000000lu, 1000000lu)));
//struct neuron neuron_model0 = make_neuron(&sim,0lu);
......
......@@ -12,7 +12,7 @@
#include <fstream>
#include <hayai/hayai.hpp>
#include <hayai.hpp>
using namespace std;
......
......@@ -5603,6 +5603,7 @@ public:
case dynamics_type::constant:
case dynamics_type::cross:
case dynamics_type::time_func:
case dynamics_type::flow:
case dynamics_type::accumulator_2:
if (mdl_dst->type == dynamics_type::integrator &&
i_port_index ==
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment