On Thu, 31 Mar 2005 12:50:49 -0500, Kohei Yoshida
<[EMAIL PROTECTED]> wrote:
> Hi Niklas,
> 
> On Thu, 31 Mar 2005 19:20:04 +0200, Niklas Nebel <[EMAIL PROTECTED]> wrote:
> > Kohei Yoshida wrote:
> > > Although it's a long-term project, I'm working toward creating an
> > > optimization solver component for Calc.  Still not sure if this will
> > > ever materialize (hope it will), but at least I'm working on it.
> > >
> > > I am also working on creating a public website for this.
> > >
> > > http://kohei.us/ooo/solver/index.html
> > >
> > > It's far from being finished, but I'm planning to post my progress on
> > > this page as I go.
> >
> > I just read on that page that you're going to parse the formula text to
> > get a linear representation. Why don't you use the approach of modifying
> > the input values and reading the formula result? That would seem both
> > easier and more versatile.
> 
> Yes.  I had thought about that approach, and I may still do that as a
> short-term solution.  But that approach may not work on the following
> case:
> 
> A1: = 2*B2*G5 + 4*B3 (objective function cell a.k.a. "target cell")
> G5: = 400
> B2 and B3 are decision variables (a.k.a. "by changing cells" variables)

Actually this was not a good counter-example as it could still be
solved using the easier approach.

Consider this scenario:

A1: = 2*G5*G6 + 3*B3
G5: = B2
G6: = 20
B2 and B3 are decision variables.

In this case, it is not so obvious in the topmost formula (A1) that G5
contains a reference to a decision variable and G6 is a constant.  To
properly translate this model into a standard form all cell references
in A1 must be resolved first, which requires some type of recursive
descent parsing.

Things get really complicated if you consider:

A1: = G5*(G6 + B3) + B4
G5: = 20
G6: = B2
B2, B3 and B4 are all decision variables.

This is still linear, but the following is not.


A1: = G5*(G6 + B3) + B4
G5: = B5
G6: = B2
B2, B3, B4 and B5 are all decision variables.

This one is non-linear, hence the linear assumption should fail.

In the last two cases, the coefficient vector cannot easily be
determined without resolving all the cell references first.  Plus
checking for linearity of the model may be very difficult.  This is my
main argument in favor of using the recursive descent parser.

Regards,

Kohei

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to