SolverControl

Controls for general settings related to the solver

GetRunMaxTime

public override int GetRunMaxTime()

Definition

Set the maximum run time for the solver (in seconds).

Return

TypeDescriptionDefault

Integer

The maximum runtime of the Solver. (Unit: seconds)

Int32.MaxValue

Example (Default Logic)

public override int GetRunMaxTime() 
{
    return Int32.MaxValue;
}

GetObjectiveFunctionType

public override ObjectiveFunctionType GetObjectiveFuntionType(IRunConfig runConfig)

Definition

Set the objective function type of the problem (Maximize or Minimize).

Parameter

TypeDescription

IRunConfig

An IRunConfig object representing the run information.

Return

TypeDescriptionDefault

ObjectiveFunctionType

The type of objective function.

Example (Default Logic)

public override ObjectiveFunctionType GetObjectiveFuntionType(IRunConfig runConfig)
{
    ObjectiveFunctionType objectiveFunctionType = UtilityHelper.StringToEnum(runConfig.OBJECTIVE_FUNCTION_TYPE, ObjectiveFunctionType.Minimize);

    return objectiveFunctionType;
}

GetProjectName

public override string GetProjectName()

Definition

Sets the name of the current project.

Return

TypeDescriptionDefault

String

The name of the project.

Example (Default Logic)

public override string GetProjectName()
{
    return Assembly.GetExecutingAssembly().GetName().Name;
}

GetOutputDirectoryPath

public override string GetOutputDirectoryPath(string solverName)

Definition

Set a directory to save the output data.

If you don't set a path, it will create and save the "Output" directory in the current project path.

Return

TypeDescriptionDefault

String

Directory path to save output data.

Null

Example (Default Logic)

public override string GetOutputDirectoryPath(string solverName) 
{
    return null;
}

Last updated