## Search found 14 matches

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...
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...
8 months ago
Forum: Syntax
Topic: Define a variable and parameters over dynamic sets
Replies: 2
Views: 9742

### Re: Define a variable and parameters over dynamic sets

Thanks a lot.
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...
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.
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

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?
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 /...
10 months ago
Forum: Modeling
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?
10 months ago
Forum: Modeling
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...
10 months ago
Forum: Modeling