help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] HELP!!!!!!!


From: Borja López Berrocal
Subject: [Help-glpk] HELP!!!!!!!
Date: Thu, 16 Oct 2003 02:34:36 +0200

 
 

Hello everybody!

 My name Borja, (from Spain). I have a big problem. I need a program in C that solves simplex. I downloaded this kit  glpk-3.0.6.tar.gz, I guess it is the last version. I want just to compile the file.c that solve the primal simplex  to optimize one function, I think it is glprsm2.c, but I’m not sure, at all.

 But I don’t know how to do it. I have tried to compile the whole kit, but I couldn´t, I didn’t find the main program.

 My problem to solve:  

                                        OPTIMIZE   CX

                                        Under this constraints   AX≤ b

X has 288 elements

A is a 312x288 matrix, it fix, never changes and is a sparse matrix. I have made it.

C, is a vector that I give to the program (data)

B, is a vector that I give to the program (data)

 

The program has to take the data from a excel file, I attach it.

It is like this

 C is :

               

Variable costs

 

ACVC[GBR,PFC]

0,04363

ACVC[GBR,ICG]

0,036402

ACVC[GBR,ATC]

0,037437

ACVC[GBR,LCT]

0,01268

ACVC[GBR,CCT]

0,050744

ACVC[GBR,OCT]

0,068646

ACVC[GBR,GCT]

0,036848

ACVC[GBR,OGC]

0,070713

ACVC[GBR,GGC]

0,032975

ACVC[GBR,HYD]

0

ACVC[GBR,NUC]

0,009593

ACVC[GBR,NND]

0,009593

 

And B is:

                 

Capacity

 

ACPW[GBR,PFC]

0

ACPW[GBR,ICG]

0

ACPW[GBR,ATC]

0

ACPW[GBR,LCT]

0

ACPW[GBR,CCT]

33450

ACPW[GBR,OCT]

15122

ACPW[GBR,GCT]

0

ACPW[GBR,OGC]

0

ACPW[GBR,GGC]

0

ACPW[GBR,HYD]

584

ACPW[GBR,NUC]

4843

ACPW[GBR,NND]

0

Demand period

 

TPELSH[GBR,SUMMERA]

3362,541

TPELSH[GBR,SUMMERB]

3435,628

TPELSH[GBR,SUMMERC]

6678,273

TPELSH[GBR,SUMMERD]

11955,93

TPELSH[GBR,SUMMERE]

18212,75

TPELSH[GBR,SUMMERF]

12514,64

TPELSH[GBR,SUMMERG]

12514,64

TPELSH[GBR,SUMMERH]

12514,64

TPELSH[GBR,SUMMERI]

12740,34

TPELSH[GBR,SUMMERJ]

17933,5

TPELSH[GBR,SUMMERK]

11589,94

TPELSH[GBR,SUMMERL]

7418,523

TPELSH[GBR,WINTERA]

5118,569

TPELSH[GBR,WINTERB]

5191,655

TPELSH[GBR,WINTERC]

8434,301

TPELSH[GBR,WINTERD]

13711,96

TPELSH[GBR,WINTERE]

19968,78

TPELSH[GBR,WINTERF]

14270,67

TPELSH[GBR,WINTERG]

14270,67

TPELSH[GBR,WINTERH]

14270,67

TPELSH[GBR,WINTERI]

14496,36

TPELSH[GBR,WINTERJ]

19689,53

TPELSH[GBR,WINTERK]

13345,96

TPELSH[GBR,WINTERL]

9174,55

 

 

So the problem is, I have 12 technology to supply electricity to 24 periods

So 12*24=288 variables

The constranints are   Xi≤capacity  i=1….24 for PFC technology

                                                         i=25…48  for ICG technology

                                                                    …..

                                                         i=225…258 for NND technology

 

And Demand fulfilment

     

X1 + X25 + X49 + X73 + X97 + X121 + X145 + X169 + X193 + X217 + X241 + X265 ≤ TPELSH[GBR,SUMMERA]

 

X2 + X26 + X50 + X74 + X98 + X122 + X146 + X170 + X194 + X218 + X242 + X266≤ TPELSH[GBR,SUMMERB]

                                                        …….

 

X24 + X48 + X72 + X96 + X120 + X144 + X168 + X192 + X216 + X240 + X264 + X288 ≤ TPELSH[GBR,WINTERL]

 

I attach the meaning of technologies and the excel file.

 I wish someone can help me,   orient to me, give me some clue or some advice, because that very important for me, is for my final project and I have to finish very soon to get a job.

 If someone does I will thank him forever

 

Attachment: Technologies.doc
Description: MS-Word document

Attachment: UK data - Conventional tech.xls
Description: MS-Excel spreadsheet


reply via email to

[Prev in Thread] Current Thread [Next in Thread]