Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
eab59570a5cd2867b9a5a07a8386b8a488c3f128
[simgrid.git] / src / include / surf / maxmin.h
1 /* Authors: Arnaud Legrand                                                  */
2
3 /* This program is free software; you can redistribute it and/or modify it
4    under the terms of the license (GNU LGPL) which comes with this package. */
5
6 typedef long double xbt_maxmin_float_t;
7 #define XBT_MAXMIN_FLOAT_T "%Lg"        /* for printing purposes */
8
9 typedef struct lmm_variable *lmm_variable_t;
10 typedef struct lmm_constraint *lmm_constraint_t;
11 typedef struct lmm_system *lmm_system_t;
12
13 lmm_system_t lmm_system_new(void);
14 void lmm_system_free(lmm_system_t sys);
15
16 lmm_constraint_t lmm_constraint_new(lmm_system_t sys, void *id,
17                                     xbt_maxmin_float_t bound_value);
18 void lmm_constraint_free(lmm_system_t sys, lmm_constraint_t cnst);
19
20 lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
21                                 xbt_maxmin_float_t weight_value,
22                                 xbt_maxmin_float_t bound,
23                                 int number_of_constraints);
24 void lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
25 xbt_maxmin_float_t lmm_variable_getvalue(lmm_variable_t var);
26
27
28 void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
29                 lmm_variable_t var, xbt_maxmin_float_t value);
30
31 void lmm_update(lmm_system_t sys, lmm_constraint_t cnst,
32                 lmm_variable_t var, xbt_maxmin_float_t value);
33 void lmm_update_variable_bound(lmm_variable_t var,
34                                xbt_maxmin_float_t bound);
35 void lmm_update_variable_weight(lmm_variable_t var,
36                                 xbt_maxmin_float_t weight);
37 void lmm_update_constraint_bound(lmm_constraint_t cnst,
38                                  xbt_maxmin_float_t bound);
39
40 void lmm_solve(lmm_system_t sys);