Search found 14 matches

by Parisa
4 months ago
Forum: Modeling
Topic: Problem with Benders decomposition
Replies: 0
Views: 588

Problem with Benders decomposition

Hello, I have posted this question in the 'Syntax' section, but I have not received any answer yet. Any way, this is the subproblem; sub.JPG And by assuming the following terminology and knowing that the subproblem does not need the feasibility cuts, the master is shown below; master.JPG And here is...
by Parisa
5 months ago
Forum: Syntax
Topic: checking the Benders decomposition
Replies: 0
Views: 688

checking the Benders decomposition

Hello, I have coded the Benders decomposition for the following problem. This is the subproblem; ss.JPG sss.JPG And by assuming the following terminology and knowing that the subproblem does not need the feasibility cuts, the master is shown below; ssss.JPG master.JPG And here is my code; ** benders...
by Parisa
8 months ago
Forum: Syntax
Topic: Define a variable and parameters over dynamic sets
Replies: 2
Views: 9742

Define a variable and parameters over dynamic sets

Hello, I need to define the parameter "f" and variable "x" over the dynamic set "j", and the parameter "d" over the dynamic set "a". For this, I do as follows; Sets k /0*24/ i(k) /0*24/ q /1*300/ s /0*23/ t /1*24/; Set j(q,s,t) / $ondelim $include A-ODPairs.csv $offdelim /; Set a(s,t) / $ondelim $in...
by Parisa
8 months ago
Forum: Syntax
Topic: How to define multi-dimensional sets with assigning values
Replies: 4
Views: 9682

Re: How to define multi-dimensional sets with assigning values

Thank you for your reply.
But if I define it as a parameter, then I cannot use syntaxes such as, "for" or "loop".
Moreover, Would you please give me some hints on How I can define a subset for multi-dimensional sets?
by Parisa
8 months ago
Forum: Syntax
Topic: How to define multi-dimensional sets with assigning values
Replies: 4
Views: 9682

How to define multi-dimensional sets with assigning values

Hello everybody, I have the following CSV file, it is like an array with four entries "(i, s, t, f)", in which "i" is the indicator and "s, t, f" are its assigned values. for this, I have written the next code. Sets i /1*300/ s /0*23/ t /1*24/; Sets x(i,s,t) / $ondelim $include Pairs.csv $offdelim /...
by Parisa
10 months ago
Forum: Modeling
Topic: Please correct my code
Replies: 5
Views: 1042

Re: Please correct my code

I know that, but in the problem "x" is defined over both "i" and "k". How can I fix this issue?
by Parisa
10 months ago
Forum: Modeling
Topic: Please correct my code
Replies: 5
Views: 1042

Re: Please correct my code

This is the code by declaring set R_q, a as "i". Sets k /1*25/ q /1*86/ a /1*86/ i /1*10/ ; Variable o; Binary Variables x(k) y(a,q,i) z(q); Parameters p f_ev(q) d(q) f_phev(q) d(q); p = 3; $ call gdxxrw Data.xlsx par d rng=edges!A1:B86 rdim=1 cdim=0 $ gdxin Data.gdx $ load d $ gdxin $ call gdxxrw D...
by Parisa
10 months ago
Forum: Modeling
Topic: Please correct my code
Replies: 5
Views: 1042

Please correct my code

Hello, I have written the following model, but I have some problem. My problem related to defining sets K_q,a and R_q,a. When I define these sets I get some errors concerning the variable x. I really need help. model.JPG This is my code. Sets k /1*25/ q /1*86/ a /1*86/ ; alias(i,k); Variable o; Bina...