How do I use SatelliteScenario Groundstation objects inside of a Parallel Computing Toolbox parfor loop

2 ビュー (過去 30 日間)
I would like to compute access for a groundstation with multiple constellations using the Parallel Computing Toolbox. However, this simple example is not working. What am I doing wrong?
parfor idx = 1:2
startTime = datetime("today");
stopTime = startTime + days(1);
sampleTime = 60;
aScenario = satelliteScenario(startTime, stopTime, sampleTime);
aGroundstation = aScenario.groundStation(0, 0);
end
Here's the error I am getting:
>> SimpleTest
Error using matlabshared.satellitescenario.GroundStation
Invalid default value for property 'ColorConverter' in class 'matlabshared.satellitescenario.ScenarioGraphic':
Error defining property 'ConvertedColor' of class 'matlabshared.satellitescenario.internal.ColorConverter'. Class named
'matlab.graphics.datatype.RGBColor' is undefined or does not support property validation.
Error in satelliteScenario/groundStation
Error in SimpleTest (line 1)
parfor idx = 1:2
Thank you!
  1 件のコメント
KRALFALLAH Mansour
KRALFALLAH Mansour 2022 年 4 月 24 日
Hello everyone,
I use Matlab 2020a, pls could you tell me in which version can I find the aerospace blocksets toolbox which countains the Spacecraft and orbit propagator blocksets.
Thank you in advance.

サインインしてコメントする。

採用された回答

Edric Ellis
Edric Ellis 2021 年 10 月 15 日
Thanks for reporting this problem. You can work around this for now like so:
fetchOutputs(parfevalOnAll(@() delete(figure), 0));
  3 件のコメント
Edric Ellis
Edric Ellis 2021 年 10 月 15 日
Just run that line after you open your pool, and before you run the parfor loop, like this:
% Explicitly create the parallel pool, if necessary
if isempty(gcp('nocreate'))
parpool();
% Work around problems by creating and immediately deleting a figure
fetchOutputs(parfevalOnAll(@() delete(figure), 0));
end
% Run stuff in parfor
parfor idx = 1:2
startTime = datetime("today");
stopTime = startTime + days(1);
sampleTime = 60;
aScenario = satelliteScenario(startTime, stopTime, sampleTime);
aGroundstation = aScenario.groundStation(0, 0);
end

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Aerospace Blockset についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by