Giter Club home page Giter Club logo

flexsimpy's Introduction

FlexSimPy

The FlexSimPy repository includes two primary visual studio projects:

  1. The PyConnector project implements the ability to bind the evaluation of nodes in FlexSim's tree to the evaluation of python functions. The project is implemented to work with python versions 3.7, 3.8, 3.9 and 3.10. The output DLLs from this project are included in the installed version of FlexSim.

  2. The FlexSimPy project implements a mechanism for controlling the FlexSim application from python. It compiles to a valid python module called 'FlexSimPy', meaning that, if you have properly installed/placed the FlexSimPy .pyd dll, you can use the python command 'import FlexSimPy' and then use the resulting module to launch and control FlexSim.

Build Instructions

FlexSimPy is implemented similar to how a standard FlexSim module is set up using the module SDK:

  1. Set up a FlexSim development environment as described in the module SDK documentation.
  2. Clone this repository to live in the 'FlexSim\modules' directory.
  3. Open the FlexSimPy.sln solution in visual studio.
  4. Choose the configuration that corresponds to the python version you will be using (Deb_3_10 is a debug configuration built against python 3.10, Rel_3_9 is release build against python 3.9, etc.).
  5. Build the solution.
  • If you are building it to create your own customized PyConnector, then the target dll will automatically be copied to FlexSim\program\python\PyConnector.dll. When you subsequently open your model that connects to python, it should load your custom-built dll.

  • If you are building it to create a customized FlexSimPy python module, then you can right-click on the python project TestFlexSimPy, and start the debugger. This will run the TestFlexSimPy.py python script, which launches FlexSim and runs a test 'post office' model.

Note: While FlexSimPy is built using the same process you would use to build a FlexSim module, it in itself is not technically a FlexSim module. It does not create a module dll that is automatically loaded into FlexSim when FlexSim starts up, nor does it have a .t tree file that is automatically loaded into FlexSim's tree. The PyConnector dlls are special dlls that are placed at FlexSim\program\python, and are loaded dynamically depending on the version of python you want FlexSim to connect to, when the evaluation of a node in your model requires python to be loaded. We place it in the modules directory merely to make the building process (updating of headers, etc.) similar to building modules, making the build process easier on our side.

flexsimpy's People

Contributors

ajohnsonflexsim avatar flexsimmer avatar gromeen avatar jjordanl avatar ruggedmongoose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yzhang98 bolanyu

flexsimpy's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.