Update to Forio Epicenter (v1.38)

Hello Everyone,

It’s been a busy start to the year for Forio – we’ve moved offices! We’re still in San Francisco, just a few miles away, and now with a better view.

We’ve also released another update to Epicenter, as well as to the Epicenter.js library.

This release of Epicenter introduces two new, related features for SimLang. First, you can now set V variables. (Previously, you could only set D decisions). Second, you can explicitly force both variables and decisions to be recalculated by calling the new recalculate() operation. It takes an array of variable and decision names and returns the updated values.

This release of Epicenter.js, 1.7.1, adds the ability for end users to log in to multiple Epicenter sims simultaneously.

Complete release notes are below. As always, Epicenter release notes for this and other releases are available at:
https://forio.com/epicenter/docs/public/releases/

Happy modeling!

WILL

##v1.38 Release Notes

New Features

  • SimLang variables can now be changed.

    • Background: Recall that in SimLang, models may contain both decisions and variables. Decisions take their value from the end user’s input; an equation defines their initial value. Variables are recalculated every time step based on their equation (definition) in the model.
  • New Feature: In previous releases, only SimLang decisions could be changed by end users. As of this release, SimLang variables can also be changed by end users. Specifically, variables can be updated directly, for example using PATCH from the Run API, or using Flow.js or Epicenter.js. When you PATCH a variable with a value, it gets that value and holds it. The equation in the variable is now ignored, as are any changes to variables used in the equation. See more information.

  • SimLang variables and decisions can now be recalculated.

    • Background: Decisions take their value from the end user’s input; an equation defines their initial value. Variables are generally recalculated every time step based on their equation (definition) in the model. However, if they are PATCHed to take their value from the end user’s input, the equation in the variable is subsequently ignored.

    • New Feature: You can cause both variables and decisions to recalculate based on their equation in the model by calling the operation recalculate. In particular, calling recalculate on a variable “unfreezes” the variable, if it had been PATCHed: moving forward, the variable is again automatically recalculated every time step based on its equation in the model. See more information.

  • Release of Epicenter.js 1.7.1. The Epicenter.js JavaScript library has been updated to version 1.7.1. Full release notes available on GitHub. Notable bug fixes and new features include:

    • The Authorization Manager now sets the path in the cookie based on the Account ID and Project ID. This allows end users to log in to multiple Epicenter simulations simultaneously without conflict.

    • Updates for the run strategies to use group name rather than group id to create runs with specific scope. CAUTION: If you update an existing project to use Epicenter.js 1.7.1, and your project restores runs, these older runs will not have the correct scope.

    • The API configuration (that is, where the REST API calls should be sent) is now loaded from the current server, rather than hard-coded in the library. This allows Epicenter.js to more easily be used on multiple Epicenter installations (not just forio.com).

Notable Bug Fixes

  • In some cases, the SimLang CEILING and FLOOR functions were vulnerable to floating point operations, and returned non-integer values. This has been corrected. This was released as Epicenter v1.36.2 on 2/1/16.

  • In some cases, runs without an explicit scope were causing errors due to incompatibilities in how empty objects were stored in and retrieved from the database. This has been corrected. This was released as Epicenter v1.36.3 on 2/2/16.

  • In some cases, simultaneous calls to the Model Run and Model Variable APIs were resulting in runs being restored from the database to memory twice. This is now resolved; requests block until the run is fully restored. This was released as Epicenter v1.36.4 on 3/12/16.

  • If you make a new project and choose to use an example, the examples now use the new Epicenter.js version 1.7.1. Existing projects initially creating using the examples were not changed.

  • Other minor fixes for security, performance, and stability.

  • Other minor improvements to documentation.

1 Like

Congrats on the new version! Hope epicenter.js will be in npm repository and be easier to integrate for both client and server side javascript.

I got a warning message from jquery 2.1.1 after upgrading to epicenter.js. Don’t think I get it from previous version.
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

Thanks Jay

We are investigating the jquery warning message you are encountering.

Regards,
Geromel

Hi Jay,

This is a known issue. We’ll fix it in a later release but for now you can ignore it.

We’ve added some functionality to epicenter.js where it looks up the URL for the api server from forio.com/epicenter/v1/config when the page is initialized. This provides flexibility for those hosting their sims on custom domains. The call is executed synchronously (due to the need to do the call before the page is loaded), hence the warning. We’ll do this a little differently in a later release but for now just ignore the warning.