Search found 8 matches

by Damaskinos
3 years ago
Forum: Syntax
Topic: Enter cyclic parameters
Replies: 9
Views: 4920

Re: Enter cyclic parameters

Hi Renger,

I've tried your suggested code, but it's still the same. 25th value is assigned to zero. :(

Cheers,
Damaskinos
by Damaskinos
3 years ago
Forum: Syntax
Topic: Enter cyclic parameters
Replies: 9
Views: 4920

Re: Enter cyclic parameters

Hi Renger, I had to left this project for a while, so sorry for not replying. It's almost what I am looking for, but there is problem with the right index definition. Using your code, I get 24th value equal to zero, hence if I want to use this way for parameter definiton, as the value is zero, I can...
by Damaskinos
3 years ago
Forum: Syntax
Topic: Enter cyclic parameters
Replies: 9
Views: 4920

Re: Enter cyclic parameters

Hi, of course. Let's say, I have hourly data of consumption for 54 hours (like 2.25 days), hence set i / 1*55/ (including consumption from 0.00 to 1.00); and hourly data of production for 24 hours only, hence probably ii(i) /1*25/. What I need is to extend production data to have the same length as ...
by Damaskinos
3 years ago
Forum: Syntax
Topic: Entering some of the values of a variable table
Replies: 2
Views: 2107

Re: Entering some of the values of a variable table

Hi, if you want to define let's say three dimensional parameter you can do it as in the following example: Set i /s, n1, n2, t/ j /s, n1, n2, t/ k /1*2/; *or you can use Alias(i,j); if in your case they're the same sets like in my example Table c(i,j,k) s.1 n1.1 n2.1 t.1 s.2 n1.2 n2.2 t.2 s 0 5 1 0 ...
by Damaskinos
3 years ago
Forum: Syntax
Topic: Enter cyclic parameters
Replies: 9
Views: 4920

Re: Enter cyclic parameters

Hi Renger, first of all, thanks for your quick reply. It looks pretty accurate and works well. I'm glad you understood although my description was pretty weird. The question is following, is there any possibility to manage situation, when I have data, let's say for (n+1/2) of days? Because if I unde...
by Damaskinos
3 years ago
Forum: Syntax
Topic: Enter cyclic parameters
Replies: 9
Views: 4920

Enter cyclic parameters

Hi, I am modelling electricity consumption of a household during three month long period. Daily consumption is assumed to be the same every day. I import data from excel file, where the data are like c(1) - 0.2 (kWh), c(2) - 0.2 (kWh),..., c(24) - 0.1 (kWh). So I've currently imported a vector of 24...
by Damaskinos
3 years ago
Forum: Syntax
Topic: subtour elimination constraints VRP
Replies: 1
Views: 2991

Re: subtour elimination constraints VRP

Hi,

I am pretty not sure what d_i means, but I suggest u should start with look for
tsp2.gms in GAMS model library. Your equation looks quite similar as the subtour
elimination constraint in travelling salesman problem (TSP).
by Damaskinos
6 years ago
Forum: Modeling
Topic: Node-edge constraint
Replies: 1
Views: 2227

Node-edge constraint

Hi, Imagine the situation of this constraint, which can be formally written as follows: gamma(i,j) = gamma(i) for all i I and j represent nodes as usually. Gamma(i,j) is value of binary variable representing if edge is connected (=0) or disconnected (=1). The same for gamma(i) = 1, then node is disa...