Closed caioluke closed 1 year ago
Hi @caioluke,
Thank you for reaching out. Considering that you have a license from Artelys you should also have an AMPL installation obtained from them. In that case instead of using modules you can use that instalation.
You can instal just amplpy and add the AMPL installation directory to the environment variable PATH using add_to_path
:
from amplpy import AMPL, add_to_path
add_to_path(r"full path to the AMPL installation directory")
ampl = AMPL()
Or modify the system environment variable PATH to include the path to the AMPL installation.
Obrigado pela resposta rápida Filipe :)
Actually, I wanted to use ONLY the amplpy library, and not the ampl installation at all.
It would be easier for my docker application if I could do that.
Is there any way to do it?
The API needs the AMPL installation where AMPL and solver drivers are present. We use the modules to do that with Docker to allow using any docker image with Python: https://dev.ampl.com/ampl/docker/index.html. However, to use a license obtained from Artelys you will need to download their bundle for Linux and place it in a Docker image (it is possible that Artelys may have a docker image, so it would be worth asking them). Which solvers do you need? We have free licenses such as https://ampl.com/ce/ that may provide you with the UUID to use AMPL and you can trial commercial solvers at any time.
Yes, I have a bundle with ampl that I currently curl in my docker container. I just thought it would be cleaner if I could pip install everything instead.
If I understood correctly this is not possible :/
The only solver I need is Xpress.
Funny PS: I work for Artelys
With amplpy.modules everything is pip install but requires a license generated on the AMPL Portal. Artelys is an AMPL reseller that in fact would be allowed to issue regular AMPL licenses on the AMPL Portal. You can talk with someone in there at Artelys in charge of licensing if they would like to be able to issue AMPL licenses. They can simply contact licensing@ampl.com asking to become a vendor on the AMPL Portal.
Hey, I checked internally in Artelys and it won't be possible to do that.
I guess have to settle for curling the build.
Thanks for the quick response!
Hi,
I would like to activate my license in amplpy but I don't have my license's uuid.
All I have is a .txt file that starts with "=" and what I would suppose to be a license that follows.
Which is enough to make ampl work locally via the normal installation, by setting the variable ARTELYS_LICENSE to this .txt file name.
What would I have to do to activate my license in amplpy in this case?
Thanks in advance, and also thanks for developing the python API :)