X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f29a7129de56edca96ea8ef58576898c1e52ed6f..0bf4e9e2336a15ee267bd39b6ac325326fb10d9d:/Model/src/main.cpp?ds=sidebyside diff --git a/Model/src/main.cpp b/Model/src/main.cpp index ab4f7f6..1151dcf 100644 --- a/Model/src/main.cpp +++ b/Model/src/main.cpp @@ -9,34 +9,18 @@ #include "exclusa.h" #include #include -#include "simulador.h" +#include "simulator.h" using namespace std; using namespace PlaQui::Model; int main(int argc, char *argv[]) { - Simulador *sim = new Simulador(); - - 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", "tanque", IConector::OUT); - sim->connect("tanque", "c1", IConector::OUT); - sim->connect("c1", "d", IConector::OUT); + Simulator *sim = new Simulator(argv[1]); 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++; }