AssignTotal#
The cost and the number of resources in use for the reference state of a Project::suggest_assignments call. You read it from SuggestResult::baseline. Compare it with SuggestResult::proposed to see what the proposal gains.
For which state is the reference, see SuggestOptions::clear_first.
Declaration#
With the serde feature, AssignTotal also implements Serialize and Deserialize, with camelCase field names.
Fields#
| Field | Type | Description |
|---|---|---|
cost |
f64 |
Cost of the reference state on the scoring stage, which SuggestOptions::level selects. With level, the reference state is leveled as is before it's scored. |
resources |
u32 |
Resources of the counted pool that have at least one active assignment in the reference state. The counted pool is every resource listed in some slot's allowed, plus the current resources of filled slots. |
For how the state cost and the new-resource penalty are computed, see Suggesting assignments.
Example#
use SuggestResult;
// Compare the reference state with the proposal.
Related#
SuggestResult- carries this value in itsbaselinefieldSuggestProposal- the matching score of the final state to compare againstStepCost- the first step starts from this cost- Suggesting assignments - shows how to compare the reference state with the proposal