gradInfoFunctions.h 1.4 KB

12345678910111213141516171819202122
  1. #pragma once
  2. #include "cmscp.h"
  3. #include "cmscp_math.h"
  4. #include "cmscp_sparseInfo.h"
  5. #include "cmscp_consTypeInfo.h"
  6. typedef struct cmscp_derInfo {
  7. double* ref; // 函数在给定点处的值
  8. double* der; // 函数在给定点处的导数矩阵
  9. }cmscp_derInfo;
  10. void gradInfoSparseObjEvent(cmscp_derInfo** objDerInfo0, cmscp_derInfo** eventDerInfo0, cmscp_sparseInfo* sparseInfo, cmscp_trajInfo** refTraj, cmscp_setup* setup);
  11. void gradInfoSparseEndp(cmscp_derInfo** gradInfo, cmscp_sparseInfo* sparseInfo, cmscp_trajInfo** refTraj, cmscp_setup* setup);
  12. void copyObjEventInput(cmscp_objEventInput* x, cmscp_objEventInput* y, cmscp_setup* setup);
  13. void copyEndpInput(cmscp_endpInput* x, cmscp_endpInput* y, int iphase, cmscp_setup* setup);
  14. void gradInfoSparseCont(cmscp_derInfo** dynGradInfo0, cmscp_derInfo** pathGradInfo0, double* refState, double* refControl, double* refParameter,
  15. int* stateNzIdxRow, int* controlNzIdxRow, int* parameterNzIdxRow, int* stateNzPtrCol, int* controlNzPtrCol, int* parameterNzPtrCol,
  16. int numState, int numControl, int numParameter, int numPathOutput, int iphase, cmscp_setup* setup);
  17. void copyContInput(cmscp_contInput* x, cmscp_contInput* y, int numState, int numControl, int numParameter, cmscp_setup* setup);
  18. void gradInfoSparseLink(cmscp_derInfo** gradInfo, cmscp_sparseInfo* sparseInfo, cmscp_trajInfo** refTraj, cmscp_setup* setup);
  19. void copyLinkInput(cmscp_linkInput* x, cmscp_linkInput* y, int iphase, cmscp_setup* setup);