I want to do the following summation inside the objective function:

sum( (t , i ), A(first element of set t, i) * B( i ) * C( t ) )

Parameter A( t , i ) is defined for all elements of t, but I want to use only the first element in that part of the equation.

I would appreciate you help!

## Thanks!

\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/HNb0OxTKLBUJ.

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hello,

You can do the following:

SUM(i, A(‘1’,i)*B(i))*SUM(t, C(t))

Cheers,

Pedro

On 22 Jan 2013, at 16:37, Lucy N wrote:

I want to do the following summation inside the objective function:

sum( (t , i ), A(first element of set t, i) * B( i ) * C( t ) )

Parameter A( t , i ) is defined for all elements of t, but I want to use only the first element in that part of the equation.

I would appreciate you help!

Thanks!

–

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/HNb0OxTKLBUJ.

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

–

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Thanks, but I get an error because I haven’t defined the set yet.

I want to define the set later in the code. Is that possible?

On Tuesday, January 22, 2013 1:47:43 PM UTC-3, PowerChile wrote:

Hello,

You can do the following:

SUM(i, A(‘1’,i)*B(i))*SUM(t, C(t))

Cheers,

Pedro

On 22 Jan 2013, at 16:37, Lucy N wrote:

```
I want to do the following summation inside the objective function:
sum( (t , i ), A(first element of set t, i) * B( i ) * C( t ) )
Parameter A( t , i ) is defined for all elements of t, but I want to use only the first element in that part of the equation.
I would appreciate you help!
Thanks!
--
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/HNb0OxTKLBUJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
```

–

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/FKsuLeoOjycJ.

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.