GRBEnv()


GRBEnv()

环境构造函数。

Constructor forGRBEnvobject. If the constructor is called with no arguments, no log file will be written for the environment.

您可以选择构建本地环境,解决本地计算机上的Gurobi模型,用于Gurobi Compute Server的客户端环境,它将解决服务器计算机上的Gurobi模型,或者即时云环境,这将推出Gurobi云服务器并在该服务器上解决模型。为您希望推出的环境类型选择适当的签名。

请注意GRBEnv构造函数将检查当前的工作目录以获取名为的文件gurobi.env.,并且它将尝试从此文件中读取参数设置如果存在。该文件应该是PRM.format (briefly, each line should contain a parameter name, followed by the desired value for that parameter). It will also populate several parameters (ComputeServerTokenServerServerPassword等)来自你的gurobi.licfile.

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

GRBEnv GRBEnv()

    创建Gurobi环境(使用日志记录)。

    返回值:

    环境对象(没有关联的日志文件)。

GRBEnv GRBEnv 细绳 logfilename)

    创建GUROBI环境(启用日志记录)。

    论点:

    logfilename.:所需的日志文件名。

    返回值:

    环境对象。

GRBEnv GRBEnv 赃物 空的 )

    创建一个空的Gurobi环境。采用开始启动环境。

    论点:

    空的承宪:指示是否环境ould be empty.

    返回值:

    环境对象。

GRBEnv GRBEnv 细绳 logfilename.那
细绳 computeserver,
细绳 路由器,
细绳 密码,
细绳 group,
int tlsInsecure,
int 优先那
双倍的 暂停 )
    在Compute Server上创建客户端Gurobi环境。

    论点:

    logfilename.:此环境的日志文件的名称。传递一个空字符串,无日志文件。

    computeServer: A Compute Server. You can refer to the server using its name or its IP address. If you are using a non-default port, the server name should be followed by the port number (e.g.,server1:61000的)

    router: The router for a Compute Server cluster. A router can be used to improve the robustness of a Compute Server deployment. You should refer to the router using either its name or its IP address. If no router is used (which is the typical case), pass an empty string.

    密码: The password for gaining access to the specified Compute Server cluster. Pass an empty string if no password is required.

    group:Compute Server组的名称。

    tlsInsecure: Indicates whether to use insecure mode in the TLS (Transport Layer Security). Set this to 0 unless your server administrator tells you otherwise.

    优先:工作的优先权。优先事项必须在-100和100之间,默认值为0(按约定)。在较低优先级作业之前,从服务器作业队列中选择更高的优先级作业。具有优先级100的作业立即运行,绕过作业队列并忽略服务器上的作业限制。您应该在优先级100个作业中谨慎行事,因为它们可以严重过载服务器,这可能导致作业失败,并且在极端情况下可能导致服务器崩溃。

    暂停:作业超时(以秒为单位)。如果作业在指定超时之前没有到达队列的前部,则构造函数将抛出一个Job_rejected.例外。使用负值表示呼叫不应该超时。

    返回值:

    环境对象。

GRBEnv GRBEnv 细绳 logfilename.那
细绳 accessID,
细绳 密钥,
细绳 水池那
int 优先 )
    在Gurobi Instant Cloud上创建Gurobi环境

    论点:

    logfilename:此环境的日志文件的名称。May beNULL(或空字符串),在这种情况下,没有创建日志文件。

    accessID:Gurobi Instant云许可证的访问ID。这可以从Gurobi Instant Cloud网站检索。与你的结合使用时密钥,这允许您启动即时云实例并向它们提交作业。

    密钥:Gurobi即时云许可证的秘密密钥。这可以从Gurobi Instant Cloud网站检索。与你的结合使用时accessID,这允许您启动即时云实例并向它们提交作业。请注意,您应该保留秘密密钥私密。

    水池:机器池。机器池允许您在即时云网站上创建固定配置(捕获类似机器,地理区域等),然后从客户程序启动和共享计算机,而无需在每次启动计算机时重新执行配置信息。可能是空字符串,在这种情况下,您的作业将在与云许可证关联的默认池中启动。

    优先:工作的优先权。优先事项必须在-100和100之间,默认值为0(按约定)。在较低优先级作业之前,从服务器作业队列中选择更高的优先级作业。具有优先级100的作业立即运行,绕过作业队列并忽略服务器上的作业限制。您应该在优先级100个作业中谨慎行事,因为它们可以严重过载服务器,这可能导致作业失败,并且在极端情况下可能导致服务器崩溃。

    返回值:

    环境对象。