This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* RpcDurableObject is a base class for DurableObjects that want to be called in an RPC style. Derive your object | |
* from this class and implement your methods as normal methods. There is no need to implement the fetch method. Then, | |
* use the buildRpcClient function to create a proxy object and call methods on the durable object as if it were a | |
* local object! | |
* | |
* This hides the complexity of calling a Durable Object from a worker and allows you to focus on the business logic | |
* of your application. It also allows you to use TypeScript to type your RPC methods; your worker and the proxy object | |
* should both implement the same interface containing the RPC methods. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export module RelationshipModel { | |
// Constants for the model | |
const k1 = 0.5; // Influence of self-satisfaction on relationship satisfaction | |
const k2 = 0.3; // Influence of jealousy/admiration on relationship satisfaction | |
const k3 = 0.2; // Influence of motivated opportunities on relationship satisfaction | |
const k4 = 0.6; // Influence of employment success on self-satisfaction | |
const k5 = -0.4; // Impact of jealousy on self-satisfaction (negative implies reducing self-satisfaction) | |
const k6 = 0.2; // Impact of opportunities on self-satisfaction | |
const k7 = 0.5; // Sensitivity of jealousy/admiration to differences in success | |
const k8 = 0.3; // How desire for success affects jealousy/admiration |
OlderNewer