- Bomb *bomba;
- Conduct *canio1;
- Conduct *canio2;
-
- bomba = new Bomb("bomba");
- bomba->set_max_flow(3);
- canio1 = new Conduct("cond_1");
- canio1->set_max_flow(10);
- canio2 = new Conduct("cond_2");
- canio2->set_max_flow(5);
-
- bomba->connect(canio1, IConector::OUT);
- canio1->connect(bomba, IConector::IN);
- canio1->connect(canio2, IConector::OUT);
- canio2->connect(canio1, IConector::IN);
-
- int i = 0;
+ Simulador *sim = new Simulador();
+
+ sim->add_pump("bomba1");
+ sim->add_conduct("c");
+ sim->add_drainage("d");
+
+ sim->connect("bomba1", "c", IConector::OUT);
+ sim->connect("c", "d", IConector::OUT);
+
+ int i=0;