Basis#
The size of the time buckets that resource load is measured in. Set it in LevelingOptions.Basis and ProfileQuery.Basis; LoadProfile.Basis reports the basis a profile used.
Declaration#
namespace Plen;
public enum Basis
{
Hour,
Day,
}
Variants#
| Variant | Description |
|---|---|
Hour |
One-hour buckets, each starting on the hour. |
Day |
One-day buckets, each starting at midnight. |
When an options property of type Basis? is null, the basis comes from SchedulingConfig.DurationUnit: Day for TimeUnit.Day, Hour for TimeUnit.Hour and TimeUnit.Minute.
Basis is a plain enum with no parse or spelling helpers. The Plen.Wire package handles the JSON spellings "hour" and "day".
Example#
using Plen;
var from = Moment.FromYmdHm(2026, 4, 6, 0, 0) ?? throw new InvalidOperationException("invalid date");
var to = Moment.FromYmdHm(2026, 4, 7, 0, 0) ?? throw new InvalidOperationException("invalid date");
// Level on daily buckets, whatever the project's duration unit.
var leveling = new LevelingOptions { Basis = Basis.Day };
// Read one day of load in hourly buckets.
var query = new ProfileQuery(from, to) { Basis = Basis.Hour };
Related#
LevelingOptions- sets the leveling basisProfileQuery- sets the load profile basisLoadProfile- reports the basis used- Resource load - measuring load in buckets
- Leveling resources - removing overallocation