#include "drainage.h"
#include "exclusa.h"
#include <unistd.h>
+#include <iostream>
#include "simulador.h"
using namespace std;
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++;
}