-------- Forwarded Message -------- From: Code Raguet <ignacio.c...@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.