Re: Imposing linear binding constraint while using Rcgmin
I wrote Rcgmin to do bounds constraints only. Linear constraints are
much more complicated to include.
If your constraints are equality ones, you could "solve", but that could
make it awkward to evaluate the gradient.
For inequality constraints, especially if there are only a couple, I
think I'd try a penalty or barrier function. They tend to mess up the
scaling and slow things down, but generally give some idea of solutions.
Penalty function adds a penalty factor * "violation". Note that gradient
may need attention. i.e. penalizes being "outside" the constraint. No
use if you end up trying log(-something) or sqrt(-something).
Barrier adds cost "inside" the constraint to keep away from the
constraint. Generally you want it to be very small except "close",
and that is controlled by barrier control parameter. Again, you need to
watch the gradient is provided properly.
If possible avoid using numerical gradients for the penalty or barrier
because of the compromised scaling, though I would use them for a quick
and dirty test.
> Message: 18
> Date: Tue, 2 Jun 2015 01:33:55 +0530
> From: Rajarshi Bhadra <[hidden email]>
> To: [hidden email] > Subject: [R] Imposing linear binding constraint while using Rcgmin
> <CAFOno_aNQsXjiT4Z+9Koxig=[hidden email]>
> Content-Type: text/plain; charset="UTF-8"
> Is there any way by which I can impose a linear binding constraint while
> using Rcgmin for a non linear optimization exercise?
> [[alternative HTML version deleted]]