« Basic Principle » : différence entre les versions

De Psimu
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 5 : Ligne 5 :
So, to use this <font color=#FF8C00>Java</font> interface, the developer will have to:
So, to use this <font color=#FF8C00>Java</font> interface, the developer will have to:
# Initialize [https://www.connectbycnes.fr/en/patriusdataset Patrius Dataset].
# Initialize [https://www.connectbycnes.fr/en/patriusdataset Patrius Dataset].
# Initialize the type of [https://www.connectbycnes.fr/en/patrius PATRIUS] MODELS (since V11.8)
# Create a <font color=#556B2F>'''PSIMU'''</font> object using its available constructor.
# Create a <font color=#556B2F>'''PSIMU'''</font> object using its available constructor.
# Calling for the propagation in master or slave mode.
# Calling for the propagation in master or slave mode.
Ligne 27 : Ligne 28 :
final String addDataName = AppPSimuConfigurationProperties.getInstance().getAdditionalPatriusFolder();
final String addDataName = AppPSimuConfigurationProperties.getInstance().getAdditionalPatriusFolder();
AppPSimuConfigurationProperties.iniPatriusDataset(addDataName);
AppPSimuConfigurationProperties.iniPatriusDataset(addDataName);
</syntaxhighlight>
For the second point, insert theis line of code:
<syntaxhighlight lang="java">
// Set NEW_MODELS for PATRIUS configuration
PatriusConfiguration.setPatriusCompatibilityMode(PatriusVersionCompatibility.NEW_MODELS);
</syntaxhighlight>
</syntaxhighlight>

Version du 10 octobre 2025 à 11:52

PSIMU proposed a Java interface

Most of the objects to pass as input data are PATRIUS ones. Some of them are specific to PSIMU or GENOPUS but, in that case, most of the time, it is due to the fact that these objects are not yet included in the used PATRIUS version: their name will then start by “Custom…”.

So, to use this Java interface, the developer will have to:

  1. Initialize Patrius Dataset.
  2. Initialize the type of PATRIUS MODELS (since V11.8)
  3. Create a PSIMU object using its available constructor.
  4. Calling for the propagation in master or slave mode.
  5. Calling for “getter” methods to extract after the propagation all useful information.


For the first point, there are two possibilities:


// Patrius Dataset initialization
PatriusDataset.addResourcesFromPatriusDataset() ;


  • Or calling a specific PSIMU method allowing to manage both Patrius Dataset included Inside the PSIMU jar and local data (see here):
// Patrius data set initialization
final String addDataName = AppPSimuConfigurationProperties.getInstance().getAdditionalPatriusFolder();
AppPSimuConfigurationProperties.iniPatriusDataset(addDataName);

For the second point, insert theis line of code:

// Set NEW_MODELS for PATRIUS configuration
PatriusConfiguration.setPatriusCompatibilityMode(PatriusVersionCompatibility.NEW_MODELS);