X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0dcda218187c4874a539a6887b132ed5e6cc77dd..759e00e7ad42a922ae00763324da351e5f196815:/src/include/surf/maxmin.h diff --git a/src/include/surf/maxmin.h b/src/include/surf/maxmin.h index 1c7e1e85d0..9a1ffb310b 100644 --- a/src/include/surf/maxmin.h +++ b/src/include/surf/maxmin.h @@ -1,11 +1,10 @@ -/* Copyright (c) 2004-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-2017. 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. */ -#ifndef _SURF_MAXMIN_H -#define _SURF_MAXMIN_H +#ifndef SURF_MAXMIN_H +#define SURF_MAXMIN_H #include "src/internal_config.h" #include "xbt/misc.h" @@ -13,6 +12,12 @@ #include "surf/datatypes.h" #include +namespace simgrid { +namespace surf { +class Action; +} +} + /** @addtogroup SURF_lmm * @details * A linear maxmin solver to resolve inequations systems. @@ -124,6 +129,7 @@ XBT_PUBLIC_DATA(double) sg_maxmin_precision; XBT_PUBLIC_DATA(double) sg_surf_precision; +XBT_PUBLIC_DATA(int) sg_concurrency_limit; static inline void double_update(double *variable, double value, double precision) { @@ -152,9 +158,9 @@ SG_BEGIN_DECL() /** @{ @ingroup SURF_lmm */ /** * @brief Create a new Linear MaxMim system - * @param selective_update [description] + * @param selective_update whether we should do lazy updates */ -XBT_PUBLIC(lmm_system_t) lmm_system_new(int selective_update); +XBT_PUBLIC(lmm_system_t) lmm_system_new(bool selective_update); /** * @brief Free an existing Linear MaxMin system @@ -233,8 +239,9 @@ XBT_PUBLIC(int) lmm_constraint_concurrency_maximum_get(lmm_constraint_t cnst); * @param bound The maximum value of the variable (-1.0 if no maximum value) * @param number_of_constraints The maximum number of constraint to associate to the variable */ -XBT_PUBLIC(lmm_variable_t) lmm_variable_new(lmm_system_t sys, void *id, double weight_value, double bound, - int number_of_constraints); +XBT_PUBLIC(lmm_variable_t) +lmm_variable_new(lmm_system_t sys, simgrid::surf::Action* id, double weight_value, double bound, + int number_of_constraints); /** * @brief Free a variable * @param sys The system associated to the variable @@ -335,7 +342,7 @@ XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst(lmm_system_t sys, lmm_constrain * * @return A variable associated to a constraint */ -XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst_safe(lmm_system_t /*sys*/, lmm_constraint_t cnst, +XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst_safe(lmm_system_t sys, lmm_constraint_t cnst, lmm_element_t * elem, lmm_element_t * nextelem, int * numelem); /** @@ -452,4 +459,4 @@ XBT_PUBLIC(double func_vegas_fpi) (lmm_variable_t var, double x); /** @} */ SG_END_DECL() -#endif /* _SURF_MAXMIN_H */ +#endif