Questions about the Results

Problems with modeling
Post Reply
amoshouqx
User
User
Posts: 3
Joined: 4 years ago

Questions about the Results

Post by amoshouqx »

Hi, I was running a gms.file for my research and I was douting if the value of TA(1,4) is correct or not (TA(1,4) = 101.000). From my thoughts, the value of TA(1,4) should be equal to CA(1,4,1,1,4), which is 1.000. I was confused by this for multiple days and I did not know how to debug the GAMS program since I was just a beginner user. Could somebody explain why TA(1,4) = 101.000 to me? I would appreciate it. Below is the partial report summary for CA and TA values and the GAMs file is attached to this post. Thank you very much! :D :D
_________________________________________________________________________________________________________________________________________
CA values.PNG
CA values.PNG (8.52 KiB) Viewed 2742 times
TA Values.PNG
TA Values.PNG (4.34 KiB) Viewed 2742 times
__________________________________________________________________________________________________________________________________________
DTA_AD_Forum.gms
(4.38 KiB) Downloaded 207 times
Fred
Posts: 372
Joined: 7 years ago

Re: Questions about the Results

Post by Fred »

Hi,

It seems that you may have forgotten to add the constraint total_arrival, in which TA occurs, to your model.

I hope this helps!

Fred
amoshouqx
User
User
Posts: 3
Joined: 4 years ago

Re: Questions about the Results

Post by amoshouqx »

Fred wrote: 4 years ago Hi,

It seems that you may have forgotten to add the constraint total_arrival, in which TA occurs, to your model.

I hope this helps!

Fred
Hi Fred,
Thanks for your reply! I have been busy these two days and I will re-run the program on weekends. Yes, that could be the reason.
amoshouqx
User
User
Posts: 3
Joined: 4 years ago

Re: Questions about the Results

Post by amoshouqx »

Fred wrote: 4 years ago Hi,

It seems that you may have forgotten to add the constraint total_arrival, in which TA occurs, to your model.

I hope this helps!

Fred
Also, is there any kind of "debugging" tool in GAMS or is there a sufficient way to address where the problem occurs in the code when the output is not right? Thanks!
Fred
Posts: 372
Joined: 7 years ago

Re: Questions about the Results

Post by Fred »

Actually, the output was right. Your idea of what the output should be like was wrong. Hard to have this fixed by a debugging tool ;-)

When facing a problem as the one described in your initial post, it is often a good idea to have a look at the equation listing and column listing to check whether the generated model corresponds to your intentions
https://www.gams.com/latest/docs/UG_GAM ... ionListing
https://www.gams.com/latest/docs/UG_GAM ... umnListing

You probably had a reason to expect TA(1,4) = CA(1,4,1,1,4), e.g. because you defined a corresponding equation.

For you model, a look at the column listing shows at first sight that variable TA(1,4) occurs only in one equation

Code: Select all

TA(1,4)
                (.LO, .L, .UP, .M = 0, 0, +INF, 0)
     (200)      SystemEst_def
A look at equation SystemEst_def shows that this obviously does not result in your expectation TA(1,4) = CA(1,4,1,1,4).

I hope this helps!

Fred
Post Reply