Connection problem between ampl and Matlab interface

16 views
Skip to first unread message

王莹

unread,
May 12, 2018, 9:28:23 AM5/12/18
to am...@googlegroups.com, in...@ampl.com
Dear Sir or Madam, 
 I am a teacher assistant from Beijing Jiaotong University.After reading the official website, our lab has the intention to purchase ampl, but there are several questions beforehand:
We have compiled the algorithm in matlab language, and we don't want to compile the algorithm using ampl language again.Can we use matlab files directly on the ampl interface?  and then use the solver in the ampl environment.
I see that on the official web, it is said that the compiled “.mod ”file can be directly invoked in the matlab environment through the API. Can that, in turn, invoking the compiled “.m” files directly in the ampl environment?

Sincerely look forward to your reply

With my best regards

Ying Wang

AMPL Support Services

unread,
May 12, 2018, 7:05:14 PM5/12/18
to 王莹, am...@googlegroups.com, in...@ampl.com
The standard way to pass data between AMPL and MATLAB is using the AMPL API for MATLAB. Could you please provide more details about what you intend to do that would not be possible with the API?

--
AMPL Support Services
sup...@ampl.com
{#HS:579426197-7484#}

AMPL Support Services

unread,
May 14, 2018, 6:47:15 AM5/14/18
to 王莹, am...@googlegroups.com, in...@ampl.com
AMPL and MATLAB are very distinct languages. AMPL is a modeling language which can be used to define the model to be solved, while MATLAB can be used to generate the data and to perform operations with the solution. What does the algorithm implemented in your ".m" file do? Assuming that it prepares the data, the solution is to use the API.


--
AMPL Support Services
sup...@ampl.com
{#HS:579426197-7484#}
On Mon, May 14, 2018 at 1:22 AM UTC, 王莹 <1711...@bjtu.edu.cn> wrote:
the question is I have a ".m"file of using matlab language, if I want to use ampl without converting the language ,what should I do?


Sincerely look forward to your reply
With my best regards
Ying Wang
在2018-05-13 07:05:10,王莹1711...@bjtu.edu.cn写道:



On Sat, May 12, 2018 at 11:04 PM UTC, AMPL Support Services <sup...@ampl.com> wrote:
The standard way to pass data between AMPL and MATLAB is using the AMPL API for MATLAB. Could you please provide more details about what you intend to do that would not be possible with the API?

--
AMPL Support Services
sup...@ampl.com


王莹

unread,
May 14, 2018, 9:18:24 AM5/14/18
to AMPL Support Services, am...@googlegroups.com, in...@ampl.com
the question is I have a ".m"file of using matlab language, if I want to use ampl without converting the language ,what should I do?

Sincerely look forward to your reply
With my best regards
Ying Wang

在2018-05-13 07:05:10,王莹1711...@bjtu.edu.cn写道:

The standard way to pass data between AMPL and MATLAB is using the AMPL API for MATLAB. Could you please provide more details about what you intend to do that would not be possible with the API?
{#HS:579426197-7484#}

AMPL Google Group

unread,
May 14, 2018, 4:30:02 PM5/14/18
to Ampl Modeling Language, sup...@ampl.com, in...@ampl.com
Could you please provide more details about what do you have implemented in the ".m" file? Is it a solver, a model, or something else? If it is a solver, there is another interface that may provide what you need https://www.mathworks.com/matlabcentral/fileexchange/64634-ampl-interface-to-matlab.

--
Filipe Brandão
am...@googlegroups.com
{#HS:579599159-7508#}
On Mon, May 14, 2018 at 1:18 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
the question is I have a ".m"file of using matlab language, if I want to use ampl without converting the language ,what should I do?

Sincerely look forward to your reply
With my best regards
Ying Wang
在2018-05-13 07:05:10,王莹1711...@bjtu.edu.cn写道:



On Mon, May 14, 2018 at 10:47 AM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
AMPL and MATLAB are very distinct languages. AMPL is a modeling
language which can be used to define the model to be solved, while
MATLAB can be used to generate the data and to perform operations with
the solution. What does the algorithm implemented in your ".m" file
do? Assuming that it prepares the data, the solution is to use the
API.

--
AMPL Support Services
sup...@ampl.com



On Sat, May 12, 2018 at 11:05 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
The standard way to pass data between AMPL and MATLAB is using the
AMPL API for MATLAB. Could you please provide more details about what
you intend to do that would not be possible with the API?

--
AMPL Support Services
sup...@ampl.com



On Sat, May 12, 2018 at 1:28 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
Dear Sir or Madam,
I am a teacher assistant from Beijing Jiaotong University.After reading the official website, our lab has the intention to purchase ampl, but there are several questions beforehand:
We have compiled the algorithm in matlab language, and we don't want to compile the algorithm using ampl language again.Can we use matlab files directly on the ampl interface? and then use the solver in the ampl environment.
I see that on the official web, it is said that the compiled ".mod "file can be directly invoked in the matlab environment through the API. Can that, in turn, invoking the compiled ".m" files directly in the ampl environment?

Sincerely look forward to your reply
With my best regards
Ying Wang
--
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 https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.



Reply all
Reply to author
Forward
0 new messages