Hi Roger

Roger Mason wrote:
> Hello John,
>
> I've been playing with ascend a bit, trying to get experience by solving
> simple problems.  Specifically, I've looked at this site:
>
> http://en.wikipedia.org/wiki/Lagrange_multipliers
>   

Yes, I've come across that site before ;-)

> and attempted to solve "very simple example" using this model:
>   

My first point is that IPOPT, our optimisation solver, already uses
Lagrange multipliers internally. So you don't need to code up all this
stuff for yourself. Otherwise, you're essentially trying to run a solver
within a solver, which isn't really a great idea.

> REQUIRE "atoms.a4l";
>
>     ATOM inverse_distance REFINES solver_var
>         DIMENSION 1/L
>         DEFAULT 1{1/ft};
>         lower_bound := 0.0{1/ft};
>         upper_bound := 1e50{1/ft};
>         nominal := 1.0{1/ft};
>     END inverse_distance;
>
> MODEL  wpediaLagrangeEx1;
>
>        (* variables *)
>        X, Y           IS_A distance;
>        lambda         IS_A factor;
>        dG_dX          IS_A inverse_distance;
>        dG_dY          IS_A inverse_distance;
>        dG_dlambda     IS_A factor;
>        
>        (* equations *)
>        dG_dX      = 1 + 2*lambda*X;
>        dG_dY      = 1 + 2*lambda*Y;
>        dG_dlambda = X^2 + Y^2 -1;
>
> METHODS
>         METHOD specify;
>                FIX dG_dX;
>                FIX dG_dY;
>                FIX dG_dlambda;
>         END specify;
>
>         METHOD values;
>                dG_dX           := 0.0; 
>                dG_dY           := 0.0;
>                dG_dlambda      := 0.0;                                  
>        END values;
>
>  
> END wpediaLagrangeEx1;
>
> This works, but ascend stops when it finds the first solution (X = Y =
> sqrt(2)/2).  Is there a way to get ascend to report multiple values of a
> variable that represent a solution?  Or am I misusing ascend?
>   

If you *really* want to try to solve a problem like this, using QRSlv as
your ASCEND solver, then you can control which root ASCEND converges to
by constraining the lower_bound and upper_bound of the unknowns in your
system. Check our wiki for details.

> Thanks, and my apologies for sending such a long message to your private
> e-mail.
>   

That's OK. Hope you don't mind that I CCed my response to the users'
mailing list, for future reference.

Cheers
JP


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Ascend-sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ascend-sim-users

Reply via email to