MPL for Windows Manual


Previous Page Table of Contents Next Page

10.2 Set Domain Index with the Dot Operator

Sometimes, when working with multi-dimensional indexes, you need to be able to refer to the underlying domain index. This can be accomplished in MPL by using the dot operator. Here is an example:

    INDEX
       FromNode := (n1,n2,n3,n4);
       ToNode   := FromNode;

       Arcs[FromNode,ToNode] := (...);

    DECISION VARIABLES

       Ship [Arcs] WHERE (Arcs.FromNode <> Arcs.ToNode);

    END

In the above example, we want the Ship variable to contain all the elements of Arcs, where the FromNode is not the same as theToNode.


    Back to Top   |   Maximal Home Page   |   Table of Contents   |   Previous Page   |   Next Page

webmaster@maximalsoftware.com.   Copyright (C) 1997-2003 Maximal Software, Inc.   -   All rights reserved.