help please

hello every body

set i units /154/;
set t hours /1
24/;
MC(i,t) is a parameter
it is like this :

1 2 3 4 … (24)
3 10.2 9.3 17.6 12.2
7 11.3 9.4 11 11.1
9 11.7 10.2 12.7 10.2
10 12.3 14.3 13.6 13.5
15 10.3 11.1 10.2 14.1
16 15.5 12.8 9.1 9
21 11.2 10.1 10.2 9.2
33 12.3 11.3 12.1 9.5
34 10.7 9.9 14 18.2
37 10.3 13.5 8 11.8
.
.
.
(54)

therefore
MC(i,‘1’) = [10.2 11.3 11.7 12.3 10.3 15.5 11.2 12.3 10.7 10.3]

the maximum cost of the first hour is : maxcost(‘1’) = 15.5
it belongs to unit number 16
how can i determine the maximum cost value of each hour. and which unit this maximum value belongs to_? maxcost(t) = ???

maxcost(t) = [15.5 14.3 17.6 18.2 … ]
for example : maxunit(t) = [16 10 3 34 … ]

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi ja

Here you go



set i units /1*54/;

set t hours /1*24/;

table MC(i,t)

1 2 3 4

3 10.2 9.3 17.6 12.2

7 11.3 9.4 11 11.1

9 11.7 10.2 12.7 10.2

10 12.3 14.3 13.6 13.5

15 10.3 11.1 10.2 14.1

16 15.5 12.8 9.1 9

;



parameter

max_mc(t) Maxium MC,

max_unit(t) Unit with maximm MC

;

alias(i,ii),(t,tt);



max_mc(t) = smax(i, mc(i,t));



loop((i,t)$max_mc(t),

max_unit(t)$(max_mc(t) = mc(i,t)) = i.val;

);

display max_mc, max_unit;


Cheers

Renger



Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von ja Mor
Gesendet: Sonntag, 28. Juni 2015 16:16
An: gamsworld@googlegroups.com
Betreff: help please



hello every body



set i units /1*54/;

set t hours /1*24/;

MC(i,t) is a parameter

it is like this :



1 2 3 4 … (24)

3 10.2 9.3 17.6 12.2

7 11.3 9.4 11 11.1

9 11.7 10.2 12.7 10.2

10 12.3 14.3 13.6 13.5

15 10.3 11.1 10.2 14.1

16 15.5 12.8 9.1 9

21 11.2 10.1 10.2 9.2

33 12.3 11.3 12.1 9.5

34 10.7 9.9 14 18.2

37 10.3 13.5 8 11.8

.

.

.

(54)



therefore

MC(i,‘1’) = [10.2 11.3 11.7 12.3 10.3 15.5 11.2 12.3 10.7 10.3]



the maximum cost of the first hour is : maxcost(‘1’) = 15.5

it belongs to unit number 16

how can i determine the maximum cost value of each hour. and which unit this maximum value belongs to_? maxcost(t) = ???



maxcost(t) = [15.5 14.3 17.6 18.2 … ]

for example : maxunit(t) = [16 10 3 34 … ]




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.