potassco / asprilo Goto Github PK
View Code? Open in Web Editor NEW🤖 ASPRILO, an intra-logistics benchmark suite for answer set programming
Home Page: https://asprilo.github.io/
License: MIT License
🤖 ASPRILO, an intra-logistics benchmark suite for answer set programming
Home Page: https://asprilo.github.io/
License: MIT License
Hi!
Initialize solver not able to connect to solver with the error
SAT
QGestureManager::deliverEvent: could not find the target for gesture
2022-02-03 21:56:02.179 python3.9[2362:153086] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
Try connection with solver
Failed to connect with solver
Retrying in 2 sek
Start solver
Failed to connect with solver
Retrying in 2 sek
Failed to connect with solver
Retrying in 2 sek
Failed to connect with solver
Retrying in 2 sek
Failed to connect with solver
Retrying in 2 sek
Failed to connect with solver
Close connection to solver
while Fast solve return error as
Connect with solver
Connection with: ('127.0.0.1', 51726)
<cmd>: error: file could not be opened:
./encoding.lp
Traceback (most recent call last):
File "/Users/pratik/opt/miniconda3/envs/visualizer/bin/viz-solver", line 10, in <module>
sys.exit(main())
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/visualizer/solver.py", line 404, in main
solver.run()
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/visualizer/solver.py", line 277, in run
if self.receive(1.0) != 0:
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/visualizer/solver.py", line 157, in receive
self.on_raw_data(self._raw_data)
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/visualizer/solver.py", line 185, in on_raw_data
self.on_data(self._data)
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/visualizer/solver.py", line 222, in on_data
if not self.solve().satisfiable:
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/visualizer/solver.py", line 288, in solve
self._control.load(self._args.encoding)
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/clingo/control.py", line 363, in load
_handle_error(_lib.clingo_control_load(self._rep, path.encode()))
File "/Users/pratik/opt/miniconda3/envs/visualizer/lib/python3.9/site-packages/clingo/_internal.py", line 65, in _handle_error
raise RuntimeError(msg)
RuntimeError: parsing failed
close solver
[Errno 57] Socket is not connected
Close connection to solver```
Debian 9(stretch), installed asprilo via conda
visualizer 0.2.0
clingo 5.3.0
'async_' is wrong key argument to clingo.control.solve(on_model = self.on_model, async_ = True)
in solver.py (egg file)
the error shows:
solve: 0
Traceback (most recent call last):
File "/home/david/anaconda3/envs/asprilo/bin/viz-solver", line 10, in
sys.exit(main())
File "/home/david/anaconda3/envs/asprilo/lib/python3.6/site-packages/visualizer-0.2.2-py3.6.egg/visualizer/solver.py", line 366, in main
File "/home/david/anaconda3/envs/asprilo/lib/python3.6/site-packages/visualizer-0.2.2-py3.6.egg/visualizer/solver.py", line 250, in run
File "/home/david/anaconda3/envs/asprilo/lib/python3.6/site-packages/visualizer-0.2.2-py3.6.egg/visualizer/solver.py", line 138, in receive
File "/home/david/anaconda3/envs/asprilo/lib/python3.6/site-packages/visualizer-0.2.2-py3.6.egg/visualizer/solver.py", line 164, in on_raw_data
File "/home/david/anaconda3/envs/asprilo/lib/python3.6/site-packages/visualizer-0.2.2-py3.6.egg/visualizer/solver.py", line 201, in on_data
File "/home/david/anaconda3/envs/asprilo/lib/python3.6/site-packages/visualizer-0.2.2-py3.6.egg/visualizer/solver.py", line 277, in solve
TypeError: 'async_' is an invalid keyword argument for this function
close solver
I'm getting the following error, looks like it might be related to this:
https://stackoverflow.com/questions/52779920/why-is-signal-sigalrm-not-working-in-python-on-windows
I didn't find anything about OS support, is this supposed to work on Windows?
Here's the error:
(aspriloEnv) PS C:\Users\gnp89> gen -x 10 -y 20 -X 2 -Y 1 -s 20 -C --random Traceback (most recent call last): File "C:\Users\gnp89\.conda\envs\aspriloEnv\Scripts\gen-script.py", line 9, in <module> sys.exit(main()) File "C:\Users\gnp89\.conda\envs\aspriloEnv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\__main__.py", line 11, in main File "C:\Users\gnp89\.conda\envs\aspriloEnv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 74, in run File "C:\Users\gnp89\.conda\envs\aspriloEnv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 84, in _run_once File "C:\Users\gnp89\.conda\envs\aspriloEnv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 227, in _gen_basic File "C:\Users\gnp89\.conda\envs\aspriloEnv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\generator.py", line 138, in generate AttributeError: module 'signal' has no attribute 'SIGALRM'
I tried to load instnaces and it worked.
But when I try to load plan, nothing is opened.
The example of plan is below:
%plan.txt
occurs(object(robot ,1),move (-1,0),1).
occurs(object(robot ,2),move (-1,0),1).
occurs(object(robot ,1),move (-1,0),2).
occurs(object(robot ,2),pickup ,2).
The gen -h command runs, any attempt at generation yields the error.
Clingo and Generator installed through anaconda.
System:Windows 10
Console log:
Traceback (most recent call last):
File "C:\Users\Dalya\anaconda3\envs\myenv\Scripts\gen-script.py", line 9, in
sys.exit(main())
File "C:\Users\Dalya\anaconda3\envs\myenv\lib\site-packages\generator-0.2.0-py3.6.egg\generator_main_.py", line 11, in main
File "C:\Users\Dalya\anaconda3\envs\myenv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 74, in run
File "C:\Users\Dalya\anaconda3\envs\myenv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 84, in _run_once
File "C:\Users\Dalya\anaconda3\envs\myenv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 227, in _gen_basic
File "C:\Users\Dalya\anaconda3\envs\myenv\lib\site-packages\generator-0.2.0-py3.6.egg\generator\generator.py", line 138, in generate
AttributeError: module 'signal' has no attribute 'SIGALRM'
So far, we never used abbreviation; hence I'd suggest replacing dest by destination
(moved here from https://github.com/krr-up/asprilo-abstraction-encodings/issues/5)
Environment:
Steps to reproduce:
After some time (it's not always consistent), I get the below error. I'm including as much context as possible in the hopes that it's helpful.
$ ./visualizer/scripts/visualizer
load file: /home/quickbeam/aspilro-instances/phillip/tiny_cases/4x4c/warehouse_x4_y4_n16_r3_s6_ps2_pr6_u12_o0_N1/x4_y4_n16_r3_s6_ps2_pr6_u12_o0_N1.lp
SAT
QXcbConnection: XCB error: 3 (BadWindow), sequence: 888, resource id: 2097424, major code: 40 (TranslateCoords), minor code: 0
Traceback (most recent call last):
File "/home/quickbeam/code/asprilo/visualizer/scripts/../visualizer/modelView.py", line 171, in event
ss += '\n' + item.get_name() + '('+ item.get_id() +')'
TypeError: cannot concatenate 'str' and 'int' objects
[1] 3039 abort (core dumped) ./visualizer/scripts/visualizer
Currently, the visualizer settings are stored relative to the current working directory in ./config/init/
Instead, store all settings under $HOME/.config/asprilo/visualizer/
where `$HOME' is the home directory of the current user, as per usual.
I got the following error message when using the asprilo generator:
Traceback (most recent call last):
File "C:\Users\Adrian\anaconda3\Scripts\gen-script.py", line 9, in
sys.exit(main())
File "C:\Users\Adrian\anaconda3\lib\site-packages\generator-0.2.0-py3.6.egg\generator_main_.py", line 11, in main
File "C:\Users\Adrian\anaconda3\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 74, in run
File "C:\Users\Adrian\anaconda3\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 84, in _run_once
File "C:\Users\Adrian\anaconda3\lib\site-packages\generator-0.2.0-py3.6.egg\generator\control.py", line 227, in _gen_basic
File "C:\Users\Adrian\anaconda3\lib\site-packages\generator-0.2.0-py3.6.egg\generator\generator.py", line 138, in generate
AttributeError: module 'signal' has no attribute 'SIGALRM'
I am using Windows 10 and anaconda 3 with a terminal. The generator version is 0.3.0.
The command I used was: gen -x 5 -y 3
but I also tried different commands, including the ones provided as an example in the readme. The error message was always the same.
UnsatisfiableError: The following specifications were found to be incompatible with each other:
At the moment, the visualizer writes at invocation a config directory in the working directory. Ideally, it would store all its config files in a single place by default, e.g. ~/.config/asprilo/visualizer/~
When rightclicking the lower box appearing when using the order tool (Menustrip: Tools--> Orders) first the tool gets stuck to the curser as if dragging to a new position then the tool closes and then the whole visualizer crashes.
This happens with or without a loaded instance.
the visualizer/solver.py
file uses the time.clock()
function which is deprecated since python 3.8. so when I run viz-solver, I get the error:
File ".../visualizer/solver.py", line 59, in __init__ self._solve_start = time.clock() AttributeError: module 'time' has no attribute 'clock'
I have a strong suspicion that this is related to an issue I posted earlier, but since there hasn't been any response there and I'm not completely sure my guess is correct, I'm opening a separate ticket here.
I'm running clingo 5.2.0, because I can't find any mention of version 5.3...
Whenever I try to solve an instance from the visualizer, I get the following error.
Connection with: ('127.0.0.1', 44162)
ground: 0
solve: 0
Traceback (most recent call last):
File "/home/quickbeam/code/asprilo/visualizer/scripts/solver_inc.py", line 43, in <module>
solver.run()
File "/home/quickbeam/code/asprilo/visualizer/scripts/network.py", line 98, in run
if self.receive(1.0) is '':
File "/home/quickbeam/code/asprilo/visualizer/scripts/network.py", line 56, in receive
self.on_raw_data(self._raw_data)
File "/home/quickbeam/code/asprilo/visualizer/scripts/network.py", line 123, in on_raw_data
self.on_data(self._data)
File "/home/quickbeam/code/asprilo/visualizer/scripts/solver.py", line 25, in on_data
if self.solve() < 0:
File "/home/quickbeam/code/asprilo/visualizer/scripts/solver_inc.py", line 25, in solve
solve_future = self._control.solve_async(self.on_model)
AttributeError: 'clingo.Control' object has no attribute 'solve_async'
close solver
Close connection to solver
I have an issue using the asprilo visualizer.
I use the asprilo visualizer via anaconda on windows 10.
Opening, using and saving instances wasn’t a problem but when I tried to save an instance I would always get this Error:
„attributeerror: 'control' object has no attribute 'builder'“.
After a bit of research I thought this might have something to do with the current python version that anaconda uses. But when I tried to update python anaconda would say: „all requested packages already installed“.
I also tried uninstalling and reinstalling the asprilo visualiser itself but when I tried to install it again, it would give the following error:
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
Your python: python=3.7
I also tried to install a specific version of python via “conda install python=3.9”. But doing so, seems to make it stuck in a loop when this line appears:
[04:22<00:03, 2.59it/s]/Examining conflict for conda-content-trust cycler ipython_genutils idna prompt-toolkit backports.shutil_get_terminal_\
I don’t know a lot about how anaconda works so any help is verry appreciated.
3ps-2r.lp.zip
Hi, after editing a file, I encounter duplicates of the same facts.
And the format is partly distorted by several facts in one line.
In the generator/generator/utils path there is a file named aux.py. Windows has a few reserved file-names, one of which is aux, preventing any files of this name to exist or be created. Nothing big, just some renaming and manual creation of the file, but i thought it would be nice to know and maybe fix in the future.
The instance file
instances/standard_cases/4/warehouse_x10_y10_n100_r4_s12_ps3_pr3_u20_o0_N1/merged/x10_y10_n100_r4_s12_ps3_pr3_u20_o5_N10.lp
has (6,1) marked as both picking station and highway
There seem to be issues when trying to run the asprilo visualizer with clingo 5.5. See potassco/clingo#323.
In the m-domain solution-checker, the two checks perfomed in the a-domain static.lp
are not included:
% At most one object of the same type (robot. shelf, picking station, etc.) may occupy a node at
% the same time, otherwise collision.
err(static, collNode, (OT, X, Y, T)) :- { holds(object(OT, _), value(at, (X, Y)), T) } > 1;
holds(object(node, _), value(at, (X, Y)), T);
init( object(OT, _), _);
time(T).
% Two adjacent objects of the same type (robots, shelves) must not swap places in one step, i.e,
% they would collide.
err(static, collSwap, (OT, R1, R2, T)) :- holds(object(OT, R1), value(at, (X1, Y1)), T);
holds(object(OT, R2), value(at, (X2, Y2)), T);
holds(object(OT, R1), value(at, (X2, Y2)), T-1);
holds(object(OT, R1), value(at, (X1, Y1)), T-1);
R1<R2, |X2-X1|+|Y2-Y1|==1.
In the specification, there was not mentioned, that these two cases do not apply for the m-domain. So I think it should be either mentioned in the specification explicitly or the two checks should be included in the m-domain checker.
torsten@bono 2010:~/ASP/asprilo> visualizer
Traceback (most recent call last):
File "/home/torsten/local/bin/visualizer", line 338, in save_instance
file_name = self._file_dialog.selectedFiles()[0]
IndexError: list index out of range
Aborted (core dumped)
Sorry about the issue spam, but I just want to confirm something. When the generator produces instances with a reachable layout, does it try to maximize the number of shelves? I don't see anything about this in ig.lp
or ig.py
, but maybe I'm missing something.
Thanks!
The a-domain solution checker is not detecting the following case:
Instance:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Grid size X: 2
%Grid size Y: 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#program base.
%init
init(object(node, 2), value(at, (2, 1))).
init(object(node, 4), value(at, (2, 2))).
init(object(node, 3), value(at, (1, 2))).
init(object(node, 1), value(at, (1, 1))).
init(object(pickingStation,1), value(at,(1,1))).
init(object(robot,1), value(at,(1,2))).
init(object(robot,2), value(at,(2,1))).
init(object(shelf,1), value(at,(2,2))).
init(object(product,1),value(on,(1,1))).
init(object(order,1),value(pickingStation,1)).init(object(order,1),value(line,(1,1))).
Plan:
occurs(object(robot,1),action(move,(1,0)),1).
occurs(object(robot,1),action(pickup,()),2).
occurs(object(robot,2),action(move,(0,1)),3).
occurs(object(robot,1),action(move,(-1,0)),3).
occurs(object(robot,2),action(pickup,()),4).
occurs(object(robot,1),action(move,(0,-1)),4).
occurs(object(robot,2),action(putdown,()),5).
occurs(object(robot,1),action(deliver,(1,1,1)),5).
no mistake is detected even though the same shelf is picked up twice.
when you add the statement #show holds(object(robot, R), value(carries, S), T): holds(object(robot, R), value(carries, S), T).
You get
holds(object(robot,1),value(carries,1),2) holds(object(robot,1),value(carries,1),3) holds(object(robot,1),value(carries,1),4) holds(object(robot,2),value(carries,1),4) holds(object(robot,1),value(carries,1),5)
At timestep 4 robot 1 and 2 are carrying the shelf 1.
There is missing a mechanism for updating the shelf positions after pickup and putdown.
I'm trying to add some custom constraints over the instances generated automatically and these constraints include an optimization statement. Currently the generator simply selects the first model derived without making sure it has the optimal cost value.
Is there anything equivalent to clingo
's --outf=1
flag available already? I can't seem to find anything currently. the API docs say it's not supported directly, i.e. it would have to be implemented on the Python side of things.
I think there is a case that is not detected properly by the a-domain solution checker. Consider the following instance:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Grid size X: 4
%Grid size Y: 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#program base.
%init
init(object(node, 2), value(at, (2, 1))).
init(object(node, 3), value(at, (3, 1))).
init(object(node, 4), value(at, (4, 1))).
init(object(node, 1), value(at, (1, 1))).
init(object(pickingStation,1), value(at,(1,1))).
init(object(pickingStation,2), value(at,(4,1))).
init(object(shelf,1), value(at,(2,1))).
init(object(product,1),value(on,(1,2))).
init(object(robot,1), value(at,(3,1))).
init(object(order,1),value(pickingStation,1)).
init(object(order,1),value(line,(1,1))).
init(object(order,2),value(pickingStation,2)).
init(object(order,2),value(line,(1,1))).
Now consider the following plan:
occurs(object(robot,1),action(move,(-1,0)),1).
occurs(object(robot,1),action(pickup,()),2).
occurs(object(robot,1),action(move,(-1,0)),3).
occurs(object(robot,1),action(deliver,(1,1,1)),4).
occurs(object(robot,1),action(deliver,(2,1,1)),5).
This plan is not correct, because order 2 need to be delivered to pickingStation 2 and not to pickingStation 1.
But still the checker/encodings/a/checker.lp
does not detect an error.
I think the rule that was inteded to cover this case is the following rule in the file action-deliver.lp
% 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).
Why does this rule not apply? Well if put in the corresponding value for checking the action of T=5
, we get the following rule:
% Robot delivers product that is not requested at picking stations
err(deliver, noOrder, (R, T)) :- occurs(object(robot, R=1 ), action(deliver, (O=2, P=1, _)), T =5 );
holds( object( robot, R =1), value( at, (X=1, Y=1) ), T=4);
holds( object( pickingStation, PS=1), value( at, (X=1, Y=1) ), T=4);
holds( object(order, O =2), value( pickingStation, PS =1 ), T=4);
not holds(object(order, O =2), value( line, (P=1, _) ), T=4).
The atom that doesn't apply is the line 4 holds( object(order, O =2), value( pickingStation, PS =1 ), T=4);
. Therefore, the wrong pickingStation is not detected.
This could be fixed by added an additional rule like for example:
err(deliver, wrongStation, (R, T)) :- occurs(object(robot, R ), action(deliver, (O, _, _)), T );
holds( object( robot, R ), value( at, (X, Y) ), T-1);
holds( object( pickingStation, PS), value( at, (X, Y) ), T-1);
not holds( object(order, O ), value( pickingStation, PS ), T-1).
I managed to edit and save a new layout
but how do I add an order?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.