Skip to content

Customization: Problems with discrete Variable #239

Answered by blankjul
dymovar96 asked this question in Q&A
Discussion options

You must be logged in to vote

An easy fix for that is to map the variables in the _evaluate function.

Let us say you define the discrete variables [1, 2, 3] and then map 1->10, 2->100, and 3->1000.
This way the algorithm just handles ordered integers, but your problem definition uses them in a non-equidistant manner.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dymovar96
Comment options

Answer selected by dymovar96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants