shutdown#

Optislang.shutdown(force: bool = False) None#

Shut down the optiSLang server.

This method stops the server from listening for incoming connections, discards pending requests, and shuts down the server. In batch mode, the project runs until execution finishes and then optiSLang is shut down.

Parameters:
forcebool, optional

Whether to forcibly shut down a local optiSLang server. The default is False. In all cases, an attempt is made to shut down the optiSLang server in the proper way. However, if the force parameter is True, after a while, the process is forcibly shut down without an exception being raised.

Raises:
OslCommunicationError

Raised when the force parameter is False and an error occurs while communicating with the server.

OslCommandError

Raised when the force parameter is False and the command or query fails.

TimeoutError

Raised when the force parameter is False and the timeout float value expires.