Problem implementing a Model

Problems with modeling
Post Reply
Lizzy
User
User
Posts: 2
Joined: 5 years ago

Problem implementing a Model

Post by Lizzy »

Hi,
I have some trouble implementing part of my model:

1) I have this definition of my parameter k
Bildschirmfoto 2018-12-06 um 11.18.23.png
I tried this but it doesn't work (the icdf function is imported)

k(alpha(m)) =e= icdf(alpha(m), 0,1);

2) If have a constraint that is defined for all m in {1,…M-1}. How could I do that?
Bildschirmfoto 2018-12-06 um 11.23.16.png
The relevant Sets/Parameters/Variables are:
Bildschirmfoto 2018-12-06 um 11.28.28.png


Thanks for any help!
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Problem implementing a Model

Post by Renger »

Hi Lizzy

One trick to have an equation only for the M-1 elements is by using the cardinal of a set (the number of elements): card(m) and the order:

Code: Select all

myconstraint(m$(ord(m) ne card(m)).. 
With respect to your second question: A variable is defined over a set, e.g. X(i), but can't be defined over a variable itself like you do X(Y).
Correct, but I don't know if this is what you are looking for, is:

Code: Select all

k(m) =e= icdf(alpha(m), 0,1);
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Lizzy
User
User
Posts: 2
Joined: 5 years ago

Re: Problem implementing a Model

Post by Lizzy »

Hello,

thanks a lot for the response.
Regarding the first question I'm sorry, I uploaded the wrong picture. So here is the right one:
Bildschirmfoto 2018-12-06 um 15.35.44.png
Bildschirmfoto 2018-12-06 um 15.35.44.png (18.42 KiB) Viewed 2409 times
So this is not possible?

I think I have the same problem regarding this constraint:
Bildschirmfoto 2018-12-06 um 15.36.44.png
Bildschirmfoto 2018-12-06 um 15.39.53.png
So there is no chance to implement constraints like this?


Best regards
Post Reply