# 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;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://swonh.gitbook.io/sdmp-user-manual-eng/general-module/user-controls/solvercontrol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
