function gsl_cdf_ugaussian_Qinv;
var x1 >= 0 ;
minimize obj: (x1^2)-8*x1;
subject to const1: x1-4 <= gsl_cdf_ugaussian_Qinv(1- 0.05);
Then I tried to solve this in AMPL
ampl: model test.mod;
ampl: load amplgsl.dll;
ampl: option solver ipopt;
ampl: solve;
EXIT: Optimal Solution Found.
Ipopt 3.12.4: Optimal Solution Found
ampl: display x1;
x1 = 3.99996
subject to const1:
-gsl_cdf_ugaussian_Qinv(0.95) + x1 <= 4;
ampl: display -gsl_cdf_ugaussian_Qinv(0.95) + x1;
-gsl_cdf_ugaussian_Qinv(0.95) + x1 = 5.64481
As it is obvious, the constraint is not satisfied! I wonder why and how I can fix this.
Thanks,
Mahraz
--
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.
Load the extended function library before reading the model that uses the gaussian function:
ampl: load amplgsl.dll;
ampl: model test.mod;
Arguably the other order should also work, or else should cause an error message to appear; this issue has been reported.
--
Robert Fourer
am...@googlegroups.com
--