Opened 9 years ago

Closed 8 years ago

#1377 closed enhancement (done)

Enable hiding of parameters

Reported by: swagner Owned by: swagner
Priority: high Milestone: HeuristicLab 3.3.4
Component: Parameters Version: 3.3.4
Keywords: Cc:

Description

It should be possible to hide parameters of an algorithm or problem in order to reduce the complexity of the UI.

Change History (22)

comment:1 Changed 9 years ago by swagner

  • Milestone changed from HeuristicLab 3.3.3 to HeuristicLab 3.3.4

comment:2 Changed 8 years ago by swagner

  • Status changed from new to accepted

comment:3 Changed 8 years ago by swagner

Implemented parameter hiding in r5768.

comment:4 Changed 8 years ago by swagner

Continued implementation of parameter hiding in r5783.

comment:5 Changed 8 years ago by swagner

Set some parameters to hidden per default in r5784.

comment:6 Changed 8 years ago by epitzer

When changing the value of a ConstrainedValueParameter that is currently hidden, an Exception is thrown:

System.NullReferenceException: Object reference not set to an instance of an object.
   at HeuristicLab.Core.Views.ItemCollectionView`1.UpdateListViewItemImage(ListViewItem listViewItem)
   at HeuristicLab.Core.Views.ItemCollectionView`1.Item_ItemImageChanged(Object sender, EventArgs e)
   at HeuristicLab.Parameters.OptionalConstrainedValueParameter`1.OnValueChanged()
   at HeuristicLab.Collections.ObservableSet`1.Add(T item)
   at HeuristicLab.Algorithms.ParticleSwarmOptimization.ParticleSwarmOptimization.UpdateTopologyParameters()
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at HeuristicLab.Parameters.OptionalConstrainedValueParameter`1.OnValueChanged()
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ComboBox.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This can be reproduced by hiding the ParticleUpdater parameter of the PSO and changing the TopologyInitializer.

The problem seems to be the manipulation of GUI elements that are not instantiated at that moment.

comment:7 Changed 8 years ago by swagner

Fixed the bug described by epitzer above in r5839.

comment:8 Changed 8 years ago by mkommend

Please also hide the CopySelected parameter of selection operators.

comment:9 Changed 8 years ago by epitzer

Maybe even LookupParameters should not be hidden in a ResultsCollector as it probably has no other parameters.

comment:10 Changed 8 years ago by swagner

Added flag in ParameterCollectionView to define whether hidden parameters can be edited or not (r5901).

comment:11 follow-up: Changed 8 years ago by gkronber

The "Show/Hide parameters" context menu does not seem to work.

Last edited 8 years ago by gkronber (previous) (diff)

comment:12 in reply to: ↑ 11 ; follow-up: Changed 8 years ago by swagner

Replying to gkronber:

The "Show/Hide parameters" context menu does not seem to work.

Sorry, but I do not notice any problems in r5927. May you give me some more details?

comment:13 in reply to: ↑ 12 Changed 8 years ago by swagner

Replying to swagner:

Replying to gkronber:

The "Show/Hide parameters" context menu does not seem to work.

Sorry, but I do not notice any problems in r5927. May you give me some more details?

Discussed this with mkommend and the problem is that the context menu is always shown, even if no parameter is selected. This is a bit misleading and should be changed.

comment:14 Changed 8 years ago by swagner

Adapted context menu of ParameterCollectionView in r5929.

comment:15 Changed 8 years ago by swagner

r6051:

  • Changed some more parameters to be hidden per default.
  • Fixed wrong layout in some parameter views.

comment:16 Changed 8 years ago by abeham

r6053

  • Added hiding to some more algorithms and problems

comment:17 follow-up: Changed 8 years ago by abeham

I was defining a custom algorithm in the GUI today and was close to run into some problems due to parameter hiding.

E.g. the IntCounter currently hides its ValueParameter, the Placeholder currently hides its OperatorParameter. When you don't know that you're looking for these parameters it will be difficult to do something meaningful with these operators.

The root of the problem is that LookupParameter<T> has set the hidden flag to true by default. This should be reverted.

I would suggest to remain with these two rules:

  • Hide parameters which do not need to be adjusted (e.g. Successor) and which will likely not be wired
  • Hide parameters when wiring them in the problem and algorithm. This works pretty well and hides a lot of the complexity exactly in that situation when its taken care of.
Last edited 8 years ago by abeham (previous) (diff)

comment:18 in reply to: ↑ 17 Changed 8 years ago by swagner

Replying to abeham:

I was defining a custom algorithm in the GUI today and was close to run into some problems due to parameter hiding.

E.g. the IntCounter currently hides its ValueParameter, the Placeholder currently hides its OperatorParameter. When you don't know that you're looking for these parameters it will be difficult to do something meaningful with these operators.

The root of the problem is that LookupParameter<T> has set the hidden flag to true by default. This should be reverted.

I would suggest to remain with these two rules:

  • Hide parameters which do not need to be adjusted (e.g. Successor) and which will likely not be wired
  • Hide parameters when wiring them in the problem and algorithm. This works pretty well and hides a lot of the complexity exactly in that situation when its taken care of.

You are right. Hiding all LookupParameters per default is not the best idea. However, as the problems you described only occur when modeling custom algorithms, I will move this issue to the 3.3.5 milestone.

comment:19 Changed 8 years ago by swagner

Hid ReplacedSelectorParameter and SelectedSelectorParameter in RandomReplacer and WorstReplacer as their values are predefined and should not be changed (r6091).

comment:20 Changed 8 years ago by swagner

Created follow-up ticket #1502.

comment:21 Changed 8 years ago by swagner

  • Status changed from accepted to readytorelease

comment:22 Changed 8 years ago by swagner

  • Resolution set to done
  • Status changed from readytorelease to closed
  • Version changed from 3.3.2 to 3.3.4
Note: See TracTickets for help on using tickets.