Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tell maxmin about the action using each variable
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 24 May 2017 09:01:01 +0000 (11:01 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 24 May 2017 09:40:17 +0000 (11:40 +0200)
src/include/surf/maxmin.h
src/surf/maxmin.cpp
src/surf/maxmin_private.hpp

index 6ba38d1..9a1ffb3 100644 (file)
 #include "surf/datatypes.h"
 #include <math.h>
 
 #include "surf/datatypes.h"
 #include <math.h>
 
+namespace simgrid {
+namespace surf {
+class Action;
+}
+}
+
 /** @addtogroup SURF_lmm 
  * @details 
  * A linear maxmin solver to resolve inequations systems.
 /** @addtogroup SURF_lmm 
  * @details 
  * A linear maxmin solver to resolve inequations systems.
@@ -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
  */
  * @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
 /**
  * @brief Free a variable
  * @param sys The system associated to the variable
index 81a1bdc..5d5cff5 100644 (file)
@@ -269,7 +269,8 @@ static void lmm_variable_mallocator_free_f(void *var)
   xbt_free(var);
 }
 
   xbt_free(var);
 }
 
-lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id, double weight, double bound, int number_of_constraints)
+lmm_variable_t lmm_variable_new(lmm_system_t sys, simgrid::surf::Action* id, double weight, double bound,
+                                int number_of_constraints)
 {
   lmm_variable_t var = nullptr;
   int i;
 {
   lmm_variable_t var = nullptr;
   int i;
index 8c8bfbb..9b4ecae 100644 (file)
@@ -87,7 +87,7 @@ typedef struct lmm_variable {
   double bound;
   double value;
   short int concurrency_share; /* The maximum number of elements that variable will add to a constraint */
   double bound;
   double value;
   short int concurrency_share; /* The maximum number of elements that variable will add to a constraint */
-  void *id;
+  simgrid::surf::Action* id;
   int id_int;
   unsigned visited;             /* used by lmm_update_modified_set */
   /* \begin{For Lagrange only} */
   int id_int;
   unsigned visited;             /* used by lmm_update_modified_set */
   /* \begin{For Lagrange only} */