FanucWeb/ActiveBOWeb/src/store/PolicyStore.js

28 lines
632 B
JavaScript
Raw Normal View History

2023-02-17 12:29:49 +00:00
import { defineStore } from "pinia";
export const usePStore = defineStore('Policy Store', {
state: () => {
return {
policy: Array,
weights: [-1, 1, 1],
nr_steps: 0,
}
},
getters: {
getPolicy: (state) => state.policy,
getWeights: (state) => state.weights,
getNrSteps: (state) => state.nr_steps,
},
actions: {
setPolicy(value) {
this.policy = value;
},
setWeights(value) {
this.weights = value;
},
setNrSteps(value) {
this.nr_steps = value;
},
}
})