[FlopCpp] using subsets in constraints and in summations

Arman Boyacı armanboyaci at gmail.com
Wed Sep 22 11:29:57 EDT 2010


Hi,

In the following code we try to take a subset of constraints using *MP_subset
( in the example: N)
*I think the hard part is that in the same time we take a subset of data (in
the example: Incoming and Outgoing)*
*

> MP_set V(100);
> MP_set A(50);
>
> MP_data D(V);
>
> MP_subset<2> Incoming(V,A);
> MP_subset<2> Outgoing(V,A);
>
> MP_subset<1> N(V);
>
> MP_variable Flow(A);
>
> MP_index v;
>
>
> Conservation(N(v))=-1*sum(Incoming(N(v),A),Flow(A))+sum(Outgoing(N(v),A),Flow(A))==D(v);
>
//
> Conservation(N(V))=-1*sum(Incoming(V,A),Flow(A))+sum(Outgoing(V,A),Flow(A))==D(V);
>
//Conservation(N(v))=-1*sum(Incoming(v,A),Flow(A))+sum(Outgoing(v,A),Flow(A))==D(v);
>


We tried several things:
(1) It does not work at all.
(2) The domain of the summation is not correct (not restricted)
(3) Same thing as in (2)

I hope that the problem is clear :)

Thanks in advance.

-Arman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/flopcpp/attachments/20100922/9f261188/attachment.html 


More information about the FlopCpp mailing list