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

Long time horizon #1

Open
Abdu-Hekal opened this issue Jun 8, 2023 · 2 comments
Open

Long time horizon #1

Abdu-Hekal opened this issue Jun 8, 2023 · 2 comments

Comments

@Abdu-Hekal
Copy link

I have attempted to use STLCCP for a long time horizon, i.e. thousands of steps. I would like to reduce the computation time for such a horizon, what can be done?

@yotakayama
Copy link
Owner

Hi @Abdu-Hekal

When STLCCP's computational time is slow, there are two possibilities: 1) each iteration is time-consuming, or 2) each iteration is fast but does not converge after multiple iterations.

To reduce computational time in the first case, you can change the solver for the subproblem in solver.py (line 91). Options like OSQP, GUROBI, or ECOS, ... can be considered. Note that if you're dealing with the linear case, solvers only solve the QP subproblem at each iteration.

Additionally, you can modify solver options by adding **solopts to the argument at line 91 in solver.py. For example, when using GUROBI, you can set solopts as 'solopts={'Method':2,'BarConvTol':1e-3,'BarQCPConvTol':1e-3}' to describe the barrier method for solving QP.

In the second case, you can change the variables related to weight $\tau, \mu$, and $\tau_{\max}$ to reduce the number of iterations. If this doesn't improve the situation, you can relax the terminal conditions by changing $s_{terminal}$ and $ep$ to observe the impact.

@yotakayama
Copy link
Owner

Additionally, It is worth mentioning that reducing redundancy in the implementation can make the framework faster. Currently, CVXPY performs a "reduction chain" operation at each iteration to make the problem "canonical." However, since our subproblems have the same form with parameterization, this operation can be performed once. Unfortunately, the current CVXPY platform doesn't support the required DPP ruleset for our problem setting, i.e., CCP parameterization is not DPP compliant. Eliminating this redundancy could potentially make STLCCP faster.

I welcome suggestions and discussions from others regarding this concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants