Re: [R] constrained optimization help please!

2012-11-06 Thread Berend Hasselman
On 05-11-2012, at 23:56, hayduke wrote: > Thank-you Berend. This approach does work. Now I need to constrain the > problem so that sum(d.NR) is positive for each fleet. I tried this but with > no luck: > I see that on Nabble you have boldified the problem. In the R-help mailing list this is con

Re: [R] constrained optimization help please!

2012-11-05 Thread hayduke
Thank-you Berend. This approach does work. Now I need to constrain the problem so that sum(d.NR) is positive for each fleet. I tried this but with no luck: *nfleets<-2 nareas<-2 M<-1 M<-array(M,dim=c(nfleets,nareas)) N<-1000 cost<-c(40,40) cost<-array(cost,dim=c(nfleets,nareas)) Price<-2 Price<-ar

Re: [R] constrained optimization help please!

2012-11-02 Thread Berend Hasselman
On 01-11-2012, at 21:59, hayduke wrote: > Hi All, > I am having some real difficulty in trying to carry out constrained > optimization. I have had no problems with the Optim() function but when I Being pedantic: I assume you mean optim(...)? > try to constrain the problem I am getting all sort