\Pi

1,082 views
Skip to first unread message

Lacky

unread,
Oct 14, 2009, 11:05:12 AM10/14/09
to AMPL Modeling Language
Hi all, is there any \Pi value embedded in AMPL. I need to impose some
(silly) non convex constraints in the form sin(2*Pi*u) = 0

Thanks

Fabrizio

Robert Fourer

unread,
Oct 16, 2009, 1:05:05 PM10/16/09
to am...@googlegroups.com, Lacky

There's no built-in symbol for pi, but it's easy to define a parameter equal
to the computer representation of the value of pi, by writing, say,

param pi = 4 * atan(1);

(With certain editors, I am told, you can actually use the symbol for the
Greek letter pi as an AMPL parameter name.)

Bob Fourer
4...@ampl.com

Juan Pablo Fernández G

unread,
Nov 13, 2014, 12:15:07 PM11/13/14
to am...@googlegroups.com, lack...@googlemail.com
Hi, i would like to know if this definition of Pi could be inside the model.

Juan Pablo Fernández G

unread,
Nov 13, 2014, 12:33:03 PM11/13/14
to am...@googlegroups.com, lack...@googlemail.com
I have already done, this instruction can be in model.


El miércoles, 14 de octubre de 2009 10:05:12 UTC-5, Lacky escribió:

khan

unread,
Feb 20, 2018, 8:01:09 AM2/20/18
to AMPL Modeling Language
Is there any way to define iota as well?

AMPL Google Group

unread,
Feb 20, 2018, 12:36:13 PM2/20/18
to am...@googlegroups.com
AMPL doesn't support the complex number, but you could use param to represent real and imaginary part.

--
Paras Tiwari
am...@googlegroups.com
{#HS:527186929-780#}
--
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
Message has been deleted
0 new messages