dzeke / Blended-Near-Optimal-Tools

Generation, visualization, and interaction tools to find preferred near-optimal alternatives
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

I got error on Amman Jordan Application #2

Open najeebabualshar opened 5 years ago

najeebabualshar commented 5 years ago

Dear Dr. Rosenberg,

My name is Najeeb Abusha'ar from the Jordan University of Science and Technology (JUST), Irbid, Jordan. I'm a masters student in Computer Science and I'm interested in your work on Blended Near-Optimal Tools (https://github.com/dzeke/Blended-Near-Optimal-Tools). Specifically, I've trying to work with the model you created for Amman (https://github.com/dzeke/Blended-Near-Optimal-Tools/tree/master/5-AmmanJordanApplication), but I'm facing some issues with it and I really hope that you can help me. I will summarize what I have done and what is my problem. I installed Matlab 2015a, with GAMS Studio 25.1.2, and I did all configuration to run the first model for testing. Everything is okay so far. When I try to run the Amman Jordan Application for the first time, I got an error at line 174 in LoadAmmanJordan.m file this error that says "Undefined function or variable 'nearoptplotmo2merg'." It runs successfully now, but, if I change any parameter in the figure, I got an error at runtime.

Your help is greatly appreciated

dzeke commented 5 years ago

Hi Najeeb,

Thanks for your interest in the blended near optimal tools. The call to nearoptplotmo2merg was in error. No such function exists. I commented that line out, changed to the correct function (nearoptplotmo2), and updated the file on the master.

Please provide more information about the problem(s) you are having at run time and I can try to help. What actions (clicks, entries, etc.) are you taking in the plot figure? What are you trying to do? What error(s) do you get at the Matlab command line?

Thanks, David

najeebabualshar commented 5 years ago

Dear Dr. David

Thanks for your support. After I run this command "LoadAmmanJordan('AmmanJordanOptNear.gdx')" When I try to change the value for any filter for alternatives by checking a new one or uncheck anything in the figure, I had been getting this error in Matlab command line:

Error using gams abnormal GAMS termination running C:\GAMS\win64\25.1\gams.exe AmmanJordanOptNearInt.gms lo=0: check listing file

Error in EnumNEIntSolsGams4 (line 147) gams(sGamsFile);

Error in nearoptplotmo2>EnumerateWithGams (line 6147) [mObjs, mResultsInt, mResultsVal, uelsOut, ReturnFlag, GamsStats, NumSolvs] = EnumNEIntSolsGams4(sGamsFile,vFixed(nO+1:end),vFixedVals(nO+1:end),vXLabelsShort,ToleranceValue,2,lRunMode);

Error in nearoptplotmo2>GenerateNewAlts (line 6243) [mObjNew, mDecNew] = EnumerateWithGams(0,0,hWindCurr,mData,nO);

Error while evaluating UIControl Callback

Your help is greatly appreciated

dzeke commented 5 years ago

Thanks for the further info Najeeb.

Do you have a license for GAMS? If yes, please post the AmmanJordanOptNearInt.lst file (generated in your local working directory when Matlab calls and runs the AmmanJordanOptNearInt.gms file) so I can debug further. If you do not have a GAMS license, then I think this is the likely culprit. You can contact GAMS at http://GAMS.com to obtain a license). In the interactive parallel coordinate plotting tool, when you click a control on the interact tab, Matlab calls the GAMS program (gams(sGamsFile);). GAMS requires a license to solve the model. The error sequence above indicates the problem is with GAMS. You can open up the AmmanJordanOptNearInt.lst file with a text editor and scan the file for the exact error message(s) generated by GAMS.

I have also updated the readme.txt file for this example to clarify what controls in the interactive parallel coordinate plot tool require a GAMS license to run for this data set.

Please be back in touch so I can resolve this issue.

Thanks, David

najeebabualshar commented 5 years ago

Thanks, Dr David for your support, and your advice. I will check the license issued for GAMS, and I will keep your touch. Best.

najeebabualshar commented 5 years ago

Hello Dr. David,

I want to ask you there are any alternative tools (free source or less cost) rather than GAMS? Because of the GAMS license is very expensive for me. Also, another question please, I want to ask if it is possible to dispense with it in a way or another if there is no alternative?

Best.

dzeke commented 5 years ago

Hi Nageeb,

What do you mean by "dispense with in a way or another"?

If you do not have a GAMS license, then you could move the model input data from GAMS to Matlab and try to run everything inside Matlab. See lines 50-130 in LoadAmmanJordan.m and also the 4-EchoReservoirApplication (https://github.com/dzeke/Blended-Near-Optimal-Tools/blob/master/4-EchoReservoirApplication/LoadEchoGamsResultsMGAComp.m) for a second example to move data from GAMS to Matlab. Once you have all the model data in Matlab, you will need to make several further changes:

  1. Extend the parallel coordinate plot tool (https://github.com/dzeke/Blended-Near-Optimal-Tools/blob/master/3-InteractiveParallelPlot/nearoptplotmo2.m, line 107) to instead call a Matlab function instead of a linear program or GAMS file.
  2. Recode the GAMS enumeration algorithm (https://github.com/dzeke/Blended-Near-Optimal-Tools/blob/master/5-AmmanJordanApplication/AmmanJordanOptNearInt.gms) as a new Matlab function.
  3. In https://github.com/dzeke/Blended-Near-Optimal-Tools/blob/master/5-AmmanJordanApplication/LoadAmmanJordan.m, change the parameters on lines 172-3 to instead reference the features you coded+created in Steps #1 and #2 (see also documentation in (https://github.com/dzeke/Blended-Near-Optimal-Tools/blob/master/3-InteractiveParallelPlot/nearoptplotmo2.m).

Admittedly, this is a lot of coding. Best, David