Jump to content

Louis Carlioz

  • Content Count

  • Joined

  • Last visited

About Louis Carlioz

  • Rank

Profile Information

  • Country
  • Are you University user?

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I would like to get an answer to the same question as well.
  2. Hi Romain, I have been fighting with that beast also. So I am sharing what I am currently using, maybe it can be helpful for you as well. In my application, I can either have no parameters, or an unknown number of parameters (with an unknown number of values). In any case, I want to apply the same actions to all possibilities that are solved. So I have a function that returns a "view" of the situation of my scenario: import collections import itertools def get_index_values_dict(scenario_name): """ Get an ordered dictionary containing the indexes \ of all steps of a scenario and the corresponding \ parameters' values. Index 0 contains the names \ of the parameters. :param scenario_name: name of the Scenario :type scenario_name: string :return: Dictionary containing indexes for all steps and corresponding values :rtype: OrderedDict(index, values) :Example: get_index_values_dict(scenario_name='REFERENCEVALUES') """ # Get all parameters and their values as a dict(param, values) values_parameter = Scenario[scenario_name].getValuesParameter() # Check if there is at least a parameter # otherwise return a dictionary "empty" if values_parameter == {}: index_values_dict = collections.OrderedDict({0: [], 1: []}) return index_values_dict else: # Create a list of lists of values lists_of_values = [] for parameter in values_parameter.keys(): lists_of_values.append(list(values_parameter[parameter])) # Fill index 0 of the ordered dict with the name of the parameters index_values_dict = collections.OrderedDict( {0: values_parameter.keys()}) # Calculate all combinations of parameters' values for values in itertools.product(*lists_of_values): # Get corresponding index of the step matching that combination index = Scenario[scenario_name].getIndexStep( parameterName=index_values_dict[0], parameterValue=list(values)) # Add index value and parameters' values in the dict index_values_dict[index[0]] = list(values) # Return the dict filled with indexes and # corresponding parameters' values return index_values_dict And then inside my main "program", I can easily handle all the steps by doing something like: # STEPS HANDLING # Get all steps indexes and corresponding values index_value_dict = get_index_values_dict(scenario_name) # Loop over all the steps # Skip index 0 since it contains only names of parameters and no values for step in list(index_value_dict.keys())[1:]: Scenario[scenario_name].selectIndexStep(index=step)
  3. I don't know if it's only because of the minor version in 12.3.1, but great job in keeping the previous user settings (and removing the old version and installing the new one instead). Thanks for it!
  4. I faced the same problem many years ago and I tried to solve it but could not really. I was working with regexp to look for pattern at the end of the name of parameters and this is quite easy to manage. The problem thought is then that you need to move all the elements that use H001 to use instead H and this can be cumbersome if you use the parameters in a lot of different things. I never thought of the solution proposed by the support (giving the value of H to H001), but this is in fact easier to achieve. The drawback is that you cannot delete H001 (still) so with many parameters and a lot of flux object, you end up with a mess. However, to make life easier and the system cleaner when you import a flux object, there should be a way of saying that if parameters have the same name and value they should be merged and not duplicated, imho.
  5. Hi, is it possible to simply copy and paste a file or a folder so that when you move from a prior version to a newer version of Flux, you do not have to reconfigure all the options like size of memory, multicore, etc?
  • Create New...