# Crate chronologic

source ·## Expand description

## Time constraint reasoning

This crate is dedicated to reasoning about time. It deals with time constraints, propagate them and maintain an agenda of all the possible dates consistent with the user constraints.

### Time structures

Several time structures (interval, sets) are provided to make easier time manipulation.

This time data defines several operators for union, intersection, translation in two ways:

- by using standard operators (
`&`

for intersection,`|`

for unsion,`+/-`

for translation) - by using iterator traits (see module
`iter`

) which allows time manipulation with saving memory allocation (no intermediate structures needed)

### Time constraint management

The module `graph`

deals with time constraints graph and mainly provides two structures:

`graph::TimeGraph`

: the time constraints graph, a time constraint is defined as an interval of duration between two instants, a graph could be considered as a collection of time constraints`graph::TimeScheduler`

: the scheduler maintains a set of slots (one for each instant) according to its time graph

Any modification of constraints are automatically propagated (see `graph::TimeGraph`

for more
informations about the propagation algorithm).

## Modules

- Time constraints management
- Iterators over time windows for efficient algorithms

## Structs

- A generic interval defined by its two time bounds
- A union of time intervals
- A single time value (duration)
- A UTC timestamp (date + time)

## Traits

- The envelope (the bounds) of a time window
- A trait for time containing
- A marker of convex (interval) time set
- A trait for time overlapping
- A unique point of a time window
- An arbitrary set of timepoints
- A trait for marking timestamped data

## Type Aliases

- An alias for
`TimeInterval<Timestamp>`

- A union of
`TimeSlot`

(aliased to`TimeSet<Timestamp>`

) - An alias for
`TimeInterval<TimeValue>`

- A union of
`TimeSpan`

(aliased to`TimeSet<TimeValue>`

)