fmincon, mex file creation error

2 次查看(过去 30 天)
Chris Knight
Chris Knight 2013-10-8
编辑: Matt J 2017-10-12
I am running a simulink model using fmincon function to optimise on of the transfer functions within it. at random numbers of iterations the following error occurs:
Error using RapidConObj (line 17)
Problem creating Accelerator MEX file for model 'FullSystem_V32'.
To see the build output, use
set_param('FullSystem_V32','AccelVerboseBuild','on')
Error in fmincon (line 635)
initVals.f = feval(funfcn{3},X,varargin{:});
Error in RapidM (line 31)
x=fmincon('RapidConObj',x0,[],[],[],[],l,[],[],options,ACCurrent);
Caused by:
Error using RapidConObj (line 17)
C:\Users\wr023543\Dropbox\EngD\RTG
Project\Modelling\RapidParam\slprj\accel\FullSystem_V32\tlc could not be
removed.
Failure in initial user-supplied objective function evaluation. FMINCON
cannot continue.
does anyone have a clue why it would be fine 5 times and not the 6th or 19 but not the 20th?
cheers
  3 个评论
Chris Knight
Chris Knight 2013-10-9
The only change to the model between runs will be the parameter value updates the fmincon function generates using the bfgs protocol.
this is what i got when i set the AccelVerboseBuild to 'on'
SimPowerSystems processing circuit #1 of FullSystem_V32 ... Computing state-space representation of linear electrical circuit ... (0 states ; 5 inputs ; 8 outputs)Computing discrete-time domain model of linear part of circuit (Ts=2e-06) ... Computing steady-state values of currents and voltages ... Building the Simulink model inside "powergui" block ... Ready. ### Building the Accelerator target for model: FullSystem_V32 ### Generating code into build folder: C:\Users\wr023543\Dropbox\EngD\RTG Project\Modelling\RapidParam\slprj\accel\FullSystem_V32 N_PWORKS = 18 numParams = 7 nStates = 0 nInputs = 5 nOutputs = 8 nSwitch = 0 Ts = 2e-06 NPARAMS_TOTAL = 11 ### Invoking Target Language Compiler on FullSystem_V32.rtw ### Using System Target File: C:\Program Files\MATLAB\R2013a\rtw\c\accel\accel.tlc ### Loading TLC function libraries .... ### Initial pass through model to cache user defined code .... ### Caching model source code ..................................................... ### Writing header file FullSystem_V32_acc.h ### Writing header file FullSystem_V32_acc_types.h ### Writing header file FullSystem_V32_acc_private.h . ### Writing header file rtwtypes.h ### Writing header file rt_look1d.h ### Writing source file rt_look1d.c . ### Writing header file rt_look.h ### Writing source file rt_look.c ### Writing source file FullSystem_V32_acc.c . ### Writing source file FullSystem_V32_acc_data.c ### Writing header file rt_nonfinite.h ### Writing source file rt_nonfinite.c . ### Writing header file rtGetInf.h ### Writing source file rtGetInf.c ### Writing header file rtGetNaN.h . ### Writing source file rtGetNaN.c ### TLC code generation complete. ### Build procedure for model: 'FullSystem_V32' aborted due to an error.
Chris Knight
Chris Knight 2013-10-14
Does anyone know why matlab would have trouble creating the MEX file?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Design Optimization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by