Document information
- University
- Politecnico di Milano
- Degree programme
- Energy Engineering
- Subject
- Energy and Climate Change Modeling and Scenarios
- Classification
- Other study material
- Original format
- Text
- Searchable text
University study material for Energy and Climate Change Modeling and Scenarios in the Energy Engineering degree programme at Politecnico di Milano. The document covers: *= 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
University study material for Energy and Climate Change Modeling and Scenarios in the Energy Engineering degree programme at Politecnico di Milano. The document covers: *= 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
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
*= 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…
First page of the document.