<?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: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507506#M2463</link>
    <description>&lt;P&gt;Oops, I didn't realize I had copied from an erroneous run when I tried to change a little bit of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my current PROC OPTMODEL and the results:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;

     /*decision variables*/
	var n {1..&amp;amp;n};
	var denom;
	var sum_n;

	number pop {1..&amp;amp;n};
	number p_rate {1..&amp;amp;n};

	read data ced_rates into [_n_] pop p_rate;

	 /*objective function*/
	minimize sum_sqrs = sum {j in 1..&amp;amp;n.} (((n[j] * p_rate[j] / denom) - (pop[j] / &amp;amp;usa_population.))**2);

     /*problem constraints*/
	con denomCon:
		denom = sum{k in 1..&amp;amp;n} (n[k] * p_rate[k]);

	con sumCon:
		sum_n = sum{k in 1..&amp;amp;n} n[k],
		sum_n = &amp;amp;n_usa.;

	con pCon {j in 1..&amp;amp;n}:
		p_rate[j] * n[j] &amp;gt;=
			if j in 10..18 then &amp;amp;n_min_rural. 
				else &amp;amp;n_min_urban.;

	solve;
	print n;
	print sum_sqrs;

quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;                                                 The OPTMODEL Procedure

                                                    Solution Summary

                                          Solver                           NLP
                                          Algorithm             Interior Point
                                          Objective Function          sum_sqrs
                                          Solution Status               Failed
                                          Objective Value                    .

                                          Optimality Error                   .
                                          Infeasibility                  12000

                                          Iterations                         0
                                          Presolve Time                   0.00
                                          Solution Time                   0.00

&lt;BR /&gt; [1] n&lt;BR /&gt;&lt;BR /&gt; 1 119.271&lt;BR /&gt; 2 140.021&lt;BR /&gt;(...)&lt;BR /&gt; 40 135.444&lt;BR /&gt; 41 140.301&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; sum_sqrs&lt;BR /&gt;&lt;BR /&gt; .&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;18421      solve;
NOTE: Problem generation will use 4 threads.
NOTE: The problem has 43 variables (43 free, 0 fixed).
NOTE: The problem has 44 linear constraints (0 LE, 3 EQ, 41 GE, 0 range).
NOTE: The problem has 126 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver removed 1 variables, 42 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolved problem has 42 variables, 2 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolver removed 43 linear constraint coefficients, leaving 83.
NOTE: Using analytic derivatives for objective.
NOTE: Using 2 threads for nonlinear evaluation.
NOTE: The NLP solver is called.
NOTE: The Interior Point algorithm is used.
WARNING: Objective function cannot be evaluated at starting point.
NOTE: Did not converge.
18422      print n;
18423      print sum_sqrs;
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: The maximum message limit was reached during execution of the statement block. 16 notes and warnings were not
      displayed.
