<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Step-by-step guide for installing Cplex and use it in Flexsim in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583290#M80738</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Paths are separated by semicolons; I can see that Python actually &lt;EM&gt;is&lt;/EM&gt; in your path. That makes sense since you can use it for FlexSim already.&lt;/P&gt;&lt;P&gt;The only thing I can think of is that maybe your python version doesn't have the docplex or cplex libraries installed. Have you tried opening a PowerShell and running&lt;/P&gt;&lt;PRE&gt;pip install docplex&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;pip install cplex&lt;/PRE&gt;&lt;P&gt;? What does it say after you run those? If they are installed, then it should say something along the lines of "you already have this installed" or "this library is up to date". If not, then it will download them.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 18 May 2023 15:34:22 GMT</pubDate>
    <dc:creator>kavika_faleumu</dc:creator>
    <dc:date>2023-05-18T15:34:22Z</dc:date>
    <item>
      <title>Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583286#M80734</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.0.1 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi everyone,&lt;/P&gt;
 &lt;P&gt;I am currently struggling with using Cplex (in a python code) through FlexSim.&lt;/P&gt;
 &lt;P&gt;I managed to get the connection between FlexSim and Python working and I tested it out with a simple code returning the sum of two numbers I give as parameters, and that works.&lt;/P&gt;
 &lt;P&gt;I installed Cplex and if I run a python code with a cplex model in Jupyter Notebook it works, but when I try to call that function from FlexSim it does not. I started to think that there could be something wrong "behind the scene". I read something about setting the environment variables properly and stuff like that. I have to admit that I am not an expert in this kind of things, so I decided to look for someone very patient and willing to explain step by step how I should install and make sure that cplex is properly set for FlexSim.&lt;/P&gt;
 &lt;P&gt;Thank you all in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 May 2023 09:16:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583286#M80734</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-17T09:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583287#M80735</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hey &lt;A rel="user" href="https://answers.flexsim.com/users/42439/jacopo-r.html" nodeid="42439"&gt;@jacopo_r&lt;/A&gt;, I have a few questions that may help me identify your issue.&lt;/P&gt;&lt;P&gt;1. &lt;EM&gt;What version(s) of Python is installed on your machine&lt;/EM&gt;? You can identify this by opening up Windows PowerShell and typing&lt;/P&gt;&lt;PRE&gt;py -0&lt;/PRE&gt;&lt;P&gt;This will print out the list of python versions you have installed on your Windows machine.&lt;/P&gt;&lt;P&gt;2. &lt;EM&gt;Is Python in your System/User Variables&lt;/EM&gt;? You can find this by going to System Properties (which you can find by simply searching for "Environment Variables").&lt;span class="lia-inline-image-display-wrapper" image-alt="1684343999641.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1517072i7BDF85BFBF26228A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1684343999641.png" alt="1684343999641.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After clicking the option above to edit system environment variables, you'll get the window below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1684344378935.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1517073i4659AD7E766E3093/image-size/large?v=v2&amp;amp;px=999" role="button" title="1684344378935.png" alt="1684344378935.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Click the Environment Variables button and another window will pop up with those variables. In your User variables and System variables, you'll see variables called "Path". Double click on each of them and look for paths related to Python. For example:&lt;/P&gt;&lt;PRE&gt;%APPDATA%\..\Local\Programs\Python\&amp;lt;PYTHON_VERSION&amp;gt;\Scripts&lt;/PRE&gt;&lt;P&gt;Or something along those lines. You can also go to that location by putting the address in your File Explorer to see if there's actually anything there.&lt;/P&gt;&lt;P&gt;3. &lt;EM&gt;Does your FlexSim Global Preferences use the same Python version as the one you have installed&lt;/EM&gt;? You can check this by opening FlexSim, going to Global Preferences, selecting the "Code" tab, and checking your Python Version.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1684344631789.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1517074iCE4CEE91E9BD6AFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="1684344631789.png" alt="1684344631789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 May 2023 17:30:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583287#M80735</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-17T17:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583288#M80736</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/35833/kavikaf.html" nodeid="35833"&gt;@Kavika F&lt;/A&gt; ,&lt;/P&gt;
 &lt;P&gt;my python version is 3.10 and it is in line with the python version I selected in the Global Preferences of Flexsim. However, I don't think I have any Environment Variable related to Python either in the User or System variables. I can see I have variables related to Cplex in the system variables, and the only one containing the name python is the one below, which is the only one called " Path".&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1684398489231.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1517076i112296D0039D96F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="1684398489231.png" alt="1684398489231.png" /&gt;&lt;/span&gt;(I had to take a screenshot cause I couldn't copy it, but if you open the image file it should be readable)&lt;/P&gt;
 &lt;P&gt;(I can see the name Gurobi in the path. I installed Gurobi but I am not actually using it cause I switch to Cplex)&lt;/P&gt;
 &lt;P&gt;So, I guess this could be at least one issue.&lt;/P&gt;
 &lt;P&gt;Looking forward to hear back from you!&lt;/P&gt;
 &lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 08:30:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583288#M80736</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T08:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583289#M80737</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I forgot to mention that even though there are no Python Path Variables related, I managed to connect FlexSim with Python and run a simple sum or feeding a global table to python and return the sum of rows (as you suggested in here &lt;A rel="nofollow" id="isPasted" href="https://answers.flexsim.com/questions/141940/running-a-python-code-with-cplex-through-flexsim.html"&gt;https://answers.flexsim.com/questions/141940/running-a-python-code-with-cplex-through-flexsim.html&lt;/A&gt;). But when I try to run a python script including a cplex optimization model, then it does not work.&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 10:40:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583289#M80737</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T10:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583290#M80738</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Paths are separated by semicolons; I can see that Python actually &lt;EM&gt;is&lt;/EM&gt; in your path. That makes sense since you can use it for FlexSim already.&lt;/P&gt;&lt;P&gt;The only thing I can think of is that maybe your python version doesn't have the docplex or cplex libraries installed. Have you tried opening a PowerShell and running&lt;/P&gt;&lt;PRE&gt;pip install docplex&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;pip install cplex&lt;/PRE&gt;&lt;P&gt;? What does it say after you run those? If they are installed, then it should say something along the lines of "you already have this installed" or "this library is up to date". If not, then it will download them.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 15:34:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583290#M80738</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-18T15:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583291#M80739</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Everything seems fine. See picture below:&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1684435421111.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1517083iF9B01783A4C273EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="1684435421111.png" alt="1684435421111.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;I tried also to see if Chat GTP has something to say that makes sense.&lt;/P&gt;
 &lt;P&gt;I got this:&lt;/P&gt;
 &lt;P id="isPasted" style="margin-bottom: 1.25em; margin-left: 0px;"&gt;&lt;EM&gt;FlexSim has the ability to execute Python code, but it cannot directly interact with Python libraries such as CPLEX. Instead, it runs Python code through the Python interpreter installed on your system.&lt;/EM&gt;&lt;/P&gt;
 &lt;P style="margin-bottom: 1.25em; margin-left: 0px;"&gt;&lt;EM&gt;Here are a few potential reasons why your CPLEX model may not be executing properly:&lt;/EM&gt;&lt;/P&gt;
 &lt;P style="margin-bottom: 0px; margin-left: 0px;"&gt;&lt;EM&gt;You might be using a different Python environment in FlexSim and outside of it. If you installed CPLEX in a specific Python environment, but FlexSim is using a different one, then FlexSim wouldn't be able to access CPLEX. To solve this, ensure that FlexSim is using the correct Python interpreter. You can specify the path to the Python interpreter in the FlexSim settings.&lt;/EM&gt;&lt;/P&gt;
 &lt;P style="margin-bottom: 0px; margin-left: 0px;"&gt;&lt;EM&gt;There might be a problem with your CPLEX installation. Try running your CPLEX Python code outside of FlexSim to verify that it works correctly.&lt;/EM&gt;&lt;/P&gt;
 &lt;P style="margin-bottom: 0px; margin-left: 0px;"&gt;&lt;EM&gt;There might be a problem with your Python code. Check the FlexSim Console or Output Console for any error messages that can help you troubleshoot the issue.&lt;/EM&gt;&lt;/P&gt;
 &lt;P style="margin-bottom: 0px; margin-left: 0px;"&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="margin-bottom: 0px; margin-left: 0px;"&gt;About this I can say that Cplex works when I run the Pyhton script with Jupyter Notebook. However, it could make sense that Flexsim is not able to access the same Python environment, but on the other hand I think a normal a+b function run in Python from Flexsim wouldn't work either. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="margin-bottom: 0px; margin-left: 0px;"&gt;Does this ring a bell maybe?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 18:53:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583291#M80739</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T18:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583292#M80740</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;What values, exceptions, or errors are you getting when you run your FlexSim Model? If you put&lt;PRE&gt;test_cplex()&lt;/PRE&gt;&lt;P&gt;in a script window, what does it return? Maybe the output (or lack thereof) can give me a hint as to what's going on.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 20:07:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583292#M80740</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-18T20:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583293#M80741</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I just notice that it give the error "&lt;EM&gt;name 'np' is not defined".&lt;/EM&gt;&lt;/P&gt;
 &lt;P&gt;Maybe it is related to the numpy package that I have in this example but I don't think I really needed it for the model I am working on. I am currently trying to run a pyhton script with cplex, but without numpy and feeding a table myself from Flexsim.&lt;/P&gt;
 &lt;P&gt;Could it be it?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 20:13:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583293#M80741</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T20:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583294#M80742</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;If your python script imports numpy, then you'll need to make sure the numpy package is installed with your Python 3.10 version. Could you try pip installing numpy in a PowerShell to see if it is there?&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 20:36:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583294#M80742</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-18T20:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583295#M80743</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1684442344343.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1517085iDDAF3408B00336CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="1684442344343.png" alt="1684442344343.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;it seems like it's there&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 20:39:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583295#M80743</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T20:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583296#M80744</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Is FlexSim giving you the error "name 'np' is not defined"?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 20:42:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583296#M80744</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-18T20:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583297#M80745</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 yes it is
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 20:43:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583297#M80745</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T20:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583298#M80746</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;What does your python script look like? Is it different from the one you originally posted? Because the error makes it sound like the&lt;/P&gt;&lt;PRE&gt;import numpy as np&lt;/PRE&gt;&lt;P&gt;line is commented out or removed. The next line in the script should be&lt;/P&gt;&lt;PRE&gt;cost = np.random.randint(1,10, (4,4))&lt;/PRE&gt;&lt;P&gt;which uses the np variable set.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 20:55:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583298#M80746</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-18T20:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583299#M80747</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;A rel="user" href="https://answers.flexsim.com/users/35833/kavikaf.html" nodeid="35833"&gt;@Kavika F&lt;/A&gt; you are actually right. The line importing numpy was commented. But I think the first one I tried and uploaded was not commented. Now I am not sure about what I did or did not for making it work, but for sure all your support helped a lot!
 &lt;P&gt;&lt;STRONG&gt;Thank you very much for this!!!&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;And since you are so nice and helpful, I would like to ask you another thing, since we're here.&lt;/P&gt;
 &lt;P&gt;In the python script, the cplex model gives a solution. I then need that solution, namely the variable x[i,j], to be returned to flexsim as an array, I guess, so then I can transport it into a global table. Could you help me with this please? I guess it's more python/cplex related than flexsim.&lt;/P&gt;
 &lt;P&gt;Again, thanks!&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 21:08:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583299#M80747</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T21:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583300#M80748</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/42439/jacopo-r.html" nodeid="42439"&gt;@jacopo_r&lt;/A&gt; Yeah of course. If your python function wants to return an Array, your User Command in FlexSim should have a "var" as a return type. Check out &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/23.0/Reference/Tools/UserCommands/UserCommands.html#parameters" target="_blank"&gt;this documentation&lt;/A&gt; for more info on that.&lt;P&gt;Then you can do something similar to &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/questions/123230/how-to-use-flexscript-python-to-create-the-data-in.html" target="_blank"&gt;a post I linked&lt;/A&gt; you to in an earlier question you had which goes over returning an Array from python and using it to populate a Global Table. Essentially you'll just take the Array and loop through it, setting values on a Global Table as you go.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 21:13:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583300#M80748</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-18T21:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583301#M80749</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I see, thanks. I tried the suggestions, also from the previous post, and they work by themselves.&lt;/P&gt;
 &lt;P&gt;Now I am having some difficulties with returning the x from the Cplex model. I have "return x" as the end of the python code, and then I read as Array and loop through it, FlexSim says "&lt;EM&gt;exception: FlexScript exception: Array index out of bounds at &amp;lt;no path&amp;gt; c: &amp;lt;no path&amp;gt; i: &amp;lt;no path&amp;gt;&lt;/EM&gt;". I think it can be related to the fact that the model variable x is defined as "assignment_model.binary_var_matrix(...)", thus it can be read as an array when return to FlexSim. Also, I am not sure the variable is returned properly.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 21:30:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583301#M80749</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T21:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583302#M80750</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/42439/jacopo-r.html" nodeid="42439"&gt;@jacopo_r&lt;/A&gt;, reading the documentation for the&lt;/P&gt;&lt;PRE&gt;binary_var_matrix()&lt;/PRE&gt;&lt;P&gt;function tells me that it returns a dictionary, not an array. If you type&lt;/P&gt;&lt;PRE&gt;test_cplex()&lt;/PRE&gt;&lt;P&gt;into a new Script window, what does it return? That may give us an idea of what type of data structure FlexSim interprets your return value as.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 22:26:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583302#M80750</guid>
      <dc:creator>kavika_faleumu</dc:creator>
      <dc:date>2023-05-18T22:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583303#M80751</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;It returns this:&lt;/P&gt;
 &lt;span class="lia-inline-image-display-wrapper" image-alt="1684449053088.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1517092i450451F32BFFA3D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1684449053088.png" alt="1684449053088.png" /&gt;&lt;/span&gt;
 &lt;P&gt;The pairs of numbers seem to be the index for rows and columns, knowing that in python a list starts from index 0 for both rows and columns. Nonetheless the value seem to be NULL for all of them.&lt;BR /&gt;My goal is to be able to return the x in order to create a table with 0 and 1, where 1 means that a specific task has been assigned to a specific worker.&lt;/P&gt;
 &lt;P&gt;Hope this can give you a better understanding.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 22:35:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583303#M80751</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T22:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583304#M80752</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I just read about Map type from here &lt;A rel="nofollow" id="isPasted" href="https://docs.flexsim.com/en/23.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Map.html#Property-values"&gt;https://docs.flexsim.com/en/23.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Map.html#Property-values&lt;/A&gt; and tried to access some of the map type values, but all of them seem indeed to be NULL. Can it be that the Cplex model is actually not optimizing? As I already said it works when I run it outside of Flexsim. So, since it is the same script, it should also work when called by Flexsim...&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 22:43:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583304#M80752</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T22:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Step-by-step guide for installing Cplex and use it in Flexsim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583305#M80753</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/35833/kavikaf.html" nodeid="35833"&gt;@Kavika F&lt;/A&gt;, I am trying to mess around and I also see some issues in feeding a table to the cplex.&lt;/P&gt;
 &lt;P&gt;In the two files uploaded, the return 1 function until I keep everything below the line where x is defined comment, this line included. After I un-comment it, the code does not return 1 anymore. Any thoughts on this?&lt;BR /&gt;Thanks&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/68315-test-cplex-numpy.fsm" target="_blank"&gt;test-cplex-numpy.fsm&lt;/A&gt;&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/68310-test-cplex-numpy.py" target="_blank"&gt;test-cplex-numpy.py&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 May 2023 22:53:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/step-by-step-guide-for-installing-cplex-and-use-it-in-flexsim/m-p/13583305#M80753</guid>
      <dc:creator>jacopo_r</dc:creator>
      <dc:date>2023-05-18T22:53:50Z</dc:date>
    </item>
  </channel>
</rss>

