MATLAB AMPL API - java ClassCastException Error (D cannot be cast to [Ljava.lang.Object;)

1 回表示 (過去 30 日間)
Nick Varnas
Nick Varnas 2022 年 3 月 22 日
回答済み: Dinesh 2024 年 2 月 1 日
I am using MATLAB AMPL API and i am trying to create a dataframe to assign values to AMPL.
Here is how i use dataframe and the error that i get
where
  • U is a 48x4 double,
  • T is a 48x1 double
  • A is a 4x1 double
The issue is, that when the same code is run in another computer with R2015 version, no errors are produced. I use R2020b version. I am not sure if this has to do anything with the issue but just mentioning it. Anyone can shed a light here?

回答 (1 件)

Dinesh
Dinesh 2024 年 2 月 1 日
Hi Nick,
The error you're encountering with the MATLAB AMPL API is most likely due to changes in the API itself or differences in how MATLAB versions handle Java objects and interactions with external libraries. To resolve this, ensure that you're using the correct version of the AMPL API compatible with MATLAB R2020b and check the AMPL API documentation for any updates or changes in the syntax for creating dataframes between versions.

カテゴリ

Help Center および File ExchangeJava Client Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by