Node Declaration and Attributes

Node attributes

Each node in a network has a number of associated incoming and outgoing flows. Unless stated otherwise, these flows should be in balance. Based on the flows specified in the model, AIMMS will automatically generate a balancing constraint for every node. The possible attributes of a Node declaration are given in this table.

Attribute

Value-type

See also page

IndexDomain

index-domain

The Parameter IndexDomain attribute, The Variable IndexDomain attribute, The Constraint IndexDomain attribute

Unit

unit-valued expression

The Parameter Unit attribute, The Variable Unit attribute

Text

string

The Text attribute, The Parameter Text attribute

Comment

comment string

The Text and Comment attributes

Definition

expression

The Definition attribute

Property

NoSave, Sos1, Sos2,

The Parameter Property attribute, The Variable Property attribute, The Constraint Property attribute

Level, Bound, ShadowPrice,

RightHandSideRange, ShadowPriceRange

Nodes are like constraints

Nodes are a special kind of constraint. Therefore, the remarks in Constraint Declaration and Attributes that apply to the attributes of constraints are also valid for nodes. The only difference between constraints and nodes is that in the definition attribute of a node you can use one of the keywords NetInflow and NetOutflow.

NetInflow and NetOutflow

The keywords NetInflow and NetOutflow denote the net input or net output flow for the node. The expressions represented by NetInflow and NetOutflow are computed by AIMMS on the basis of all arcs that depart from and arrive at the declared node. Since these keywords are opposites, you should choose the keyword that makes most sense for a particular node.

Example

The following two Node declarations show natural applications of the keywords NetInflow and NetOutflow.

Node CustomerDemandNode {
    IndexDomain  : (j in Customers, p in Products);
    Definition   : {
        NetInflow >= ProductDemanded(j,p)
    }
}
Node DepotStockSupplyNode {
    IndexDomain  : (i in Depots, p in Products);
    Definition   : {
        NetOutflow <= StockAvailable(i,p) + ProductImport(i,p)
    }
}

The declaration of CustomerDemandNode(c,p) only involves network flows, while the flow balance of DepotStockSupplyNode(d,p) also uses a variable ProductImport(d,p).