> ## 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.

# avoidAssignment

```ts theme={null}
function avoidAssignment(opts?): RuleEntry<"assignment-priority", object & RuleOptions>;
```

Softly penalizes assigning targeted members for general preferences; use
[timeOff](timeOff) for unavailable periods.

## Parameters

<ResponseField name="opts" type="RuleOptions">
  See [RuleOptions](./RuleOptions)
</ResponseField>

## Returns

`RuleEntry`\<`"assignment-priority"`, `object` & [`RuleOptions`](./RuleOptions)>

Soft constraint. The solver adds a penalty for each assignment of the
targeted members, making them less likely to appear on the schedule.
Use `priority` to control preference strength; higher priority means a larger
penalty. This rule remains a preference. The member is still assigned when
coverage or hard constraints require it.

Opposite of [preferAssignment](preferAssignment). Both map to the same underlying
`assignment-priority` rule with different directions.
