locked
Set a variable to be observed RRS feed

  • Question

  • Is it possible to mark a variable to be observable without setting a default/fake value? So that I can generate the compiled algorithm first, and then provide it with the observations later?

    Unfortunately isObserved property is readonly.



    • Edited by colinfang Wednesday, November 12, 2014 12:06 AM
    Wednesday, November 12, 2014 12:05 AM

Answers

  • No.  Is there a problem with setting a value?
    • Marked as answer by colinfang Wednesday, November 12, 2014 10:43 AM
    Wednesday, November 12, 2014 9:28 AM
    Owner

All replies

  • No.  Is there a problem with setting a value?
    • Marked as answer by colinfang Wednesday, November 12, 2014 10:43 AM
    Wednesday, November 12, 2014 9:28 AM
    Owner
  • We have a standard way of doing this:

    var userCount = Variable.Observed(default(int)).Named("UserCount");
    var userIds = Variable.Observed(default(IList<int>), observation).Named("UserIds");

    Wednesday, November 12, 2014 3:25 PM