PatrickYang Tracker
https://communities.sas.com/kntur85557/tracker
PatrickYang TrackerTue, 23 Apr 2024 20:47:54 GMT2024-04-23T20:47:54ZRe: Scale of capabilities of PROC OPTMODEL: Number of constraints, maximum dimension of input data,
https://communities.sas.com/t5/Mathematical-Optimization/Scale-of-capabilities-of-PROC-OPTMODEL-Number-of-constraints/m-p/499939#M2418
<P>Thank you, Rob! This is so helpful!</P><P> </P><P>Exactly what it is that we need! Really appreciate your timely input!!</P>Fri, 28 Sep 2018 15:50:46 GMThttps://communities.sas.com/t5/Mathematical-Optimization/Scale-of-capabilities-of-PROC-OPTMODEL-Number-of-constraints/m-p/499939#M2418PatrickYang2018-09-28T15:50:46ZRe: Scale of capabilities of PROC OPTMODEL: Number of constraints, maximum dimension of input data,
https://communities.sas.com/t5/Mathematical-Optimization/Scale-of-capabilities-of-PROC-OPTMODEL-Number-of-constraints/m-p/498832#M2414
<P>Hi Rob:</P><P> </P><P>This is so helpful! Thank you so much.</P><P> </P><P>As I can tell, the new Usage Note (#62892) discusses how various elements (such as, VAR, IMPVAR, CON, MIN\MAX, among many other) of PROC OPTMODEL respectively contribute to memory consumption on 32- or 64-bit systems. Under either LP or MILP. The note is certainly of great help to users of PROC OPTMODEL including us.</P><P> </P><P>On the other hand, is it fair to say, assuming there is as much memory as necessary (or, assuming the amount of memory is unlimited), that:</P><P>1. SAS PROC OPTMODEL is able to handle an MP with a (virtually) unlimited number of constraints.</P><P>2. SAS PROC OPTMODEL is able to work with SAS datasets (through READ DATA or CREATE DATA statements in the procedure) which are (virtually) unlimited in size?</P><P> </P><P>In our paper being considered for publication, a reviewer would like us to provide information regarding the full capacity of PROC OPTMODEL (maximum number of constraints, maximum size of a SAS dataset that can pass through the procedure).</P><P> </P><P>Thank you, Rob. The note is useful to us and to many users in the years to come.</P>Tue, 25 Sep 2018 19:31:06 GMThttps://communities.sas.com/t5/Mathematical-Optimization/Scale-of-capabilities-of-PROC-OPTMODEL-Number-of-constraints/m-p/498832#M2414PatrickYang2018-09-25T19:31:06ZScale of capabilities of PROC OPTMODEL: Number of constraints, maximum dimension of input data, etc.
https://communities.sas.com/t5/Mathematical-Optimization/Scale-of-capabilities-of-PROC-OPTMODEL-Number-of-constraints/m-p/490975#M2391
<P>Hi all:</P><P> </P><P>Not sure if anybody has discussed these issues. We could not find the information from the user's guide. If there are pages in the documentation which discuss these issues, please let us know (thank you!). We have spent a lot of time going through SAS/ORยฎ 14.3 Userโs Guide Mathematical Programming The OPTMODEL Procedure. But we could not find any information regarding the scale of capabilities of PROC OPTMODEL. Specifically, we would like to find out:</P><P>1. Maximum number of constraints that PROC OPTMODEL can handle</P><P>2. Maximum dimension of input data that PROC OPTMODEL can handle</P><P>3. Requirements with regard to the amount of memory installed on the desktop computer</P><P> </P><P>We imagine PROC OPTMODEL is able to handle an unlimited number of constraints. The maximum dimension of an input dataset for PROC OPTMODEL is the same as the maximum dimension of a SAS dataset. Not sure about requirements on computer memory, though.</P><P> </P><P>Thank you so much!!!</P>Wed, 29 Aug 2018 19:54:46 GMThttps://communities.sas.com/t5/Mathematical-Optimization/Scale-of-capabilities-of-PROC-OPTMODEL-Number-of-constraints/m-p/490975#M2391PatrickYang2018-08-29T19:54:46ZRe: PROC OPTMODEL for Nonlinear Integer Optimization - HELP!!!!
https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/421645#M2141
Hi Lindsey:<BR /><BR />Thank you for sharing with us this new option. It was unknown to us. We will work on understanding the code and see if we can fully implement it in our work. Hopefully, we can fully figure out the details of the code after going through the documentation. If not, we will respond to this message with the hope to check with you again. Thank you for the new insights!!!! <span class="lia-unicode-emoji" title=":slightly_smiling_face:">๐</span>Fri, 15 Dec 2017 16:59:04 GMThttps://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/421645#M2141PatrickYang2017-12-15T16:59:04ZRe: PROC OPTMODEL for Nonlinear Integer Optimization - HELP!!!!
https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/421245#M2138
<P>Thank you, Rob. Your response has helped our team solve a major issue and allowed us to proceed.</P><P> </P><P>Also, thank you for making PROC OPTMODEL so user-friendly and powerful to use.</P>Thu, 14 Dec 2017 16:43:59 GMThttps://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/421245#M2138PatrickYang2017-12-14T16:43:59ZRe: PROC OPTMODEL for Nonlinear Integer Optimization - HELP!!!!
https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/420899#M2127
<P>Hi Rob:</P><P> </P><P>Thank you so much! Your response is always helpful.</P><P> </P><P>In fact, one of my team members is wondering about two things:</P><P> </P><P>1. <SPAN>min obj_abs_weight_goal = sum {j in bags} (surplus[j] + slack[j]); Why is the objective function the way it is? My understanding is that, since both surplus and slack parameters are set up to be POSITIVE, the minimization of the summation of the two is equivalent to the minimization of both positive parameters to the extent that they are as close to zero as possible.</SPAN></P><P> </P><P><SPAN>2. con obj_to_con_goal {j in bags}: sum {i in apples} bagApples[i,j] * apple_weight[i] - surplus[j] + slack[j] = &weight_Apple_Goal.; What does the summation of the last two terms (i.e., -surplus[j] + slack[j]) on the left-hand side of the equation do? My understanding is that, within each bag indexed by j, the total weight of all assigned apples minus the amount greater than 25, IF ANY (when this happens to bag j, slack for this bag = 0), plus the amount less than 25, IF ANY (when this happens to bag j, surplus for this bag = 0), should equal 25, the target weight for bag j.</SPAN></P><P> </P><P><SPAN>Thank you so much, Rob.</SPAN></P>Wed, 13 Dec 2017 17:14:10 GMThttps://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/420899#M2127PatrickYang2017-12-13T17:14:10ZPROC OPTMODEL for Nonlinear Integer Optimization - HELP!!!!
https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/420639#M2124
<P>Hi all:</P><P> </P><P>We have a mathematical programming problem which can be briefly described like this:</P><P> </P><P>We have a total of 2000 apples and need to select some of them for assignment to 10 bags. The following constraints/objective function need to be satisfied:</P><P>1. Constraint: An apple is assigned to no more than one bag.</P><P>2. Constraint: The total number of apples in each bag is 35.</P><P>3. Objective function: The total weight of the apples in each bag is as close to 25 lbs as possible.</P><P>Clearly, this is an assignment problem which needs to be solved using binary decision variables (We use i to index apples and use j to index bags). In PROC OPTMODEL, the first two constraints are very easy to formulate with binary decision variables.</P><P> </P><P>The main issue is with the objective function which asks the total weight of apples be as close to 25 lbs as possible (i.e., minimize the deviation from 25 on both sides: 1) minimization of surplus from 25 and 2) minimization of slack from 25). We plan to implement an ABSOLUTE VALUE operation on this objective function: Within each bag j: | summation of (values of decision variables * weight of all apples) - 25| should be as small as possible (i.e., absolute value should be as close to zero as possible). Therefore, the objective function is nonlinear in the decision variables due to the absolute value operation.</P><P> </P><P>As of SAS/OR 14.2, PROC OPTMODEL cannot directly handle INTEGER decision variables in a NONLINEAR objective function. We need to linearize this objective function. After consulting around, we got the following code. Wondering if it is correct for our purpose? Any insights will be highly appreciated: Thank you so much!</P><P> </P><P> </P><P> </P><P>%let<SPAN> TotalBags=10; </SPAN>/*Total number of bags*/</P><P>%let<SPAN> TotalApples=2000; </SPAN>/*Total number of apples*/</P><P>%let<SPAN> </SPAN>number_Apple_Goal=35; /*Goal on the number of apples assigned to each bag*/</P><P>%let<SPAN> </SPAN>weight_Apple_Goal=25; /*Goal on the weight of apples assigned to each bag*/</P><P> </P><P>set<SPAN> </SPAN>bags =<SPAN> </SPAN><STRONG>1..</STRONG>&TotalBags.;</P><P>set<SPAN> </SPAN>apples =<SPAN> </SPAN><STRONG>1..</STRONG>&TotalApples.;</P><P> </P><P>number apple_weight {apples};</P><P>var<SPAN> </SPAN>bagApples{apples, bags}<SPAN> </SPAN>binary; /*Decision variables on which apples are assigned to which bags*/</P><P> </P><P> </P><P>con<SPAN> no_twobags</SPAN> {i in apples}: sum {j in bags} bagApples[i,j] <=<SPAN> </SPAN><STRONG>1</STRONG>;<SPAN> </SPAN>/*No apple is selected for more than one bag*/</P><P>con<SPAN> total_apples_bag</SPAN> {j in bags}: sum {i in apples} bagApples[i,j] = &number_Apple_Goal.;<SPAN> </SPAN>/*Goal on the number of apples in a bag*/</P><P> </P><P> </P><P>var surplus {bags} >= <STRONG>0</STRONG>;</P><P>var slack {bags} >= <STRONG>0</STRONG>;</P><P>min obj_abs_weight_goal = sum {j in bags} (surplus[j] + slack[j]);</P><P>con obj_to_con_goal {j in bags}: sum {i in apples} bagApples[i,j] * apple_weight[i] - surplus[j] + slack[j] = &weight_Apple_Goal.;</P><P> </P><P> </P>Wed, 13 Dec 2017 00:18:28 GMThttps://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-Nonlinear-Integer-Optimization-HELP/m-p/420639#M2124PatrickYang2017-12-13T00:18:28ZRe: PROC MIXED: Output data tables header Col1, Col2, ...... NO variable names displayed
https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-Output-data-tables-header-Col1-Col2-NO-variable-names/m-p/340116#M17917
<P>Up Up Up!</P>Fri, 10 Mar 2017 21:54:14 GMThttps://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-Output-data-tables-header-Col1-Col2-NO-variable-names/m-p/340116#M17917PatrickYang2017-03-10T21:54:14ZPROC MIXED: Output data tables header Col1, Col2, ...... NO variable names displayed
https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-Output-data-tables-header-Col1-Col2-NO-variable-names/m-p/340046#M17916
<P>We are trying to follow the SAS PROC MIXED paper: <A href="http://www2.sas.com/proceedings/sugi29/198-29.pdf" target="_blank">http://www2.sas.com/proceedings/sugi29/198-29.pdf</A></P><P> </P><P>We are attempting to reproduce Tables 3 and 4 on Page 6.</P><P> </P><P>However, we could not get the tables to display actual variable names (U1, W1, U2, W2,...,). Instead, it is Col1, Col2, Col3,... that are displayed.</P><P> </P><P>Did we do anything wrong??????</P>Fri, 10 Mar 2017 18:19:57 GMThttps://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-Output-data-tables-header-Col1-Col2-NO-variable-names/m-p/340046#M17916PatrickYang2017-03-10T18:19:57ZRe: Download of SAS Example Data: Where???????
https://communities.sas.com/t5/All-Things-Community/Download-of-SAS-Example-Data-Where/m-p/302093#M1910
<P>Thank you very much for your respoonse, Reeza.</P>Mon, 03 Oct 2016 16:16:36 GMThttps://communities.sas.com/t5/All-Things-Community/Download-of-SAS-Example-Data-Where/m-p/302093#M1910PatrickYang2016-10-03T16:16:36ZDownload of SAS Example Data: Where???????
https://communities.sas.com/t5/All-Things-Community/Download-of-SAS-Example-Data-Where/m-p/301070#M1895
<P>Maybe it is just me! But, where can I find the example datasets that SAS uses in its documentation???</P><P> </P><P>Say, this one (<SPAN>Australian Health Survey data</SPAN><span class="lia-unicode-emoji" title=":disappointed_face:">๐</span> <A href="http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/viewer.htm#etsug_qlim_sect033.htm" target="_blank">http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/viewer.htm#etsug_qlim_sect033.htm</A></P><P> </P><P> </P>Tue, 27 Sep 2016 16:25:51 GMThttps://communities.sas.com/t5/All-Things-Community/Download-of-SAS-Example-Data-Where/m-p/301070#M1895PatrickYang2016-09-27T16:25:51ZRe: Why would someone use SAS?
https://communities.sas.com/t5/All-Things-Community/Why-would-someone-use-SAS/m-p/301069#M1894
<P>1. SAS is way more than statistical analysis.</P><P>2. In many high stakes fields (health care analytics, aviation, etc.), SAS is much more preferred due to its high level quality control, whereas R provides absolutely no warranty.</P><P>3. SAS is much easier to use than R</P><P>and many more</P>Tue, 27 Sep 2016 16:23:10 GMThttps://communities.sas.com/t5/All-Things-Community/Why-would-someone-use-SAS/m-p/301069#M1894PatrickYang2016-09-27T16:23:10ZRe: PROC IRT: estimate latent traits with KNOWN item parameters
https://communities.sas.com/t5/SAS-Procedures/PROC-IRT-estimate-latent-traits-with-KNOWN-item-parameters/m-p/298799#M60353
<P>Yes, it is possible to do. Given item parameter estimates, you can do subject scoring (i.e., computing scores for subjects). Refer to Example 5 of PROC IRT documentation: Subject Scoring.</P>Thu, 15 Sep 2016 20:36:24 GMThttps://communities.sas.com/t5/SAS-Procedures/PROC-IRT-estimate-latent-traits-with-KNOWN-item-parameters/m-p/298799#M60353PatrickYang2016-09-15T20:36:24ZRe: How to change the log-in E-mail account after institutional affiliation change????
https://communities.sas.com/t5/All-Things-Community/How-to-change-the-log-in-E-mail-account-after-institutional/m-p/298757#M1869
<P>Thank you, Beverly, for this solution. It does work. After making the change, I am now able to log into the community using a new E-mail address that I just typed in.</P>Thu, 15 Sep 2016 18:51:02 GMThttps://communities.sas.com/t5/All-Things-Community/How-to-change-the-log-in-E-mail-account-after-institutional/m-p/298757#M1869PatrickYang2016-09-15T18:51:02ZHow to change the log-in E-mail account after institutional affiliation change????
https://communities.sas.com/t5/All-Things-Community/How-to-change-the-log-in-E-mail-account-after-institutional/m-p/298745#M1865
<P>My current log-in E-mail is from my previous employer. Given a new job, I would like to change the log-in E-mail to that from the new employer. Is it possible for me to make the change? I do not want to register for a brand new account.</P><P> </P><P>Thank you.</P>Thu, 15 Sep 2016 18:18:35 GMThttps://communities.sas.com/t5/All-Things-Community/How-to-change-the-log-in-E-mail-account-after-institutional/m-p/298745#M1865PatrickYang2016-09-15T18:18:35ZInconsistency in PROC GA documentation?
https://communities.sas.com/t5/Mathematical-Optimization/Inconsistency-in-PROC-GA-documentation/m-p/279167#M1390
<P>When teaching myself PROC GA, I suspect I encountered some inconsistency in SAS documentation for this procedure: Between the SAS code and the description in the text. I just want to make sure my understanding is correct.</P><P> </P><P>1. Page of SAS documentation (first block of SAS code for PROC GA): <A href="https://support.sas.com/documentation/cdl/en/orlsoug/68155/HTML/default/viewer.htm#orlsoug_ga_examples01.htm" target="_blank">https://support.sas.com/documentation/cdl/en/orlsoug/68155/HTML/default/viewer.htm#orlsoug_ga_examples01.htm</A></P><P> </P><P>2. SAS code:</P><PRE class="xis-codeBlock"> call Initialize('DEFAULT',200);
call ContinueFor(140);</PRE><P> </P><P>3. Description in the text: "<SPAN>Next, the </SPAN><A href="https://support.sas.com/documentation/cdl/en/orlsoug/68155/HTML/default/orlsoug_ga_syntax09.htm" target="_blank">Initialize call</A><SPAN>specifies default initialization (random sequences) and a population size of 100. The </SPAN><A href="https://support.sas.com/documentation/cdl/en/orlsoug/68155/HTML/default/orlsoug_ga_syntax02.htm" target="_blank">ContinueFor call</A><SPAN> specifies a run of 220 iterations."</SPAN></P><P> </P><P><SPAN>Am I correct there is inconsistency here?</SPAN></P><P> </P>Tue, 21 Jun 2016 22:24:46 GMThttps://communities.sas.com/t5/Mathematical-Optimization/Inconsistency-in-PROC-GA-documentation/m-p/279167#M1390PatrickYang2016-06-21T22:24:46ZRe: PROC OPTMODEL for MULTIPLE solutions????
https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-MULTIPLE-solutions/m-p/266497#M1305
<P>Thank you, Rob, for showing us the link for the paper on identiifying multiple best solutions within PROC OPTMODEL. I will be reading it and try to figure out its relevance to our work. At this point, we truly enjoy this optimization program that is provided as part of SAS/OR.</P><P> </P><P>It surprises me that you still remember this question that I posted regarding the procedure, after nearly THREE months. We much appreciate it! <span class="lia-unicode-emoji" title=":slightly_smiling_face:">๐</span></P>Tue, 26 Apr 2016 18:53:39 GMThttps://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMODEL-for-MULTIPLE-solutions/m-p/266497#M1305PatrickYang2016-04-26T18:53:39ZRe: "Weighting" of cases in PROC OPTMODEL??
https://communities.sas.com/t5/Mathematical-Optimization/quot-Weighting-quot-of-cases-in-PROC-OPTMODEL/m-p/256232#M1258
<P>Thank you, Rob. This response of yours clarifies everything. Really helpful!!</P>Fri, 11 Mar 2016 22:05:30 GMThttps://communities.sas.com/t5/Mathematical-Optimization/quot-Weighting-quot-of-cases-in-PROC-OPTMODEL/m-p/256232#M1258PatrickYang2016-03-11T22:05:30ZRe: "Weighting" of cases in PROC OPTMODEL??
https://communities.sas.com/t5/Mathematical-Optimization/quot-Weighting-quot-of-cases-in-PROC-OPTMODEL/m-p/255848#M1254
<P>Hi Rob:</P><P> </P><P>Thank you for your prompt reply. I understand just a little bit the use of multiple objective functions. Based on the information from the documentation, given multiple objective functions, PROC OPTMODEL handles them in a sequential manner unless I combine them into one (say, maximize obj_combo=obj1+obj2+obj3, which I learned from you here at the SAS community. :-)).</P><P> </P><P>After reading the message you posted above, I could think of a case where multiple objective functions could be used:</P><P>Step 1: I set up/declare the first objective function OBJ1 to "maximize the contribution from the newer items" followed by the set of constraints.</P><P>Step 2: I set up/declare the second objective function OBJ2 to maximize the contribution from the older items followed by the same set of contraints as in Step 1.</P><P>Step 3: SOLVE with milp OBJ1; /*To optimize the contribution of newer items first*/</P><P>Step 4: SOLVE with milp OBJ2; /*To optimize the contribution of older items second*/</P><P> </P><P>Because PROC OPTMODEL processes the above two SOLVE statements in a sequential manner, I would be able to achieve the goal of assigning newer items first when adhering to one set of constraints and assigning older items second when satisfying the same set of constraints.</P><P> </P><P>I understand I need to read through the mathematical programming book on multiple objectives. But there is one thing in your post I do not quite understand: "After solving this, you add a constraint on this objective...." So, I am not sure what TYPE of constraint would need to be imposed on the first objective function specified for newer items? Using very general terms, what is the goal of the constraint that you suggest should be imposed on the first objective function?</P><P> </P><P>Thank you so much, Rob.</P>Thu, 10 Mar 2016 16:49:04 GMThttps://communities.sas.com/t5/Mathematical-Optimization/quot-Weighting-quot-of-cases-in-PROC-OPTMODEL/m-p/255848#M1254PatrickYang2016-03-10T16:49:04Z"Weighting" of cases in PROC OPTMODEL??
https://communities.sas.com/t5/Mathematical-Optimization/quot-Weighting-quot-of-cases-in-PROC-OPTMODEL/m-p/255805#M1251
<P>In an item assignment project, based on the request from our client, we would like to prioritize some of the items because they are produced under a new set of standards. In other words, we would like to have PROC OPTMODEL work on assigning these new items FIRST when trying to meet all the constraints that have been specified. To us, it sounds like some type of weight thing which assigns a higher probability of selection to newer items. *Weight* is just a terminology that came to us naturally but it may not be the right language in the literature of constrained optimization.</P><P> </P><P>We went through the documentation of PROC OPTMODEL but did not find any information related to this topic: Priortize newer items over older ones when trying to satisfy the constraints. So, we are wondering if this request from our client is really a "legitimate" one under the framework of constrained optimization?</P>Thu, 10 Mar 2016 15:22:55 GMThttps://communities.sas.com/t5/Mathematical-Optimization/quot-Weighting-quot-of-cases-in-PROC-OPTMODEL/m-p/255805#M1251PatrickYang2016-03-10T15:22:55Z