14. Licensing

14.1. Machine Identification

The FORCESPRO licensing system works by receiving unique identifiers from the machines the software runs on and enabling the machines by activating the corresponding unique identifiers. Activation of machines can be done by receiving the unique identifiers of the machines using fingerprinting executables provided in the portal and adding those unique identifiers on the portal.

For more information on machine activation see: https://my.embotech.com/readme

14.1.1. Client Identification

Machines running FORCESPRO clients are licensed using the machine’s username and the machine’s unique identifier.

14.1.2. Solver Identification

Machines running FORCESPRO solvers are licensed using the machine’s unique identifier.

14.2. Static License

When generating a solver the license’s state on the portal (enabled machines and expiration) is saved in the solver so that the solver can run on the enabled machines.

14.2.1. System requirements for static license

The requirement for static license checking is to have correct system clock settings (accurately showing current time, compliant to UTC time).

14.2.2. Generating solvers with static license

Static license checking is automatically enabled on a generated solver.

14.2.3. Running solvers with static license

After generating a solver, you can move it to the running platform and build it with the rest of your project.

14.3. License Files

License Files are used in order to enable solvers to run in machines that were not enabled during the time of code generation or to enable solvers to run after a license renewal (that happened after solver code generation).

14.3.1. System requirements for license files

The requirements for using license files are:

  • A platform supporting I/O operations

  • A platform with access to file system

  • Correct system clock settings (accurately showing current time, compliant to UTC time)

  • Using the MATLAB interface of FORCESPRO

14.3.2. Generating solvers with license files

License file checking is automatically enabled on a generated solver (supposing the platform supports it). The user has the option to select the name of the license file using the following codeoption:

% Matlab
codeoptions.license_file_name = '<filename_without_extension>'; % no paths, only filename

Important

The license file name must be a valid variable name

14.3.3. Generating license files

License files can be created by using the MATLAB function ForcesGetLicenseFile. This function can be called with the following (optional) arguments:

  • license file name: Name to be given to created license file (without extension). Default value: FORCES_PRO

  • server: FORCESPRO server to use to generate the license file. Default value: default server used by client

For more information on function usage run: help ForcesGetLicenseFile in the MATLAB Command Window.

14.3.4. Running solvers with license files

After generating a solver, you can move it to the running platform and build it with the rest of your project. After generating a license file, you can move it to your project folder.

When running a solver:

  • The solver will read the license file and validate the license

  • The license file need to be in the same folder as the executable of your project

14.4. Floating Licenses

Floating Licenses are used when the system that is enabled for running solvers needs to frequently change or is a virtualized environment (such as Docker or Virtualbox). The licensing works by getting a temporary local lease from the floating license server in order to be able to run a solver in a machine.

14.4.1. System requirements for floating licenses

The requirements for enabling solvers with floating licenses are:

  • A x86/x86_64 Linux platform

  • An internet connection on the running platform

  • Correct system clock settings (accurately showing current time, compliant to UTC time)

14.4.2. Floating License Attributes

Floating licenses are defined by the following two fields:

  • Number of Licenses: The number of machines that can run solvers concurrently using a floating license for a FORCESPRO user.

  • Lease Time: The time for which a local lease is valid after it has been granted. Default lease time is 10 minutes. Please contact support@embotech.com to change this.

14.4.3. Generating solvers with floating licenses

To enable floating licenses on a generated solver use the following codeoption:

% Matlab
codeoptions.useFloatingLicense = 1;
# Python
codeoptions["useFloatingLicense"] = 1

And select the platform to use

% Matlab
codeoptions.platform = 'platform_name';
# Python
codeoptions["platform"] = "platform_name"

Available platform options are:

  • Gnu-x86

  • Gnu-x86_64

  • Docker-Gnu-x86

  • Docker-Gnu-x86_64

14.4.4. Running solvers with floating licenses

After generating a solver, you can move it to the running platform and build it with the rest of your project.

When running a solver:

  • The solver will communicate with the floating license server

  • If the number of enabled machines has not exceeded the license limits, a license lease will be returned

  • If a lease had already been granted for a machine (and is still valid) this will be the one returned to the solver instead of granting a new one

  • The solver will save the lease locally and run

  • If a valid local lease already exists the solver will run without communicating with the server