Evolver
Re: Running @Risk within Evolver

Thread Starter: Basil   Started: 10-19-2009 4:05 PM   Replies: 2
 Palisade Corporation Forums » Products » Evolver » Re: Running @Risk within Evolver
 Printable Version    « Previous Thread
  19 Oct 2009, 4:05 PM
Basil is not online. Last active: 8/9/2010 3:34:06 PM Basil

Top 10 Posts
Joined on 03-04-2008
Posts 4
Running @Risk within Evolver

Attachment: Portfolio Builder for Posting (Oct 2009).xls
Hi all,

I am a novice at VBA which means I can sometimes tweak VBA code into something that is useful, but I am stumped here...

I am trying to do what Optimizer does automatically.  I have 30 projects that Evolver is assembling into a portfolio (through the recipe method choosing integers 1 or 0). That seems to work with my macros.

Each project has uncertain characteristics (described as @Risk distributions).  For each Evolver trial satisfying the constraints, I want @Risk to run a simulation and calculate portfolio level statistics.  This is the part that keeps crashing.

Then I want Evolver to rate the fitness of the portfolio on a weighted score of portfolio level measures and then go to its next generation of guesses.

I have tried it as shown in the attached file, and i have also tried through the Evolver options, set to call the @Risk routine after each calculation.  In all cases, the routine doesn't seem to recognize the @Risk functions being used.

Any help would be appreciated,

Thanks,

Basil






  
  23 Oct 2009, 4:54 AM
Mirek is not online. Last active: 4/20/2010 9:12:43 AM Mirek

Top 10 Posts
Joined on 08-30-2005
Posts 75
Re: Running @Risk within Evolver

Hello,

Let me address why the code in the attached workbook doesn't compile:

(1) There are two methods named Sim_Risk, one needs to be re-named.

(2) You're programming @RISK with the old version 4-style macro language, including commands like RiskGetSettings or RiskSimulate.  These are supported in version 5, but for them to work you need to add reference to the Risk.xla add-in (listed as "AtRiskXL" when you go to Tools>References in the VBA editor).

I'd recommend using the new object-oriented macro language introduced in @RISK version 5.  That seems like a better idea from the point of view of maintaining the code and obtaining technical support in the future.

Mirek


  
  09 Nov 2009, 6:34 PM
Basil is not online. Last active: 8/9/2010 3:34:06 PM Basil

Top 10 Posts
Joined on 03-04-2008
Posts 4
Re: Running @Risk within Evolver
Mirek,

Thanks for helping out here.  I had grabbed that code from another application and wouldn't have spotted that change in language requirement.

All is going well now,

Basil

  
 Page 1 of 1 (3 items)
Palisade Corporation Forums » Products » Evolver » Re: Running @Risk within Evolver

You can add attachments
You can post new topics
You can reply to topics
You cannot delete your posts
You can edit your posts
You cannot create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

Powered by Community Server :: Forums