18424
18425  quit;
NOTE: PROCEDURE OPTMODEL used (Total process time):
      real time           0.12 seconds
      cpu time            0.06 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Oct 2018 15:36:12 GMT</pubDate>
    <dc:creator>mathmannix</dc:creator>
    <dc:date>2018-10-25T15:36:12Z</dc:date>
    <item>
      <title>proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not conve</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507306#M2455</link>
      <description>&lt;P&gt;[rge, obviously].&lt;/P&gt;&lt;P&gt;I am trying to learn and use proc optmodel (replacing an older program someone else wrote with proc nlp, which didn't really work as desired anyway.)&lt;/P&gt;&lt;P&gt;Am I doing this at all correctly?&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;

     /*decision variables*/
	var n {1..&amp;amp;n};
	var denom;
	var sum_n;

	number pop {1..&amp;amp;n};
	number p_rate {1..&amp;amp;n};

	read data ced_rates into [_n_] pop p_rate;

	denom = sum{k in 1..&amp;amp;n} n[k] * p_rate[k];

	minimize sum_sqrs = sum {j in 1..&amp;amp;n.} ((n[j] * p_rate[j] / denom) - (pop[j] / &amp;amp;usa_population.))**2;

	sum_n = sum{k in 1..&amp;amp;n} n[k];

     /*problem constraints*/
	con	sum_n = &amp;amp;n_usa.,
		p_rate[1] * n[1] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[2] * n[2] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[3] * n[3] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[4] * n[4] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[5] * n[5] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[6] * n[6] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[7] * n[7] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[8] * n[8] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[9] * n[9] &amp;gt;=	&amp;amp;n_min_urban.,

		p_rate[10]*n[10] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[11]*n[11] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[12]*n[12] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[13]*n[13] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[14]*n[14] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[15]*n[15] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[16]*n[16] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[17]*n[17] &amp;gt;=	&amp;amp;n_min_rural.,
		p_rate[18]*n[18] &amp;gt;=	&amp;amp;n_min_rural.,

		p_rate[19]*n[19] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[20]*n[20] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[21]*n[21] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[22]*n[22] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[23]*n[23] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[24]*n[24] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[25]*n[25] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[26]*n[26] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[27]*n[27] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[28]*n[28] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[29]*n[29] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[30]*n[30] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[31]*n[31] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[32]*n[32] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[33]*n[33] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[34]*n[34] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[35]*n[35] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[36]*n[36] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[37]*n[37] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[38]*n[38] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[39]*n[39] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[40]*n[40] &amp;gt;=	&amp;amp;n_min_urban.,
		p_rate[41]*n[41] &amp;gt;=	&amp;amp;n_min_urban.;

	solve;
	print n;
	print sum_sqrs;

quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I wanted the number of constraints to be dynamic (&amp;amp;n. = 41), but I couldn't figure out a way to do that.)&lt;/P&gt;&lt;P&gt;I guess the major problem is that the log shows&lt;/P&gt;&lt;P&gt;WARNING: Objective function cannot be evaluated at starting point.&lt;BR /&gt;NOTE: Did not converge.&lt;/P&gt;&lt;P&gt;and then a bunch of "NOTE: Division by zero at line"... lines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another problem is that, when the program does print out the 41 n values, they do NOT add up to the desired total, &amp;amp;n_usa.&lt;/P&gt;&lt;P&gt;(They are all given values greater than their constraint minimums, so at least that's something.)&lt;/P&gt;&lt;P&gt;The sum_sqrs variable is output as "."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong? (Am I doing anything right, even?)&lt;/P&gt;&lt;P&gt;Thanks in advance for any help or constructive input.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 20:00:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507306#M2455</guid>
      <dc:creator>mathmannix</dc:creator>
      <dc:date>2018-10-24T20:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507324#M2457</link>
      <description>&lt;P&gt;You are probably not solving the problem that you think you are.&amp;nbsp; You might find the EXPAND statement useful in debugging your model.&amp;nbsp; I suspect that you intended the following two lines to be constraints:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;denom = sum{k in 1..&amp;amp;n} n[k] * p_rate[k];
sum_n = sum{k in 1..&amp;amp;n} n[k];
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As written, they simply update the values of denom and sum_n, but then the solver is free to change those values.&amp;nbsp; Instead, I think you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con denomCon:
   denom = sum{k in 1..&amp;amp;n} n[k] * p_rate[k];
