how to generate nl file

400 views
Skip to first unread message

gmen...@gmail.com

unread,
May 14, 2014, 8:25:43 AM5/14/14
to am...@googlegroups.com
I am trying to compile the source code of fg_write in order to create an nl file in a windows environment without success.
¿May somebody give me the fg_write.exe to transform a ampl file to a nl file or explain me how to do it?

victor.z...@gmail.com

unread,
May 14, 2014, 1:24:16 PM5/14/14
to am...@googlegroups.com
fg_write is a function that takes an ASL object representing a problem instance and writes it to an .nl file. It doesn't transform AMPL file into an .nl file, for that you need the AMPL translator.

This fg_write function is a part of AMPL Solver Library (ASL) which can be compiled on Windows, for example, with CMake and Visual Studio or msbuild:

cd ampl
cmake .
msbuild /p:Configuration=Release AMPL.sln

The built AMPL Solver Library (amplsolver.lib) will be placed in the solvers/Release directory.

HTH,
Victor


On Wed, May 14, 2014 at 5:25 AM, <gmen...@gmail.com> wrote:
I am trying to compile the source code of fg_write in order to create an nl file in a windows environment without success.
¿May somebody give me the fg_write.exe to transform a ampl file to a nl file or explain me how to do it?

--
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 post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

gmen...@gmail.com

unread,
May 20, 2014, 11:32:35 AM5/20/14
to am...@googlegroups.com, gmen...@gmail.com
 Thanks Victor

"fg_write is a function that takes an ASL object representing a problem instance and writes it to an .nl file. It doesn't transform AMPL file into an .nl file, for that you need the AMPL translator."

Then, is there any function that reads an AMPL file and generates the ASL object? 

victor.z...@gmail.com

unread,
May 20, 2014, 12:54:03 PM5/20/14
to am...@googlegroups.com
Not that I'm aware of, but it is easy to write one by first invoking the AMPL translator to convert an AMPL file into an .nl file and then using fg_read to read the .nl file into an ASL object.

HTH,
Victor
  
  


--
Reply all
Reply to author
Forward
0 new messages