Re: [eclipse-clp-users] help

From: Rana Mohamed <eng.ranamoh_at_...6...>
Date: Thu, 22 Oct 2015 14:00:55 -0700
Thanks for your concern, the whole program is in the attachment it contains
the definition of each agent, where the definitions consist of the location
of the agent, the  variable and time at the start and the end of the
location and the knowledge which remains the same at the each location.
also contains how agent evolve, where it evolve continuously at the same
location and discretely when an event fired which make the agent moves from
location to another and also if we have more than one agent has a
synchronized event it makes the knowledge of each agent shared to the other
agents.
the systems works using the *drive* clause which starts with the start
state of each agent, then each agent evolves continuously until an event
fire to cause the discrete step, the system allows only one event  at a
time, i've solve the abort problem now the problem  is at the process of
knowledge sharing  which is done using the *check* clause, using *check* at
*drive* is not done correctly especially with the constraints of one event
at a time and i don't know how to solve it.

On Wed, Oct 21, 2015 at 1:01 PM, Kish Shen <kisshen@...5...> wrote:

> Hi,
>
> It is difficult to provide any speicifc help to you, as you have not
> really given enough of your program. Most importantly, you have not given
> your code for check/4, the goal that you say is causing ECLiPSe to abort.
>
> Also, what precisely do you mean by ECLiPSe "always gave me abort" -- do
> you mean ECLiPSe raise an error? If so, there should have been an error
> message printed, which will give you some idea of what went wrong, and you
> should include this in your report.
>
> If on the other hand, the ECLiPSe process aborted (i.e. crashed), then you
> should state this clearly, and give any messages that you got when this
> happened.
>
> Cheers,
>
> Kish
>
> On 13/10/2015 09:20, Rana Mohamed wrote:
>
>> I'm working on a constraint logic program, which represents the
>> interaction
>> of 4 agents (hybrid automata) (disturbance, decay, cargo, truck), they
>> interacts in terms of events (synchronized or interleaved) the purpose of
>> interaction is to share their knowledge when there is a synchronized
>> event,
>> each agents has a continuous and discrete behavior during the continuous
>> behavior (at the same state) the knowledge remains the same, during the
>> discrete steps (agent moves from state to another when an event is fired).
>> they update knowledge by adding the shared knowledge (because of the
>> synchronized event) to the previous knowledge of the agent.
>>
>> the implementation is:
>>
>> drive((S1,Y0,Know),(S2,D0,Know1),(S3,X0,Know2),(S4,Z0,Know3),
>> Starttime,Steps,[(S1,S2,S3,S4,Time,Event,D)|R]):-
>>      disturbance(S1,[Y0],[Y],Starttime,Ty,Know),
>>      decay(S2,[D0],[D],Starttime,Td,Know1),
>>      cargo(S3,[X0],[X],Starttime,Tx,Know2),
>>      truck(S4, [Z0],[Z],Starttime,Tz,Know3),
>>      Ty $=Td, Ty $=Tx, Ty $=Tz,Time $=Ty,
>>
>>   % %  S1,2,3,4 represents the state of each agent
>> %% D,Y,X,Z is the values at the end and start of state
>> %% starttime is the start time at state, Td,Tx,Tz the end time at each
>> %state
>> % Know is the knowledge at each state.
>>
>> *
>>
>> check((Event,Shared1,Know),(Event,Shared2,Know1),(Event,Shared3,Know2),(Event,Shared4,Know3)),
>>    *
>>
>>
>> evolve(disturbance,(S1,Y0,Know),(NextS1,YY0,Knowa),Shared1,Starttime,Ty,Event),
>>
>> evolve(decay,(S2,D0,Know1),(NextS2,DD0,Knowb),Shared2,Starttime,Td,Event),
>>
>> evolve(cargo,(S3,X0,Know2),(NextS3,XX0,Knowc),Shared3,Starttime,TX,Event),
>>
>> evolve(truck,(S4,Z0,Know3),(Next
>>
>
>



Received on Thu Oct 22 2015 - 21:01:03 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:30 CEST