Is it possible to make MATLAB Coder generate C++ code with tunable parameters?

조회 수: 8 (최근 30일)
Hello,
We are using the MATLAB Coder to generate C++ code of the TOMHT algorithm from the Sensor Fusion and Tracking Toolbox. However, most parameters are labeled as non-tunable in MATLAB, and because of this, these parameters are lost in the C++ code after the code generation and are hard-coded into values.
We would like to be able to use different parameter configurations for different projects within our company. It would be very cumbersome to have to do a new code generation for each different parameter configuration. Is there any way we can still change these parameters outside of Matlab? We do not mean to change the parameters while the tracker is running, but we do want to be able to configure different parameter settings, based on for instance the available computing power or the amount of radars in the project.
Kind Regards,
Joost

채택된 답변

Darshan Ramakant Bhat
Darshan Ramakant Bhat 2021년 10월 11일
Unfortunately I dont think it is possible right now with MATLAB Coder. Non-tunable properties are treated as compile time constants in MATLAB Coder and internal optimizations can constand fold this value.
I have notified this as a request to the development team.
  댓글 수: 1
Elad Kivelevitch
Elad Kivelevitch 2024년 4월 22일 14:29
We have made some of the properties tunable starting release 2024a.
Please see my answers below.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Elad Kivelevitch
Elad Kivelevitch 2021년 10월 11일
Joost,
If you could please list which parameters you would like to make tunable, we can consider whether it would be possible to make them tunable given how the tracker is set up.
Thanks,
Elad
  댓글 수: 5
Joost
Joost 2021년 10월 26일
You are most welcome, your answers help us as well.
Elad Kivelevitch
Elad Kivelevitch 2024년 4월 22일 14:28
Joost,
As of release 2024a, we have added tunability to some of the tracker properties.
trackerGNN properties:
  • AssignmentThreshold
  • ConfirmationThreshold
  • DeletionThreshold
  • DetectionProbability
  • FalseAlarmRate
  • Volume
  • Beta
  • InitialClassProbabilities
trackerJPDA properties:
  • AssignmentThreshold
  • ConfirmationThreshold
  • DeletionThreshold
  • DetectionProbability
  • InitializationThreshold
  • ClutterDensity
  • NewTargetDensity
  • DeathRate
  • InitialClassProbabilities
  • HitMissThreshold
trackerTOMHT properties:
  • AssignmentThreshold
  • ConfirmationThreshold
  • DeletionThreshold
  • DetectionProbability
  • FalseAlarmRate
  • Volume
  • Beta
  • MinBranchProbability
We also made it easier to generate code using the generateCode method.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by