--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-1775765496-5222644463-1643825324-182380671%40helpscout.net.
Thankyou Sir,
Instead of using MS. Excel, I want to run the following AMPL program on MATLAB.
Is there any API which can integrate AMPL with MATLAB and run the following AMPL program.
On Wed, Feb 2, 2022 at 6:08 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
To plot objective values from a solver log, I would copy the relevant lines of the log, paste the lines into a spreadsheet program (like Excel), and use the "Text to Columns" feature to extract the iteration numbers and objective values. Then a plot can be created by using the many convenient plotting features in the spreadsheet program.
It is possible to automate some of this procedure, but that can be difficult, because the detailed iteration data from the solver log is only available as a text listing. Unless you have a really large number of plots to make, copying and pasting by hand is likely to be the easiest approach.
--
Robert Fourer
am...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-1775765496-5226158968-1643905483-1739749768%40helpscout.net.
>> iter = 1:5; >> objval = [4.57481E+00,1.96429E+01,1.91308E+01,1.90990E+01,1.90987E+01]; >> plot(iter,objval)

Thank you for your response Sir.
Actually it's my final year project :
Model file contains : 42variable (non-negative), 42 constraints(linear) and 16 non-linear constraint.
Objective function is non-linear.
My requirement is to plot graph of Objective function value for each iteration vs iteration.
My teacher is not allowing to use MS excel, he said to use any other software or method to plot the graph.
I thought of AMPL API for MATLAB but you are saying I need to write the text file, to extract the graph.
Sir is there any other software or method to plot the graph i.e. other than MS Excel.
On Thu, Feb 3, 2022 at 4:24 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
There is an AMPL API for MATLAB that can run AMPL programs, and can exchange data and results between AMPL and MATLAB.
It is not clear what you mean, however, when you say "run the following AMPL program on MATLAB." Can you explain what AMPL program you are trying to run, or attach a copy of the program?
(Earlier you asked about plotting a graph of the objective value versus the iteration. The information for that graph is only available in the solver log, which cannot be accessed through the AMPL API for MATLAB. You would need to write the solver log to a text file and then create a MATLAB program to read the objective values from the file and make the plot.)
--
Robert Fourer
am...@googlegroups.com