-1

I'm working on an optimization problem using IBM's OPL (Optimization Programming Language). I have defined a set called ExtGraphNodes in my model file, but when I try to use it in my data file, I encounter an error stating that the element is not defined.

I have declared the set as follows in my model file: {TimedNode} ExtGraphNodes; In my data file, I define the set using: ExtGraphNodes = { <"A1", 0>, <"A1", 1>, ... }; However, I still receive an error saying "Element 'ExtGraphNodes' not defined." I expected that with the correct declaration, the model should recognize the set.

my code

1 Answer 1

0

You must declare your set as follows in your model file:

{TimedNode} ExtGraphNodes = ...;

See the doc about Initializing sets.

I hope this helps.

Chris.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.