X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/040d8fa855d2b6ac9884f68108a09b935570be21..5ed37babb2fa9097abe82df299c0aa259ed84d5a:/teshsuite/surf/maxmin_bench/maxmin_bench.cpp diff --git a/teshsuite/surf/maxmin_bench/maxmin_bench.cpp b/teshsuite/surf/maxmin_bench/maxmin_bench.cpp index 67717dedee..7450918847 100644 --- a/teshsuite/surf/maxmin_bench/maxmin_bench.cpp +++ b/teshsuite/surf/maxmin_bench/maxmin_bench.cpp @@ -1,6 +1,6 @@ /* A few crash tests for the maxmin library */ -/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -24,7 +24,7 @@ static double test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_li std::vector variables(nb_var); /* We cannot activate the selective update as we pass nullptr as an Action when creating the variables */ - simgrid::kernel::lmm::System Sys(false); + simgrid::kernel::lmm::MaxMin Sys(false); for (auto& cnst : constraints) { cnst = Sys.constraint_new(nullptr, simgrid::xbt::random::uniform_real(0.0, 10.0)); @@ -43,7 +43,6 @@ static double test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_li var = Sys.variable_new(nullptr, 1.0, -1.0, nb_elem); //Have a few variables with a concurrency share of two (e.g. cross-traffic in some cases) short concurrency_share = 1 + static_cast(simgrid::xbt::random::uniform_int(0, max_share - 1)); - var->set_concurrency_share(concurrency_share); std::vector used(nb_cnst, 0); for (int j = 0; j < nb_elem; j++) { @@ -52,7 +51,7 @@ static double test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_li k = simgrid::xbt::random::uniform_int(0, nb_cnst - 1); } while (used[k] >= concurrency_share); Sys.expand(constraints[k], var, simgrid::xbt::random::uniform_real(0.0, 1.5)); - Sys.expand_add(constraints[k], var, simgrid::xbt::random::uniform_real(0.0, 1.5)); + Sys.expand(constraints[k], var, simgrid::xbt::random::uniform_real(0.0, 1.5)); used[k]++; } }