- [_[1], _[2], _[3]] ∈ Main.FakeDualCone(3)</code></pre><h2 id="Advanced:-add-support-for-new-attributes"><a class="docs-heading-anchor" href="#Advanced:-add-support-for-new-attributes">Advanced: add support for new attributes</a><a id="Advanced:-add-support-for-new-attributes-1"></a><a class="docs-heading-anchor-permalink" href="#Advanced:-add-support-for-new-attributes" title="Permalink"></a></h2><p>You might feel that the Dualization layer is getting in your way to get information from an inner layer. If you ever see yourself typing <code>model.dual_problem.dual_model</code>, it is a sign that you need to define new attributes, especially if these information are related to specific variables and constraints. The mapping between variables and constraints before and after dualization is quite complex. It depends on whether constraints corresponded to variables constrained at creation or not and whether the corresponding set is an equality (i.e., <code>MOI.EqualTo</code> or <code>MOI.Zeros</code>).</p><p>When define MOI attributes to communicate information in MOI, layers like Dualization can transfer these attributes to the right variables or constraints before or after their transformation. So the best practice is to define such variable or constraint attributes and attempt to <code>MOI.get</code> or <code>MOI.set</code> them. They is an API that you need to define for these attributes that contains the functions are <code>dual_attribute</code>, <code>dual_attribute_value</code>, <code>constrained_variable_dual_attribute</code>, <code>fixed_variable_value</code>, <code>fixed_constrained_variables_get</code>, <code>equality_constraint_get</code>. That's a lot of functions, some of which may never be useful for your specific attributes (e.g., if it is never used on an equality constraint) so no need to implement the whole API for all attributes.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../mathematical_background/">Mathematical background »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Wednesday 22 April 2026 06:48">Wednesday 22 April 2026</span>. Using Julia version 1.10.11.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments