Hi Xypron,

> The first syntax executes command_line.
> The second syntax invokes a shell (Linux console, or Windows console
> ("cmd"))and returns to AMPL when the shell is terminated.
>
> (see Robert Fourer, AMPL, 2nd edition)
>
> These commands make sense in AMPL, because it is an interactive language.
>
> What will be the added value for GLPK users compared to using a shell
> script?

I think it would useful to run third parties console application e.g. gnuplot.

shell 'wgnuplot.exe lp_result-graph.gnu';
shell;

Display the window graph.

I don't know if this makes sense.

Anyway, back to graphing example in Mathprog. Here is my idea below.
This is not working yet.

solve;
table result{i in I, j in J: x[i,j]} OUT "ODBC"
  'DSN=SQLITE3'
  'DELETE FROM transp_result;'
  'INSERT INTO transp_result VALUES (?,?,?)' :
  i ~ LOC1, j ~ LOC2, x[i,j].val ~ PRIMAL, x[i,j].dual ~ DUAL;

Xypron, how to write LOC1 and LOC2 into one data entry, e.g. ROUTE

ROUTE for LOC1 and LOC2
'Seattle - New York',

# filename for gnuplot
param file, symbolic := 'lp_result_sqlite3.gnu';
# start printing the gnuplot script
printf 'set style data lines\n' > file;
printf 'set datafile separator "|" \n' >> file;
printf 'set style data histograms \n' >>file;

# not working yet. Needs to be fixed with one label "ROUTE"
printf 'plot " < sqlite3 C:\\gusek\\xypron\\transp_sqlite3.db3  select
* from transp_result" \n' >>file;
printf '     using 2:xtic(1) title "primal", "" using 4 t "dual" ' >>file;

Probably would be best using lp_result.dat for gnuplot data for
instead of using SQL statement.

Any gnuplot users in this group who want to help, how we can get
interactive graphing in MathProg.

Thanks. Noli

_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to