nutrMin[i] <= sum_j (nutrPer[i][j] * Buy[j]) <= nutrMax[i]
|
minimize sum_j (cost[j] * Buy[j])
|
This way of creating the model is shown in the function buildModelByRow
, in example ilodiet.cpp
.
nutrMin[i] <= ... <= nutrMax[i]
cost(foodCost[j]) "+" "sum_i" (range[i](nutrPer[i][j]))
|
typedef IloArray<IloNumArray> IloNumArray2
;