Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of known bugs v4.03 #10

Open
djagt opened this issue Dec 3, 2022 · 22 comments
Open

List of known bugs v4.03 #10

djagt opened this issue Dec 3, 2022 · 22 comments
Labels
bug Something isn't working v4.03 Concerning version 4.03

Comments

@djagt
Copy link
Collaborator

djagt commented Dec 3, 2022

No description provided.

@djagt djagt added bug Something isn't working v4.03 Concerning version 4.03 labels Dec 3, 2022
@djagt
Copy link
Collaborator Author

djagt commented Dec 3, 2022

multipoly/@polynomial/horzcat:
multipoly/@polynomial/vertcat:
Previously, when horizontally concatenating a nx0 'polynomial' array with a 0x0 array, the returned output was a 0x0 array. This has been adjusted to return a nx0 array instead. Similarly for vertical concatenation.

@djagt
Copy link
Collaborator Author

djagt commented Dec 3, 2022

sosdecvar:
Previously, when using "sosdecvar(prog,c)" for a vector-valued 'syms' object "c", the whole vector would be added to "prog.decvartable" as a single (scalar-valued) decision variable, producing errors when e.g. adding an objective function. This has been resolved, now adding the decision variables to "prog.decvartable" in much the same way that vector-valued independent variables are added to "prog.vartable" in "sosprogram.m".

@djagt
Copy link
Collaborator Author

djagt commented Dec 16, 2022

sossolve:
Using the 'psimplify' option (psimplify=1), in some cases, certain decision variables are found not to contribute at all to the optimization program before calling the solver. This is indicated by setting K.s(i)=0 for this ith matrix-valued variable, so that the ith matrix-valued variable is interpreted to be of dimension 0x0. However, Mosek does not accept 0x0 dimensional variables, producing an error. This issue has been resolved, setting K.s(K.s==0)=[], thus removing the 0x0-dimensional variables from the SDP structure altogether. In the conversion back to SOSP solutions, this is interpreted the same way as keeping K.s(i)=0.

@djagt
Copy link
Collaborator Author

djagt commented Dec 18, 2022

internal/sosprogramming/getconstraint:
internal/sparsityandstructure/uniquerows_integerTable:
The function "getconstraint" has been rewritten to use the newly addded "uniquerows_integerTable", performing the same task as before. This works much faster than the previous approach, which relied on iterative use of "findcommonZ".

@djagt
Copy link
Collaborator Author

djagt commented Jan 31, 2023

sospolymatrixvar:
In the case when the optional argument matrixstr is empty, and nargin==5, the function should check whether the fifth input argument PVoption is set to pvar. However, instead of checking PVoption=='pvar', the function checked whether output=='pvar', which makes no sense. This issue has been fixed.

@djagt
Copy link
Collaborator Author

djagt commented Jan 31, 2023

sospsimplfiy:
There were a few lines in the subroutine LOCALxsignupdate(xsignOld,A,b, tol) that did not actually contribute. These have been commented out to reduce computational costs for larger-scale cases.

@djagt
Copy link
Collaborator Author

djagt commented Jan 31, 2023

sosquadvar:
The function allows monomials to be provided as cells for a multipartite structure. However, the function only checked whether the left-hand side monomials were provided as a cell (~iscell(Z1c)), not the right-hand side monomials (~iscell(Z2c)). This has been fixed.

@djagt
Copy link
Collaborator Author

djagt commented Jan 31, 2023

internal/processing/vrep2hrep:
The function calls "cdd" through the user-provided path to the "cdd" executive. However, if this path involved folder names with spaces in them, the call to "cdd" would fail. This issue has been resolved.

@djagt
Copy link
Collaborator Author

djagt commented Feb 7, 2023

sossolve:
In the dpvar implementation of the addextrasosvar subroutine of sossolve, matrix SOS constraints F(x) = kron(I,Z(x))' * Q * kron(I,Z(x)) were instead enforced as F(x) = kron(Z(x),I)' * Q * kron(Z(x),I). This issue has been resolved.

@djagt
Copy link
Collaborator Author

djagt commented Feb 7, 2023

custom/findsos:
When the proposed polynomial P contained elements on the diagonal which are constant, the function ran into an issue with an empty field Pjj.degmat. This issue has been resolved. In addition, a feature has been added to allow constant matrices (of type 'double') to be passed as well, in so far as that is useful.

@djagt
Copy link
Collaborator Author

djagt commented Feb 7, 2023

internal/DP/sospolyvar_mat:
The function requires row and column dimensions to be specified as a 1x2 array in the third argument. However, in many cases, the row and column dimensions will be equal, and users may only provide one dimension. Accordingly, the function has been updated to allow a single dimension to be specified as the third argument, setting both the row and column dimension equal to this value.

