Hello, Analytica Friends,
I hope you are enjoying your summer! In this issue see how MultiTable and SubTable functions can let you combine input edit tables and computed results in a single table view. Then learn how to read and write spreadsheets to Analytica. Finally, we take you to Napa Valley where Analytica is used to model water supply issues.
Let us know how you are using Analytica - it's always great to hear from you!
Marie Kjargaard, Newsletter Editor
MultiTables & SubTables in Analytica
With the release of Analytica 4.6, MultiTable and SubTable features allow you to configure a virtual view of multiple edit tables or portions of tables, along with computed results in a single view for your model’s UI.
The elegant way of organizing variables in your model logic (separating distinct quantities into different variables) is often in conflict with user-interface objectives where it may be desirable to group different quantities into the same table view.
In this video, Lonnie Chrisman, Lumina’s CTO, demonstrates how to use the MultiTable and SubTable features to present the end user with input tables that are structured differently from the input variables in your model.
Tips & Tricks: Read and Write Spreadsheets from Analytica
Did you know you can read and write to spreadsheets from Analytica? In Analytica 4.6, spreadsheet functions are now accessible in all our editions.
Open a workbook by using SpreadsheetOpen(), then read the data in it using SpreadsheetRange(). It is best practice to copy data from a spreadsheet into a new variable. This way you'll always be able to use the model, even if you can't find the spreadsheet the model uses. This can be done with the press of a button!
Say you want to save the contents of a variable Imported_Spreadsheet (which contains the function SpreadsheetRange) to Saved_Spreadsheet, and copy the implicit Saved_Spreadsheet indexes to global indexes Saved_Row and Saved_Column. Putting the following OnClick script into a button node will do the trick:
Saved_Row := CopyIndex(Saved_Spreadsheet.Row);
Saved_Column := CopyIndex(Saved_Spreadsheet.Col);
Saved_Spreadsheet := Imported_Spreadsheet[@.Row=@Saved_Row, @.Col=@Saved_Column];
The first two lines copy the implicit indexes to global indexes, and the third line copies the data and reindexes it to the newly updated global indexes. Then you can manipulate the data however you like.
You can write to a spreadsheet using SpreadsheetSetCell(), SpreadsheetSetRange(), or SpreadsheetSetInfo(), but be sure to save any of your changes with SpreadsheetSave()!
The best part is that spreadsheet functions are integrated seamlessly in ACP - you can upload and download relevant spreadsheets from the ACP model directory, or you can do it from the open model itself. Check out the Wiki for an example model and more instructions on how to use spreadsheets in Desktop Analytica here, and in ACP here.
How much water do we have?
With the ongoing drought in California, water supply has become a more pressing issue. For the city of St. Helena (pop. 5,947), located in California’s wine-rich Napa Valley, water has been at the heart of ongoing community debates about growth between those who support increased housing and commercial development and others concerned about growing traffic and preserving St. Helena’s small town character. The city formed a commission to update their state-mandated water plan. For commission member Tim Nieman, a decision analysis consultant with environmental and energy industry expertise – and a St. Helena resident, Analytica was the clear choice to model the supply and demand of water.
“It was easy to describe the structure of the problem using Analytica’s influence diagrams", said Nieman, “and we were super open with our analysis.”
Those on either side of the issue could clearly see how the analysis was performed.
“That helped a lot,” said Nieman. “They couldn’t just say, ‘I don’t like the results.”
Read about how the Analytica model was used to inform stakeholders and help develop new policies for St. Helena.
Build computer models that are fast, transparent, flexible, and powerful.
Free 101 includes influence diagrams, risk analysis, and Intelligent Arrays™ to let you build models with up to 101 variables and other user-defined objects.
|Download Free 101|
Zero cost. Never expires.
Analytica experts show how to build and analyze a model and answer your questions about our products or services. You can also ask your own questions about how Analytica could be used for your applications.
Sign up to schedule your demo