Skip to content

Conversation

@Fabian-Geyer
Copy link
Contributor

Extend the info struct available for different solvers. The information is currently implemented in recursive fashion:

E.g. if S is a sossol solver, we can access information about problem sizes and sparsity as follows:

S.info % -> sossol information: currently gram matrix information
S.info.sdp % -> high level interface information (n_decVar, Kc, Kx)
S.info.sdp.conic % -> low level interface (size and nnz of H, a, g and n_decVar)
S.info.sdp.conic.solver % -> solver specific information (e.g. regarding matrix size and sparsity)

Currently only the following solvers are implemented:

  • sossol
  • sdpsol
  • conic
  • solver specific (mosek, sedumi and clarabel - info structs not finished yet)

Note: info only holds information that is available during the buildproblem stage. It is not supposed to hold information regarding solver status (S.stats should be used for that)

For this reason, at the solver level, the properties in conic are split into two properties:

  • ConicSolver.solver_info;
  • ConicSolver.status

Finally, as mentioned above, the info struct now also hold information regarding the gram matrix.

Status: WIP

@Fabian-Geyer Fabian-Geyer linked an issue Nov 19, 2025 that may be closed by this pull request
@Fabian-Geyer Fabian-Geyer self-assigned this Nov 19, 2025
@Fabian-Geyer Fabian-Geyer linked an issue Nov 19, 2025 that may be closed by this pull request
@Fabian-Geyer Fabian-Geyer assigned tcunis and unassigned Fabian-Geyer Nov 19, 2025
obj.info.conic.size_A = size(obj.args_in.a);
obj.info.conic.n_decVar = length(obj.args_in.x0);
% fill info struct
obj.solver_info.name = 'mosek';
Copy link
Contributor

@tcunis tcunis Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove name field -- see comment above.

properties (Access=private)
solver;

sdp_info;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename to sdpsol_info

);

% number of decision variables
obj.sdp_info.n_decVar = numel(x);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename to numel_x. We should also add a field numel_g at least.

% function to retrieve Gram solution with dimensions
obj.sdp2gram = casadi.Function('G', ...
{sdp.x}, {Qvar_G Ksdp_x_s Qcon_G Ksdp_g_s}, ...
{'x_sol'}, {'Qx', 'Qx_dim' 'Qc', 'Qc_dim'});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove for now -- we'll get back to this in #95

@tcunis
Copy link
Contributor

tcunis commented Jan 17, 2026

Hello @Fabian-Geyer, thank you for your changes. Could you please let me know about the status of this PR? If I should provide another review, please publish the PR again (it's currently in draft).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Augment solver statistics and outputs

3 participants