X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/6f0378c3b23f392a1f342106932a90486bd05dbc..d53ded00c10a30a17c7f0aad90acca933a7f4db9:/Model/src/main.cpp?ds=sidebyside diff --git a/Model/src/main.cpp b/Model/src/main.cpp index 3efdf8e..ab4f7f6 100644 --- a/Model/src/main.cpp +++ b/Model/src/main.cpp @@ -8,6 +8,7 @@ #include "drainage.h" #include "exclusa.h" #include +#include #include "simulador.h" using namespace std; @@ -19,14 +20,23 @@ int main(int argc, char *argv[]) sim->add_pump("bomba1"); sim->add_conduct("c"); + sim->add_conduct("c1"); sim->add_drainage("d"); + sim->add_tank("tanque"); sim->connect("bomba1", "c", IConector::OUT); - sim->connect("c", "d", IConector::OUT); + sim->connect("c", "tanque", IConector::OUT); + sim->connect("tanque", "c1", IConector::OUT); + sim->connect("c1", "d", IConector::OUT); int i=0; while (i<10) { sim->simulate(); + if (i == 4) { + if (!sim->pump_deactivate("bomba1")) { + std::cout << "c no es pump :-)" << std::endl; + } + } i++; }