cottax.relational.consumers.visualization module¶
Registers how a relational condition is drawn (NodeDrawing), its categories (KINDS), and how the names its vocabulary mints are written (MintDrawing).
- KINDS = (Kind(name='optimise', legend='optimise', title='one objective, minimised subject to the relations', slotted=True, colour=('#dbcfec', '#77609a')), Kind(name='root-find', legend='root-find (r = 0)', title='every relation vanishes, one per unknown: r(u) = 0', slotted=False, colour=('#ead3a0', '#96771f')), Kind(name='fixed-point', legend='fixed-point (u = g(u))', title='every relation is the next value of its unknown: u = g(u)', slotted=False, colour=('#c4dcb2', '#4f7a37')), Kind(name='feasibility', legend='feasibility (h = 0, g <= 0)', title='no objective: any point satisfying the relations will do', slotted=True, colour=('#dcdcdc', '#5e5e5e')))¶
Every category a relational condition draws under.
- class CondDrawing[source]¶
Bases:
MintDrawingThe condition on a place: a residual, R(u).
- plain: AbstractVar[Notation] = Around()¶
- latex: AbstractVar[Notation] = Around()¶
- SLOT_TEXT = {'0 ≤': Text(plain='0 ≤', latex='0 \\leq'), '= 0': Text(plain='= 0', latex='= 0'), '≤ 0': Text(plain='≤ 0', latex='\\leq 0'), <class 'cottax.relational.relational_condition.Max'>: Text(plain='max', latex='\\max'), <class 'cottax.relational.relational_condition.Min'>: Text(plain='min', latex='\\min')}¶
an objective’s by its sense.
- Type:
What labels a slot of each kind, plain and in LaTeX
- kind_of(node: RelationalCondition)[source]¶
The category node draws under: a problem’s by its shape, a requirement’s the one it would take with its left sides as unknowns; None for none (two objectives).
- Return type:
Kind|None
- slots_of(node: RelationalCondition)[source]¶
A condition node’s reads by what each one says, in the order its driver is handed them: the objectives, then the relations against zero – vanishing, bounded above, bounded below – then each relation between two places, labelled by the side the node owns (= u, ≤ u, u ≤) or, owning neither or both, as written.
- Return type:
tuple[Slot,...]
- class RelationalDrawing[source]¶
Bases:
NodeDrawingIts category (kind_of) and its slots (slots_of).
- drawn(node: RelationalCondition)[source]¶
Its category and slots.
- Return type: