Problem loading parameters

Problems with syntax of GAMS
Post Reply
Jubeyer
User
User
Posts: 41
Joined: 4 years ago

Problem loading parameters

Post by Jubeyer »

Hi,
I have two gdx files, and I want to load two different but similar parameters from those two files respectively. While one gets loaded nicely but other is encountering error 362 (saying values for domain 2 are unknown no checking possible).

My syntax for loading the two parameters from two gdx files are as follows:

$GDXIN DASCUCINPUT2
$load PUMPING_ENFORCED_ON
DASCUCINPUT2_MG.gdx
(2.15 KiB) Downloaded 183 times

$GDXIN DASCUCINPUT2_MG
$load PUMPING_ENFORCED_ON_MG
DASCUCINPUT2.gdx
(315.07 KiB) Downloaded 177 times
Jubeyer
User
User
Posts: 41
Joined: 4 years ago

Re: Problem loading parameters

Post by Jubeyer »

Sorry I forgot to mention how those two parameters declared,

SET
INTERVAL
GEN
MG_GEN

PARAMETERS
PUMPING_ENFORCED_ON(GEN,INTERVAL)
PUMPING_ENFORCED_ON_MG(MG_GEN,INTERVAL)
Fred
Posts: 373
Joined: 7 years ago

Re: Problem loading parameters

Post by Fred »

Hi,

The parameters you are trying to load have domain sets. You need to make sure that those domain sets are known. There are different ways how to do that. I don't know where data of the sets INTERVAL, GEN, MG_GEN comes from in your case. If those sets can be defined through the same gdx files, you could for example use implicit set definition.

Code: Select all

SET
INTERVAL
GEN
MG_GEN;
PARAMETERS
PUMPING_ENFORCED_ON(GEN<,INTERVAL<)
PUMPING_ENFORCED_ON_MG(MG_GEN<,INTERVAL);
$GDXIN DASCUCINPUT2
$load PUMPING_ENFORCED_ON
$GDXIN DASCUCINPUT2_MG
$load PUMPING_ENFORCED_ON_MG
display PUMPING_ENFORCED_ON, PUMPING_ENFORCED_ON_MG;
I hope this helps.

Fred
Post Reply