Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Max-min solver written ! :) Seems to be working fine !
[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 FLOAT;
7
8 typedef struct lmm_variable *lmm_variable_t;
9 typedef struct lmm_constraint *lmm_constraint_t;
10 typedef struct lmm_system *lmm_system_t;
11
12 lmm_system_t lmm_system_new(void);
13 void lmm_system_free(lmm_system_t sys);
14
15 lmm_constraint_t lmm_constraint_new(lmm_system_t sys, void *id, 
16                                     FLOAT bound_value);
17 void lmm_constraint_free(lmm_system_t sys, lmm_constraint_t cnst);
18
19 lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id, 
20                                 FLOAT weight_value, FLOAT bound,
21                                 int number_of_constraints);
22 void lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
23 FLOAT lmm_variable_getvalue(lmm_variable_t var);
24
25
26 void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
27                 lmm_variable_t var, FLOAT value);
28
29 void lmm_update(lmm_system_t sys, lmm_constraint_t cnst,
30                 lmm_variable_t var, FLOAT value);
31 void lmm_update_variable_bound(lmm_variable_t var, FLOAT bound);
32 void lmm_update_variable_weight(lmm_variable_t var, FLOAT weight);
33 void lmm_update_constraint_bound(lmm_constraint_t cnst, FLOAT bound);
34
35 void lmm_solve(lmm_system_t sys);