å“¦ã€‚

å‘è‡ªæˆ‘çš„ iPad

åœ¨ 2012-11-2ï¼Œ15:12ï¼ŒRenger van Nieuwkoop å†™é“ï¼š

Hi Maria

I do not quite understand what Z(n,a) could be. Usually you have the flow on an arc, defined as f(a), but Z(n,a) refers to a node and some arc (but not necessarily the arc connecting to n).

I think you really want to have Z(a), but that is up to you.

Anyway, this would work in your setting (you cannot define Z as Z(a,n), because a is an assigned set, so you have to define it over all I,j. This is not a problem as the equation can be declared over a (e.g. f(n,a(I,j)).

set n nodes /n1*n10/

a(n,n) arcs;

table arcs(n,n)

n1 n2 n3 n4 n5

n1 1 1 1

n2 1 1 1

n3 1 1 1 1

n4 1 1 1

n5 1 1 1

;

alias(n,i,j);

a(i,j)= YES$arcs(i,j);

alias(n,i,j);

variables

Z(n,i,j),

y(n);

equation f(n,i,j);

f(n,a(i,j))…

Z(n,a)+ y(j) =G= 0 ;

Cheers

Renger

Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von Maria a. Rad

Gesendet: Donnerstag, 1. November 2012 19:49

An: gamsworld@googlegroups.com

Betreff: Re: exponents of a dynamic set

Hi Renger

thanks for ur time. Since I do not piont to the exponents of the dynamic set in my constraint, this way does not work. This is the exact constraint:

set n nodes /1*10/

a(n,n) arcs;

- here a(n,n) is evaluated as:

n1 n2 n3 n4 n5

n1 YES YES YES

n2 YES YES YES

n3 YES YES YES YES

n4 YES YES YES

n5 YES YES YES

f(n,a) . . Z(n,a)+ y(?) =e=0;

In which ‘?’ means the second exponent of a something like ord(a(*,2)) (which is not correct!)

Cheers

Maria

–

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

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.

–

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.