Skip to main content

Module constraint

Module constraint 

Source
Expand description

What steps require of the state: Constraints, defined by name, and all of a part’s together (Constraints).

A step defines its constraints with define_constraints in a target of its own, made by its make and made again only when what that read changes. A solve gathers them all once (Constraints::of), and at every state it tries makes only those it asks again, each by its own step’s generator, of the part as built and the state tried (Remade): no program is run for it, and no constraint is copied but those asked. No step builds on the constraints of the steps before it, so a constraint that moves makes no other step’s again — which a target revised by every step would, at a cost growing with the square of the steps.

Structs§

Constraint
What an operation requires of the state: residuals that are zero — or, for a limit, at most zero — where it holds, each a length, and how they change as the values of the state they depend on move.
Constraints
Every constraint the steps so far defined, by name, each with the step that defined it: gathered from their targets (Constraints::of).
DefinedAt
Where a constraint is defined: behind the instances path, outermost first, by the step step of the part placed there, as name — what makes it alone again (see Remade).
Remade
The constraints a solve made again at the states it tried (Remade::constraints), by step, each with the state it read: a step is made again only where a state it read changed. A solve asks a pendant’s constraints where it was carried, and again where its own solve starts, from there; and where it ends, as its last step left it.

Enums§

Bound
What a constraint asks of its residuals.

Functions§

define_constraints
Defines the constraints generator makes of args in the step being run, one of the part’s Constraints. Each is checked: its derivatives are by states its generator read, a row per residual, as many numbers as a step of the state takes. A plain function, like a make (Make).
made_again
How many times this thread has made a step’s constraints again at a state a solve tried (Remade::constraints), ever: what a solve’s work grows with, now that it runs no program for a state it tries, so a test can bound it by a count rather than time it.

Type Aliases§

ConstraintGenerator
What makes a step’s constraints: its constraints, by name.