Hi Jakob,

Thanks for the prompt response, it was really helpful.
I find two issues with the save/load approach, plus another issue with the
documentation that I hope you can help me with:
1) referring again to the previous env1 and env2 example: when env2 loads
the state saved from env1, vehicle information is a bit off. For example,
when getting position information from one of the vehicles, the state prior
to been saved reports a position of (101.5000452506627, 95.2), but if I
verify the position after having loaded that specific state file I get a
position of (101.49894165466144, 95.2) for the same vehicle - similarly
happens for other quantities. Do you have any hints on the reason of this
error?
2) After env2 loads the state, I try to step within the simulation of env2.
However, after the simulation step, the _subscriptionMapping gets empty at
field 235, since the read int of the result (after sending the cmd of
CMD_SIMSTEP) is always 0. Do you know what is it causing this problem?
3 - documentation) It seems the docu page of save and load (
https://sumo.dlr.de/docs/Simulation/SaveAndLoad.html) reports two load
options, but there is no def load under tools/traci/_simulation.py

Thank you,
Stefano

On Fri, Mar 10, 2023 at 10:04 AM Jakob Erdmann <namdre.s...@gmail.com>
wrote:

> Please see https://sumo.dlr.de/docs/Simulation/SaveAndLoad.htm
>
> Am Do., 9. März 2023 um 17:14 Uhr schrieb Stefano Bonasera <
> stefano.bonas...@gmail.com>:
>
>> Hello,
>>
>> SUMO version: 1.16
>>
>> I am struggling with the following issue, working on python:
>> I start with two base environments (env1 and env2), randomly initialized,
>> leveraging flow to spawn actors, and with identical road networks. The two
>> envs will have at some point two different configurations of existing
>> actors/env_states - e.g., env1 has 4 actors with specific x_i, y_i
>> locations, velocity (lon and lat), angles, controllers, while env2 has 2
>> actors with different features.
>>
>> At some point in my algo, I want env2 configuration to be identical to
>> env1's one via copying the current configuration/env_state of env1 into
>> env2: following the previous example, the final result would be for env2 to
>> have a configuration with 4 actors, each with features (x_i, y_i locations,
>> velocity (lon and lat), angles, controllers, ...) identical to what env1
>> has at that time.
>>
>> I have tried several approaches to manually removing/adding and moving
>> actors - all unsuccessful since I can change only a limited amount of
>> features of each actor (for example I cannot set the controllers, or the
>> lateral velocity), resulting in two different envs. Are you aware of any
>> solution for replicating env1 configuration/env_state into env2?
>>
>> Thank you so much for taking the time to read my email and for the help
>> in advance.
>>
>> --
>> Kind regards,
>> Stefano.
>> _______________________________________________
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> _______________________________________________
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>


-- 
Kind regards,
Stefano.
_______________________________________________
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to