grbenv()


grbenv()

构造函数Grbenv.object. You have the option of constructing either a local environment, which solves Gurobi models on the local machine, a client environment for a Gurobi compute server, which will solve Gurobi models on a server machine, or an Instant Cloud environment, which will launch a Gurobi Cloud server and solve models on that server. Choose the appropriate signature for the type of environment you wish to launch.

Grbenv. Grbenv.( )

    Create a Gurobi environment (with logging disabled). This method will also populate several parameters (ComputeServer,Tokenserver,服务器密码, etc.) from yourgurobi.lic.file. This method will also check the current working directory for a file namedgurobi.env, and it will attempt to read parameter settings from this file if it exists. The file should be inPRMformat (briefly, each line should contain a parameter name, followed by the desired value for that parameter).

    通常,您应该旨在在程序中创建一个Gurobi环境,即使您计划使用多种型号。重新使用一个环境比创建和销毁多个环境更有效。

    Return value:

    An environment object (with no associated log file).

Grbenv. Grbenv.( string logFileName )

    Create a Gurobi environment (with logging enabled). This method will also populate several parameters (ComputeServer,Tokenserver,服务器密码, etc.) from yourgurobi.lic.file. This method will also check the current working directory for a file namedgurobi.env, and it will attempt to read parameter settings from this file if it exists. The file should be inPRMformat (briefly, each line should contain a parameter name, followed by the desired value for that parameter).

    通常,您应该旨在在程序中创建一个Gurobi环境,即使您计划使用多种型号。重新使用一个环境比创建和销毁多个环境更有效。

    Arguments:

    logFileName: The desired log file name.

    Return value:

    An environment object.

Grbenv. Grbenv.( bool empty )

    Create an empty Gurobi environment. UseStart启动环境。

    If the environment is not empty, This method will also populate several parameters (ComputeServer,Tokenserver,服务器密码, etc.) from yourgurobi.lic.file. This method will also check the current working directory for a file namedgurobi.env, and it will attempt to read parameter settings from this file if it exists. The file should be inPRMformat (briefly, each line should contain a parameter name, followed by the desired value for that parameter).

    通常,您应该旨在在程序中创建一个Gurobi环境,即使您计划使用多种型号。重新使用一个环境比创建和销毁多个环境更有效。

    Arguments:

    empty: Indicates whether the environment should be empty. You should useempty=Trueif you want to set parameters before actually starting the environment. This can be useful if you want to connect to a Compute Server, a token server, or the Gurobi Instant Cloud. See theEmpty EnvironmentSection for more details.

    Return value:

    An environment object.

Grbenv. Grbenv.( string logfilename,
string computeserver,
string 路由器,
string password,
string 团体,
TlsInsecure,
优先,
double timeout )
    在Compute Server上创建客户端Gurobi环境。此方法还将检查当前工作目录是否为命名的文件gurobi.env, and it will attempt to read parameter settings from this file if it exists. The file should be inPRMformat (briefly, each line should contain a parameter name, followed by the desired value for that parameter).

    通常,您应该旨在在程序中创建一个Gurobi环境,即使您计划使用多种型号。重新使用一个环境比创建和销毁多个环境更有效。

    Arguments:

    logFileName:此环境的日志文件的名称。Pass an empty string for no log file.

    computeserver:计算服务器。您可以使用其名称或其IP地址引用服务器。如果您使用的是非默认端口,则服务器名称应后跟端口号(例如,server1:61000)

    路由器:Compute Server群集的路由器。路由器可用于提高计算服务器部署的稳健性。您应该使用其名称或其IP地址引用路由器。如果没有使用路由器(这是典型的情况),请传递空字符串。

    password:获取对指定的Compute Server群集访问的密码。如果不需要密码,请传递空字符串。

    团体: The name of the Compute Server group.

    TlsInsecure.:表示是否在TLS(传输层安全性)中使用不安全模式。将此设置为0,除非您的服务器管理员否则告诉您。

    priority:工作的优先权。优先事项必须在-100和100之间,默认值为0(按约定)。在较低优先级作业之前,从服务器作业队列中选择更高的优先级作业。根据服务器的配置,具有优先级100的作业立即运行,绕过作业队列并忽略服务器上的作业限制。您应该在优先级100个作业中谨慎行事,因为它们可以严重过载服务器,这可能导致作业失败,并且在极端情况下可能导致服务器崩溃。此行为由此管理HARDJOBLIMIT, and is dissabled by default. Refer to theGurobi Remote Services参考手册for more information on starting Compute Server options.

    timeout: Queue timeout (in seconds). If the job doesn't reach the front of the queue before the specified timeout, the call will exit with aJOB_REJECTEDerror. Use -1 to indicate that the call should never timeout.

    Return value:

    An environment object.

Grbenv. Grbenv.( string logfilename,
string accessID,
string secretKey,
string 水池,
priority )
    Create a Gurobi environment on Gurobi Instant Cloud This method will also check the current working directory for a file namedgurobi.env, and it will attempt to read parameter settings from this file if it exists. The file should be inPRMformat (briefly, each line should contain a parameter name, followed by the desired value for that parameter).

    通常,您应该旨在在程序中创建一个Gurobi环境,即使您计划使用多种型号。重新使用一个环境比创建和销毁多个环境更有效。

    Arguments:

    logfilename:此环境的日志文件的名称。也许空值(or an empty string), in which case no log file is created.

    accessID: The access ID for your Gurobi Instant Cloud license. This can be retrieved from the Gurobi Instant Cloud website. When used in combination with yoursecretKey, this allows you to launch Instant Cloud instances and submit jobs to them.

    secretKey: The secret key for your Gurobi Instant Cloud license. This can be retrieved from the Gurobi Instant Cloud website. When used in combination with youraccessID, this allows you to launch Instant Cloud instances and submit jobs to them. Note that you should keep your secret key private.

    pool:机器池。机器池允许您在即时云网站上创建固定配置(捕获机器类型,地理区域等类型),然后从客户端程序启动和共享计算机,而无需每次启动计算机时重新启动配置信息。也许空值(or an empty string), in which case your job will be launched in the default pool associated with your cloud license.

    priority:工作的优先权。优先事项必须在-100和100之间,默认值为0(按约定)。在较低优先级作业之前,从服务器作业队列中选择更高的优先级作业。

    Return value:

    An environment object.