.. _license-label: ======= License ======= It is possible to run LTM core from the API with and without a license file. If there is no license file, LTM-API will forward any LTM password environment variables to LTM core. LTM license file takes presendence over environment passwords. .. toctree:: :titlesonly: LTM with license file ===================== The attribute ``global_settings/ltm_license_file_path`` gives a hint to LTM-API to where the license file is located. It can be a relative or absolute path. Behind the scenes, LTM-API will transform it into an absolute path. It will then set 3 extra environment variables that LTM core understands. * ``LTM_LICENSE_CONTROL_SYSTEM`` = ``"TRUE"``. * ``LTM_LICENSE_PATH`` = *license file folder* * ``LTM_LICENSE_FILE`` = *license file name* Example code to set the license file from Python on the model object. .. code-block:: python with LtmSession("api") as session: session.load(filename="input.json") session.model.global_settings.ltm_license_file_path = "/path/to/license_file.dat" LTM with passwords ================== To run LTM without a license file, make sure the relevant are set before or during execution of the model. .. code-block:: python os.environ["LTM_EMPS_LISENS"] = "..." os.environ["LTM_TEMPERATURKORR"] = "..." os.environ["LTM_MPS_VIND"] = "..." os.environ["LTM_MPS_VINDEKSTRA"] = "..." os.environ["LTM_MPS_VINDPARKER"] = "..." os.environ["LTM_PRISAVSNITT_MAKS"] = "..." session.execute_model()