Hello,
Is there any way to make a noise in GAMS at the end of a code (solving an MIP model)? I do not want to check the GAMS environment back and forth to see whether the solving process has been completed.
Best, Amir
Hello,
Is there any way to make a noise in GAMS at the end of a code (solving an MIP model)? I do not want to check the GAMS environment back and forth to see whether the solving process has been completed.
Best, Amir
Never heard a request like this before… GAMS does not make noises but you can execute any program with execute. Here is a way to play a wav file (on Windows):
...
solve mymodel us lp min z;
execute 'powershell -c (New-Object Media.SoundPlayer "C:\Windows\Media\notify.wav").PlaySync();'
-Michael
You could also use the embedded code feature to run a python snippet - there are a bunch of text to speech libraries out there.
$onEmbeddedCode Python:
import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()
$offEmbeddedCode