← Indietro
Altro

Useful commands for developing the course project

Altro di Energy and Climate Change Modeling and Scenarios per il corso di Energy Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Energy and Climate Change Modeling and ScenariosAltro

Informazioni sul documento

Cosa trovi in questo materiale

Altro di Energy and Climate Change Modeling and Scenarios per il corso di Energy Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

*= add a comment $... = execute a command; $title = title of the code $ontext/$offtext = add a comment without using * $include + name of the file.gms = I can add subprograms by calling them from outside of my code you can avoid listing n elements by using the compact notation w/ the * ; Display = display the specified variables on the output report; use it frequently Sum(sets, variables(sets)) SET = I define the domain of a parameter or variable Identify the domain + ‘name of the domain’ + / elements of the domain / ; \ I can avoid to express every element if these are subsequently by using *; I may also want to define subsets, so I define 1 set dependent from the other like a variable with parenthesis; mapping gives me the possibility to relate a set with another and help me to visualize the results in a logical table (I have to use a point between the elements of the different sets); \ Ord (set) = ; Card (set) = number of elements in a set; ALIAS = give different name to previously defined sets; Managing Data: PARAMETER = define a parameter called x that has a value for each element of the defined domain 1 Identify the parameter (which domain is considering) + ‘name of the parameter’ + / elements of the domain and value / ; 2 instead of assigning a value directly to the parameter I can define an equation; 3 I can covert data from an excel file into a .gdx file : $call GDXXRW.EXE i=data.xlsx o=data.gdx par=a rng=capacity!A2:B3 rdim=1 par=b rng=demand!A2:B4 rdim=1 par=d rng=distance!A2:D4 rdim=1 cdim=1 $GDXIN data.gdx $LOAD a, b, d $GDXIN \ I and o are the name of the input and output files, par need the name of the parameter to import, rng is where we have to take the data from and rdim/cdim define the labels needed to import parameters defined over a set; names must…

Anteprima

Prima pagina del documento.

Prima pagina: Useful commands for developing the course project