<?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: How do you use labels to set parameters in a time-table look-up function? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554574#M58467</link>
    <description>&lt;P&gt;This doesn't work because the code has no idea what patient is when you call gettablevalue on one of the cells. You'll have to modify the code of the Based On Simulation Time pickoption to make this work. Right now the last line of code looks like this:&lt;/P&gt;&lt;PRE&gt;return gettablevalue(table, row*, col*);  *actually code to get the correct row or col&lt;/PRE&gt;&lt;P&gt;You could change the table to hold just the label names and change the code like this:&lt;/P&gt;&lt;PRE&gt;string labelName = gettablevalue(table, row*, col*);
return getlabel(patient, labelName);&lt;/PRE&gt;&lt;P&gt;Another possibility is to use the execute string function that lets you pass two things in:&lt;/P&gt;&lt;PRE&gt;string code = gettablestr(table, row*, col*);
return executestring(code, patient, patientlocation);&lt;/PRE&gt;&lt;P&gt;You would then use c for the patient, or i for the patient's location in your table:&lt;/P&gt;&lt;PRE&gt;getlabel(c, "MDProcess")
getlabel(i, "MDProcess")&lt;/PRE&gt;</description>
    <pubDate>Tue, 06 Dec 2016 18:16:24 GMT</pubDate>
    <dc:creator>Matthew_Gillespie</dc:creator>
    <dc:date>2016-12-06T18:16:24Z</dc:date>
    <item>
      <title>How do you use labels to set parameters in a time-table look-up function?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554573#M58466</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim HC 5.1.0 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;In a certain model, the analyst would like to differentiate between the time MD's see patients based on two factors - the time of day and the PCI's distribution-driven, care time. In other words, all PCI's have their own distributions to draw from regarding general service times with the MD. These values are assigned to a patient label named, "MDProcess." And, the analyst would like the information contained in the MDProcess label used in a time-table to determine treatment time depending on the time of day. The questions are, 1) What information can be used as an hourly parameter in a time table? 2) What is the correct format for adding a label to the time table parameter? See the attached picture for visual support. Note that although the patient label contains a valid time, it is not transferred to the time table parameter and so the MD spends no time with the patient regardless of the time of day.. &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="4145-label-question.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494652i8D47FCDC5B6DB0D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="4145-label-question.jpg" alt="4145-label-question.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also note that, "getlabelnum(patient, "MDProcess") doesn't work because of "patient," Nor does getlabelvalue.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 16:48:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554573#M58466</guid>
      <dc:creator>lou_keller</dc:creator>
      <dc:date>2016-12-06T16:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use labels to set parameters in a time-table look-up function?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554574#M58467</link>
      <description>&lt;P&gt;This doesn't work because the code has no idea what patient is when you call gettablevalue on one of the cells. You'll have to modify the code of the Based On Simulation Time pickoption to make this work. Right now the last line of code looks like this:&lt;/P&gt;&lt;PRE&gt;return gettablevalue(table, row*, col*);  *actually code to get the correct row or col&lt;/PRE&gt;&lt;P&gt;You could change the table to hold just the label names and change the code like this:&lt;/P&gt;&lt;PRE&gt;string labelName = gettablevalue(table, row*, col*);
return getlabel(patient, labelName);&lt;/PRE&gt;&lt;P&gt;Another possibility is to use the execute string function that lets you pass two things in:&lt;/P&gt;&lt;PRE&gt;string code = gettablestr(table, row*, col*);
return executestring(code, patient, patientlocation);&lt;/PRE&gt;&lt;P&gt;You would then use c for the patient, or i for the patient's location in your table:&lt;/P&gt;&lt;PRE&gt;getlabel(c, "MDProcess")
getlabel(i, "MDProcess")&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Dec 2016 18:16:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554574#M58467</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2016-12-06T18:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use labels to set parameters in a time-table look-up function?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554575#M58468</link>
      <description>&lt;P&gt;Thanks Matthew. I've attached the model I've been working with so you can see the dynamics involved. The model is just a demo model designed to show a variety of functions to include the Cleaning Time Delay data display you helped with earlier.&lt;A href="https://answers.flexsim.com/storage/attachments/4146-using-labels-lou.fsm"&gt;using-labels-lou.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 19:20:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554575#M58468</guid>
      <dc:creator>lou_keller</dc:creator>
      <dc:date>2016-12-06T19:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use labels to set parameters in a time-table look-up function?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554576#M58469</link>
      <description>&lt;P&gt;@jbmontgomery&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 19:22:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-you-use-labels-to-set-parameters-in-a-time-table-look-up/m-p/13554576#M58469</guid>
      <dc:creator>lou_keller</dc:creator>
      <dc:date>2016-12-06T19:22:55Z</dc:date>
    </item>
  </channel>
</rss>

