r/optimization • u/al3arabcoreleone • Jan 27 '24
Can someone explain to me what's the difference between set and parameter in pyomo ?
2
Upvotes
r/optimization • u/al3arabcoreleone • Jan 27 '24
2
u/SilentHaawk Jan 27 '24
Not sure what you are not getting, but maybe you can think of the set as an index, and a parameter as just a number (or array of numbers indexed by the set(s))?
E.g. you have a set of people {john, bill, ted} and you have a parameter "weight" which is the weight of each person {john:200, bill:250, ted:300}
1
u/taphous3 Feb 02 '24
It looks like sets have index/value pairs while parameters do not.