Skip to main content

Module solving

Module solving 

Source
Expand description

Solving a part’s state as an editor does, the same for every program: settling it so every constraint holds (solve()), dragging a placed part (Pull::Point), setting a value a step offers to set (set), and asking which constraints hold (check), how free the placed parts are (freedom) and which constraints conflict (conflicting).

Nothing here knows what the constraints are. What a solve may move and where it starts from, the steps say in the part itself: each placed part moves by its pose state (crate::placed), held where it is as far as the constraints allow; a step declares any other value a solve moves, or holds one fixed, as an Unknown; and the values a user sets directly — a joint’s coordinates — as Settings, for an editor to list. geop_lib_constraints::solve solves, encloses and measures, running the program (Rerun) where it starts and where it ends, and making only the constraints it asks again at every state it tries.

Structs§

Freedom
How free the placed parts are (see freedom).
Report
How a solve went: whether every constraint holds, and how hard it was to get there.
Setting
A value of the state a user sets directly — a joint’s coordinate — and the limits it is kept within.
SettingState
A value a user sets, as an editor shows it: where the state has it.
Settings
Values of the state a user sets directly, as a step declares them for an editor to list (see settings): a target of the part, named after what they are of — the coordinates of a joint, by the joint’s name.
SettingsState
Settings as an editor lists them.
Unknown
A value of the state as a step declares it for solving: the state it is, and how a solve may move it — or that it holds it fixed. A solve starts it from seed where the state has none of it, and — given a constraint unless — where that constraint does not hold either: a joint’s coordinate, measured from where its parts are unless the joint holds.

Enums§

Measure
What a value a user sets measures.

Functions§

check
Which constraints hold where the part reader reads has its state.
conflicting
A smallest set of the constraints of the program rerun runs, last run with state, that cannot all hold together, by name — none where they all hold after a solve (see solve::conflicting).
declare_unknowns
Declares the unknowns generator makes of args in the step being run, of the part’s Unknowns: of several declarations of one state, one that holds it fixed wins, and otherwise the first made. A plain function, like a make (Make).
freedom
How free every placed part of the program rerun runs is where state has it, the values held held where they are — a joint’s coordinates, to ask what moves without its joints: to first order, as the constraints leave it, decided over the box an enclosure of the solution proves (see solve::freedom). The program was last run with state.
largest
The size of the largest of the placed parts drawn as drawn, at least one.
scale_of
The size of the part reader reads: of the largest part placed in it, at least one. What a constraint holds to geop_core_math::solvers::system::RELATIVE_TOLERANCE of.
set
Solves the state with the values set held there — a joint’s coordinates typed in: the parts move to them as a mechanism’s would — every other value a user sets keeping where it is, if the constraints let it, as along a serial chain; where they do not, round a closed loop, the others give way.
settings
Every value a user sets in the part reader reads — and in the parts placed flexibly in it — grouped as the steps declared them, in the order they made them, each where the state has it.
settings_of
The target declaring the settings of of.
solve
Where the state has to be for every constraint of the program rerun runs to hold, as little away from where state has it as the constraints allow, after pulls pulled it — of the placed parts, only the one the step only placed moving, if given — every value within its limits and those pulls set held there: the values of the state that changed — the poses of the parts it moved, each relative to the part it is placed in, and the unknowns the steps declared — and how the solve went.
solved_states
The values of the state a solve sets: the unknowns the steps declare — the poses of the placed parts, and of those in the parts placed in them — what a program’s file keeps of its state.

Type Aliases§

D
Numbers that carry their derivatives by one pose’s step: six, as many as a pose’s variables.