# State

### Properties

<table data-full-width="false"><thead><tr><th width="183">Name</th><th width="102.33333333333331">Type</th><th width="352">Description</th><th>Note</th></tr></thead><tbody><tr><td>Key</td><td>String</td><td>This is the key of state.</td><td></td></tr><tr><td>Index</td><td>Integer</td><td>Index of state.</td><td></td></tr><tr><td>BestValue</td><td>Double</td><td>The objective function value of state.</td><td></td></tr><tr><td>DualBound</td><td>Double</td><td>Dual bound of state.</td><td></td></tr><tr><td>EstimationValue</td><td>Double</td><td>The estimated value of the state.</td><td></td></tr><tr><td>PrimalBound</td><td>Double</td><td>The objective function value of the feasible solution obtained by the roll-out heuristic from the state.</td><td></td></tr><tr><td>IsInitial</td><td>Boolean</td><td>Whether it is an initial state.</td><td></td></tr><tr><td>IsLeaf</td><td>Boolean</td><td>Whether the current state is a leaf node in the state transition network.</td><td></td></tr><tr><td>IsFinal</td><td>Boolean</td><td>Whether it is an final state.</td><td></td></tr><tr><td>IsLastStage</td><td>Boolean</td><td>Whether the current stage is the last stage (the stage just before the final state).</td><td></td></tr><tr><td>IsVisited</td><td>Boolean</td><td>Whether or not the state has been visited.</td><td></td></tr><tr><td>IsPostActionState</td><td>Boolean</td><td>Whether this is the state after performing the action.</td><td></td></tr><tr><td>IsSetDualBound</td><td>Boolean</td><td>Whether dual bound is set.</td><td></td></tr><tr><td>IsSetEstimationBound</td><td>Boolean</td><td>Whether the value estimate is set.</td><td></td></tr><tr><td>PreActionState</td><td>State</td><td>The state before performing the action.</td><td></td></tr><tr><td>PrevBestStates</td><td>Dictionary&#x3C;string, State></td><td>A set of states selected among the states of the previous stage connected to the current state. (A set of states with the best value of objective function value of the previous state + cost/value of action)</td><td>Key: Key of state<br>Value: Previous state</td></tr><tr><td>PrevBestState</td><td>State</td><td>The representative state among the PrevBestState.</td><td></td></tr><tr><td>PrevStates</td><td>Dictionary&#x3C;string, State></td><td>The set of states from the previous stage associated with the current State.</td><td>Key: Key of state<br>Value: Previous state</td></tr><tr><td>Stage</td><td>Stage</td><td>The stage of the current state.</td><td></td></tr><tr><td>ClusterID</td><td>Integer</td><td>State The ClusterID assigned through the clustering method.</td><td></td></tr><tr><td>ClusterDistance</td><td>Double</td><td>The Euclidean distance from the centroid of the cluster to which the state belongs.</td><td></td></tr></tbody></table>

### Constructors

<details>

<summary>State()</summary>

#### Description

Constructor of [`State`](/sdmp-user-manual-eng/general-module/data-model/state.md) object.

</details>

<details>

<summary>public State(string key)</summary>

#### Parameters

String: The key of the state.

#### Description

Constructor of [`State`](/sdmp-user-manual-eng/general-module/data-model/state.md) object.

</details>

### Methods

<details>

<summary>public virtual void SetDualBound(double value)</summary>

#### Parameters

Double: The dual bound value to set.

#### Description

Sets the dual bound of the [`State`](/sdmp-user-manual-eng/general-module/data-model/state.md) object.

</details>

<details>

<summary>public virtual void SetPrimalBound(double value)</summary>

#### Parameters

Double: The primal bound value to set.

#### Description

Sets the primal bound of the [`State`](/sdmp-user-manual-eng/general-module/data-model/state.md) object.

</details>


---

# 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/data-model/state.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.
