Can MPCPy support external trained model

55 views
Skip to first unread message

Patrick Duhirwe Nzivugira

unread,
Apr 8, 2021, 4:24:46 AM4/8/21
to MPCPy
Hello,

I have DNN models trained and saved using Keras. Can I use those models to represent my system behavior?
If possible, can you provide guidelines for it?

Thank you.

David Blum

unread,
Apr 12, 2021, 10:31:20 AM4/12/21
to MPCPy
Hello, 

Thank you for your question.  I'd like to understand it a little more.  Are you looking to use the DNN models to solve the optimal control problem? 

Currently, DNN models are not supported.  One way to utilize such a model would be to implement a new model class that extends mpcpy.models._Model and uses MPCPy exodata, units, and utility functionality.  The class mpcpy.models.Modelica could be used as a template.  If wanting to use this model in an optimal control problem, new optimization package type and problem type classes could be created that extend mpcpy.optimization._Package and mpcpy.optimization._Problem to utilize the new DNN model type, using for instance the classes mpcpy.optimization.JModelica and mpcpy.optimization.EnergyMin as templates for package type and problem type respectively.

Best Regards, 

Dave
Reply all
Reply to author
Forward
0 new messages