diff options
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses_mlp.c')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses_mlp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ats/gnunet-service-ats_addresses_mlp.c b/src/ats/gnunet-service-ats_addresses_mlp.c index c0d4dc08e..aa72b9d90 100644 --- a/src/ats/gnunet-service-ats_addresses_mlp.c +++ b/src/ats/gnunet-service-ats_addresses_mlp.c | |||
@@ -63,7 +63,7 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp) | |||
63 | mlp->c_d = col; | 63 | mlp->c_d = col; |
64 | /* Column name */ | 64 | /* Column name */ |
65 | glp_set_col_name (mlp->prob, col, "d"); | 65 | glp_set_col_name (mlp->prob, col, "d"); |
66 | /* Column coffiecient */ | 66 | /* Column objective function coefficient */ |
67 | glp_set_obj_coef (mlp->prob, col, mlp->co_D); | 67 | glp_set_obj_coef (mlp->prob, col, mlp->co_D); |
68 | /* Column lower bound = 0.0 */ | 68 | /* Column lower bound = 0.0 */ |
69 | glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0); | 69 | glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0); |
@@ -74,7 +74,7 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp) | |||
74 | mlp->c_u = col; | 74 | mlp->c_u = col; |
75 | /* Column name */ | 75 | /* Column name */ |
76 | glp_set_col_name (mlp->prob, col, "u"); | 76 | glp_set_col_name (mlp->prob, col, "u"); |
77 | /* Column coffiecient */ | 77 | /* Column objective function coefficient */ |
78 | glp_set_obj_coef (mlp->prob, col, mlp->co_U); | 78 | glp_set_obj_coef (mlp->prob, col, mlp->co_U); |
79 | /* Column lower bound = 0.0 */ | 79 | /* Column lower bound = 0.0 */ |
80 | glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0); | 80 | glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0); |
@@ -85,17 +85,16 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp) | |||
85 | mlp->c_r = col; | 85 | mlp->c_r = col; |
86 | /* Column name */ | 86 | /* Column name */ |
87 | glp_set_col_name (mlp->prob, col, "r"); | 87 | glp_set_col_name (mlp->prob, col, "r"); |
88 | /* Column coffiecient */ | 88 | /* Column objective function coefficient */ |
89 | glp_set_obj_coef (mlp->prob, col, mlp->co_R); | 89 | glp_set_obj_coef (mlp->prob, col, mlp->co_R); |
90 | /* Column lower bound = 0.0 */ | 90 | /* Column lower bound = 0.0 */ |
91 | glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0); | 91 | glp_set_col_bnds (mlp->prob, col, GLP_LO, 0.0, 0.0); |
92 | 92 | ||
93 | /* Quality metric columns */ | 93 | /* Quality metric columns */ |
94 | col = glp_add_cols(mlp->prob, mlp->m); | 94 | col = glp_add_cols(mlp->prob, mlp->m); |
95 | mlp->c_q_start = col; | ||
96 | mlp->c_q_end = col + mlp->m; | ||
97 | for (c = 0; c < mlp->m; c++) | 95 | for (c = 0; c < mlp->m; c++) |
98 | { | 96 | { |
97 | mlp->c_q[c] = col + c; | ||
99 | GNUNET_asprintf (&name, "q_%u", mlp->q[c]); | 98 | GNUNET_asprintf (&name, "q_%u", mlp->q[c]); |
100 | glp_set_col_name (mlp->prob, col + c, name); | 99 | glp_set_col_name (mlp->prob, col + c, name); |
101 | glp_set_col_bnds (mlp->prob, col + c, GLP_LO, 0.0, 0.0); | 100 | glp_set_col_bnds (mlp->prob, col + c, GLP_LO, 0.0, 0.0); |