Skip to content

Commit

Permalink
increased folders position dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
giodegas committed Aug 6, 2014
1 parent 79beb74 commit 1202ec6
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 23 deletions.
1 change: 0 additions & 1 deletion MAS_Example/conf/makeconf.bat

This file was deleted.

2 changes: 0 additions & 2 deletions MAS_Example/conf/startagent.bat

This file was deleted.

7 changes: 5 additions & 2 deletions MAS_Example/startmas.bat
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
@echo off
cls
title "DALI MAS - Windows Starter script"
title "MAS"
set sicstus_home=C:\Program Files (x86)\SICStus Prolog 4.2.3\bin
::set main_home=%~dp0\..
set main_home=..
set dali_home=..\src
set conf_dir=conf
set prolog=%sicstus_home%\spwin.exe
set WAIT=ping -n 4 127.0.0.1

::del /q tmp\*.*
del /q work\*.pl
copy mas\*.txt work

set daliH=%dali_home:\=/%

start /B "" "%prolog%" -l "%dali_home%\active_server_wi.pl" --goal go(3010,'%daliH%/server.txt').
echo DALI server running at port 3010. Press RETURN to start the MAS.
echo Server attivato. Pronto ad attivare il MAS.
pause

start /B "" "%prolog%" -l "%dali_home%\active_user_wi.pl" --goal utente.
%WAIT% >nul
@echo Server DALI attivato.
FOR /F "tokens=*" %%G IN ('dir /b mas\*.txt') DO (
@echo agente: %%~nG
call conf/makeconf %%~nG %%G
Expand Down
2 changes: 1 addition & 1 deletion scripts_examples/startmas.bat
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title "MAS"
set sicstus_home=C:\Program Files (x86)\SICStus Prolog 4.2.3\bin
::set main_home=%~dp0\..
set main_home=..
set dali_home=..\interpreter
set dali_home=..\src
set conf_dir=conf
set prolog=%sicstus_home%\spwin.exe
set WAIT=ping -n 4 127.0.0.1
Expand Down
6 changes: 3 additions & 3 deletions scripts_examples/startmas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ clear # cls
#title "MAS"
sicstus_home=/usr/local/sicstus4.2.3
main_home=..
dali_home=../interpreter
dali_home=../src
conf_dir=conf
prolog="$sicstus_home/bin/sicstus"
WAIT="ping -c 4 127.0.0.1"
Expand All @@ -27,7 +27,7 @@ done

cp $build_home/*.txt work

xterm -hold -e "$prolog -l $dali_home/active_server_wi.pl --goal \"go(3010,'$dali_home/server.txt').\"" & #start /B "" "%prolog%" -l "%dali_home%/active_server_wi.pl" --goal go(3010,'%daliH%/server.txt').
xterm -hold -e "$prolog -l $dali_home/active_server_wi.pl --goal \"go(3010,'server.txt').\"" & #start /B "" "%prolog%" -l "%dali_home%/active_server_wi.pl" --goal go(3010,'%daliH%/server.txt').
echo Server attivato. Attivo il MAS....
$WAIT > /dev/null # %WAIT% >nul

Expand All @@ -40,7 +40,7 @@ for agent_filename in $build_home/*
do
agent_base="${agent_filename##*/}"
echo "Agente: $agent_base"
xterm -e "./conf/makeconf.sh $agent_base" &
xterm -e "./conf/makeconf.sh $agent_base $dali_home" &
xterm -hold -e "./conf/startagent.sh $agent_base $prolog $dali_home" &
$WAIT > /dev/null # %WAIT% >nul
done
Expand Down
11 changes: 0 additions & 11 deletions src/active_server_wi.pl
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,3 @@
write(Stream,'.'),nl(Stream),
close(Stream).

%CARICA UNA ONTOLOGIA
carica_ontologia(F):-see(F),
repeat,
read(T),
if(T=end_of_file,true,
out(T)),
T == end_of_file,
!,
seen.


2 changes: 1 addition & 1 deletion src/active_user_wi.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
user.

% apri in lettura il file, Stream è la variabile dove metto lo stream e le opzioni sono niente
utente:-open('../interpreter/server.txt',read,Stream,[]),
utente:-open('server.txt',read,Stream,[]),
read(Stream,I),
close(Stream),linda_client(I),
out(agente_attivo(user,I)),
Expand Down
2 changes: 1 addition & 1 deletion src/communication_onto_utils.pl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
fetch_url( http(Host,Port,QueryCodes),[host(HostPort),accept('application/sparql-results+xml, */*;q=0.5')],Response).

query(Query,ArgList,Mode):-
see('../interpreter/owl/query.conf'),
see('owl/query.conf'),
search_label(Mode),
read(Q),
seen,
Expand Down
1 change: 0 additions & 1 deletion src/server.txt

This file was deleted.

0 comments on commit 1202ec6

Please sign in to comment.