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:

  1. import os
  2. import FlexSimPy as fp
  3. scriptPath = os.path.dirname(os.path.realpath(__file__))
  4. programDir = scriptPath + "\\..\\..\\..\\..\\program\\"
  5.  
  6. controller = fp.launch(evaluationLicense=False,programDir=programDir)
  7. controller.open(scriptPath+"\\ABDI_1.fsm")
  8.  
  9. controller.setParameter("x3",3)
  10. print(controller.getParameter("x3"))
  11. controller.reset()
  12. controller.runToTime(403199)
  13. print(controller.getPerformanceMeasure("Total_prod"))
  14. 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.

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.

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.