
Sorry for the unclear description in my last post. It is an error in my last
post, that x4 should be in the range of [-1, 0] as it is identical to x1.
Actually I think both "constraint" (for the requirement 1 and 2, so there
are only 9 variables) and "bounded" (for the requirement 3) opt are needed
in my case.  Does it means that the "optim" function can not meet my
requirements, and that the "constrOptim" function is needed (as Joanthon
mentioned)?

Many thanks for the reply!

Best,
Hao

On Sat, Nov 20, 2010 at 3:17 AM, Hans W Borchers [via R] <
ml-node+3051338-309339578-202837@n4.nabble.com<ml-node%2B3051338-309339578-202837@n4.nabble.com>
> wrote:


> I don't see any direct need for real 'constraint' optimization here,
> it is a 'bounded' optimization where you are allowed to use
>
>     lower <- c(-1,0,-1,0,-1,0,0,0,0,0,0,0)
>     upper <- c( 0,1, 0,0, 0,1,1,1,1,1,1,1)
>
> Otherwise, your description is confusing:
>   (1) Did you change f to a new function with 9 variables, eliminating
>       x3, x4, and x12 ?
>   (2) x4 (being equal to x1) has to be in [-1, 0] but also in [0, 1]?
>   (3) If you need to restrict x12 to [0, 1] also, you cannot eliminate it.
>       Either keep x12 and use an equality constraint, or use inequality
>       constraints on xxlr.
>
> Hans Werner
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3051338&i=0>mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
>
> ------------------------------
>  View message @
> http://r.789695.n4.nabble.com/question-about-constraint-minimization-tp3050880p3051338.html
>
> To unsubscribe from question about constraint minimization, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3050880&code=ZGhhY2FkZW1pY0BnbWFpbC5jb218MzA1MDg4MHwtNjM2Nzc0NA==>.
>
>

-- 
View this message in context: http://r.789695.n4.nabble.com/question-about-constraint-minimization-tp3050880p3051663.html
Sent from the R help mailing list archive at Nabble.com.

	[[alternative HTML version deleted]]

