Search found 395 matches

by Renger
2 years ago
Forum: Solvers
Topic: Error
Replies: 4
Views: 2742

Re: Error

search for "uncontrolled set" in this forum and you will find your answer.
Renger
by Renger
2 years ago
Forum: Syntax
Topic: **** 361 Values for domain 1 are unknown - no checking possible
Replies: 2
Views: 1673

Re: **** 361 Values for domain 1 are unknown - no checking possible

Hi Yanziphing
Please give more information on your problem (read the guidelines on how to do that).
Cheers
Renger
by Renger
2 years ago
Forum: Syntax
Topic: how to generate a time series
Replies: 3
Views: 919

Re: how to generate a time series

Hi Yanzhip You could generate a subset with the set elements you want: Set Year /2014*2033/, Year6(year) 'Six step years'; scalar timestep /6/ ; year6(year)$(mod(ord(year)-1,6) = 0) = YES; disply Year6; ---- 13 SET Year6 Six step years 2014, 2020, 2026, 2032 Cheers Renger
by Renger
2 years ago
Forum: Tools
Topic: Reading variables from GDX to R
Replies: 1
Views: 923

Re: Reading variables from GDX to R

Hi Ayman I wrote a little function a few months ago, to do exactly that rgdx.var <- function(varname) { var.data <- data.frame(varname$val) var.dim <- length(varname$uels) domains <- varname$domains for (j in (1:(var.dim))) { if (domains[j] == "*") { domains[j] <- paste("X", j, sep = "") } } for (i ...
by Renger
2 years ago
Forum: Modeling
Topic: Multiple sets - different input datasets
Replies: 2
Views: 995

Re: Multiple sets - different input datasets

Hi Fermar It looks like you are including files with the parameter definition. One way would be to rename these parameters in the include files and assign them to the main parameter. in the include file: parameter sc1values(tech,t) ... in main file $include file with sc1values values = sc1values(tec...
by Renger
2 years ago
Forum: Solvers
Topic: Error
Replies: 4
Views: 2742

Re: Error

Hi Rofice Your variable z can't be a positive variable but should be free (this is also indicated in the listing). Furthermore, your model is not an LP but a NLP. It is also good to give your model some sensible start values, so you won't get problems with divisions (GAMS otherwise assumes zero as s...
by Renger
2 years ago
Forum: Syntax
Topic: Read part of a table
Replies: 1
Views: 1092

Re: Read part of a table

Hi Stan You can build subsets like this set year ' 'Full set of years' /M1*M120/; year1(year) 'First half of all years' /M1*M12/, year2(year) 'Second half of all years' /M25*M36/; loop(year1, .... ); or loop over all years but constrain the loop to the first half loop(year$year1(year), .. ); If you ...
by Renger
2 years ago
Forum: Syntax
Topic: Cannot solve error 148
Replies: 1
Views: 618

Re: Cannot solve error 148

Hi You have made the following errors: solve IMPREX USING DNLP maximize Old_demand(j,y,a); You are maximizing several variables at the same time (and if this would be possible, you should have written it like solve IMPREX USING DNLP maximize Old_demand; The maximand should be one-dimensional if you ...
by Renger
2 years ago
Forum: Modeling
Topic: Projected
Replies: 1
Views: 1096

Projected

Hi Since Version 24.8.1 the summary now also gives as information: "Projected". The release notes tell me "the number of variables and equations where the level was projected to one of the bounds (compare model attribute tolProj), if that number is greater than 0 ." Could any explain what this means...
by Renger
2 years ago
Forum: Syntax
Topic: Error while reading four-dimensional data form excel
Replies: 2
Views: 1123

Re: Error while reading four-dimensional data form excel

Hi Ceepbit You shouldn't use the dot-notation. Every set element should be in its own cell in excel. In your case: BT AGR AGRI INDU 1 The gdxxrw command will then be: $CALL GDXXRW.exe x2017b.xlsx par=SAM rng=A1:E6 rdim=2 cdim=2 Two sets are found in the rows (rdim=2), two sets are found in the colum...