question

Joao Victor Amaral avatar image
0 Likes"
Joao Victor Amaral asked João Victor SDA answered

FlexSimPy error: "lc_flexinit failed: 1".

Hi,

I'm using FlexSimPy to control a model externally. If I set evaluationLicense = True I can't simulate with different seeds (all results are deterministics), but when I pass evaluationLicense=False, it returns the error "lc_flexinit failed: 1".

I'm using an Educational License, but I already tried it using an Enterprise License and got the same error.

How can I fix it?

Following is my code:

import os
import FlexSimPy as fp
scriptPath = os.path.dirname(os.path.realpath(__file__))
programDir = scriptPath + "\\..\\..\\..\\..\\program\\"

controller = fp.launch(evaluationLicense=False,programDir=programDir)
controller.open(scriptPath+"\\ABDI_1.fsm")

controller.setParameter("x3",3)
print(controller.getParameter("x3"))
controller.reset()
controller.runToTime(403199)
print(controller.getPerformanceMeasure("Total_prod"))
print("ok")

Thanks.

FlexSim 22.1.1
pythonflexsimpylaunch error
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·
Are you running FlexSim on a computer that has FlexSim installed? That seems like an error you might get if you were running this script on a machine that had never had FlexSim installed.
0 Likes 0 ·
Joao Victor Amaral avatar image Joao Victor Amaral Jordan Johnson ♦♦ commented ·

Hi Jordan,

Yes, my machine has FlexSim (22.1.1) installed. Also, I tested the code on another machine (with another version of FlexSim - 22.2), but it didn't work either.

Thank you.

0 Likes 0 ·
Pedro Ortelani avatar image
0 Likes"
Pedro Ortelani answered Joao Victor Amaral edited

Hi @Joao Victor Amaral,

Did you have the same problem when running the TestFlexSimPy project?

If you didn't run it, you can find it at FlexSim's GitHub link: https://github.com/flexsim/FlexSimPy

In this link you'll also find information about how to properly configure and build FlexSimPy.

I hope it helps!

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joao Victor Amaral avatar image Joao Victor Amaral commented ·

Hi Pedro, how are you?


I followed the procedures described on https://docs.flexsim.com/en/22.0/Reference/DeveloperAdvancedUser/ModuleSDK/QuickStart/QuickStart.html to configure the FlexSim, and the error doesn't occur anymore.

Thanks a lot.


0 Likes 0 ·
João Victor SDA avatar image
0 Likes"
João Victor SDA answered

Hello,


Following the procedure to create a new module node into the FlexSim tree, the 'lc_flexinit: 1' error doesn't occur anymore in FlexSim 22.1.

However, this error persists when I use FlexSim 22.2.3 update, even doing the same procedure.


This error occurs when I pass the argument 'evaluateLicense = False' to controller Launch.

Obs: It's essential for me to the 'evaluateLicense = False' because if 'true' FlexSim doesn't do replications.


Thanks.


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.