-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solved bug #16
- Loading branch information
Showing
13 changed files
with
435 additions
and
20 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
%==================================================================================== | ||
% test_storerequest description | ||
%==================================================================================== | ||
context(ctx_test_storerequest, "localhost", "TCP", "11820"). | ||
context(ctx_test_storerequest, "localhost", "TCP", "9003"). | ||
qactor( test_wasteservice, ctx_test_storerequest, "it.unibo.test_wasteservice.Test_wasteservice"). |
75 changes: 75 additions & 0 deletions
75
Sprint1/Sprint1_Project/sprint1_map_editor/.idea/artifacts/map_editor_bcr_jar4.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
rootProject.name = "unibo.mapemptyroom22" | ||
rootProject.name = "unibo.mapperqak22" |
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
12 changes: 12 additions & 0 deletions
12
unibo.mapperQak22/src/it/unibo/ctxmapperqak22/MainCtxmapperqak22.kt
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,12 @@ | ||
/* Generated by AN DISI Unibo */ | ||
package it.unibo.ctxmapperqak22 | ||
import it.unibo.kactor.QakContext | ||
import it.unibo.kactor.sysUtil | ||
import kotlinx.coroutines.runBlocking | ||
|
||
fun main() = runBlocking { | ||
QakContext.createContexts( | ||
"localhost", this, "mapperqak22.pl", "sysRules.pl","ctxmapperqak22" | ||
) | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
unibo.mapperQak22/src/it/unibo/ctxmapwithobstqak22/MainCtxmapwithobstqak22.kt
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,12 @@ | ||
/* Generated by AN DISI Unibo */ | ||
package it.unibo.ctxmapwithobstqak22 | ||
import it.unibo.kactor.QakContext | ||
import it.unibo.kactor.sysUtil | ||
import kotlinx.coroutines.runBlocking | ||
|
||
fun main() = runBlocking { | ||
QakContext.createContexts( | ||
"localhost", this, "mapwithobstqak22.pl", "sysRules.pl","ctxmapwithobstqak22" | ||
) | ||
} | ||
|
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,83 @@ | ||
/* Generated by AN DISI Unibo */ | ||
package it.unibo.mapperqak22 | ||
|
||
import it.unibo.kactor.* | ||
import alice.tuprolog.* | ||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.delay | ||
import kotlinx.coroutines.launch | ||
import kotlinx.coroutines.runBlocking | ||
|
||
class Mapperqak22 ( name: String, scope: CoroutineScope ) : ActorBasicFsm( name, scope ){ | ||
|
||
override fun getInitialState() : String{ | ||
return "s0" | ||
} | ||
override fun getBody() : (ActorBasicFsm.() -> Unit){ | ||
val interruptedStateTransitions = mutableListOf<Transition>() | ||
var NumStep = 0 | ||
return { //this:ActionBasciFsm | ||
state("s0") { //this:State | ||
action { //it:State | ||
println("mapperbuilder starts") | ||
unibo.kotlin.planner22Util.initAI() | ||
//genTimer( actor, state ) | ||
} | ||
//After Lenzi Aug2002 | ||
sysaction { //it:State | ||
} | ||
transition( edgeName="goto",targetState="doAheadMove", cond=doswitch() ) | ||
} | ||
state("doAheadMove") { //this:State | ||
action { //it:State | ||
delay(300) | ||
request("step", "step(350)" ,"basicrobot" ) | ||
//genTimer( actor, state ) | ||
} | ||
//After Lenzi Aug2002 | ||
sysaction { //it:State | ||
} | ||
transition(edgeName="t00",targetState="continue",cond=whenReply("stepdone")) | ||
transition(edgeName="t01",targetState="turn",cond=whenReply("stepfail")) | ||
} | ||
state("continue") { //this:State | ||
action { //it:State | ||
unibo.kotlin.planner22Util.updateMap( "w", "" ) | ||
//genTimer( actor, state ) | ||
} | ||
//After Lenzi Aug2002 | ||
sysaction { //it:State | ||
} | ||
transition( edgeName="goto",targetState="doAheadMove", cond=doswitch() ) | ||
} | ||
state("turn") { //this:State | ||
action { //it:State | ||
NumStep = NumStep + 1 | ||
forward("cmd", "cmd(l)" ,"basicrobot" ) | ||
unibo.kotlin.planner22Util.updateMap( "l", "" ) | ||
unibo.kotlin.planner22Util.showMap() | ||
//genTimer( actor, state ) | ||
} | ||
//After Lenzi Aug2002 | ||
sysaction { //it:State | ||
} | ||
transition( edgeName="goto",targetState="doAheadMove", cond=doswitchGuarded({ NumStep < 4 | ||
}) ) | ||
transition( edgeName="goto",targetState="endwork", cond=doswitchGuarded({! ( NumStep < 4 | ||
) }) ) | ||
} | ||
state("endwork") { //this:State | ||
action { //it:State | ||
unibo.kotlin.planner22Util.showMap(); | ||
unibo.kotlin.planner22Util.saveRoomMap("mapRoomEmpty"); | ||
println("mapperbuilder BYE") | ||
terminate(1) | ||
//genTimer( actor, state ) | ||
} | ||
//After Lenzi Aug2002 | ||
sysaction { //it:State | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.