Search found 16 matches

by TheBebbo
2 years ago
Forum: Tools
Topic: variety of solutions in one GDX/Excel Sheet
Replies: 3
Views: 4670

Re: variety of solutions in one GDX/Excel Sheet

Thanks for your answer! Sets t/1*8760/ Y/1*20/; Parameters; P_strom(t) ...... Variable G Objective function Charge(t) Discharge(t) Model Test Gewinnmaximierung PV-BSS System /all/; Solve Test using LP max G; loop(y, Solve Test using LP max G; P_Strom(t) = P_strom(t) * 1.02; Age=Age * 0.9883; PV_Erze...
by TheBebbo
2 years ago
Forum: Tools
Topic: variety of solutions in one GDX/Excel Sheet
Replies: 3
Views: 4670

variety of solutions in one GDX/Excel Sheet

Hi guys!

I solved a optimization problem for 20 different units of time by using a loop. Is it possible to create one GDX for all 20 solutions? Respectively to transfer all of them to one excel sheet?


Best Greetings
TheBebbo
by TheBebbo
2 years ago
Forum: Syntax
Topic: Sum over hours for years with an increase of Values
Replies: 1
Views: 1625

Sum over hours for years with an increase of Values

Hey people, i want to maximize the profit over an investment for 20 years. So far I have the objective function for 1 year over 8760 hours. Set t time in hours /1*8760/; Scalar θ /0,2/; Parameters Prce(t) Price2(t) Example1(t) Example2(t) SC(t) X(t) Y(t) Z(t) B(t); $gdxIn Values_2004.gdx $LOAD Price...
by TheBebbo
2 years ago
Forum: Tools
Topic: Data Import from Excel
Replies: 8
Views: 7973

Re: Data Import from Excel

Thank you Fred. I found the problem. The GDX File had more than only the 50 values and I couldn't use all values because of my demo license.
by TheBebbo
2 years ago
Forum: Tools
Topic: Data Import from Excel
Replies: 8
Views: 7973

Re: Data Import from Excel

Here my example:

Set
t Time /1*50/


Parameters
X(t) Costs for X
Y(t) Costs for Y
Z(t) Costs for Y;

$GDXIN X-Y-Z.gdx
$LOAD X, Y , Z
$GDXIN


In the gdx file are the 50 values for x y z. But if I wanna run the code the error "Unable to open gdx file for $GDXIN" appears.
by TheBebbo
2 years ago
Forum: Tools
Topic: Data Import from Excel
Replies: 8
Views: 7973

Re: Data Import from Excel

With your help I could create the GDX file on windows and sent the cdx file to my MAC. Now I need to open the gdx in GAMS.


$GDXIN Input_data.gdx
$LOAD X, Y , z.
$GDXIN

That's what I tried but it didn't work out. Maybe you could help me one more time.

Thank you in advance! :)
by TheBebbo
2 years ago
Forum: Syntax
Topic: Error 492 Symbol not in GDX
Replies: 8
Views: 8622

Re: Error 492 Symbol not in GDX

It works! Thank you so much! You helped me a lot :)
by TheBebbo
2 years ago
Forum: Syntax
Topic: CSV2gdx
Replies: 2
Views: 2083

CSV2gdx

Hi! Because I use Gams with a Macbook I need to use csv2gdx instead of GDXXRW. But I have no clue about the code I have to use. Every code I found didn't work. So maybe one of you can help me for the easy example with only 5 values which is attached to this message.

Thanks to everyone!
by TheBebbo
2 years ago
Forum: Syntax
Topic: Error 492 Symbol not in GDX
Replies: 8
Views: 8622

Re: Error 492 Symbol not in GDX

Thanks for your reply! I only changed the name of the excel sheet to post it here. So When I tried it it fit to the code.

I changed the range to A2:B51 but it still creates only an empty GDX file.
by TheBebbo
2 years ago
Forum: Syntax
Topic: Error 492 Symbol not in GDX
Replies: 8
Views: 8622

Re: Error 492 Symbol not in GDX

Hi! In the following I show you the code I used and my Excel sheet as an attachment. Sets t "time" /1*51/ Parameters X(t) Price for x at time t Y(t) Price for Y at time t Z(t) Price for Z at time t; $onecho>input_data2.txt par=X rng=priceX!B2:B51 cdim=0 rdim=1 par=Y rng=priceY!B2:B51 cdim=...