manually finished
This commit is contained in:
parent
351b63da6b
commit
a21bf5b045
@ -13,7 +13,8 @@
|
|||||||
:step="1"
|
:step="1"
|
||||||
:min="10"
|
:min="10"
|
||||||
:max="200"
|
:max="200"
|
||||||
thumb-label/>
|
thumb-label
|
||||||
|
/>
|
||||||
<v-slider
|
<v-slider
|
||||||
class="control-slider"
|
class="control-slider"
|
||||||
label="nr base funcs"
|
label="nr base funcs"
|
||||||
@ -21,7 +22,8 @@
|
|||||||
:step="1"
|
:step="1"
|
||||||
:min="2"
|
:min="2"
|
||||||
:max="20"
|
:max="20"
|
||||||
thumb-label/>
|
thumb-label
|
||||||
|
/>
|
||||||
<v-slider
|
<v-slider
|
||||||
class="control-slider"
|
class="control-slider"
|
||||||
label="nr episodes"
|
label="nr episodes"
|
||||||
@ -29,7 +31,9 @@
|
|||||||
:step="1"
|
:step="1"
|
||||||
:min="10"
|
:min="10"
|
||||||
:max="200"
|
:max="200"
|
||||||
thumb-label/>
|
thumb-label
|
||||||
|
:disabled="episodeRef"
|
||||||
|
/>
|
||||||
<v-slider
|
<v-slider
|
||||||
class="control-slider"
|
class="control-slider"
|
||||||
label="nr runs"
|
label="nr runs"
|
||||||
@ -37,7 +41,9 @@
|
|||||||
:step="1"
|
:step="1"
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="50"
|
:max="50"
|
||||||
thumb-label/>
|
thumb-label
|
||||||
|
:disabled="runRef"
|
||||||
|
/>
|
||||||
<v-slider
|
<v-slider
|
||||||
class="control-slider"
|
class="control-slider"
|
||||||
label="greedy"
|
label="greedy"
|
||||||
@ -45,7 +51,9 @@
|
|||||||
:step="0.01"
|
:step="0.01"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="1"
|
:max="1"
|
||||||
thumb-label/>
|
thumb-label
|
||||||
|
:disabled="greedyRef"
|
||||||
|
/>
|
||||||
<v-row class="d-flex justify-space-evenly mb-9">
|
<v-row class="d-flex justify-space-evenly mb-9">
|
||||||
<v-btn color="primary" @click="cstore.setSendWeights()">Send Weights</v-btn>
|
<v-btn color="primary" @click="cstore.setSendWeights()">Send Weights</v-btn>
|
||||||
<v-btn color="secondary" @click="cstore.setRunner()">Run</v-btn>
|
<v-btn color="secondary" @click="cstore.setRunner()">Run</v-btn>
|
||||||
@ -57,21 +65,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {usePStore} from "@/store/PolicyStore";
|
import {usePStore} from "@/store/PolicyStore";
|
||||||
import {useCStore} from "@/store/ControlStore";
|
import {useCStore} from "@/store/ControlStore";
|
||||||
import {computed} from "vue";
|
import {computed, watch, ref} from "vue";
|
||||||
|
|
||||||
const pstore = usePStore();
|
const pstore = usePStore();
|
||||||
const cstore = useCStore();
|
const cstore = useCStore();
|
||||||
|
|
||||||
const options = cstore.user_modes;
|
const options = cstore.user_modes;
|
||||||
const selectedOption = cstore.mode;
|
|
||||||
|
|
||||||
const sliders = [
|
const episodeRef = ref(false);
|
||||||
{ min: 10, max: 200, value: pstore.max_steps, name: 'max steps', action: pstore.setMaxSteps},
|
const runRef = ref(true);
|
||||||
{ min: 5, max: 10, value: pstore.nr_weights, name: 'nr base funs', action: pstore.setNrWeights},
|
const greedyRef = ref(true);
|
||||||
{ min: 10, max: 200, value: cstore.nr_episodes, name: 'nr episodes', action: cstore.setNrEpisodes},
|
|
||||||
{ min: 1, max: 100, value: cstore.nr_runs, name: 'nr runs', action: cstore.setNrRuns},
|
|
||||||
{ min: 0, max: 1, value: cstore.greedy, name: 'greedy', action: cstore.setGreedy},
|
|
||||||
];
|
|
||||||
const baseFuncsComp = computed({
|
const baseFuncsComp = computed({
|
||||||
get: () => pstore.nr_weights,
|
get: () => pstore.nr_weights,
|
||||||
set: (value) => pstore.setNrWeights(value),
|
set: (value) => pstore.setNrWeights(value),
|
||||||
@ -81,6 +85,26 @@ const modeSelector = computed({
|
|||||||
get: () => cstore.mode,
|
get: () => cstore.mode,
|
||||||
set: (value) => cstore.setUserMode(value)
|
set: (value) => cstore.setUserMode(value)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(() => cstore.getUserMode, () => {
|
||||||
|
const usrMode = cstore.getUserMode;
|
||||||
|
|
||||||
|
if (usrMode === 'manually') {
|
||||||
|
episodeRef.value = true;
|
||||||
|
runRef.value = true;
|
||||||
|
greedyRef.value = true;
|
||||||
|
}
|
||||||
|
if (usrMode === 'BO') {
|
||||||
|
episodeRef.value = false;
|
||||||
|
runRef.value = false;
|
||||||
|
greedyRef.value = true;
|
||||||
|
}
|
||||||
|
if (usrMode === 'active BO') {
|
||||||
|
episodeRef.value = false;
|
||||||
|
runRef.value = false;
|
||||||
|
greedyRef.value = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -3,7 +3,7 @@ import { defineStore } from "pinia";
|
|||||||
export const useCStore = defineStore('Control Store', {
|
export const useCStore = defineStore('Control Store', {
|
||||||
state: () => {
|
state: () => {
|
||||||
return {
|
return {
|
||||||
mode: null,
|
mode: 'manually',
|
||||||
user_modes: ['manually', 'BO', 'active BO'],
|
user_modes: ['manually', 'BO', 'active BO'],
|
||||||
nr_episodes: 10,
|
nr_episodes: 10,
|
||||||
nr_runs: 1,
|
nr_runs: 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user