-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
110 changed files
with
7,390 additions
and
3,119 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "generator/lib/pyyaml"] | ||
path = generator/lib/pyyaml | ||
url = https://github.com/yaml/pyyaml.git |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Changelog | ||
|
||
|
||
## 0.2.0 | ||
|
||
### Added | ||
|
||
- Docs: | ||
- Add description for checker | ||
- Add description for experiments | ||
- Checker: | ||
- Add checker for C and M domain | ||
- Generator: | ||
- Add incremental multi-shot generation to manage grounding size | ||
- Add a multitude of generator options to fine-tune the resulting instances | ||
- Add support for YAML-formatted batch scripts | ||
- Add batch generation scripts for different domains and layouts | ||
- Add ground program observer for analytical output of grounding size | ||
- Visualizer: | ||
- Add support for manually adding orders via GUI | ||
- Add rudimentary support to stream orders | ||
- Add rudimentary support for exogenous events | ||
- Add various convenience features to GUI | ||
- Add various command line options and piping support | ||
- Misc: | ||
- Add new small example instance | ||
|
||
### Changed | ||
|
||
- Docs: | ||
- Migrate from org-mode to markdown format | ||
- Revise specification | ||
- Revise description of the generator, visualizer and instance sets | ||
- Checker: | ||
- Revise checker for A and B domain | ||
- Generator: | ||
- Refactor code to support different generation modes | ||
- Change generator ASP encoding to reduce grounding size | ||
- Remove python batch scripts | ||
- Rename main generator script to `gen` | ||
- Visualizer: | ||
- Refactor whole source code for better maintainability and robustness | ||
- Make windows for orders and inventory dockable in sidebar | ||
- Rename main visualizer script to `viz` | ||
- Misc: | ||
- Remove old example instance | ||
|
||
### Fixed | ||
|
||
- Docs: | ||
- Fix incorrect links and missing images in documentation | ||
- Generator: | ||
- Fix exception for invocation w/o arguments | ||
- Fix solve calls to work with clingo 5.2.x API | ||
- Visualizer: | ||
- Fix closing of sockets after communication with solver terminates | ||
- Fix solve calls to work with clingo 5.2.x API | ||
|
||
|
||
## 0.1.0 | ||
|
||
Initial Release | ||
|
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ASPRILO [![Github Release](https://img.shields.io/github/release/potassco/asprilo/all.svg)](https://github.com/potassco/asprilo/releases) | ||
|
||
## About | ||
|
||
This is source tree of **ASPRILO**, an intra-logistics benchmark suite for answer set | ||
programming. For further details, please consult the documentation on our website at | ||
<https://asprilo.github.io/>. | ||
|
||
|
||
## Directory Structure | ||
|
||
- `./docs/` contains the documentation sources | ||
- `./checker/` contains the instance generator sources | ||
- `./generator/` contains the instance generator sources | ||
- `./visualizer/` contains the instance visualizer sources | ||
|
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../docs/checker.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
% = ACTION: PICKUP, PUTDOWN, DELIVER =========================================== | ||
|
||
|
||
% - Domain --------------------------------------------------------------------- | ||
|
||
action(deliver, (O, P, Q)) :- init(object(order, O), value(line, (P, RQ))), | ||
Q = 1..RQ . % RQ and Q are the requested | ||
% and delivered quantity, resp. | ||
|
||
|
||
% - Preconditions - Verification ----------------------------------------------- | ||
|
||
% Robot not at picking station | ||
err(deliver, notAtPS, (R, T)) :- occurs(object(robot, R), action(deliver, (_, _, _)), T ); | ||
holds(object( robot, R), value( at, (X, Y) ), T-1); | ||
not holds(object( pickingStation, _), value( at, (X, Y) ), T-1). | ||
|
||
% Robot not carrying a shelf | ||
err(deliver, noShelf, (R, T)) :- occurs(object(robot, R), action(deliver, (_, _, _)), T); | ||
{ holds( object(robot, R), value( carries, S ), T-1) : | ||
holds( object(shelf, S), _ , T-1) } < 1. | ||
|
||
% Robot delivers product that is not requested at picking stations | ||
err(deliver, noOrder, (R, T)) :- occurs(object(robot, R ), action(deliver, (O, P, _)), T ); | ||
holds( object( robot, R ), value( at, (X, Y) ), T-1); | ||
holds( object( pickingStation, PS), value( at, (X, Y) ), T-1); | ||
holds( object(order, O ), value( pickingStation, PS ), T-1); | ||
not holds(object(order, O ), value( line, (P, _) ), T-1). | ||
|
||
% Robot delivers higher amount than requested | ||
err(deliver, orderAmount, (R, T)) :- occurs(object(robot, R), action(deliver, (O, P, Q)), T); | ||
holds( object(order, O), value( line, (P, RQ) ), T-1); | ||
Q > RQ. | ||
|
||
% Robot delivers higher amount than available on shelf | ||
err(deliver, shelfAmount, (R, T)) :- occurs(object(robot, R), action(deliver, (O, P, Q)), T); | ||
holds( object(robot, R), value(carries, S ), T-1); | ||
holds( object(product, P), value(on, (S, SQ) ) , T-1); | ||
Q > SQ. | ||
|
||
% Robot must deliver at least one unit | ||
err(deliver, zeroAmount, (R, T)) :- occurs(object(robot, R), action(deliver, (_, _, 0)), T). | ||
|
||
|
||
% - Book-Keeping: Effects ------------------------------------------------------- | ||
|
||
% Update order lines | ||
holds(object(order, O), value(line, (P, RQ-Q)), T) :- occurs(object(robot, R), action(deliver, (O, P, Q)), T); | ||
holds(object(order,O), value(line, (P, RQ)), T-1); | ||
Q < RQ. | ||
% Update product quantities on shelves | ||
|
||
holds(object(product, P), value(on, (S, SQ-Q)), T) :- occurs(object(robot, R), action(deliver, (_, P, Q)), T ); | ||
holds( object(robot, R), value(carries, S ), T-1); | ||
holds( object(product, P), value(on, (S, SQ) ), T-1); | ||
Q < SQ. | ||
|
||
|
||
% - Book-Keeping: Related Inertia Abnormals --------------------------------------- | ||
|
||
% Remove outdated product quantites on shelves | ||
ab(object(product, P), value(on, (S, SQ)), T) :- occurs(object(robot, R), action(deliver, (_, P, _)), T ); | ||
holds( object(robot, R), value(carries, S ), T-1); | ||
holds( object(product, P), value(on, (S, SQ) ), T-1). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
% = ACTION move ================================================================ | ||
|
||
% - Domain --------------------------------------------------------------------- | ||
|
||
action(move, (0,1)). | ||
action(move, (1,0)). | ||
action(move, (0,-1)). | ||
action(move, (-1,0)). | ||
|
||
|
||
% - Checks: Preconditions ------------------------------------------------------ | ||
|
||
% Target node non-existent | ||
err(move, node, (R, T)) :- occurs(object(robot, R), action(move, (DX, DY)), T ); | ||
holds( object(robot, R), value(at, (X, Y)), T-1); | ||
not holds( object(node, _), value(at, (X+DX, Y+DY)), T ). | ||
|
||
% Movement domain violated | ||
err(move, domain, (R, T)) :- occurs(object(robot, R), action(move, (DX, DY)), T ); | ||
holds( object(robot, R), value(at, (X, Y)), T-1); | ||
not action(move, (DX, DY)). | ||
|
||
|
||
|
||
%adjacent(R, DX, DY, T) :- holds( object(node, _), value(at, (X+DX, Y+DY)), T ).at(robot(R), X, Y, T-1); node(X+DX, Y+DY); action(move(DX, DY)). | ||
|
||
% - Book-Keeping: Effects -------------------------------------------------------------------- | ||
|
||
holds(object(robot, R), value(at, (X+DX, Y+DY)), T) :- occurs(object(robot, R), action(move, (DX, DY)), T ); | ||
holds( object(robot, R), value(at, (X, Y)), T-1). | ||
|
||
holds(object(shelf, S), value(at, (X, Y )), T) :- holds( object(robot, R), value(at, (X, Y)), T ); | ||
holds( object(robot, R), value(carries, (R, S)), T-1). | ||
|
||
|
||
% - Book-Keeping: Related Inertia Abnormals --------------------------------------- | ||
|
||
ab(object(robot, R), value(at, (X, Y)), T) :- holds( object(robot, R), value(at, (X, Y)), T-1); | ||
occurs(object(robot, R), action(move, _), T ). | ||
ab(object(shelf, S), value(at, (X, Y)), T) :- holds( object(shelf, S), value(at, (X, Y)), T-1); | ||
occurs(object(robot, R), action(move, _), T ); | ||
holds( object(robot, R), value(carries, (R, S)), T-1). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
% = ACTION: PICKUP, PUTDOWN, DELIVER =========================================== | ||
|
||
|
||
% - Domain --------------------------------------------------------------------- | ||
|
||
action(pickup, ()). | ||
|
||
|
||
% - Preconditions - Verification ----------------------------------------------- | ||
|
||
% No shelf to pickup at location | ||
err(pickup, noShelf, (R, T)) :- occurs(object(robot, R), action(pickup, ()), T); | ||
holds( object(robot, R), value(at, (X, Y)), T-1); | ||
not holds( object(shelf, _), value(at, (X, Y)), T-1). | ||
|
||
|
||
|
||
|
||
% Robot already carries a shelf | ||
err(pickup, carries, (R, T)) :- occurs(object(robot, R), action(pickup, ()), T); | ||
holds(object(R, _), value(carries, _), T-1). | ||
|
||
|
||
% - Book-Keeping: Effects -------------------------------------------------------------------- | ||
|
||
holds(object(robot, R), value(carries, S), T) :- occurs(object(robot, R), action(pickup, () ), T ); | ||
holds( object(robot, R), value(at, (X, Y)), T-1); | ||
holds( object(shelf, S), value(at, (X, Y)), T-1). | ||
|
||
|
||
% - Book-Keeping: Related Inertia Abnormals --------------------------------------- | ||
% | ||
% None. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
% = ACTION: PICKUP, PUTDOWN, DELIVER =========================================== | ||
|
||
|
||
% - Domain --------------------------------------------------------------------- | ||
|
||
action(putdown, ()). | ||
|
||
|
||
% - Preconditions - Verification ----------------------------------------------- | ||
|
||
% Robot does not carry a shelf | ||
err(putdown, noShelf, (R, T)) :- occurs(object(robot, R), action(putdown, ()), T ); | ||
not holds( object(robot, R), value(carries, _), T-1). | ||
|
||
|
||
% - Book-Keeping: Effects -------------------------------------------------------------------- | ||
% | ||
% None. | ||
|
||
|
||
% - Book-Keeping: Related Inertia Abnormals --------------------------------------- | ||
|
||
ab(object(robot, R), value(carries, S), T) :- occurs(object(robot, R), action(putdown, ()), T ); | ||
holds( object(robot, R), value(carries, S), T-1). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
% = CHECKER ENCODINGS FOR THE A PROBLEM DOMAIN =========================== | ||
|
||
% - Initial Setup -------------------------------------------------------------- | ||
% | ||
% Sets up inital state, horizon and general inertia axiom | ||
|
||
#include "init.lp". | ||
|
||
|
||
% - Checks and Book-Keeping Entailments Per Action ----------------------------- | ||
% | ||
% Per each action, conduct | ||
% - checks for preconditions | ||
% - "book-keeping" entailments for effects and related inertial abnormalities | ||
|
||
#include "action-move.lp". | ||
#include "action-pickup.lp". | ||
#include "action-putdown.lp". | ||
#include "action-deliver.lp". | ||
|
||
|
||
% - Checks for Static Law Violations ------------------------------------------- | ||
|
||
#include "static.lp". | ||
|
||
|
||
% - Goal condition ------------------------------------------------------------- | ||
% | ||
% Define: | ||
% 1. the necessary sequence of actions and preconditions to fulfill an oder; and | ||
% 2. the general goal that all orders are fulfilled (ie., fully processed) | ||
|
||
% Order fulfillment | ||
#include "fulfillment.lp". | ||
|
||
% General goal | ||
#include "goal.lp". |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
% = ORDER FULFILLMENT ============================================================================== | ||
% | ||
% Sequence of actions and conditions required to fulfill (i.e., fully process) an order. | ||
% | ||
|
||
% Remove outdated order lines | ||
ab(object(order, O), value(line, (P, RQ)), T) :- occurs(object(robot, R), action(deliver, (O, P, _)), T ); | ||
holds( object(order, O), value( line, (P, RQ) ), T-1). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
% = GOAL CONDITION ============================================================= | ||
|
||
err(goal, unfilledOrder, (O, P, Q, H)) :- holds(object(order, O), value(line, (P, Q)), H); | ||
horizon(H). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
% INITIAL SETUP ================================================================ | ||
|
||
% - Initial State -------------------------------------------------------------- | ||
|
||
holds(O, V, 0) :- init(O, V). | ||
|
||
|
||
% - Plan Length ---------------------------------------------------------------- | ||
|
||
horizon(H) :- H = #max{ 0; T : occurs( _, _, T) }. | ||
time(1..H) :- horizon(H). | ||
|
||
|
||
% - General Law of Interia ----------------------------------------------------- | ||
|
||
holds(O, V, T) :- holds(O, V, T-1), not ab(O, V, T), time(T). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
%% #show time/1. | ||
%% #show action/1. | ||
#show err/3. | ||
%#show at/4. | ||
%% #show moves/2. | ||
%% #show node/2. | ||
%% #show adjacent/4. | ||
#show carries/3. | ||
|
Oops, something went wrong.