> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SolveStrategy

```ts theme={null}
type SolveStrategy =
  | {
  type: "optimize";
}
  | {
  type: "feasibility-only";
};
```

Strategy for [Schedule.solve](./Schedule#solve) and [Schedule.compile](./Schedule#compile).

## Union Members

### Type Literal

```ts theme={null}
{
  type: "optimize";
}
```

| Name   | Type         | Description                               |
| ------ | ------------ | ----------------------------------------- |
| `type` | `"optimize"` | Optimize objectives and soft constraints. |

### Type Literal

```ts theme={null}
{
  type: "feasibility-only";
}
```

| Name   | Type                 | Description                                                                      |
| ------ | -------------------- | -------------------------------------------------------------------------------- |
| `type` | `"feasibility-only"` | Find a hard-feasible solution without optimizing objectives or soft constraints. |

`{ type: "optimize" }` optimizes objectives and soft constraints.
`{ type: "feasibility-only" }` asks the solver for a hard-feasible solution
only, ignoring objectives and soft-constraint penalties. Feasibility-only
results do not guarantee cost, objective optimality, or soft-constraint
explanation results.