@djagt
Copy link
Collaborator Author

djagt commented Mar 20, 2023

sossolve:
If no SDP solver is specified, the function would previously try to use SeDuMi by default, even if this solver was not actually installed. The function now checks whether there exists a solver on the Matlab path, and uses this one. Also, if a solver is specified, an error is now produced if this solver cannot be found on the path.

@djagt
Copy link
Collaborator Author

djagt commented Mar 25, 2023

dpvar/@dpvar/horzcat:
dpvar/@dpvar/vertcat:
The functions previously produced an error when concatenating multiple non-dpvar objects with a dpvar object. The functions now convert all input arguments to dpvar class objects to avoid issues.

@djagt
Copy link
Collaborator Author

djagt commented Apr 6, 2023

dpvar/@dpvar/mrdivide
Using this function, right-(matrix-)division of 'dpvar' objects d with constant values is now supported, so that e.g. d/2 no longer throws an error. Note that the denominator must be of type 'double', as e.g. division of 'dpvar' by 'dpvar' or 'polynomial' class objects is still not supported.

@djagt
Copy link
Collaborator Author

djagt commented May 4, 2023

sosprogram:
Previously, the function would not set up the SOS program correctly if decision variables were specified as column vector in the 'syms' case. This has been resolved, taking the transpose of the vector of decision variables when these are specified as column vector.

@djagt
Copy link
Collaborator Author

djagt commented May 4, 2023

custom/findsos:
In testing whether the rational decomposition Zd'*Q*Zd is indeed SOS, the function checks whether the smallest eigenvalue of the matrix Q is greater then -1e-14. Previously, if this condition was not satisfied, the function would suggest that no rational SOS decomposition exists. The function has now been updated to also accept negative eigenvalues greater than -1e-10, displaying a warning if these eigenvalues are more negative than -1e-14. Also, if no rational decomposition is possible, the non-rational decomposition is now returned.

@djagt
Copy link
Collaborator Author

djagt commented Aug 12, 2023

sosquadvar:
A third output Q has been added to the function, representing the matrix of decision variables (coefficients) parameterizing the output polynomial P. The code has also been updated to allow for more general polynomial bases ZL and ZR to be passed as input (rather than just monomial bases).

@djagt
Copy link
Collaborator Author

djagt commented Aug 12, 2023

sossolve:
When using the SDP solver Mosek, the function sossolve did not properly check whether the optimization program was found to be primal or dual infeasible. This has been resolved. The function now also checks whether the problem or solution status are unknown, suggesting the solver ran into numerical issues.

@djagt
Copy link
Collaborator Author

djagt commented Jan 24, 2024

sospsimplify:
A tolerance has been re-introduced in simplifying the SOS program using sospsimplify. Coefficients below the tolerance are assumed to be zero in eliminating constraints. Without this tolerance, there are cases where a feasible SOS program may be reduced to an infeasible one. The value of the tolerance can be set using opts.simplify_tol=... in calling sossolve(prog,opts), and defaults to 1e-12 if not specified.

@djagt
Copy link
Collaborator Author

djagt commented Jan 24, 2024

multipoly/@polynomial/power:
Functionality update: the function now allows matrix-valued polynomial objects to be raised to vector-valued powers (i.e. Matrix.^Vector) and vice versa (Vector.^Matrix), so long as either the number of rows or the number of columns of the matrix and the vector match. The vector is concatenated with itself (using repmat) to match the dimensions of the matrix, at which point element-wise powers are computed in the standard manner.

@djagt
Copy link
Collaborator Author

djagt commented Jul 2, 2024

sosgetsol:
Previously, if sossolve was called for an unsolved SOS program, this produced an error, as the function attempted to extract elements from the empty field sos.solinfo.RRx. Now, a more informative error is thrown if the SOS program has not been solved yet.

@djagt
Copy link
Collaborator Author

djagt commented Sep 8, 2024

sosprogram:
When initializing an optimization program with e.g variables [x,y] and decision variables [a,b] declared as 'syms' objects, using prog=sosprogram([x,y],[a,b]), the resulting program structure had the decision variable names stored as prog.decvartable='a,b', without any opening or closing brackets. However, other functions assume the decision variable names to be stored in brackets as prog.decvartable='[a,b]', leading to issues down the line. This has been resolved, using the function converttochar rather than the function sym2chartable to convert the 'syms' objects to variable names, ensuring that these variables names are enclosed in brackets in the program structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v4.03 Concerning version 4.03
Projects
None yet
Development

No branches or pull requests

1 participant