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

Some errors #4

Open
chengji253 opened this issue Apr 26, 2021 · 4 comments
Open

Some errors #4

chengji253 opened this issue Apr 26, 2021 · 4 comments

Comments

@chengji253
Copy link

chengji253 commented Apr 26, 2021

Hello!
I am trying to run your code in file ‘’dmpc‘’.
Firstly, I run the "dmpc.m", here comes the error :

The number of input parameters is not enough.

Error randomTest (line 15)
diff = E1*(po - candidate);

Error dmpc (line 26)
[po,pf] = randomTest(N,pmin,pmax,rmin);

After that I tried to fix it according to the file "dmpc_hard". I add parameters ''E1'' and ''order'' as you set in
''function [po,pf] = randomTest(N,pmin,pmax,rmin,E1,order)''
But there comes some other errors like:

------dpmc_paper.m--------

Wrong use of initDMPC
Too many input parameters.

Error dmpc_paper (line 84)
[pi,vi,ai] = initDMPC(poi,pfi,h,k_hor,K,epsilon);

----dmpc_soft_bound2.m-------

The index at position 2 is outside the array boundaries (cannot exceed 1).

Error ReachedGoal (line 4)
differ = squeeze(p(:,length_t,:)) - squeeze(pf);

Error dmpc_soft_bound2 (line 156)
reached_goal = ReachedGoal(pk,pf,k,error_tol,N);

I'm wondering if there are some functions missing. It can't be the problem of MATLAB version.
I would appreciate it if you could take some of your busy time to reply to me. Thank you.

@carlosluis
Copy link
Owner

Hello,

Could you please go through all the comments on #3 to make sure the problem is not related to that? I feel it could be connected.

Sadly, I don't have a computer with matlab installed to test this anymore, so the support I can provide on this repo is quite limited. The best I can suggest is use the break point functionality to understand why are you getting those errors on dmpc_bound2.m (this is the main entry point of the code, so focus on that file for now, other files may be old versions of the algorithm)

@chengji253
Copy link
Author

It doesn't matter, I'm looking at your paper and code carefully now. I'm sure I'll work out the bugs and possibly push you a bug-free version afterwards.

@Faust-Wang
Copy link

Faust-Wang commented Nov 23, 2021

I have the same problem as @chengji253 , in the DMPC file all scripts except xx will not run. I wonder if you solved these errors?
It is hoped that the @carlosluis will add a documentation to the project that describes the role of each folder and the files within each folder.
Thank you very much for the code @carlosluis

@chengji253
Copy link
Author

@Faust-Wang I tried but not solved yet. - -

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

3 participants