con sumCon:
   sum_n = sum{k in 1..&amp;amp;n} n[k];
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, you can write your family of 41 constraints more compactly as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con pCon {j in 1..&amp;amp;n}:
   p_rate[j] * n[j] &amp;gt;= if j in 10..18 then &amp;amp;n_min_rural. else &amp;amp;n_min_urban.;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Alternatively, if p_rate[j] is known to be positive, you can omit these explicit constraints and instead modify the lower bound of n[j]:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;for {j in 1..&amp;amp;n}
   n[j].lb = (if j in 10..18 then &amp;amp;n_min_rural. else &amp;amp;n_min_urban.) / p_rate[j];
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 20:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507324#M2457</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-10-24T20:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507468#M2461</link>
      <description>&lt;P&gt;OK, thank you for your help so far, but I still get the same [lack of] results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;                                                    Solution Summary

                                          Solver                           NLP
                                          Algorithm             Interior Point
                                          Objective Function          sum_sqrs
                                          Solution Status               Failed
                                          Objective Value                    .

                                          Optimality Error                   .
                                          Infeasibility                      0

                                          Iterations                         0
                                          Presolve Time                   0.00
                                          Solution Time                   0.00


                                                        sum_sqrs

                                                               .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(%n n values omitted from results)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excerpt from Log:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Problem generation will use 4 threads.
NOTE: Previous errors might cause the problem to be resolved incorrectly.
NOTE: The problem has 43 variables (43 free, 0 fixed).
NOTE: The problem has 43 linear constraints (0 LE, 2 EQ, 41 GE, 0 range).
NOTE: The problem has 125 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver removed 0 variables, 41 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolved problem has 43 variables, 2 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolver removed 41 linear constraint coefficients, leaving 84.
NOTE: Using analytic derivatives for objective.
NOTE: Using 2 threads for nonlinear evaluation.
NOTE: The NLP solver is called.
NOTE: The Interior Point algorithm is used.
WARNING: Objective function cannot be evaluated at starting point.
NOTE: Did not converge.
15315      print n;
15316      print sum_sqrs;
NOTE: Division by zero at line 15249 column 63.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is it not converging?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 13:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507468#M2461</guid>
      <dc:creator>mathmannix</dc:creator>
      <dc:date>2018-10-25T13:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507487#M2462</link>
      <description>&lt;P&gt;I need more information to be able to diagnose this.&amp;nbsp; But you have some error before the log that you posted:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;NOTE&lt;/SPAN&gt;: Previous errors might cause the problem to be resolved incorrectly&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can you please share your code and data?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 14:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507487#M2462</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-10-25T14:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507506#M2463</link>
      <description>&lt;P&gt;Oops, I didn't realize I had copied from an erroneous run when I tried to change a little bit of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my current PROC OPTMODEL and the results:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;

     /*decision variables*/
	var n {1..&amp;amp;n};
	var denom;
	var sum_n;

	number pop {1..&amp;amp;n};
	number p_rate {1..&amp;amp;n};

	read data ced_rates into [_n_] pop p_rate;

	 /*objective function*/
	minimize sum_sqrs = sum {j in 1..&amp;amp;n.} (((n[j] * p_rate[j] / denom) - (pop[j] / &amp;amp;usa_population.))**2);

     /*problem constraints*/
	con denomCon:
		denom = sum{k in 1..&amp;amp;n} (n[k] * p_rate[k]);

	con sumCon:
		sum_n = sum{k in 1..&amp;amp;n} n[k],
		sum_n = &amp;amp;n_usa.;

	con pCon {j in 1..&amp;amp;n}:
		p_rate[j] * n[j] &amp;gt;=
			if j in 10..18 then &amp;amp;n_min_rural. 
				else &amp;amp;n_min_urban.;

	solve;
	print n;
	print sum_sqrs;

quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;                                                 The OPTMODEL Procedure

                                                    Solution Summary

                                          Solver                           NLP
                                          Algorithm             Interior Point
                                          Objective Function          sum_sqrs
                                          Solution Status               Failed
                                          Objective Value                    .

                                          Optimality Error                   .
                                          Infeasibility                  12000

                                          Iterations                         0
                                          Presolve Time                   0.00
                                          Solution Time                   0.00

