[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: MathProg set vs param]
From: |
Andrew Makhorin |
Subject: |
[Fwd: MathProg set vs param] |
Date: |
Sun, 28 May 2023 03:17:52 +0300 |
-------- Forwarded Message --------
From: Code Raguet <ignacio.code@gmail.com>
To: help-glpk@gnu.org
Subject: MathProg set vs param
Date: Sat, 27 May 2023 19:51:01 -0300
> Hi, there!
> I'm new to MathProg (and LP) but I have several years as a software
> developer.
> I would like to understand the semantic differences between set and
> param.
> When reading the doc and looking at examples, I understand that the
> set statement is for sets, arrays, vectors, (n-tuples) and simple
> symbolic elements. On the other hand, param statement is for simple
> scalar values or values of a set (usually indexed).
>
> My issues are about the semantics and rationale behind these
> statements.
> Why are two different statements for doing quite similar (in my
> understanding) purpose?
> I mean, both declare data structures (and initialize in the data
> section).
> Aren't sets kind of a param after all?
>
> for ex.:
> Imagine declaring an array of simple elements:
> set S := {'A', 'B'};
> param P{i in {'A', 'B'}};
>
> How are these statements different?
>
>
> Thanks in advance,
> Ignacio.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fwd: MathProg set vs param],
Andrew Makhorin <=