Skip to content

Commit 01ee7e7

Browse files
Merge pull request #1 from ratioSolver/rationet
Rationet
2 parents 6104e9f + 14dc01a commit 01ee7e7

25 files changed

+151
-14503
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "extern/plexa"]
22
path = extern/plexa
33
url = https://github.com/ratioSolver/PlExA
4+
[submodule "extern/rationet"]
5+
path = extern/rationet
6+
url = https://github.com/ratioSolver/ratioNet

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ include(CTest)
1818
enable_testing()
1919

2020
set(COMPUTE_NAMES ON CACHE BOOL "Computes the objects' names" FORCE)
21+
set(RATIONET_INCLUDE_UTILS OFF CACHE BOOL "Include utils library" FORCE)
2122

2223
add_subdirectory(extern/plexa)
24+
add_subdirectory(extern/rationet)
2325

2426
file(GLOB RATIO_GUI_SOURCES src/*.cpp)
2527
file(GLOB RATIO_GUI_HEADERS include/*.h)
2628

2729
add_executable(${PROJECT_NAME} ${RATIO_GUI_SOURCES})
28-
target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/include $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/extern/crow $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> $<INSTALL_INTERFACE:> ${Boost_INCLUDE_DIRS})
29-
target_link_libraries(${PROJECT_NAME} PRIVATE PlExA ${CMAKE_THREAD_LIBS_INIT})
30+
target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/include $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> $<INSTALL_INTERFACE:> ${Boost_INCLUDE_DIRS})
31+
target_link_libraries(${PROJECT_NAME} PRIVATE PlExA ratioNet ${CMAKE_THREAD_LIBS_INIT})
3032

3133
if(MSVC)
3234
target_compile_options(${PROJECT_NAME} PRIVATE /W4)

client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<head>
55
<meta charset="UTF-8" />
6-
<link rel="icon" href="/oRatio.png" />
6+
<link rel="icon" href="/favicon.ico" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<title>oRatio</title>
99
</head>

client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ratio-solver",
3-
"version": "1.1.3",
3+
"version": "1.2.0",
44
"scripts": {
55
"dev": "vite",
66
"build": "vite build",

client/public/favicon.ico

234 KB
Binary file not shown.

client/public/oRatio.png

-2.14 KB
Binary file not shown.

client/src/App.vue

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
<template>
22
<v-app>
33
<v-navigation-drawer v-model='drawer'>
4-
<v-tabs v-model='solver' direction='vertical' color='deep-purple-accent-4'>
5-
<v-tab v-for='[key, value] in solvers'>
6-
<v-col class='text-left'>
7-
<v-icon>mdi-brain</v-icon>{{ value.name }}
8-
</v-col>
9-
<v-col class='text-right'>
10-
<v-progress-circular v-if="solvers.get(key).state == 'reasoning'" :size="20" indeterminate
11-
color="primary"></v-progress-circular>
12-
<v-progress-circular v-if="solvers.get(key).state == 'adapting'" :size="20" indeterminate
13-
color="primary"></v-progress-circular>
14-
<v-icon v-if="solvers.get(key).state == 'idle'">mdi-pause-circle</v-icon>
15-
<v-icon v-if="solvers.get(key).state == 'failed'">mdi-alert-circle</v-icon>
16-
<v-icon v-if="solvers.get(key).state == 'executing'">mdi-play-circle</v-icon>
17-
<v-icon v-if="solvers.get(key).state == 'finished'">mdi-check-circle</v-icon>
18-
</v-col>
19-
</v-tab>
20-
</v-tabs>
4+
<v-list dense v-model:selected="current_solver">
5+
<SolverListItem v-for="[id, solver] in solvers" :key="id" :solver="solver" />
6+
</v-list>
217
</v-navigation-drawer>
228

239
<v-app-bar>
@@ -38,13 +24,8 @@
3824
</v-app-bar>
3925

4026
<v-main>
41-
<v-window id='main-window' v-model='solver' direction='vertical' class='fill-height' show-arrows>
42-
<v-window-item v-for='[key, value] of solvers' class='fill-height' :eager='true'>
43-
<v-window v-model='tab' class='fill-height'>
44-
<v-window-item :id='getTimelinesId(key)' value='timelines' class='fill-height' :eager='true' />
45-
<v-window-item :id='getGraphId(key)' value='graph' class='fill-height' :eager='true' />
46-
</v-window>
47-
</v-window-item>
27+
<v-window id='main-window' v-model='current_solver' direction='vertical' class='fill-height' show-arrows>
28+
<Solver v-for="[id, solver] in solvers" :key="id" :solver="solver" :show_tabs="false" :tab="tab" />
4829
</v-window>
4930
</v-main>
5031
</v-app>
@@ -54,15 +35,16 @@
5435
export default {
5536
data: () => ({
5637
tab: 'timelines',
57-
drawer: false,
58-
solver: 0
38+
drawer: false
5939
})
6040
}
6141
</script>
6242

6343
<script setup>
6444
import { useAppStore } from '@/store/app';
6545
import { storeToRefs } from 'pinia';
46+
import SolverListItem from '@/components/SolverListItem.vue';
47+
import Solver from '@/components/Solver.vue';
6648
67-
const { connected, solvers, reasoning, idle, inconsistent, getTimelinesId, getGraphId } = storeToRefs(useAppStore());
49+
const { connected, solvers, current_solver } = storeToRefs(useAppStore());
6850
</script>

client/src/components/Solver.vue

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<template>
2+
<v-window-item :value='props.solver.id' class='fill-height' eager>
3+
<v-tabs v-if='show_tabs' v-model='props.tab' color='deep-purple-accent-4'>
4+
<v-tab value='timelines'><v-icon>mdi-chart-timeline</v-icon>Timelines</v-tab>
5+
<v-tab value='graph'><v-icon>mdi-graph-outline</v-icon>Graph</v-tab>
6+
</v-tabs>
7+
<v-window :id='"slv-" + props.solver.id' v-model='props.tab' class='fill-height' show-arrows>
8+
<v-window-item :id='get_timelines_id(props.solver.id)' value='timelines' class='fill-height' eager />
9+
<v-window-item :id='get_graph_id(props.solver.id)' value='graph' class='fill-height' eager />
10+
</v-window>
11+
</v-window-item>
12+
</template>
13+
14+
<script setup>
15+
import { useAppStore } from '@/store/app';
16+
import { storeToRefs } from 'pinia';
17+
18+
const props = defineProps({
19+
solver: {
20+
type: Object,
21+
required: true,
22+
},
23+
show_tabs: {
24+
type: Boolean,
25+
required: false,
26+
default: true,
27+
},
28+
tab: {
29+
type: String,
30+
required: false,
31+
default: 'timelines',
32+
},
33+
});
34+
35+
const { get_timelines_id, get_graph_id } = storeToRefs(useAppStore());
36+
</script>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<template>
2+
<v-list-item :value="solver.id" :title="solver.name" :append-icon="useAppStore().solver_state_icon(solver.state)" />
3+
</template>
4+
5+
<script setup>
6+
import { useAppStore } from '@/store/app';
7+
8+
defineProps({
9+
solver: {
10+
type: Object,
11+
required: true,
12+
},
13+
});
14+
</script>

0 commit comments

Comments
 (0)