&lt;BR /&gt; [1] n&lt;BR /&gt;&lt;BR /&gt; 1 119.271&lt;BR /&gt; 2 140.021&lt;BR /&gt;(...)&lt;BR /&gt; 40 135.444&lt;BR /&gt; 41 140.301&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; sum_sqrs&lt;BR /&gt;&lt;BR /&gt; .&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;18421      solve;
NOTE: Problem generation will use 4 threads.
NOTE: The problem has 43 variables (43 free, 0 fixed).
NOTE: The problem has 44 linear constraints (0 LE, 3 EQ, 41 GE, 0 range).
NOTE: The problem has 126 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver removed 1 variables, 42 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolved problem has 42 variables, 2 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolver removed 43 linear constraint coefficients, leaving 83.
NOTE: Using analytic derivatives for objective.
NOTE: Using 2 threads for nonlinear evaluation.
NOTE: The NLP solver is called.
NOTE: The Interior Point algorithm is used.
WARNING: Objective function cannot be evaluated at starting point.
NOTE: Did not converge.
18422      print n;
18423      print sum_sqrs;
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: Division by zero at line 18356 column 63.
NOTE: The maximum message limit was reached during execution of the statement block. 16 notes and warnings were not
      displayed.
18424
18425  quit;
NOTE: PROCEDURE OPTMODEL used (Total process time):
      real time           0.12 seconds
      cpu time            0.06 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Oct 2018 15:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507506#M2463</guid>
      <dc:creator>mathmannix</dc:creator>
      <dc:date>2018-10-25T15:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507508#M2464</link>
      <description>&lt;P&gt;The default initial value for each variable is 0.&amp;nbsp; Because denom appears in a denominator of the objective function, you get a division by zero error.&amp;nbsp; One thing you can try is initializing denom to something nonzero, say 1.&amp;nbsp; You can do this during declaration:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var denom init 1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or with an assignment statement before the solve:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;denom = 1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If that doesn't help, please share your data set and macro variables so that I can diagnose further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 15:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507508#M2464</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-10-25T15:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507545#M2465</link>
      <description>&lt;P&gt;The program "works". That is, it compiles and presents a "feasible" solution (one which fits the constraints I gave it), but the solution is not at all realistic. Furthermore, it is highly subjective to initial constraints (such as changing the var sum_n line from the default of 0 to 1 or 10 or 308745538). It also provides a quite different solution if I specify PRESOLVE=BASIC rather than the default, but not one I like much better.&lt;/P&gt;&lt;P&gt;Shouldn't the sum of squares be a convex function, with only one local minimum?&lt;/P&gt;&lt;P&gt;Now I'm just not sure what to do, because my program seems to work syntactically, but I just don't like its output.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 18:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507545#M2465</guid>
      <dc:creator>mathmannix</dc:creator>
      <dc:date>2018-10-25T18:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507546#M2466</link>
      <description>&lt;P&gt;Unfortunately, I don't think I (should / am authorized to / legally can ?)&amp;nbsp; publicly post my data set and macro variables.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 18:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507546#M2466</guid>
      <dc:creator>mathmannix</dc:creator>
      <dc:date>2018-10-25T18:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel WARNING: Objective function cannot be evaluated at starting point. NOTE: Did not c</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507551#M2467</link>
      <description>&lt;P&gt;Yes, the sum of squares of &lt;EM&gt;convex&lt;/EM&gt; functions is convex, but the expression you are squaring is not convex.&amp;nbsp; As a simpler example, consider (sqrt(f(x)))^2 + (sqrt(f(x)))^2, where f(x) is any nonconvex function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To increase the likelihood of finding a globally optimal solution for a nonconvex minimization (or nonconcave maximization) problem, you can use the MULTISTART option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;solve with nlp / multistart;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you can simplify the code a bit by omitting the sum_n variable and merging two of the constraints into one:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con sumCon:
   sum{k in 1..&amp;amp;n} n[k] = &amp;amp;n_usa.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;From your log, it looks like the presolver is doing that anyway.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 19:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/proc-optmodel-WARNING-Objective-function-cannot-be-evaluated-at/m-p/507551#M2467</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-10-25T19:07:29Z</dc:date>
    </item>
  </channel>
</rss>

