Originally posted by: **SystemAdmin**

What exactly do you want to do? I see at least the following two interpretations of your code:

1. You want to create an expression that is the sum of x times p. In that case the type 'int' for 'som' does not make any sense.

2. You want to compute the

__value__ of the sum of x times p. In that case you need to use IloCplex::getValue instead of x to get the

__value__ of the respective variable (note that values are only available if a feasible solution is available).

#CPLEXOptimizers#DecisionOptimization