Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Modelica.Icons.{RotationalSensor, TranslationalSensor} #3016

Merged
merged 2 commits into from
Jul 18, 2019

Conversation

beutlich
Copy link
Member

@beutlich beutlich commented Jul 1, 2019

Closes #340.

@beutlich beutlich added L: Icons Issue addresses Modelica.Icons task General work that is not related to a bug or feature labels Jul 1, 2019
@beutlich beutlich added this to the MSL4.0.0 milestone Jul 1, 2019
@beutlich beutlich self-assigned this Jul 1, 2019
@beutlich beutlich requested review from dietmarw and christiankral and removed request for christiankral July 6, 2019 08:54
Copy link
Contributor

@christiankral christiankral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I checkout the branch abeutlich:rename-icons I cannot find the the guidelines of sensor design added in f0a841a and b8dfa02. These guidelines contain a modelica:// link to the round and rectangular sensor icon, so I suppose these links have to be updated as well.

@beutlich beutlich requested a review from AHaumer July 7, 2019 14:54
Copy link
Contributor

@tobolar tobolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stumble a bit about the naming of the icons. As I stated in #2301 (comment), I rather prefer to follow the Indexing rules decribed e.g. in https://www.asindexing.org/best-indexing-practices. Following that rules, a subheading (round, rectangular) shall be predeceased by a main heading (sensor). The suggested names follow indeed reverse order.

I know there is no such rule defined in MSL, but even in the Modelica.Icons package itself, there can be found both approaches - simply compare names of "package" icons to those of "type" icons.
So my recommendation is to use SensorRectangular instead of RectangularSensor (and similarly for RoundSensor.

As I know this could trigger a large discussion (which is fine), I only leave my concern as a comment.


partial class TranslationalSensor
partial class RectangularSensor
"Icon representing a linear measurement device"
Copy link
Contributor

@tobolar tobolar Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The element's desription (and documentation) shall be modified accordingly. Whereby the RoundSensor is "Icon representing a round measurement device", the RectangularSensor is "... a linear measurement device".

To be really honest, is is not clear at all when to use which icon for a sensor component. Neither it is described in Modelica.UsersGuide.Conventions.Icons.

A link to Modelica.UsersGuide.Conventions.Icons shall be established in the documentation of the two sensor icons as well.

@@ -931,7 +931,7 @@ Conversion test for <a href=\"https://github.com/modelica/ModelicaStandardLibrar

package Icons
extends Modelica.Icons.ExamplesPackage;
model Issue813 "Conversion test for #813"
model Issue340 "Conversion test for #340"
Copy link
Contributor

@tobolar tobolar Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not this concern both 813 and 340 issues?

@christiankral
Copy link
Contributor

christiankral commented Jul 9, 2019

Some examples: * = current implementation

Main first Main second
SensorVoltage VoltageSensor *
VoltageSignal SignalVoltage *
SensorRound RoundSensor *
DiodeIdeal IdealDiode *
MachineInduction InductionMachine *
ThermalPortTransformer * TransformerThermalPort
ElectroMagneticConverterSinglePhase SinglePhaseElectroMagneticConverter *
AdaptorAngleToTorque AngleToTorqueAdaptor *

@christiankral
Copy link
Contributor

I stumble a bit about the naming of the icons. As I stated in #2301 (comment), I rather prefer to follow the Indexing rules decribed e.g. in https://www.asindexing.org/wp-content/uploads/2014/04/ASI-BestPracticesIndexing2015-linked-updated-copyright-v3-02-26-16.pdf. Following that rules, a subheading (round, rectangular) shall be predeceased by a main heading (sensor). The suggested names follow indeed reverse order.

Is there a membership required to access the PDF file provided by the link above? I get the following error message when trying to access the PDF file: Error 404 - Page not found!

@christiankral
Copy link
Contributor

christiankral commented Jul 10, 2019

The new notation would require to rename most of the actual class names. So someone familiar with the structure of the MSL, will not recognize it any more after the re-design. So I am not convinced that this is the right way to go. However, even though I could live with most of the new names, the class name MachineInduction sounds definitely a lot too crazy to me. In case of the electric machines a hierarchical structure could solve the naming problem, somehow:

  • Machines.Induction.SquirrelCage
  • Machines.Induction.SlipRing
  • Machines.Synchronous.PermanentMagnet
  • Machines.Synchronous.ElectricalExcited
  • Machines.Synchronous.ReluctanceRotor

In the very same way, for example, sources could be structured as:

  • Analog.Sources.Voltage.Signal
  • Analog.Sources.Voltage.Constant
  • Analog.Sources.Current.Signal
  • Analog.Sources.Current.Constant
    etc.

I think it were difficult to decide when a new package shall be introduced. Are two machine models enough? So the structuring would also change the existing hierarchy of the MSL a lot. To me it seems to be a an overkill, too.

@tobolar
Copy link
Contributor

tobolar commented Jul 11, 2019

Is there a membership required...

No idea why the link is not working. Please find the pdf via https://www.asindexing.org/best-indexing-practices.

@tobolar
Copy link
Contributor

tobolar commented Jul 11, 2019

@christiankral

In case of the electric machines a hierarchical structure could solve the naming problem,...

This would definitely be the consequence. But I agree it would require too much effort. So let us just make a notice of this.

@AHaumer
Copy link
Contributor

AHaumer commented Jul 15, 2019

Please stop this discussion ... I'm strictly agianst such crazy things like
Machines.Induction.SquirrelCage or Analog.Sources.Voltage.Signal

@tobolar tobolar requested review from tobolar and removed request for tobolar July 16, 2019 15:04
@christiankral
Copy link
Contributor

@AHaumer This PR does not introduce any crazy namings. This PR sticks to the existing naming conventions. So you can just go ahead regularly review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Icons Issue addresses Modelica.Icons task General work that is not related to a bug or feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename and remove icons from Modelica.Icons
4 participants