SlaybaughLab / Coeus

Energy Tuning Assembly Design and Optimization Tool
2 stars 0 forks source link

Add User Defined Constraints #13

Open jamesbevins opened 6 years ago

jamesbevins commented 6 years ago

I think the way to do this is by having a constraints module. We can have some built in constraint check (like weight, thresholds, etc), and we can have the ability for the user to build their own in the module based on reading from a tally output (or where ever). The input would then require the user to specify the function name and any required parameters (ex tally number).

jamesbevins commented 6 years ago

Issue with pre-defining a semi-requirement to modify source code?

jamesbevins commented 6 years ago

each constraint is one line in gnowee_settings.csv. a list of some sort that saves all the constraints that are read in. Read in each constraint in gnowee_settings.py. each constraint is made up of one function, one number, and a tally number. inside calc_fitness in gnowee_settings.py is where it will call each of these constraint bundle and checks them.

jamesbevins commented 6 years ago

Created a constraints module. It is just an outline, but it is a start. The methods can be used to replace the current calculations being done in Calc_Fitness. I kept it on the objfunc branch.