Multi-Objective Optimizer for Mac

Hello, is there a way to integrate one of the existing grasshopper addons on multi-objective optimisation for Mac? Or maybe anyone knows one, which exists out there?

2 Likes

I had the same question.

First: many multi-objective fitness criteria can be simplified to a single cumulative fitness criteria.

For example, finding a column with minimum weight while fulfilling stress and buckling can be formulated as a single objective using some mathematical functions. I already tested it, LMK if you need details.

Second: AFAIK, there is no multi-objective solver currently available for Grasshopper on macOS. However, it seems that all the optimization plugins for GH are using already existing libraries and are implementing them for GH. So the hard solution would be to do the same and just provide the UI / GH interface for the macOS GH.
However, I have recently stumbled upon the powerful GH optimization plugin Tunny, which is open source. So one could donwload the code and just “modify it a bit” to make it GH macOS compatible. My software knowledge is however very limited (i have only compiled some basic plugin code until now), so maybe @hiron has some thoughts?
Currently, basic Tunny plugin seems to be compatible on the macOS and only the UI seems to not work. Would it be possible to write a cross-platform UI version for the Tunny plugin - maybe using Eto.Forms? From my very limited perspective is seems to be a task with not too much effort and a lot of potential benefit for the macOS Grasshopper community, since it would be the first native MOO plugin for GH on macOS.

Hope this makes sense…

p.s.: I am willing to support this development with my limited software knowledge, probably mainly useful for testing

1 Like

Hi @rudolf.neumerkel

Thanks for your interest in Tunny.
I was not sure how many users there are, so I had to keep Tunny support to Windows only, but if there are requests, I will consider supporting it.
There are two problems with supporting mac.

1
Pythonnet, a library used for optimization, is handled slightly differently on mac and windows.
This is true for other libraries as well, so it’s really not a big problem

2
As you have already pointed out the UI is not compatible. This is currently under development v1.0 new UI is made in WPF and I believe it is possible to make it mac compatible with a few changes.
But the problem is that v1.0 itself is still some time away from completion.

1 Like

I think the demand might already be relatively high, as there currently are no other native MOO plugins available. There already have been tons of requests to other developers. Wallacei for example mentioned that they would support it in the future, but it has not been developed yet.

Regarding 1 & 2, I guess it would be great if an ideally full cross-platform solution could be found with maximum “synergy” in the code. Not sure what the changes to WPF would be to make it Mac compatible, maybe @curtisw has some suggestions on these points?

1 Like

I have found that there is more demand than I thought, so I will consider responding.
This will be a v1 feature, so I am not sure when we will be able to release it, but I will check the library’s support status so that we can support macs when v1 is released.
Sorry if this is difficult in terms of compatibility.

If anyone know of a good cross platform UI library, please let me know.
Would it be Eto?

1 Like

These are amazing news, thanks a lot and let me know if I can support the development or test sth.
AFAIK, Eto was specifically developed with cross-platform compatibility in mind!

I’ve made some progress in my attempts, but the libraries Tunny is using seem to work fine on macs.
The issue is still what to do with the UI.
I am thinking of Eto start with the minimum configuration.

1 Like

Hey @hiron,

Glad to hear it. Please do let us know if you need help getting started with Eto.Forms or transitioning your WPF UI over. A lot of times any MVVM view models can be reused or slightly tweaked to work with Eto UI.

Cheers,
Curtis.

2 Likes

Hi @curtisw, it’s very helpful. Thanks!!

Since I am developing with MVVM, I have created a simple UI for now and will soon be able to see the optimization in action.
I am considering converting WPF to Eto because I used Ribbon for the UI and I don’t think I can bring it to Eto as it is.

3 Likes

Hi @curtisw and @rudolf.neumerkel

I have implemented it to the point where it almost works, but there is one problem.
If you know of a solution, please let me know.

1 Like

@rudolf.neumerkel

Beta for mac version is now available.
It may not work in the first place, but any feedback would be appreciated.

Amazing!

First, where should I post my feedback? In the McNeel forum?

Downloaded Tunny from Github and moved the Tunny-mac_dev as whole to my Library folder - hope that is correct.
When running the example file optimization_with_constraint.gh I get the following error:

Source: Python.Runtime 
Message: No module named 'optuna'

Optuna is provided as a .dll in the Tunny-mac_dev folder, but it seems not to be found. I guess it has to be moved somewhere else?

Also, the interface in darkmode is not legible:

When clicking Optuna dashboard Rhino is currently crashing, but I think this is because of abovemetioned issue.

@rudolf.neumerkel

I was wondering what would happen in an environment other than my own, so the feedback is helpful.

Can you tell me what the contents of the .rhinocode folder looks like?

The following is the folder structure that Tunny assumes.

This is what my folder looks like.

Optuna etc. are all missing, how should I install them?

1 Like

Thanks @rudolf.neumerkel

Your report is very helpful. I have corrected the points that come to mind.
What about the following versions?

Installed the new version.
Still getting the same Optuna error. In the .rhinocode folder Optuna is of course still missing, so the error message makes sense I would say?
Should I install Optuna via the script editor first?