public override bool CanPerform(Event proposedEvent, Universe environment) { if (IsEvaluated) return true; // Check all dependent subsystems foreach (var sub in DependentSubsystems) { if (!sub.IsEvaluated) if (sub.CanPerform(proposedEvent, environment) == false) return false; } _task = proposedEvent.GetAssetTask(Asset); //Find the correct task for the subsystem _newState = proposedEvent.State; IsEvaluated = true; // Call the can perform method that is in the python class dynamic perform = _pythonInstance.CanPerform(proposedEvent, environment); return (bool)perform; }
public override bool CanExtend(Event proposedEvent, Universe environment, double evalToTime) { dynamic extend = _pythonInstance.CanExtend(proposedEvent, environment, evalToTime); return (bool)extend; }