<?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 to Use OPTMODEL to specify?! in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/789087#M3585</link>
    <description>&lt;P&gt;Thanks a huge. It is. I verify with puppy Sovler/Excel, though hard to digest in SAS yet.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Jan 2022 22:57:39 GMT</pubDate>
    <dc:creator>hellohere</dc:creator>
    <dc:date>2022-01-08T22:57:39Z</dc:date>
    <item>
      <title>How to Use OPTMODEL to specify?!</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/787569#M3574</link>
      <description>&lt;P&gt;I know some on Solver/EXCEL. New to SAS/OPTMODEL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can help me on this?!&lt;/P&gt;&lt;P&gt;I have two datasets(4 Entities, 2 States(exclusive), 2 performance measurements/State/Entity). How to find the max sum of cross product?!&lt;/P&gt;&lt;P&gt;Dataset1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;State&amp;nbsp; &amp;nbsp; E1&amp;nbsp; &amp;nbsp; &amp;nbsp; E2&amp;nbsp; &amp;nbsp; &amp;nbsp;E3&amp;nbsp; &amp;nbsp; &amp;nbsp; E4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;S1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5.2&amp;nbsp; &amp;nbsp; &amp;nbsp;5.8&amp;nbsp; &amp;nbsp; 8.2&amp;nbsp; &amp;nbsp; &amp;nbsp; 3.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7.2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8.1&amp;nbsp; &amp;nbsp; &amp;nbsp;3.6&amp;nbsp; &amp;nbsp; 5.0&amp;nbsp; &amp;nbsp; &amp;nbsp; 4.9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset2&amp;nbsp;&lt;/P&gt;&lt;P&gt;State&amp;nbsp; &amp;nbsp;E1&amp;nbsp; &amp;nbsp; E2&amp;nbsp; &amp;nbsp; E3&amp;nbsp; &amp;nbsp; E4&amp;nbsp; &amp;nbsp; &amp;nbsp; E5&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.3&amp;nbsp; &amp;nbsp;3.1&amp;nbsp; &amp;nbsp; 9.1&amp;nbsp; &amp;nbsp;7.3&amp;nbsp; &amp;nbsp; &amp;nbsp;4.0&amp;nbsp;&lt;/P&gt;&lt;P&gt;S2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.2&amp;nbsp; &amp;nbsp;5.3&amp;nbsp; &amp;nbsp; 7.1&amp;nbsp; &amp;nbsp;4.7&amp;nbsp; &amp;nbsp; &amp;nbsp; 7.3&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 01:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/787569#M3574</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2021-12-29T01:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use OPTMODEL to specify?!</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/788148#M3581</link>
      <description>&lt;P&gt;Which numbers are input, and which are output (decision variables)?&amp;nbsp; What are the restrictions on the decision variables?&amp;nbsp; Without any restrictions (constraints), the sum of cross products can be as large as you want.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 17:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/788148#M3581</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2022-01-03T17:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use OPTMODEL to specify?!</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/789012#M3583</link>
      <description>&lt;P&gt;Rob:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variables are binary(0/1) for each entity [either state1 or state 2]. S(i), S stands for State to Entity(i).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to maximize the sum of entity performance(two performance measurements, the product as the final performance.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Say Performance A is the project performance; Performance B is the leadership performance.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Entity(1)'s performance for State(1) is 5.2*2.3; for State(2) is 8.1*4.2. The goal the to maximize the team's performance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The constraints for&lt;/P&gt;&lt;P&gt;1) binary exclusive input, 1/0&lt;/P&gt;&lt;P&gt;2) performance measurement cannot be below a threshold 2.0. Entity(4) performance A on State(2) are 1.8 below the threshold 2.0,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;then Entity(4) must not be on State(2) , Entity(4) must be on State(1).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help me on this?!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 02:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/789012#M3583</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-01-08T02:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use OPTMODEL to specify?!</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/789015#M3584</link>
      <description>&lt;P&gt;Not quite sure I understand, but does the following do what you want?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let numEntities = 5;
data indata;
   input dataset state $ e1-e&amp;amp;numEntities;
   datalines;
1 S1 5.2 5.8 8.2 3.1 7.2
1 S2 8.1 3.6 5.0 4.9 1.8
2 S1 2.3 3.1 9.1 7.3 4.0 
2 S2 4.2 5.3 7.1 4.7 7.3
;

proc optmodel;
   set DATASETS;
   read data indata into DATASETS=[dataset];

   set &amp;lt;str&amp;gt; STATES;
   read data indata into STATES=[state];

   set ENTITIES = 1..&amp;amp;numEntities;
   num performance {DATASETS, STATES, ENTITIES};
   read data indata into [dataset state] {entity in ENTITIES} &amp;lt;performance[dataset,state,entity]=col('e'||entity)&amp;gt;;

   var IsState {ENTITIES, STATES} binary;

   max Objective = sum {e in ENTITIES, s in STATES} (prod {d in DATASETS} performance[d,s,e]) * IsState[e,s];

   con OneStatePerEntity {e in ENTITIES}:
      sum {s in STATES} IsState[e,s] = 1;

   for {e in ENTITIES, s in STATES: min {d in DATASETS} performance[d,s,e] &amp;lt; 2} fix IsState[e,s] = 0;

   solve;

   print IsState;
   print {e in ENTITIES, s in STATES: IsState[e,s].sol &amp;gt; 0.5} (prod {d in DATASETS} performance[d,s,e]);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Jan 2022 03:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/789015#M3584</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2022-01-08T03:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use OPTMODEL to specify?!</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/789087#M3585</link>
      <description>&lt;P&gt;Thanks a huge. It is. I verify with puppy Sovler/Excel, though hard to digest in SAS yet.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 22:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-Use-OPTMODEL-to-specify/m-p/789087#M3585</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-01-08T22:57:39Z</dc:date>
    </item>
  </channel>
</rss>

