chrispahm / linter-gams

A GAMS IDE plugin for Atom
6 stars 0 forks source link

Cannot run GAMS code #23

Closed rotsoc closed 6 years ago

rotsoc commented 6 years ago

I use one of the ways of running a model and nothing happens...

chrispahm commented 6 years ago

Hey there! Thanks for raising an issue. Can you explain a little further the steps you did that lead to the error? E.g. did you click the 'Run' button in the sidebar, press shift-enter etc. Is there some error output in the developer console (can be accessed via ctrl-shift-i on Windows, Linux or cmd-option-i on Mac)

Also, I would like you to check if gams-helpers is installed and up-to-date (breaks sometimes when an update goes wrong), and has a valid GAMS path in the settings.

Best, Christoph

rotsoc commented 6 years ago

Hi! I clicked the 'Run' button on the sidebar, pressed shift-enter, pressed ctrl+shift+p and searched 'run' and clicked on the helper function run. Basically tried all ways.

There is some error output in the developer console, though! Thanks! It says that Uncaught (in promise) Error: Status 'Running GAMS' is already set at Registry.statusAdd

Should I paste the whole error output? gams-helpers is installed and up-to-date. However, it didn't have a valid GAMS path in the settings even though I set the GAMS path in the linter-gams settings.

Thank you for the answer!

rotsoc commented 6 years ago

It seems that putting the GAMS path in the gams-helpers solved the issue! Many thanks!

chrispahm commented 6 years ago

Alright, thanks for keeping me updated! Currently, the GAMS paths aren't synced between the linter and the helper module, I should probably change that... Also, the error you saw is related to an uncaught exception thron when no GAMS path was found. So some work to do here, I guess a notification that no GAMS path is set should suffice.

By the way, did you check out the Parse symbol values of the linter main package? If yes, is it of any value to you?

Best, Christoph

rotsoc commented 6 years ago

Hm... I am new to both GAMS and Atom and I cannot seem to find out what the Parse symbol values setting actually does! Could you clarify...? Thanks. From running a simple transport example it seems that it shows values for each iteration on the console. Is that it? That seems helpful.

chrispahm commented 6 years ago

The bug should be gone with #4. The provider should now be cleared correctly if no GAMS exe is found and an alert notification is shown.

Yeah, the idea is that it shows all values of sets and parameters right before each solving statement, and column and equation listings from that solve. Through this I barely write any display or abort statements anymore, but rather just click on the symbol. In order for it to work, a solve statement needs to be present though. The background of the feature is that I spend quiet some time on debugging GAMS models, and I wanted a quick way to investigate values (often the first source of errors), but also equations and variables. The column and equation listing often make the listing file go over a houndred megabytes for some of our models, which is way to big for Atom. So splitting that up into smaller chunks also helped to process that information. However, I think it would be better if you would get the value of a set/parameter right at the position where you clicked it (opposed to the situation now where you get the value at solve). That makes it quiet more difficult to program though...