Hi Robert Fourer,
I need your help please.
I found these "set," "parameters," and "variables," and there is this constraint:
Why did this person impose the constraint on "j" and "i" and didn't remove them from "Power1" or from the variable "Q" in the constraint? When I tried to remove them using AMPL, it gave me an error. Can you please explain what's happening here and what is this situation called in AMPL?
I have an exam tomorrow and I need to explain why he still keeps i and j
……..
set Power1 within {J,M,I,F,W};
param Power_Level1{Power1};
set Power2 within {I, H,K,P,W};
param Power_Level2{Power2};
var Q{(j,m,i,f,wu) in Power1 , (n,h,k,p,wd) in Power2}binary;
#Constrant
s.t. Power_level_node {j in J ,i in I} : sum {(j,m,i,f,wu) in Power1 ,(n,h,k,p,wd) in Power2} Q [j,m,i,f,wu,n,h,k,p,wd]<=1;
I have an exam tomorrow, and I urgently need your answer.
بتاريخ الخميس، 18 يناير 2024، جاء من Tamara Alz <tamara...@gmail.com>:
On Thu, Jan 18, 2024 at 5:15 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Hi Robert Fourer,
I need your help please.
I found these "set," "parameters," and "variables," and there is this constraint:
Why did this person impose the constraint on "j" and "i" and didn't remove them from "Power1" or from the variable "Q" in the constraint? When I tried to remove them using AMPL, it gave me an error. Can you please explain what's happening here and what is this situation called in AMPL?
I have an exam tomorrow and I need to explain why he still keeps i and j
……..
set Power1 within {J,M,I,F,W};
param Power_Level1{Power1};
set Power2 within {I, H,K,P,W};
param Power_Level2{Power2};
var Q{(j,m,i,f,wu) in Power1 , (n,h,k,p,wd) in Power2}binary;
#Constrant
s.t. Power_level_node {j in J ,i in I} : sum {(j,m,i,f,wu) in Power1 ,(n,h,k,p,wd) in Power2} Q [j,m,i,f,wu,n,h,k,p,wd]<=1;
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/CALyZqOKisk-W0CceM1jYPg9ZvMHw1OmxsLsDGmbxO__H0qtPjw%40mail.gmail.com.
If I want give description Power 1, can I say that it is a set that contains the following set.
I understand the mathematical workings of Power 1, but I would like a description of it.
Should I write Power 1 as a set that includes all these sets , knowing that each element within it is a set?
Set Power1 contains {J, M, I, F, W};
Parameter Power_Level1 {Power1};
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/CALyZqOKisk-W0CceM1jYPg9ZvMHw1OmxsLsDGmbxO__H0qtPjw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-2484269648-7452480550-1705634956-816274994%40helpscout.net.
Dear Robert,
I am very confused as to whether it is a set or subset.
Thank you,
On Sat, Feb 24, 2024 at 10:38 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Hi again,
Do we consider Power 1 a set or a subset?"
Thank you,
On Sat, Feb 24, 2024 at 1:31 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Thank you for answer.
I have one question I hope you can help me.
If I want give description Power 1, can I say that it is a set that contains the following set.
I understand the mathematical workings of Power 1, but I would like a description of it.
Should I write Power 1 as a set that includes all these sets , knowing that each element within it is a set?
Set Power1 contains {J, M, I, F, W};
Parameter Power_Level1 {Power1};
On Fri, Jan 19, 2024 at 10:14 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Please can anyone explain it to me?
بتاريخ الخميس، 18 يناير 2024، جاء من Tamara Alz <tamara...@gmail.com>:
On Fri, Jan 19, 2024 at 3:28 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
When the s.t. statement defines indexes i and j,
s.t. Power_level_node {j in J, i in I} ...
and then i and j are used for indexing in the constraint expression,
sum {(j,m,i,f,wu) in Power1, ...
then the indexing is over a "slice" through set Power1. For each combination of i and j, AMPL interprets "(j,m,i,f,wu) in Power1" to mean the set of all m, f, and wu such that (j,m,i,f,wu) is a member of Power1. Slices are discussed in Chapter 6 of the AMPL book, in Section 6.2 Subsets and slices of ordered pairs and in Section 6.3 Sets of longer tuples.
--
Robert Fourer
We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.