1 /* A few tests for the maxmin library */
3 /* Authors: Arnaud Legrand */
5 /* This program is free software; you can redistribute it and/or modify it
6 under the terms of the license (GNU LGPL) which comes with this package. */
10 #include "surf/maxmin.h"
14 /* ==l1== l2 ==l3== */
21 lmm_system_t sys = NULL ;
22 lmm_constraint_t l1 = NULL;
23 lmm_constraint_t l2 = NULL;
24 lmm_constraint_t l3 = NULL;
26 lmm_variable_t r_1_2_3 = NULL;
27 lmm_variable_t r_1 = NULL;
28 lmm_variable_t r_2 = NULL;
29 lmm_variable_t r_3 = NULL;
33 sys = lmm_system_new();
34 l1 = lmm_constraint_new(sys, /* (void *) "L1", */ 1.0);
35 l2 = lmm_constraint_new(sys, /* (void *) "L2", */ 10.0);
36 l3 = lmm_constraint_new(sys, /* (void *) "L3", */ 1.0);
38 r_1_2_3 = lmm_variable_new(sys, /* (void *) "R 1->2->3", */ 1.0 , 1.0 , 3);
39 r_1 = lmm_variable_new(sys, /* (void *) "R 1", */ 1.0 , 1.0 , 1);
40 r_2 = lmm_variable_new(sys, /* (void *) "R 2", */ 1.0 , 1.0 , 1);
41 r_3 = lmm_variable_new(sys, /* (void *) "R 3", */ 1.0 , 1.0 , 1);
43 lmm_add_constraint(sys, l1, r_1_2_3, 1.0);
44 lmm_add_constraint(sys, l2, r_1_2_3, 1.0);
45 lmm_add_constraint(sys, l3, r_1_2_3, 1.0);
47 lmm_add_constraint(sys, l1, r_1, 1.0);
49 lmm_add_constraint(sys, l2, r_2, 1.0);
51 lmm_add_constraint(sys, l3, r_3, 1.0);
57 int main(int argc, char **argv)