[AMPL 18394] Binary Variable referring to Nodes or Arcs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 18394] Binary Variable referring to Nodes or Arcs

What You See Productions
If I wanted to refer to a particular node or arc in a binary variable how would I do that?  I tried their example below to switch it on if this node gets hit with no luck:
var Use {ORIG,DEST} binary;

Is {ORIG,DEST} not the name of the ARC?  I'm just wanting a 1 if the node gets hit at all in the program sort of like a WHERE clause in SQL.

var Use {(i,j) in ARCS: i = 'ARC-or-NODE-Name?'} binary

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 18396] Binary Variable referring to Nodes or Arcs

AMPL mailing list
{#HS:803142518-38597#}
On Fri, Mar 15, 2019 at 10:13 PM UTC, Ampl Modeling Language <[hidden email]> wrote:
If I wanted to refer to a particular node or arc in a binary variable how would I do that? I tried their example below to switch it on if this node gets hit with no luck:
var Use {ORIG,DEST} binary;

Is {ORIG,DEST} not the name of the ARC? I'm just wanting a 1 if the node gets hit at all in the program sort of like a WHERE clause in SQL.

var Use {(i,j) in ARCS: i = 'ARC-or-NODE-Name?'} binary



--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.