> For the complete documentation index, see [llms.txt](https://swonh.gitbook.io/sdmp-user-manual-eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swonh.gitbook.io/sdmp-user-manual-eng/general-module/user-controls/solvercontrol.md).

# SolverControl

### GetRunMaxTime

```csharp
public override int GetRunMaxTime()
```

#### Definition

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

#### Return

<table><thead><tr><th width="121.33333333333331">Type</th><th width="452">Description</th><th>Default</th></tr></thead><tbody><tr><td>Integer</td><td>The maximum runtime of the Solver. (Unit: seconds)</td><td>Int32.MaxValue</td></tr></tbody></table>

#### Example (Default Logic)

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

### GetObjectiveFunctionType

```csharp
public override ObjectiveFunctionType GetObjectiveFuntionType(IRunConfig runConfig)
```

#### Definition

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

#### Parameter

<table><thead><tr><th width="266">Type</th><th>Description</th></tr></thead><tbody><tr><td>IRunConfig</td><td>An IRunConfig object representing the run information.</td></tr></tbody></table>

#### Return

<table><thead><tr><th width="262">Type</th><th width="328">Description</th><th>Default</th></tr></thead><tbody><tr><td>ObjectiveFunctionType</td><td>The type of objective function.</td><td><a href="#default-logic">Default Logic</a></td></tr></tbody></table>

#### Example (Default Logic)

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

    return objectiveFunctionType;
}
```

### GetProjectName

```csharp
public override string GetProjectName()
```

#### Definition

Sets the name of the current project.

#### Return

<table><thead><tr><th width="171">Type</th><th width="370">Description</th><th>Default</th></tr></thead><tbody><tr><td>String</td><td>The name of the project.</td><td><a href="#default-logic-1">Default Logic</a></td></tr></tbody></table>

#### Example (Default Logic)

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

### GetOutputDirectoryPath

```csharp
public override string GetOutputDirectoryPath(string solverName)
```

#### Definition

Set a directory to save the output data.

{% hint style="info" %}
If you don't set a path, it will create and save the "Output" directory in the current project path.
{% endhint %}

#### Return

<table><thead><tr><th width="161.33333333333331">Type</th><th width="435">Description</th><th>Default</th></tr></thead><tbody><tr><td>String</td><td>Directory path to save output data.</td><td>Null</td></tr></tbody></table>

#### Example (Default Logic)

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